aws-sdk-efs 0.27.0

AWS SDK for Amazon Elastic File System
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 CreateReplicationConfigurationOutput {
    /// <p>The ID of the source Amazon EFS file system that is being replicated.</p>
    #[doc(hidden)]
    pub source_file_system_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Web Services Region in which the source Amazon EFS file system is located.</p>
    #[doc(hidden)]
    pub source_file_system_region: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the current source file system in the replication configuration.</p>
    #[doc(hidden)]
    pub source_file_system_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.</p>
    #[doc(hidden)]
    pub original_source_file_system_arn: std::option::Option<std::string::String>,
    /// <p>Describes when the replication configuration was created.</p>
    #[doc(hidden)]
    pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>An array of destination objects. Only one destination object is supported.</p>
    #[doc(hidden)]
    pub destinations: std::option::Option<std::vec::Vec<crate::types::Destination>>,
    _request_id: Option<String>,
}
impl CreateReplicationConfigurationOutput {
    /// <p>The ID of the source Amazon EFS file system that is being replicated.</p>
    pub fn source_file_system_id(&self) -> std::option::Option<&str> {
        self.source_file_system_id.as_deref()
    }
    /// <p>The Amazon Web Services Region in which the source Amazon EFS file system is located.</p>
    pub fn source_file_system_region(&self) -> std::option::Option<&str> {
        self.source_file_system_region.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the current source file system in the replication configuration.</p>
    pub fn source_file_system_arn(&self) -> std::option::Option<&str> {
        self.source_file_system_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.</p>
    pub fn original_source_file_system_arn(&self) -> std::option::Option<&str> {
        self.original_source_file_system_arn.as_deref()
    }
    /// <p>Describes when the replication configuration was created.</p>
    pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>An array of destination objects. Only one destination object is supported.</p>
    pub fn destinations(&self) -> std::option::Option<&[crate::types::Destination]> {
        self.destinations.as_deref()
    }
}
impl aws_http::request_id::RequestId for CreateReplicationConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateReplicationConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`CreateReplicationConfigurationOutput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput).
    pub fn builder() -> crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationOutputBuilder{
        crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationOutputBuilder::default()
    }
}

/// A builder for [`CreateReplicationConfigurationOutput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateReplicationConfigurationOutputBuilder {
    pub(crate) source_file_system_id: std::option::Option<std::string::String>,
    pub(crate) source_file_system_region: std::option::Option<std::string::String>,
    pub(crate) source_file_system_arn: std::option::Option<std::string::String>,
    pub(crate) original_source_file_system_arn: std::option::Option<std::string::String>,
    pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
    pub(crate) destinations: std::option::Option<std::vec::Vec<crate::types::Destination>>,
    _request_id: Option<String>,
}
impl CreateReplicationConfigurationOutputBuilder {
    /// <p>The ID of the source Amazon EFS file system that is being replicated.</p>
    pub fn source_file_system_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.source_file_system_id = Some(input.into());
        self
    }
    /// <p>The ID of the source Amazon EFS file system that is being replicated.</p>
    pub fn set_source_file_system_id(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.source_file_system_id = input;
        self
    }
    /// <p>The Amazon Web Services Region in which the source Amazon EFS file system is located.</p>
    pub fn source_file_system_region(mut self, input: impl Into<std::string::String>) -> Self {
        self.source_file_system_region = Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region in which the source Amazon EFS file system is located.</p>
    pub fn set_source_file_system_region(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.source_file_system_region = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the current source file system in the replication configuration.</p>
    pub fn source_file_system_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.source_file_system_arn = Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the current source file system in the replication configuration.</p>
    pub fn set_source_file_system_arn(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.source_file_system_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.</p>
    pub fn original_source_file_system_arn(
        mut self,
        input: impl Into<std::string::String>,
    ) -> Self {
        self.original_source_file_system_arn = Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the original source Amazon EFS file system in the replication configuration.</p>
    pub fn set_original_source_file_system_arn(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.original_source_file_system_arn = input;
        self
    }
    /// <p>Describes when the replication configuration was created.</p>
    pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
        self.creation_time = Some(input);
        self
    }
    /// <p>Describes when the replication configuration was created.</p>
    pub fn set_creation_time(
        mut self,
        input: std::option::Option<aws_smithy_types::DateTime>,
    ) -> Self {
        self.creation_time = input;
        self
    }
    /// Appends an item to `destinations`.
    ///
    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
    ///
    /// <p>An array of destination objects. Only one destination object is supported.</p>
    pub fn destinations(mut self, input: crate::types::Destination) -> Self {
        let mut v = self.destinations.unwrap_or_default();
        v.push(input);
        self.destinations = Some(v);
        self
    }
    /// <p>An array of destination objects. Only one destination object is supported.</p>
    pub fn set_destinations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Destination>>,
    ) -> Self {
        self.destinations = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateReplicationConfigurationOutput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput).
    pub fn build(
        self,
    ) -> crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput
    {
        crate::operation::create_replication_configuration::CreateReplicationConfigurationOutput {
            source_file_system_id: self.source_file_system_id,
            source_file_system_region: self.source_file_system_region,
            source_file_system_arn: self.source_file_system_arn,
            original_source_file_system_arn: self.original_source_file_system_arn,
            creation_time: self.creation_time,
            destinations: self.destinations,
            _request_id: self._request_id,
        }
    }
}