aws-sdk-m2 1.98.0

AWS SDK for AWSMainframeModernization
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 StartBatchJobInput {
    /// <p>The unique identifier of the application associated with this batch job.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the batch job.</p>
    pub batch_job_identifier: ::std::option::Option<crate::types::BatchJobIdentifier>,
    /// <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
    pub job_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
    pub auth_secrets_manager_arn: ::std::option::Option<::std::string::String>,
}
impl StartBatchJobInput {
    /// <p>The unique identifier of the application associated with this batch job.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier of the batch job.</p>
    pub fn batch_job_identifier(&self) -> ::std::option::Option<&crate::types::BatchJobIdentifier> {
        self.batch_job_identifier.as_ref()
    }
    /// <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
    pub fn job_params(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.job_params.as_ref()
    }
    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
    pub fn auth_secrets_manager_arn(&self) -> ::std::option::Option<&str> {
        self.auth_secrets_manager_arn.as_deref()
    }
}
impl StartBatchJobInput {
    /// Creates a new builder-style object to manufacture [`StartBatchJobInput`](crate::operation::start_batch_job::StartBatchJobInput).
    pub fn builder() -> crate::operation::start_batch_job::builders::StartBatchJobInputBuilder {
        crate::operation::start_batch_job::builders::StartBatchJobInputBuilder::default()
    }
}

/// A builder for [`StartBatchJobInput`](crate::operation::start_batch_job::StartBatchJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartBatchJobInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) batch_job_identifier: ::std::option::Option<crate::types::BatchJobIdentifier>,
    pub(crate) job_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) auth_secrets_manager_arn: ::std::option::Option<::std::string::String>,
}
impl StartBatchJobInputBuilder {
    /// <p>The unique identifier of the application associated with this batch job.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the application associated with this batch job.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The unique identifier of the application associated with this batch job.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The unique identifier of the batch job.</p>
    /// This field is required.
    pub fn batch_job_identifier(mut self, input: crate::types::BatchJobIdentifier) -> Self {
        self.batch_job_identifier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unique identifier of the batch job.</p>
    pub fn set_batch_job_identifier(mut self, input: ::std::option::Option<crate::types::BatchJobIdentifier>) -> Self {
        self.batch_job_identifier = input;
        self
    }
    /// <p>The unique identifier of the batch job.</p>
    pub fn get_batch_job_identifier(&self) -> &::std::option::Option<crate::types::BatchJobIdentifier> {
        &self.batch_job_identifier
    }
    /// Adds a key-value pair to `job_params`.
    ///
    /// To override the contents of this collection use [`set_job_params`](Self::set_job_params).
    ///
    /// <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
    pub fn job_params(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.job_params.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.job_params = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
    pub fn set_job_params(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.job_params = input;
        self
    }
    /// <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
    pub fn get_job_params(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.job_params
    }
    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
    pub fn auth_secrets_manager_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auth_secrets_manager_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
    pub fn set_auth_secrets_manager_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auth_secrets_manager_arn = input;
        self
    }
    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</p>
    pub fn get_auth_secrets_manager_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.auth_secrets_manager_arn
    }
    /// Consumes the builder and constructs a [`StartBatchJobInput`](crate::operation::start_batch_job::StartBatchJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_batch_job::StartBatchJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_batch_job::StartBatchJobInput {
            application_id: self.application_id,
            batch_job_identifier: self.batch_job_identifier,
            job_params: self.job_params,
            auth_secrets_manager_arn: self.auth_secrets_manager_arn,
        })
    }
}