#[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
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.
§Example
use wkt::Timestamp;
let x = Task::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Task::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Task::new().set_or_clear_create_time(None::<Timestamp>);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.
§Example
use wkt::Timestamp;
let x = Task::new().set_update_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Task::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Task::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
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.
§Example
use google_cloud_dataplex_v1::model::task::TriggerSpec;
let x = Task::new().set_trigger_spec(TriggerSpec::default()/* use setters */);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.
§Example
use google_cloud_dataplex_v1::model::task::TriggerSpec;
let x = Task::new().set_or_clear_trigger_spec(Some(TriggerSpec::default()/* use setters */));
let x = Task::new().set_or_clear_trigger_spec(None::<TriggerSpec>);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.
§Example
use google_cloud_dataplex_v1::model::task::ExecutionSpec;
let x = Task::new().set_execution_spec(ExecutionSpec::default()/* use setters */);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.
§Example
use google_cloud_dataplex_v1::model::task::ExecutionSpec;
let x = Task::new().set_or_clear_execution_spec(Some(ExecutionSpec::default()/* use setters */));
let x = Task::new().set_or_clear_execution_spec(None::<ExecutionSpec>);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.
§Example
use google_cloud_dataplex_v1::model::task::ExecutionStatus;
let x = Task::new().set_execution_status(ExecutionStatus::default()/* use setters */);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.
§Example
use google_cloud_dataplex_v1::model::task::ExecutionStatus;
let x = Task::new().set_or_clear_execution_status(Some(ExecutionStatus::default()/* use setters */));
let x = Task::new().set_or_clear_execution_status(None::<ExecutionStatus>);Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
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.
§Example
use google_cloud_dataplex_v1::model::task::SparkTaskConfig;
let x = Task::new().set_spark(SparkTaskConfig::default()/* use setters */);
assert!(x.spark().is_some());
assert!(x.notebook().is_none());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.
§Example
use google_cloud_dataplex_v1::model::task::NotebookTaskConfig;
let x = Task::new().set_notebook(NotebookTaskConfig::default()/* use setters */);
assert!(x.notebook().is_some());
assert!(x.spark().is_none());Trait Implementations§
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request