aws-sdk-uxc 1.5.0

AWS SDK for AWS User Experience Customization
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 UpdateAccountCustomizationsInput {
    /// <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
    pub account_color: ::std::option::Option<crate::types::AccountColor>,
    /// <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub visible_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
    pub visible_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateAccountCustomizationsInput {
    /// <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
    pub fn account_color(&self) -> ::std::option::Option<&crate::types::AccountColor> {
        self.account_color.as_ref()
    }
    /// <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.visible_services.is_none()`.
    pub fn visible_services(&self) -> &[::std::string::String] {
        self.visible_services.as_deref().unwrap_or_default()
    }
    /// <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.visible_regions.is_none()`.
    pub fn visible_regions(&self) -> &[::std::string::String] {
        self.visible_regions.as_deref().unwrap_or_default()
    }
}
impl UpdateAccountCustomizationsInput {
    /// Creates a new builder-style object to manufacture [`UpdateAccountCustomizationsInput`](crate::operation::update_account_customizations::UpdateAccountCustomizationsInput).
    pub fn builder() -> crate::operation::update_account_customizations::builders::UpdateAccountCustomizationsInputBuilder {
        crate::operation::update_account_customizations::builders::UpdateAccountCustomizationsInputBuilder::default()
    }
}

/// A builder for [`UpdateAccountCustomizationsInput`](crate::operation::update_account_customizations::UpdateAccountCustomizationsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAccountCustomizationsInputBuilder {
    pub(crate) account_color: ::std::option::Option<crate::types::AccountColor>,
    pub(crate) visible_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) visible_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateAccountCustomizationsInputBuilder {
    /// <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
    pub fn account_color(mut self, input: crate::types::AccountColor) -> Self {
        self.account_color = ::std::option::Option::Some(input);
        self
    }
    /// <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
    pub fn set_account_color(mut self, input: ::std::option::Option<crate::types::AccountColor>) -> Self {
        self.account_color = input;
        self
    }
    /// <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
    pub fn get_account_color(&self) -> &::std::option::Option<crate::types::AccountColor> {
        &self.account_color
    }
    /// Appends an item to `visible_services`.
    ///
    /// To override the contents of this collection use [`set_visible_services`](Self::set_visible_services).
    ///
    /// <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn visible_services(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.visible_services.unwrap_or_default();
        v.push(input.into());
        self.visible_services = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn set_visible_services(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.visible_services = input;
        self
    }
    /// <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn get_visible_services(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.visible_services
    }
    /// Appends an item to `visible_regions`.
    ///
    /// To override the contents of this collection use [`set_visible_regions`](Self::set_visible_regions).
    ///
    /// <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
    pub fn visible_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.visible_regions.unwrap_or_default();
        v.push(input.into());
        self.visible_regions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
    pub fn set_visible_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.visible_regions = input;
        self
    }
    /// <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
    pub fn get_visible_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.visible_regions
    }
    /// Consumes the builder and constructs a [`UpdateAccountCustomizationsInput`](crate::operation::update_account_customizations::UpdateAccountCustomizationsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_account_customizations::UpdateAccountCustomizationsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_account_customizations::UpdateAccountCustomizationsInput {
            account_color: self.account_color,
            visible_services: self.visible_services,
            visible_regions: self.visible_regions,
        })
    }
}