aws-sdk-storagegateway 1.115.0

AWS SDK for AWS Storage Gateway
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>JoinDomainInput</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct JoinDomainInput {
    /// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub gateway_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the domain that you want the gateway to join.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.</p>
    pub organizational_unit: ::std::option::Option<::std::string::String>,
    /// <p>List of IP addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example, <code>mydc.mydomain.com:389</code>.</p><note>
    /// <p>S3 File Gateway supports IPv6 addresses in addition to IPv4 and other existing formats.</p>
    /// <p>FSx File Gateway does not support IPv6.</p>
    /// </note>
    pub domain_controllers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Specifies the time in seconds, in which the <code>JoinDomain</code> operation must complete. The default is 20 seconds.</p>
    pub timeout_in_seconds: ::std::option::Option<i32>,
    /// <p>Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.</p>
    pub user_name: ::std::option::Option<::std::string::String>,
    /// <p>Sets the password of the user who has permission to add the gateway to the Active Directory domain.</p>
    pub password: ::std::option::Option<::std::string::String>,
}
impl JoinDomainInput {
    /// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn gateway_arn(&self) -> ::std::option::Option<&str> {
        self.gateway_arn.as_deref()
    }
    /// <p>The name of the domain that you want the gateway to join.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.</p>
    pub fn organizational_unit(&self) -> ::std::option::Option<&str> {
        self.organizational_unit.as_deref()
    }
    /// <p>List of IP addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example, <code>mydc.mydomain.com:389</code>.</p><note>
    /// <p>S3 File Gateway supports IPv6 addresses in addition to IPv4 and other existing formats.</p>
    /// <p>FSx File Gateway does not support IPv6.</p>
    /// </note>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.domain_controllers.is_none()`.
    pub fn domain_controllers(&self) -> &[::std::string::String] {
        self.domain_controllers.as_deref().unwrap_or_default()
    }
    /// <p>Specifies the time in seconds, in which the <code>JoinDomain</code> operation must complete. The default is 20 seconds.</p>
    pub fn timeout_in_seconds(&self) -> ::std::option::Option<i32> {
        self.timeout_in_seconds
    }
    /// <p>Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.</p>
    pub fn user_name(&self) -> ::std::option::Option<&str> {
        self.user_name.as_deref()
    }
    /// <p>Sets the password of the user who has permission to add the gateway to the Active Directory domain.</p>
    pub fn password(&self) -> ::std::option::Option<&str> {
        self.password.as_deref()
    }
}
impl ::std::fmt::Debug for JoinDomainInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("JoinDomainInput");
        formatter.field("gateway_arn", &self.gateway_arn);
        formatter.field("domain_name", &self.domain_name);
        formatter.field("organizational_unit", &self.organizational_unit);
        formatter.field("domain_controllers", &self.domain_controllers);
        formatter.field("timeout_in_seconds", &self.timeout_in_seconds);
        formatter.field("user_name", &self.user_name);
        formatter.field("password", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl JoinDomainInput {
    /// Creates a new builder-style object to manufacture [`JoinDomainInput`](crate::operation::join_domain::JoinDomainInput).
    pub fn builder() -> crate::operation::join_domain::builders::JoinDomainInputBuilder {
        crate::operation::join_domain::builders::JoinDomainInputBuilder::default()
    }
}

/// A builder for [`JoinDomainInput`](crate::operation::join_domain::JoinDomainInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct JoinDomainInputBuilder {
    pub(crate) gateway_arn: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) organizational_unit: ::std::option::Option<::std::string::String>,
    pub(crate) domain_controllers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) timeout_in_seconds: ::std::option::Option<i32>,
    pub(crate) user_name: ::std::option::Option<::std::string::String>,
    pub(crate) password: ::std::option::Option<::std::string::String>,
}
impl JoinDomainInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    /// This field is required.
    pub fn gateway_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.gateway_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn set_gateway_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn get_gateway_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_arn
    }
    /// <p>The name of the domain that you want the gateway to join.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the domain that you want the gateway to join.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The name of the domain that you want the gateway to join.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.</p>
    pub fn organizational_unit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organizational_unit = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.</p>
    pub fn set_organizational_unit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organizational_unit = input;
        self
    }
    /// <p>The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.</p>
    pub fn get_organizational_unit(&self) -> &::std::option::Option<::std::string::String> {
        &self.organizational_unit
    }
    /// Appends an item to `domain_controllers`.
    ///
    /// To override the contents of this collection use [`set_domain_controllers`](Self::set_domain_controllers).
    ///
    /// <p>List of IP addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example, <code>mydc.mydomain.com:389</code>.</p><note>
    /// <p>S3 File Gateway supports IPv6 addresses in addition to IPv4 and other existing formats.</p>
    /// <p>FSx File Gateway does not support IPv6.</p>
    /// </note>
    pub fn domain_controllers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.domain_controllers.unwrap_or_default();
        v.push(input.into());
        self.domain_controllers = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of IP addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example, <code>mydc.mydomain.com:389</code>.</p><note>
    /// <p>S3 File Gateway supports IPv6 addresses in addition to IPv4 and other existing formats.</p>
    /// <p>FSx File Gateway does not support IPv6.</p>
    /// </note>
    pub fn set_domain_controllers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.domain_controllers = input;
        self
    }
    /// <p>List of IP addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example, <code>mydc.mydomain.com:389</code>.</p><note>
    /// <p>S3 File Gateway supports IPv6 addresses in addition to IPv4 and other existing formats.</p>
    /// <p>FSx File Gateway does not support IPv6.</p>
    /// </note>
    pub fn get_domain_controllers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.domain_controllers
    }
    /// <p>Specifies the time in seconds, in which the <code>JoinDomain</code> operation must complete. The default is 20 seconds.</p>
    pub fn timeout_in_seconds(mut self, input: i32) -> Self {
        self.timeout_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the time in seconds, in which the <code>JoinDomain</code> operation must complete. The default is 20 seconds.</p>
    pub fn set_timeout_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.timeout_in_seconds = input;
        self
    }
    /// <p>Specifies the time in seconds, in which the <code>JoinDomain</code> operation must complete. The default is 20 seconds.</p>
    pub fn get_timeout_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.timeout_in_seconds
    }
    /// <p>Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.</p>
    /// This field is required.
    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.</p>
    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_name = input;
        self
    }
    /// <p>Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.</p>
    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_name
    }
    /// <p>Sets the password of the user who has permission to add the gateway to the Active Directory domain.</p>
    /// This field is required.
    pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.password = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Sets the password of the user who has permission to add the gateway to the Active Directory domain.</p>
    pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.password = input;
        self
    }
    /// <p>Sets the password of the user who has permission to add the gateway to the Active Directory domain.</p>
    pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
        &self.password
    }
    /// Consumes the builder and constructs a [`JoinDomainInput`](crate::operation::join_domain::JoinDomainInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::join_domain::JoinDomainInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::join_domain::JoinDomainInput {
            gateway_arn: self.gateway_arn,
            domain_name: self.domain_name,
            organizational_unit: self.organizational_unit,
            domain_controllers: self.domain_controllers,
            timeout_in_seconds: self.timeout_in_seconds,
            user_name: self.user_name,
            password: self.password,
        })
    }
}
impl ::std::fmt::Debug for JoinDomainInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("JoinDomainInputBuilder");
        formatter.field("gateway_arn", &self.gateway_arn);
        formatter.field("domain_name", &self.domain_name);
        formatter.field("organizational_unit", &self.organizational_unit);
        formatter.field("domain_controllers", &self.domain_controllers);
        formatter.field("timeout_in_seconds", &self.timeout_in_seconds);
        formatter.field("user_name", &self.user_name);
        formatter.field("password", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}