aws-sdk-directory 1.69.0

AWS SDK for AWS Directory Service
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 AddRegionInput {
    /// <p>The identifier of the directory to which you want to add Region replication.</p>
    pub directory_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
    pub region_name: ::std::option::Option<::std::string::String>,
    /// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
    pub vpc_settings: ::std::option::Option<crate::types::DirectoryVpcSettings>,
}
impl AddRegionInput {
    /// <p>The identifier of the directory to which you want to add Region replication.</p>
    pub fn directory_id(&self) -> ::std::option::Option<&str> {
        self.directory_id.as_deref()
    }
    /// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
    pub fn region_name(&self) -> ::std::option::Option<&str> {
        self.region_name.as_deref()
    }
    /// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
    pub fn vpc_settings(&self) -> ::std::option::Option<&crate::types::DirectoryVpcSettings> {
        self.vpc_settings.as_ref()
    }
}
impl AddRegionInput {
    /// Creates a new builder-style object to manufacture [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
    pub fn builder() -> crate::operation::add_region::builders::AddRegionInputBuilder {
        crate::operation::add_region::builders::AddRegionInputBuilder::default()
    }
}

/// A builder for [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddRegionInputBuilder {
    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
    pub(crate) region_name: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_settings: ::std::option::Option<crate::types::DirectoryVpcSettings>,
}
impl AddRegionInputBuilder {
    /// <p>The identifier of the directory to which you want to add Region replication.</p>
    /// This field is required.
    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.directory_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the directory to which you want to add Region replication.</p>
    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.directory_id = input;
        self
    }
    /// <p>The identifier of the directory to which you want to add Region replication.</p>
    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.directory_id
    }
    /// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
    /// This field is required.
    pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
    pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region_name = input;
        self
    }
    /// <p>The name of the Region where you want to add domain controllers for replication. For example, <code>us-east-1</code>.</p>
    pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.region_name
    }
    /// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
    /// This field is required.
    pub fn vpc_settings(mut self, input: crate::types::DirectoryVpcSettings) -> Self {
        self.vpc_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
    pub fn set_vpc_settings(mut self, input: ::std::option::Option<crate::types::DirectoryVpcSettings>) -> Self {
        self.vpc_settings = input;
        self
    }
    /// <p>Contains VPC information for the <code>CreateDirectory</code> or <code>CreateMicrosoftAD</code> operation.</p>
    pub fn get_vpc_settings(&self) -> &::std::option::Option<crate::types::DirectoryVpcSettings> {
        &self.vpc_settings
    }
    /// Consumes the builder and constructs a [`AddRegionInput`](crate::operation::add_region::AddRegionInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::add_region::AddRegionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::add_region::AddRegionInput {
            directory_id: self.directory_id,
            region_name: self.region_name,
            vpc_settings: self.vpc_settings,
        })
    }
}