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 StopDiscoveryJobInput {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to stop.</p>
    pub discovery_job_arn: ::std::option::Option<::std::string::String>,
}
impl StopDiscoveryJobInput {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to stop.</p>
    pub fn discovery_job_arn(&self) -> ::std::option::Option<&str> {
        self.discovery_job_arn.as_deref()
    }
}
impl StopDiscoveryJobInput {
    /// Creates a new builder-style object to manufacture [`StopDiscoveryJobInput`](crate::operation::stop_discovery_job::StopDiscoveryJobInput).
    pub fn builder() -> crate::operation::stop_discovery_job::builders::StopDiscoveryJobInputBuilder {
        crate::operation::stop_discovery_job::builders::StopDiscoveryJobInputBuilder::default()
    }
}

/// A builder for [`StopDiscoveryJobInput`](crate::operation::stop_discovery_job::StopDiscoveryJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopDiscoveryJobInputBuilder {
    pub(crate) discovery_job_arn: ::std::option::Option<::std::string::String>,
}
impl StopDiscoveryJobInputBuilder {
    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that you want to stop.</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 stop.</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 stop.</p>
    pub fn get_discovery_job_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.discovery_job_arn
    }
    /// Consumes the builder and constructs a [`StopDiscoveryJobInput`](crate::operation::stop_discovery_job::StopDiscoveryJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::stop_discovery_job::StopDiscoveryJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_discovery_job::StopDiscoveryJobInput {
            discovery_job_arn: self.discovery_job_arn,
        })
    }
}