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 GetAccountPoolOutput {
    /// <p>The ID of the domain in which the account pool lives whose details are to be displayed.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the account pool.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the account pool.</p>
    pub id: ::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>,
    /// <p>The user who created the account pool.</p>
    pub created_by: ::std::string::String,
    /// <p>The timestamp at which the account pool was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp at which the account pool was last updated.</p>
    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The user who last updated the account pool.</p>
    pub updated_by: ::std::option::Option<::std::string::String>,
    /// <p>The domain unit ID of the account pool.</p>
    pub domain_unit_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAccountPoolOutput {
    /// <p>The ID of the domain in which the account pool lives whose details are to be displayed.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>The name of the account pool.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the account pool.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.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()
    }
    /// <p>The user who created the account pool.</p>
    pub fn created_by(&self) -> &str {
        use std::ops::Deref;
        self.created_by.deref()
    }
    /// <p>The timestamp at which the account pool was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The timestamp at which the account pool was last updated.</p>
    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
    /// <p>The user who last updated the account pool.</p>
    pub fn updated_by(&self) -> ::std::option::Option<&str> {
        self.updated_by.as_deref()
    }
    /// <p>The domain unit ID of the account pool.</p>
    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
        self.domain_unit_id.as_deref()
    }
}
impl ::std::fmt::Debug for GetAccountPoolOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetAccountPoolOutput");
        formatter.field("domain_id", &self.domain_id);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("id", &self.id);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("resolution_strategy", &self.resolution_strategy);
        formatter.field("account_source", &self.account_source);
        formatter.field("created_by", &self.created_by);
        formatter.field("created_at", &self.created_at);
        formatter.field("last_updated_at", &self.last_updated_at);
        formatter.field("updated_by", &self.updated_by);
        formatter.field("domain_unit_id", &self.domain_unit_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetAccountPoolOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAccountPoolOutput {
    /// Creates a new builder-style object to manufacture [`GetAccountPoolOutput`](crate::operation::get_account_pool::GetAccountPoolOutput).
    pub fn builder() -> crate::operation::get_account_pool::builders::GetAccountPoolOutputBuilder {
        crate::operation::get_account_pool::builders::GetAccountPoolOutputBuilder::default()
    }
}

/// A builder for [`GetAccountPoolOutput`](crate::operation::get_account_pool::GetAccountPoolOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetAccountPoolOutputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) id: ::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>,
    pub(crate) created_by: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_by: ::std::option::Option<::std::string::String>,
    pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAccountPoolOutputBuilder {
    /// <p>The ID of the domain in which the account pool lives whose details are to be displayed.</p>
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain in which the account pool lives whose details are to be displayed.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The ID of the domain in which the account pool lives whose details are to be displayed.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>The name of the account pool.</p>
    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 ID of the account pool.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the account pool.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the account pool.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <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>
    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
    }
    /// <p>The user who created the account pool.</p>
    /// This field is required.
    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user who created the account pool.</p>
    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by = input;
        self
    }
    /// <p>The user who created the account pool.</p>
    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by
    }
    /// <p>The timestamp at which the account pool was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp at which the account pool was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The timestamp at which the account pool was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The timestamp at which the account pool was last updated.</p>
    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp at which the account pool was last updated.</p>
    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_at = input;
        self
    }
    /// <p>The timestamp at which the account pool was last updated.</p>
    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_at
    }
    /// <p>The user who last updated the account pool.</p>
    pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.updated_by = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user who last updated the account pool.</p>
    pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.updated_by = input;
        self
    }
    /// <p>The user who last updated the account pool.</p>
    pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.updated_by
    }
    /// <p>The domain unit ID of the account pool.</p>
    pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_unit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain unit ID of the account pool.</p>
    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_unit_id = input;
        self
    }
    /// <p>The domain unit ID of the account pool.</p>
    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_unit_id
    }
    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 [`GetAccountPoolOutput`](crate::operation::get_account_pool::GetAccountPoolOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`created_by`](crate::operation::get_account_pool::builders::GetAccountPoolOutputBuilder::created_by)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_account_pool::GetAccountPoolOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_account_pool::GetAccountPoolOutput {
            domain_id: self.domain_id,
            name: self.name,
            id: self.id,
            description: self.description,
            resolution_strategy: self.resolution_strategy,
            account_source: self.account_source,
            created_by: self.created_by.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_by",
                    "created_by was not specified but it is required when building GetAccountPoolOutput",
                )
            })?,
            created_at: self.created_at,
            last_updated_at: self.last_updated_at,
            updated_by: self.updated_by,
            domain_unit_id: self.domain_unit_id,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GetAccountPoolOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetAccountPoolOutputBuilder");
        formatter.field("domain_id", &self.domain_id);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("id", &self.id);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("resolution_strategy", &self.resolution_strategy);
        formatter.field("account_source", &self.account_source);
        formatter.field("created_by", &self.created_by);
        formatter.field("created_at", &self.created_at);
        formatter.field("last_updated_at", &self.last_updated_at);
        formatter.field("updated_by", &self.updated_by);
        formatter.field("domain_unit_id", &self.domain_unit_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}