aws-sdk-databrew 1.92.0

AWS SDK for AWS Glue DataBrew
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 UpdateRecipeJobInput {
    /// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
    pub encryption_key_arn: ::std::option::Option<::std::string::String>,
    /// <p>The encryption mode for the job, which can be one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
    /// <li>
    /// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
    /// </ul>
    pub encryption_mode: ::std::option::Option<crate::types::EncryptionMode>,
    /// <p>The name of the job to update.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
    pub log_subscription: ::std::option::Option<crate::types::LogSubscription>,
    /// <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
    pub max_capacity: ::std::option::Option<i32>,
    /// <p>The maximum number of times to retry the job after a job run fails.</p>
    pub max_retries: ::std::option::Option<i32>,
    /// <p>One or more artifacts that represent the output from running the job.</p>
    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
    /// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
    pub data_catalog_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>,
    /// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
    pub database_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>,
    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
    pub timeout: ::std::option::Option<i32>,
}
impl UpdateRecipeJobInput {
    /// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
    pub fn encryption_key_arn(&self) -> ::std::option::Option<&str> {
        self.encryption_key_arn.as_deref()
    }
    /// <p>The encryption mode for the job, which can be one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
    /// <li>
    /// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
    /// </ul>
    pub fn encryption_mode(&self) -> ::std::option::Option<&crate::types::EncryptionMode> {
        self.encryption_mode.as_ref()
    }
    /// <p>The name of the job to update.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
    pub fn log_subscription(&self) -> ::std::option::Option<&crate::types::LogSubscription> {
        self.log_subscription.as_ref()
    }
    /// <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
    pub fn max_capacity(&self) -> ::std::option::Option<i32> {
        self.max_capacity
    }
    /// <p>The maximum number of times to retry the job after a job run fails.</p>
    pub fn max_retries(&self) -> ::std::option::Option<i32> {
        self.max_retries
    }
    /// <p>One or more artifacts that represent the output from running the job.</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 `.outputs.is_none()`.
    pub fn outputs(&self) -> &[crate::types::Output] {
        self.outputs.as_deref().unwrap_or_default()
    }
    /// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</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 `.data_catalog_outputs.is_none()`.
    pub fn data_catalog_outputs(&self) -> &[crate::types::DataCatalogOutput] {
        self.data_catalog_outputs.as_deref().unwrap_or_default()
    }
    /// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</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 `.database_outputs.is_none()`.
    pub fn database_outputs(&self) -> &[crate::types::DatabaseOutput] {
        self.database_outputs.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
    pub fn timeout(&self) -> ::std::option::Option<i32> {
        self.timeout
    }
}
impl UpdateRecipeJobInput {
    /// Creates a new builder-style object to manufacture [`UpdateRecipeJobInput`](crate::operation::update_recipe_job::UpdateRecipeJobInput).
    pub fn builder() -> crate::operation::update_recipe_job::builders::UpdateRecipeJobInputBuilder {
        crate::operation::update_recipe_job::builders::UpdateRecipeJobInputBuilder::default()
    }
}

/// A builder for [`UpdateRecipeJobInput`](crate::operation::update_recipe_job::UpdateRecipeJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateRecipeJobInputBuilder {
    pub(crate) encryption_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_mode: ::std::option::Option<crate::types::EncryptionMode>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) log_subscription: ::std::option::Option<crate::types::LogSubscription>,
    pub(crate) max_capacity: ::std::option::Option<i32>,
    pub(crate) max_retries: ::std::option::Option<i32>,
    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
    pub(crate) data_catalog_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>,
    pub(crate) database_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) timeout: ::std::option::Option<i32>,
}
impl UpdateRecipeJobInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
    pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encryption_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
    pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encryption_key_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
    pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.encryption_key_arn
    }
    /// <p>The encryption mode for the job, which can be one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
    /// <li>
    /// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
    /// </ul>
    pub fn encryption_mode(mut self, input: crate::types::EncryptionMode) -> Self {
        self.encryption_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encryption mode for the job, which can be one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
    /// <li>
    /// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
    /// </ul>
    pub fn set_encryption_mode(mut self, input: ::std::option::Option<crate::types::EncryptionMode>) -> Self {
        self.encryption_mode = input;
        self
    }
    /// <p>The encryption mode for the job, which can be one of the following:</p>
    /// <ul>
    /// <li>
    /// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
    /// <li>
    /// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
    /// </ul>
    pub fn get_encryption_mode(&self) -> &::std::option::Option<crate::types::EncryptionMode> {
        &self.encryption_mode
    }
    /// <p>The name of the job to update.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the job to update.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the job to update.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
    pub fn log_subscription(mut self, input: crate::types::LogSubscription) -> Self {
        self.log_subscription = ::std::option::Option::Some(input);
        self
    }
    /// <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
    pub fn set_log_subscription(mut self, input: ::std::option::Option<crate::types::LogSubscription>) -> Self {
        self.log_subscription = input;
        self
    }
    /// <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
    pub fn get_log_subscription(&self) -> &::std::option::Option<crate::types::LogSubscription> {
        &self.log_subscription
    }
    /// <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
    pub fn max_capacity(mut self, input: i32) -> Self {
        self.max_capacity = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
    pub fn set_max_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_capacity = input;
        self
    }
    /// <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
    pub fn get_max_capacity(&self) -> &::std::option::Option<i32> {
        &self.max_capacity
    }
    /// <p>The maximum number of times to retry the job after a job run fails.</p>
    pub fn max_retries(mut self, input: i32) -> Self {
        self.max_retries = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of times to retry the job after a job run fails.</p>
    pub fn set_max_retries(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_retries = input;
        self
    }
    /// <p>The maximum number of times to retry the job after a job run fails.</p>
    pub fn get_max_retries(&self) -> &::std::option::Option<i32> {
        &self.max_retries
    }
    /// Appends an item to `outputs`.
    ///
    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
    ///
    /// <p>One or more artifacts that represent the output from running the job.</p>
    pub fn outputs(mut self, input: crate::types::Output) -> Self {
        let mut v = self.outputs.unwrap_or_default();
        v.push(input);
        self.outputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more artifacts that represent the output from running the job.</p>
    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Output>>) -> Self {
        self.outputs = input;
        self
    }
    /// <p>One or more artifacts that represent the output from running the job.</p>
    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Output>> {
        &self.outputs
    }
    /// Appends an item to `data_catalog_outputs`.
    ///
    /// To override the contents of this collection use [`set_data_catalog_outputs`](Self::set_data_catalog_outputs).
    ///
    /// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
    pub fn data_catalog_outputs(mut self, input: crate::types::DataCatalogOutput) -> Self {
        let mut v = self.data_catalog_outputs.unwrap_or_default();
        v.push(input);
        self.data_catalog_outputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
    pub fn set_data_catalog_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>) -> Self {
        self.data_catalog_outputs = input;
        self
    }
    /// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
    pub fn get_data_catalog_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>> {
        &self.data_catalog_outputs
    }
    /// Appends an item to `database_outputs`.
    ///
    /// To override the contents of this collection use [`set_database_outputs`](Self::set_database_outputs).
    ///
    /// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
    pub fn database_outputs(mut self, input: crate::types::DatabaseOutput) -> Self {
        let mut v = self.database_outputs.unwrap_or_default();
        v.push(input);
        self.database_outputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
    pub fn set_database_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>) -> Self {
        self.database_outputs = input;
        self
    }
    /// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
    pub fn get_database_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>> {
        &self.database_outputs
    }
    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
    pub fn timeout(mut self, input: i32) -> Self {
        self.timeout = ::std::option::Option::Some(input);
        self
    }
    /// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        self.timeout = input;
        self
    }
    /// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
        &self.timeout
    }
    /// Consumes the builder and constructs a [`UpdateRecipeJobInput`](crate::operation::update_recipe_job::UpdateRecipeJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_recipe_job::UpdateRecipeJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_recipe_job::UpdateRecipeJobInput {
            encryption_key_arn: self.encryption_key_arn,
            encryption_mode: self.encryption_mode,
            name: self.name,
            log_subscription: self.log_subscription,
            max_capacity: self.max_capacity,
            max_retries: self.max_retries,
            outputs: self.outputs,
            data_catalog_outputs: self.data_catalog_outputs,
            database_outputs: self.database_outputs,
            role_arn: self.role_arn,
            timeout: self.timeout,
        })
    }
}