pub struct Builder { /* private fields */ }
Expand description
A builder for AwsBackupBackupPlanBackupPlanDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn backup_plan_name(self, input: impl Into<String>) -> Self
pub fn backup_plan_name(self, input: impl Into<String>) -> Self
The display name of a backup plan.
sourcepub fn set_backup_plan_name(self, input: Option<String>) -> Self
pub fn set_backup_plan_name(self, input: Option<String>) -> Self
The display name of a backup plan.
Examples found in repository?
32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508
pub(crate) fn deser_structure_crate_model_aws_backup_backup_plan_backup_plan_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupPlanBackupPlanDetails>,
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::aws_backup_backup_plan_backup_plan_details::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() {
"BackupPlanName" => {
builder = builder.set_backup_plan_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdvancedBackupSettings" => {
builder = builder.set_advanced_backup_settings(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_advanced_backup_settings_list(tokens)?
);
}
"BackupPlanRule" => {
builder = builder.set_backup_plan_rule(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_rule_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 advanced_backup_settings(
self,
input: AwsBackupBackupPlanAdvancedBackupSettingsDetails
) -> Self
pub fn advanced_backup_settings(
self,
input: AwsBackupBackupPlanAdvancedBackupSettingsDetails
) -> Self
Appends an item to advanced_backup_settings
.
To override the contents of this collection use set_advanced_backup_settings
.
A list of backup options for each resource type.
sourcepub fn set_advanced_backup_settings(
self,
input: Option<Vec<AwsBackupBackupPlanAdvancedBackupSettingsDetails>>
) -> Self
pub fn set_advanced_backup_settings(
self,
input: Option<Vec<AwsBackupBackupPlanAdvancedBackupSettingsDetails>>
) -> Self
A list of backup options for each resource type.
Examples found in repository?
32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508
pub(crate) fn deser_structure_crate_model_aws_backup_backup_plan_backup_plan_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupPlanBackupPlanDetails>,
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::aws_backup_backup_plan_backup_plan_details::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() {
"BackupPlanName" => {
builder = builder.set_backup_plan_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdvancedBackupSettings" => {
builder = builder.set_advanced_backup_settings(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_advanced_backup_settings_list(tokens)?
);
}
"BackupPlanRule" => {
builder = builder.set_backup_plan_rule(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_rule_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 backup_plan_rule(self, input: AwsBackupBackupPlanRuleDetails) -> Self
pub fn backup_plan_rule(self, input: AwsBackupBackupPlanRuleDetails) -> Self
Appends an item to backup_plan_rule
.
To override the contents of this collection use set_backup_plan_rule
.
An array of BackupRule
objects, each of which specifies a scheduled task that is used to back up a selection of resources.
sourcepub fn set_backup_plan_rule(
self,
input: Option<Vec<AwsBackupBackupPlanRuleDetails>>
) -> Self
pub fn set_backup_plan_rule(
self,
input: Option<Vec<AwsBackupBackupPlanRuleDetails>>
) -> Self
An array of BackupRule
objects, each of which specifies a scheduled task that is used to back up a selection of resources.
Examples found in repository?
32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508
pub(crate) fn deser_structure_crate_model_aws_backup_backup_plan_backup_plan_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupPlanBackupPlanDetails>,
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::aws_backup_backup_plan_backup_plan_details::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() {
"BackupPlanName" => {
builder = builder.set_backup_plan_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdvancedBackupSettings" => {
builder = builder.set_advanced_backup_settings(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_advanced_backup_settings_list(tokens)?
);
}
"BackupPlanRule" => {
builder = builder.set_backup_plan_rule(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_rule_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) -> AwsBackupBackupPlanBackupPlanDetails
pub fn build(self) -> AwsBackupBackupPlanBackupPlanDetails
Consumes the builder and constructs a AwsBackupBackupPlanBackupPlanDetails
.
Examples found in repository?
32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508
pub(crate) fn deser_structure_crate_model_aws_backup_backup_plan_backup_plan_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupPlanBackupPlanDetails>,
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::aws_backup_backup_plan_backup_plan_details::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() {
"BackupPlanName" => {
builder = builder.set_backup_plan_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"AdvancedBackupSettings" => {
builder = builder.set_advanced_backup_settings(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_advanced_backup_settings_list(tokens)?
);
}
"BackupPlanRule" => {
builder = builder.set_backup_plan_rule(
crate::json_deser::deser_list_com_amazonaws_securityhub_aws_backup_backup_plan_rule_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",
),
),
}
}