aws-sdk-datasync 1.58.0

AWS SDK for AWS DataSync
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 UpdateDiscoveryJobInput {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.</p>
    pub discovery_job_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)</p>
    pub collection_duration_minutes: ::std::option::Option<i32>,
}
impl UpdateDiscoveryJobInput {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.</p>
    pub fn discovery_job_arn(&self) -> ::std::option::Option<&str> {
        self.discovery_job_arn.as_deref()
    }
    /// <p>Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)</p>
    pub fn collection_duration_minutes(&self) -> ::std::option::Option<i32> {
        self.collection_duration_minutes
    }
}
impl UpdateDiscoveryJobInput {
    /// Creates a new builder-style object to manufacture [`UpdateDiscoveryJobInput`](crate::operation::update_discovery_job::UpdateDiscoveryJobInput).
    pub fn builder() -> crate::operation::update_discovery_job::builders::UpdateDiscoveryJobInputBuilder {
        crate::operation::update_discovery_job::builders::UpdateDiscoveryJobInputBuilder::default()
    }
}

/// A builder for [`UpdateDiscoveryJobInput`](crate::operation::update_discovery_job::UpdateDiscoveryJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDiscoveryJobInputBuilder {
    pub(crate) discovery_job_arn: ::std::option::Option<::std::string::String>,
    pub(crate) collection_duration_minutes: ::std::option::Option<i32>,
}
impl UpdateDiscoveryJobInputBuilder {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.</p>
    /// This field is required.
    pub fn discovery_job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.discovery_job_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.</p>
    pub fn set_discovery_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.discovery_job_arn = input;
        self
    }
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to update.</p>
    pub fn get_discovery_job_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.discovery_job_arn
    }
    /// <p>Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)</p>
    /// This field is required.
    pub fn collection_duration_minutes(mut self, input: i32) -> Self {
        self.collection_duration_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)</p>
    pub fn set_collection_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.collection_duration_minutes = input;
        self
    }
    /// <p>Specifies in minutes how long that you want the discovery job to run. (You can't set this parameter to less than the number of minutes that the job has already run for.)</p>
    pub fn get_collection_duration_minutes(&self) -> &::std::option::Option<i32> {
        &self.collection_duration_minutes
    }
    /// Consumes the builder and constructs a [`UpdateDiscoveryJobInput`](crate::operation::update_discovery_job::UpdateDiscoveryJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_discovery_job::UpdateDiscoveryJobInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_discovery_job::UpdateDiscoveryJobInput {
            discovery_job_arn: self.discovery_job_arn,
            collection_duration_minutes: self.collection_duration_minutes,
        })
    }
}