aws_sdk_backup/operation/update_recovery_point_lifecycle/
_update_recovery_point_lifecycle_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateRecoveryPointLifecycleInput {
6    /// <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.</p>
7    pub backup_vault_name: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub recovery_point_arn: ::std::option::Option<::std::string::String>,
10    /// <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>
11    /// <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>
12    pub lifecycle: ::std::option::Option<crate::types::Lifecycle>,
13}
14impl UpdateRecoveryPointLifecycleInput {
15    /// <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.</p>
16    pub fn backup_vault_name(&self) -> ::std::option::Option<&str> {
17        self.backup_vault_name.as_deref()
18    }
19    /// <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>
20    pub fn recovery_point_arn(&self) -> ::std::option::Option<&str> {
21        self.recovery_point_arn.as_deref()
22    }
23    /// <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>
24    /// <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>
25    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::Lifecycle> {
26        self.lifecycle.as_ref()
27    }
28}
29impl UpdateRecoveryPointLifecycleInput {
30    /// Creates a new builder-style object to manufacture [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
31    pub fn builder() -> crate::operation::update_recovery_point_lifecycle::builders::UpdateRecoveryPointLifecycleInputBuilder {
32        crate::operation::update_recovery_point_lifecycle::builders::UpdateRecoveryPointLifecycleInputBuilder::default()
33    }
34}
35
36/// A builder for [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct UpdateRecoveryPointLifecycleInputBuilder {
40    pub(crate) backup_vault_name: ::std::option::Option<::std::string::String>,
41    pub(crate) recovery_point_arn: ::std::option::Option<::std::string::String>,
42    pub(crate) lifecycle: ::std::option::Option<crate::types::Lifecycle>,
43}
44impl UpdateRecoveryPointLifecycleInputBuilder {
45    /// <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.</p>
46    /// This field is required.
47    pub fn backup_vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.backup_vault_name = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <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.</p>
52    pub fn set_backup_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.backup_vault_name = input;
54        self
55    }
56    /// <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.</p>
57    pub fn get_backup_vault_name(&self) -> &::std::option::Option<::std::string::String> {
58        &self.backup_vault_name
59    }
60    /// <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>
61    /// This field is required.
62    pub fn recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.recovery_point_arn = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <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>
67    pub fn set_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.recovery_point_arn = input;
69        self
70    }
71    /// <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>
72    pub fn get_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
73        &self.recovery_point_arn
74    }
75    /// <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>
76    /// <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>
77    pub fn lifecycle(mut self, input: crate::types::Lifecycle) -> Self {
78        self.lifecycle = ::std::option::Option::Some(input);
79        self
80    }
81    /// <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>
82    /// <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>
83    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::Lifecycle>) -> Self {
84        self.lifecycle = input;
85        self
86    }
87    /// <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>
88    /// <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>
89    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::Lifecycle> {
90        &self.lifecycle
91    }
92    /// Consumes the builder and constructs a [`UpdateRecoveryPointLifecycleInput`](crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput).
93    pub fn build(
94        self,
95    ) -> ::std::result::Result<
96        crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput,
97        ::aws_smithy_types::error::operation::BuildError,
98    > {
99        ::std::result::Result::Ok(crate::operation::update_recovery_point_lifecycle::UpdateRecoveryPointLifecycleInput {
100            backup_vault_name: self.backup_vault_name,
101            recovery_point_arn: self.recovery_point_arn,
102            lifecycle: self.lifecycle,
103        })
104    }
105}