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
// 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 UpdateRecoveryPointLifecycleInput {
/// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
pub backup_vault_name: ::std::option::Option<::std::string::String>,
/// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
pub recovery_point_arn: ::std::option::Option<::std::string::String>,
/// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define. </p>
/// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
pub lifecycle: ::std::option::Option<crate::types::Lifecycle>,
}
impl UpdateRecoveryPointLifecycleInput {
/// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
pub fn backup_vault_name(&self) -> ::std::option::Option<&str> {
self.backup_vault_name.as_deref()
}
/// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
pub fn recovery_point_arn(&self) -> ::std::option::Option<&str> {
self.recovery_point_arn.as_deref()
}
/// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define. </p>
/// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::Lifecycle> {
self.lifecycle.as_ref()
}
}
impl UpdateRecoveryPointLifecycleInput {
/// Creates a new builder-style object to manufacture [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
pub fn builder() -> crate::operation::update_recovery_point_lifecycle::builders::UpdateRecoveryPointLifecycleInputBuilder {
crate::operation::update_recovery_point_lifecycle::builders::UpdateRecoveryPointLifecycleInputBuilder::default()
}
}
/// A builder for [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateRecoveryPointLifecycleInputBuilder {
pub(crate) backup_vault_name: ::std::option::Option<::std::string::String>,
pub(crate) recovery_point_arn: ::std::option::Option<::std::string::String>,
pub(crate) lifecycle: ::std::option::Option<crate::types::Lifecycle>,
}
impl UpdateRecoveryPointLifecycleInputBuilder {
/// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
/// This field is required.
pub fn backup_vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.backup_vault_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
pub fn set_backup_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.backup_vault_name = input;
self
}
/// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
pub fn get_backup_vault_name(&self) -> &::std::option::Option<::std::string::String> {
&self.backup_vault_name
}
/// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
/// This field is required.
pub fn recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.recovery_point_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
pub fn set_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.recovery_point_arn = input;
self
}
/// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
pub fn get_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.recovery_point_arn
}
/// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define. </p>
/// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
pub fn lifecycle(mut self, input: crate::types::Lifecycle) -> Self {
self.lifecycle = ::std::option::Option::Some(input);
self
}
/// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define. </p>
/// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::Lifecycle>) -> Self {
self.lifecycle = input;
self
}
/// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define. </p>
/// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::Lifecycle> {
&self.lifecycle
}
/// Consumes the builder and constructs a [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput {
backup_vault_name: self.backup_vault_name,
recovery_point_arn: self.recovery_point_arn,
lifecycle: self.lifecycle,
})
}
}