Struct aws_sdk_backup::model::control_scope::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ControlScope
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn compliance_resource_ids(self, input: impl Into<String>) -> Self
pub fn compliance_resource_ids(self, input: impl Into<String>) -> Self
Appends an item to compliance_resource_ids
.
To override the contents of this collection use set_compliance_resource_ids
.
The ID of the only Amazon Web Services resource that you want your control scope to contain.
sourcepub fn set_compliance_resource_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_compliance_resource_ids(self, input: Option<Vec<String>>) -> Self
The ID of the only Amazon Web Services resource that you want your control scope to contain.
Examples found in repository?
7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044
pub(crate) fn deser_structure_crate_model_control_scope<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::ControlScope>, 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::control_scope::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() {
"ComplianceResourceIds" => {
builder = builder.set_compliance_resource_ids(
crate::json_deser::deser_list_com_amazonaws_backup_compliance_resource_id_list(tokens)?
);
}
"ComplianceResourceTypes" => {
builder = builder.set_compliance_resource_types(
crate::json_deser::deser_list_com_amazonaws_backup_resource_type_list(tokens)?
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_map_com_amazonaws_backup_string_map(
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 compliance_resource_types(self, input: impl Into<String>) -> Self
pub fn compliance_resource_types(self, input: impl Into<String>) -> Self
Appends an item to compliance_resource_types
.
To override the contents of this collection use set_compliance_resource_types
.
Describes whether the control scope includes one or more types of resources, such as EFS
or RDS
.
sourcepub fn set_compliance_resource_types(self, input: Option<Vec<String>>) -> Self
pub fn set_compliance_resource_types(self, input: Option<Vec<String>>) -> Self
Describes whether the control scope includes one or more types of resources, such as EFS
or RDS
.
Examples found in repository?
7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044
pub(crate) fn deser_structure_crate_model_control_scope<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::ControlScope>, 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::control_scope::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() {
"ComplianceResourceIds" => {
builder = builder.set_compliance_resource_ids(
crate::json_deser::deser_list_com_amazonaws_backup_compliance_resource_id_list(tokens)?
);
}
"ComplianceResourceTypes" => {
builder = builder.set_compliance_resource_types(
crate::json_deser::deser_list_com_amazonaws_backup_resource_type_list(tokens)?
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_map_com_amazonaws_backup_string_map(
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",
),
),
}
}
Adds a key-value pair to tags
.
To override the contents of this collection use set_tags
.
The tag key-value pair applied to those Amazon Web Services resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. The tag value is optional, but it cannot be an empty string. The structure to assign a tag is: [{"Key":"string","Value":"string"}]
.
The tag key-value pair applied to those Amazon Web Services resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. The tag value is optional, but it cannot be an empty string. The structure to assign a tag is: [{"Key":"string","Value":"string"}]
.
Examples found in repository?
7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044
pub(crate) fn deser_structure_crate_model_control_scope<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::ControlScope>, 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::control_scope::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() {
"ComplianceResourceIds" => {
builder = builder.set_compliance_resource_ids(
crate::json_deser::deser_list_com_amazonaws_backup_compliance_resource_id_list(tokens)?
);
}
"ComplianceResourceTypes" => {
builder = builder.set_compliance_resource_types(
crate::json_deser::deser_list_com_amazonaws_backup_resource_type_list(tokens)?
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_map_com_amazonaws_backup_string_map(
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) -> ControlScope
pub fn build(self) -> ControlScope
Consumes the builder and constructs a ControlScope
.
Examples found in repository?
7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044
pub(crate) fn deser_structure_crate_model_control_scope<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::ControlScope>, 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::control_scope::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() {
"ComplianceResourceIds" => {
builder = builder.set_compliance_resource_ids(
crate::json_deser::deser_list_com_amazonaws_backup_compliance_resource_id_list(tokens)?
);
}
"ComplianceResourceTypes" => {
builder = builder.set_compliance_resource_types(
crate::json_deser::deser_list_com_amazonaws_backup_resource_type_list(tokens)?
);
}
"Tags" => {
builder = builder.set_tags(
crate::json_deser::deser_map_com_amazonaws_backup_string_map(
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",
),
),
}
}