Struct aws_sdk_config::model::account_aggregation_source::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for AccountAggregationSource.
Implementations§
source§impl Builder
impl Builder
sourcepub fn account_ids(self, input: impl Into<String>) -> Self
pub fn account_ids(self, input: impl Into<String>) -> Self
Appends an item to account_ids.
To override the contents of this collection use set_account_ids.
The 12-digit account ID of the account being aggregated.
sourcepub fn set_account_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_account_ids(self, input: Option<Vec<String>>) -> Self
The 12-digit account ID of the account being aggregated.
Examples found in repository?
src/json_deser.rs (lines 14995-14997)
14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032
pub(crate) fn deser_structure_crate_model_account_aggregation_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AccountAggregationSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::account_aggregation_source::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"AccountIds" => {
builder = builder.set_account_ids(
crate::json_deser::deser_list_com_amazonaws_configservice_account_aggregation_source_account_list(tokens)?
);
}
"AllAwsRegions" => {
builder = builder.set_all_aws_regions(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AwsRegions" => {
builder = builder.set_aws_regions(
crate::json_deser::deser_list_com_amazonaws_configservice_aggregator_region_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn all_aws_regions(self, input: bool) -> Self
pub fn all_aws_regions(self, input: bool) -> Self
If true, aggregate existing Config regions and future regions.
sourcepub fn set_all_aws_regions(self, input: Option<bool>) -> Self
pub fn set_all_aws_regions(self, input: Option<bool>) -> Self
If true, aggregate existing Config regions and future regions.
Examples found in repository?
src/json_deser.rs (lines 15000-15004)
14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032
pub(crate) fn deser_structure_crate_model_account_aggregation_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AccountAggregationSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::account_aggregation_source::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"AccountIds" => {
builder = builder.set_account_ids(
crate::json_deser::deser_list_com_amazonaws_configservice_account_aggregation_source_account_list(tokens)?
);
}
"AllAwsRegions" => {
builder = builder.set_all_aws_regions(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AwsRegions" => {
builder = builder.set_aws_regions(
crate::json_deser::deser_list_com_amazonaws_configservice_aggregator_region_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn aws_regions(self, input: impl Into<String>) -> Self
pub fn aws_regions(self, input: impl Into<String>) -> Self
Appends an item to aws_regions.
To override the contents of this collection use set_aws_regions.
The source regions being aggregated.
sourcepub fn set_aws_regions(self, input: Option<Vec<String>>) -> Self
pub fn set_aws_regions(self, input: Option<Vec<String>>) -> Self
The source regions being aggregated.
Examples found in repository?
src/json_deser.rs (lines 15007-15009)
14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032
pub(crate) fn deser_structure_crate_model_account_aggregation_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AccountAggregationSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::account_aggregation_source::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"AccountIds" => {
builder = builder.set_account_ids(
crate::json_deser::deser_list_com_amazonaws_configservice_account_aggregation_source_account_list(tokens)?
);
}
"AllAwsRegions" => {
builder = builder.set_all_aws_regions(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AwsRegions" => {
builder = builder.set_aws_regions(
crate::json_deser::deser_list_com_amazonaws_configservice_aggregator_region_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> AccountAggregationSource
pub fn build(self) -> AccountAggregationSource
Consumes the builder and constructs a AccountAggregationSource.
Examples found in repository?
src/json_deser.rs (line 15024)
14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032
pub(crate) fn deser_structure_crate_model_account_aggregation_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AccountAggregationSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::account_aggregation_source::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"AccountIds" => {
builder = builder.set_account_ids(
crate::json_deser::deser_list_com_amazonaws_configservice_account_aggregation_source_account_list(tokens)?
);
}
"AllAwsRegions" => {
builder = builder.set_all_aws_regions(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"AwsRegions" => {
builder = builder.set_aws_regions(
crate::json_deser::deser_list_com_amazonaws_configservice_aggregator_region_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}