#[non_exhaustive]pub struct Task {
pub name: String,
pub uid: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub description: String,
pub display_name: String,
pub state: State,
pub labels: HashMap<String, String>,
pub trigger_spec: Option<TriggerSpec>,
pub execution_spec: Option<ExecutionSpec>,
pub execution_status: Option<ExecutionStatus>,
pub config: Option<Config>,
/* private fields */
}Expand description
A task represents a user-visible job.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}.
uid: StringOutput only. System generated globally unique ID for the task. This ID will be different if the task is deleted and re-created with the same name.
create_time: Option<Timestamp>Output only. The time when the task was created.
update_time: Option<Timestamp>Output only. The time when the task was last updated.
description: StringOptional. Description of the task.
display_name: StringOptional. User friendly display name.
state: StateOutput only. Current state of the task.
labels: HashMap<String, String>Optional. User-defined labels for the task.
trigger_spec: Option<TriggerSpec>Required. Spec related to how often and when a task should be triggered.
execution_spec: Option<ExecutionSpec>Required. Spec related to how a task is executed.
execution_status: Option<ExecutionStatus>Output only. Status of the latest task executions.
config: Option<Config>Task template specific user-specified config.
Implementations§
Source§impl Task
impl Task
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_trigger_spec<T>(self, v: T) -> Selfwhere
T: Into<TriggerSpec>,
pub fn set_trigger_spec<T>(self, v: T) -> Selfwhere
T: Into<TriggerSpec>,
Sets the value of trigger_spec.
Sourcepub fn set_or_clear_trigger_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<TriggerSpec>,
pub fn set_or_clear_trigger_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<TriggerSpec>,
Sets or clears the value of trigger_spec.
Sourcepub fn set_execution_spec<T>(self, v: T) -> Selfwhere
T: Into<ExecutionSpec>,
pub fn set_execution_spec<T>(self, v: T) -> Selfwhere
T: Into<ExecutionSpec>,
Sets the value of execution_spec.
Sourcepub fn set_or_clear_execution_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExecutionSpec>,
pub fn set_or_clear_execution_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExecutionSpec>,
Sets or clears the value of execution_spec.
Sourcepub fn set_execution_status<T>(self, v: T) -> Selfwhere
T: Into<ExecutionStatus>,
pub fn set_execution_status<T>(self, v: T) -> Selfwhere
T: Into<ExecutionStatus>,
Sets the value of execution_status.
Sourcepub fn set_or_clear_execution_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExecutionStatus>,
pub fn set_or_clear_execution_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ExecutionStatus>,
Sets or clears the value of execution_status.
Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
Sets the value of config.
Note that all the setters affecting config are mutually
exclusive.
Sourcepub fn spark(&self) -> Option<&Box<SparkTaskConfig>>
pub fn spark(&self) -> Option<&Box<SparkTaskConfig>>
The value of config
if it holds a Spark, None if the field is not set or
holds a different branch.
Sourcepub fn set_spark<T: Into<Box<SparkTaskConfig>>>(self, v: T) -> Self
pub fn set_spark<T: Into<Box<SparkTaskConfig>>>(self, v: T) -> Self
Sets the value of config
to hold a Spark.
Note that all the setters affecting config are
mutually exclusive.
Sourcepub fn notebook(&self) -> Option<&Box<NotebookTaskConfig>>
pub fn notebook(&self) -> Option<&Box<NotebookTaskConfig>>
The value of config
if it holds a Notebook, None if the field is not set or
holds a different branch.
Sourcepub fn set_notebook<T: Into<Box<NotebookTaskConfig>>>(self, v: T) -> Self
pub fn set_notebook<T: Into<Box<NotebookTaskConfig>>>(self, v: T) -> Self
Sets the value of config
to hold a Notebook.
Note that all the setters affecting config are
mutually exclusive.