aws-sdk-deadline 1.100.0

AWS SDK for AWSDeadlineCloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchUpdateJobInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The list of jobs to update. You can specify up to 100 jobs per request.</p>
    pub jobs: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdateJobItem>>,
}
impl BatchUpdateJobInput {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The list of jobs to update. You can specify up to 100 jobs per request.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.jobs.is_none()`.
    pub fn jobs(&self) -> &[crate::types::BatchUpdateJobItem] {
        self.jobs.as_deref().unwrap_or_default()
    }
}
impl BatchUpdateJobInput {
    /// Creates a new builder-style object to manufacture [`BatchUpdateJobInput`](crate::operation::batch_update_job::BatchUpdateJobInput).
    pub fn builder() -> crate::operation::batch_update_job::builders::BatchUpdateJobInputBuilder {
        crate::operation::batch_update_job::builders::BatchUpdateJobInputBuilder::default()
    }
}

/// A builder for [`BatchUpdateJobInput`](crate::operation::batch_update_job::BatchUpdateJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchUpdateJobInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) jobs: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdateJobItem>>,
}
impl BatchUpdateJobInputBuilder {
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Appends an item to `jobs`.
    ///
    /// To override the contents of this collection use [`set_jobs`](Self::set_jobs).
    ///
    /// <p>The list of jobs to update. You can specify up to 100 jobs per request.</p>
    pub fn jobs(mut self, input: crate::types::BatchUpdateJobItem) -> Self {
        let mut v = self.jobs.unwrap_or_default();
        v.push(input);
        self.jobs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of jobs to update. You can specify up to 100 jobs per request.</p>
    pub fn set_jobs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdateJobItem>>) -> Self {
        self.jobs = input;
        self
    }
    /// <p>The list of jobs to update. You can specify up to 100 jobs per request.</p>
    pub fn get_jobs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchUpdateJobItem>> {
        &self.jobs
    }
    /// Consumes the builder and constructs a [`BatchUpdateJobInput`](crate::operation::batch_update_job::BatchUpdateJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_update_job::BatchUpdateJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_update_job::BatchUpdateJobInput {
            client_token: self.client_token,
            jobs: self.jobs,
        })
    }
}