Skip to main content

OrderedJob

Struct OrderedJob 

Source
#[non_exhaustive]
pub struct OrderedJob { pub step_id: String, pub labels: HashMap<String, String>, pub scheduling: Option<JobScheduling>, pub prerequisite_step_ids: Vec<String>, pub job_type: Option<JobType>, /* private fields */ }
Expand description

A job executed by the workflow.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§step_id: String

Required. The step id. The id must be unique among all jobs within the template.

The step id is used as prefix for job id, as job goog-dataproc-workflow-step-id label, and in prerequisiteStepIds field from other steps.

The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.

§labels: HashMap<String, String>

Optional. The labels to associate with this job.

Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}

Label values must be between 1 and 63 characters long, and must conform to the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 32 labels can be associated with a given job.

§scheduling: Option<JobScheduling>

Optional. Job scheduling configuration.

§prerequisite_step_ids: Vec<String>

Optional. The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow.

§job_type: Option<JobType>

Required. The job definition.

Implementations§

Source§

impl OrderedJob

Source

pub fn new() -> Self

Source

pub fn set_step_id<T: Into<String>>(self, v: T) -> Self

Sets the value of step_id.

§Example
let x = OrderedJob::new().set_step_id("example");
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = OrderedJob::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_scheduling<T>(self, v: T) -> Self
where T: Into<JobScheduling>,

Sets the value of scheduling.

§Example
use google_cloud_dataproc_v1::model::JobScheduling;
let x = OrderedJob::new().set_scheduling(JobScheduling::default()/* use setters */);
Source

pub fn set_or_clear_scheduling<T>(self, v: Option<T>) -> Self
where T: Into<JobScheduling>,

Sets or clears the value of scheduling.

§Example
use google_cloud_dataproc_v1::model::JobScheduling;
let x = OrderedJob::new().set_or_clear_scheduling(Some(JobScheduling::default()/* use setters */));
let x = OrderedJob::new().set_or_clear_scheduling(None::<JobScheduling>);
Source

pub fn set_prerequisite_step_ids<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of prerequisite_step_ids.

§Example
let x = OrderedJob::new().set_prerequisite_step_ids(["a", "b", "c"]);
Source

pub fn set_job_type<T: Into<Option<JobType>>>(self, v: T) -> Self

Sets the value of job_type.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::HadoopJob;
let x = OrderedJob::new().set_job_type(Some(
    google_cloud_dataproc_v1::model::ordered_job::JobType::HadoopJob(HadoopJob::default().into())));
Source

pub fn hadoop_job(&self) -> Option<&Box<HadoopJob>>

The value of job_type if it holds a HadoopJob, None if the field is not set or holds a different branch.

Source

pub fn set_hadoop_job<T: Into<Box<HadoopJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a HadoopJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::HadoopJob;
let x = OrderedJob::new().set_hadoop_job(HadoopJob::default()/* use setters */);
assert!(x.hadoop_job().is_some());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn spark_job(&self) -> Option<&Box<SparkJob>>

The value of job_type if it holds a SparkJob, None if the field is not set or holds a different branch.

Source

pub fn set_spark_job<T: Into<Box<SparkJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a SparkJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::SparkJob;
let x = OrderedJob::new().set_spark_job(SparkJob::default()/* use setters */);
assert!(x.spark_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn pyspark_job(&self) -> Option<&Box<PySparkJob>>

The value of job_type if it holds a PysparkJob, None if the field is not set or holds a different branch.

Source

pub fn set_pyspark_job<T: Into<Box<PySparkJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a PysparkJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::PySparkJob;
let x = OrderedJob::new().set_pyspark_job(PySparkJob::default()/* use setters */);
assert!(x.pyspark_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn hive_job(&self) -> Option<&Box<HiveJob>>

The value of job_type if it holds a HiveJob, None if the field is not set or holds a different branch.

Source

pub fn set_hive_job<T: Into<Box<HiveJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a HiveJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::HiveJob;
let x = OrderedJob::new().set_hive_job(HiveJob::default()/* use setters */);
assert!(x.hive_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn pig_job(&self) -> Option<&Box<PigJob>>

The value of job_type if it holds a PigJob, None if the field is not set or holds a different branch.

Source

pub fn set_pig_job<T: Into<Box<PigJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a PigJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::PigJob;
let x = OrderedJob::new().set_pig_job(PigJob::default()/* use setters */);
assert!(x.pig_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn spark_r_job(&self) -> Option<&Box<SparkRJob>>

The value of job_type if it holds a SparkRJob, None if the field is not set or holds a different branch.

Source

pub fn set_spark_r_job<T: Into<Box<SparkRJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a SparkRJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::SparkRJob;
let x = OrderedJob::new().set_spark_r_job(SparkRJob::default()/* use setters */);
assert!(x.spark_r_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn spark_sql_job(&self) -> Option<&Box<SparkSqlJob>>

The value of job_type if it holds a SparkSqlJob, None if the field is not set or holds a different branch.

Source

pub fn set_spark_sql_job<T: Into<Box<SparkSqlJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a SparkSqlJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::SparkSqlJob;
let x = OrderedJob::new().set_spark_sql_job(SparkSqlJob::default()/* use setters */);
assert!(x.spark_sql_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn presto_job(&self) -> Option<&Box<PrestoJob>>

The value of job_type if it holds a PrestoJob, None if the field is not set or holds a different branch.

Source

pub fn set_presto_job<T: Into<Box<PrestoJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a PrestoJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::PrestoJob;
let x = OrderedJob::new().set_presto_job(PrestoJob::default()/* use setters */);
assert!(x.presto_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.trino_job().is_none());
assert!(x.flink_job().is_none());
Source

pub fn trino_job(&self) -> Option<&Box<TrinoJob>>

The value of job_type if it holds a TrinoJob, None if the field is not set or holds a different branch.

Source

pub fn set_trino_job<T: Into<Box<TrinoJob>>>(self, v: T) -> Self

Sets the value of job_type to hold a TrinoJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::TrinoJob;
let x = OrderedJob::new().set_trino_job(TrinoJob::default()/* use setters */);
assert!(x.trino_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.flink_job().is_none());

The value of job_type if it holds a FlinkJob, None if the field is not set or holds a different branch.

Sets the value of job_type to hold a FlinkJob.

Note that all the setters affecting job_type are mutually exclusive.

§Example
use google_cloud_dataproc_v1::model::FlinkJob;
let x = OrderedJob::new().set_flink_job(FlinkJob::default()/* use setters */);
assert!(x.flink_job().is_some());
assert!(x.hadoop_job().is_none());
assert!(x.spark_job().is_none());
assert!(x.pyspark_job().is_none());
assert!(x.hive_job().is_none());
assert!(x.pig_job().is_none());
assert!(x.spark_r_job().is_none());
assert!(x.spark_sql_job().is_none());
assert!(x.presto_job().is_none());
assert!(x.trino_job().is_none());

Trait Implementations§

Source§

impl Clone for OrderedJob

Source§

fn clone(&self) -> OrderedJob

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderedJob

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OrderedJob

Source§

fn default() -> OrderedJob

Returns the “default value” for a type. Read more
Source§

impl Message for OrderedJob

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for OrderedJob

Source§

fn eq(&self, other: &OrderedJob) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OrderedJob

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,