pub struct Builder { /* private fields */ }
Expand description
A builder for AwsBackupBackupVaultNotificationsDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn backup_vault_events(self, input: impl Into<String>) -> Self
pub fn backup_vault_events(self, input: impl Into<String>) -> Self
Appends an item to backup_vault_events
.
To override the contents of this collection use set_backup_vault_events
.
An array of events that indicate the status of jobs to back up resources to the backup vault. The following events are supported:
-
BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
-
COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
-
RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
-
S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
sourcepub fn set_backup_vault_events(self, input: Option<Vec<String>>) -> Self
pub fn set_backup_vault_events(self, input: Option<Vec<String>>) -> Self
An array of events that indicate the status of jobs to back up resources to the backup vault. The following events are supported:
-
BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
-
COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
-
RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
-
S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
Examples found in repository?
32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 32400 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 32433 32434 32435 32436 32437 32438 32439 32440 32441
pub(crate) fn deser_structure_crate_model_aws_backup_backup_vault_notifications_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupVaultNotificationsDetails>,
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_vault_notifications_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() {
"BackupVaultEvents" => {
builder = builder.set_backup_vault_events(
crate::json_deser::deser_list_com_amazonaws_securityhub_non_empty_string_list(tokens)?
);
}
"SnsTopicArn" => {
builder = builder.set_sns_topic_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 sns_topic_arn(self, input: impl Into<String>) -> Self
pub fn sns_topic_arn(self, input: impl Into<String>) -> Self
An ARN that uniquely identifies the Amazon SNS topic for a backup vault’s events.
sourcepub fn set_sns_topic_arn(self, input: Option<String>) -> Self
pub fn set_sns_topic_arn(self, input: Option<String>) -> Self
An ARN that uniquely identifies the Amazon SNS topic for a backup vault’s events.
Examples found in repository?
32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 32400 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 32433 32434 32435 32436 32437 32438 32439 32440 32441
pub(crate) fn deser_structure_crate_model_aws_backup_backup_vault_notifications_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupVaultNotificationsDetails>,
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_vault_notifications_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() {
"BackupVaultEvents" => {
builder = builder.set_backup_vault_events(
crate::json_deser::deser_list_com_amazonaws_securityhub_non_empty_string_list(tokens)?
);
}
"SnsTopicArn" => {
builder = builder.set_sns_topic_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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) -> AwsBackupBackupVaultNotificationsDetails
pub fn build(self) -> AwsBackupBackupVaultNotificationsDetails
Consumes the builder and constructs a AwsBackupBackupVaultNotificationsDetails
.
Examples found in repository?
32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 32400 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 32433 32434 32435 32436 32437 32438 32439 32440 32441
pub(crate) fn deser_structure_crate_model_aws_backup_backup_vault_notifications_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsBackupBackupVaultNotificationsDetails>,
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_vault_notifications_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() {
"BackupVaultEvents" => {
builder = builder.set_backup_vault_events(
crate::json_deser::deser_list_com_amazonaws_securityhub_non_empty_string_list(tokens)?
);
}
"SnsTopicArn" => {
builder = builder.set_sns_topic_arn(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}