aws-sdk-datazone 1.137.0

AWS SDK for Amazon DataZone
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)]
pub struct CreateAccountPoolInput {
    /// <p>The ID of the domain where the account pool is created.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the account pool.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the account pool.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The mechanism used to resolve the account selection from the account pool.</p>
    pub resolution_strategy: ::std::option::Option<crate::types::ResolutionStrategy>,
    /// <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.</p>
    pub account_source: ::std::option::Option<crate::types::AccountSource>,
}
impl CreateAccountPoolInput {
    /// <p>The ID of the domain where the account pool is created.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The name of the account pool.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the account pool.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The mechanism used to resolve the account selection from the account pool.</p>
    pub fn resolution_strategy(&self) -> ::std::option::Option<&crate::types::ResolutionStrategy> {
        self.resolution_strategy.as_ref()
    }
    /// <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.</p>
    pub fn account_source(&self) -> ::std::option::Option<&crate::types::AccountSource> {
        self.account_source.as_ref()
    }
}
impl ::std::fmt::Debug for CreateAccountPoolInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAccountPoolInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("resolution_strategy", &self.resolution_strategy);
        formatter.field("account_source", &self.account_source);
        formatter.finish()
    }
}
impl CreateAccountPoolInput {
    /// Creates a new builder-style object to manufacture [`CreateAccountPoolInput`](crate::operation::create_account_pool::CreateAccountPoolInput).
    pub fn builder() -> crate::operation::create_account_pool::builders::CreateAccountPoolInputBuilder {
        crate::operation::create_account_pool::builders::CreateAccountPoolInputBuilder::default()
    }
}

/// A builder for [`CreateAccountPoolInput`](crate::operation::create_account_pool::CreateAccountPoolInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAccountPoolInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) resolution_strategy: ::std::option::Option<crate::types::ResolutionStrategy>,
    pub(crate) account_source: ::std::option::Option<crate::types::AccountSource>,
}
impl CreateAccountPoolInputBuilder {
    /// <p>The ID of the domain where the account pool is created.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain where the account pool is created.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the domain where the account pool is created.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The name of the account pool.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the account pool.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the account pool.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the account pool.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the account pool.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the account pool.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The mechanism used to resolve the account selection from the account pool.</p>
    /// This field is required.
    pub fn resolution_strategy(mut self, input: crate::types::ResolutionStrategy) -> Self {
        self.resolution_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The mechanism used to resolve the account selection from the account pool.</p>
    pub fn set_resolution_strategy(mut self, input: ::std::option::Option<crate::types::ResolutionStrategy>) -> Self {
        self.resolution_strategy = input;
        self
    }
    /// <p>The mechanism used to resolve the account selection from the account pool.</p>
    pub fn get_resolution_strategy(&self) -> &::std::option::Option<crate::types::ResolutionStrategy> {
        &self.resolution_strategy
    }
    /// <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.</p>
    /// This field is required.
    pub fn account_source(mut self, input: crate::types::AccountSource) -> Self {
        self.account_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.</p>
    pub fn set_account_source(mut self, input: ::std::option::Option<crate::types::AccountSource>) -> Self {
        self.account_source = input;
        self
    }
    /// <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.</p>
    pub fn get_account_source(&self) -> &::std::option::Option<crate::types::AccountSource> {
        &self.account_source
    }
    /// Consumes the builder and constructs a [`CreateAccountPoolInput`](crate::operation::create_account_pool::CreateAccountPoolInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_account_pool::CreateAccountPoolInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_account_pool::CreateAccountPoolInput {
            domain_identifier: self.domain_identifier,
            name: self.name,
            description: self.description,
            resolution_strategy: self.resolution_strategy,
            account_source: self.account_source,
        })
    }
}
impl ::std::fmt::Debug for CreateAccountPoolInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAccountPoolInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("resolution_strategy", &self.resolution_strategy);
        formatter.field("account_source", &self.account_source);
        formatter.finish()
    }
}