1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// 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,
})
}
}