aws_sdk_dynamodb/types/
_point_in_time_recovery_description.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The description of the point in time settings applied to the table.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PointInTimeRecoveryDescription {
7    /// <p>The current state of point in time recovery:</p>
8    /// <ul>
9    /// <li>
10    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
11    /// <li>
12    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
13    /// </ul>
14    pub point_in_time_recovery_status: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>,
15    /// <p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional.</p>
16    pub recovery_period_in_days: ::std::option::Option<i32>,
17    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
18    pub earliest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
20    pub latest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21}
22impl PointInTimeRecoveryDescription {
23    /// <p>The current state of point in time recovery:</p>
24    /// <ul>
25    /// <li>
26    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
27    /// <li>
28    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
29    /// </ul>
30    pub fn point_in_time_recovery_status(&self) -> ::std::option::Option<&crate::types::PointInTimeRecoveryStatus> {
31        self.point_in_time_recovery_status.as_ref()
32    }
33    /// <p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional.</p>
34    pub fn recovery_period_in_days(&self) -> ::std::option::Option<i32> {
35        self.recovery_period_in_days
36    }
37    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
38    pub fn earliest_restorable_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.earliest_restorable_date_time.as_ref()
40    }
41    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
42    pub fn latest_restorable_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.latest_restorable_date_time.as_ref()
44    }
45}
46impl PointInTimeRecoveryDescription {
47    /// Creates a new builder-style object to manufacture [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
48    pub fn builder() -> crate::types::builders::PointInTimeRecoveryDescriptionBuilder {
49        crate::types::builders::PointInTimeRecoveryDescriptionBuilder::default()
50    }
51}
52
53/// A builder for [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct PointInTimeRecoveryDescriptionBuilder {
57    pub(crate) point_in_time_recovery_status: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>,
58    pub(crate) recovery_period_in_days: ::std::option::Option<i32>,
59    pub(crate) earliest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
60    pub(crate) latest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
61}
62impl PointInTimeRecoveryDescriptionBuilder {
63    /// <p>The current state of point in time recovery:</p>
64    /// <ul>
65    /// <li>
66    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
67    /// <li>
68    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
69    /// </ul>
70    pub fn point_in_time_recovery_status(mut self, input: crate::types::PointInTimeRecoveryStatus) -> Self {
71        self.point_in_time_recovery_status = ::std::option::Option::Some(input);
72        self
73    }
74    /// <p>The current state of point in time recovery:</p>
75    /// <ul>
76    /// <li>
77    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
78    /// <li>
79    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
80    /// </ul>
81    pub fn set_point_in_time_recovery_status(mut self, input: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>) -> Self {
82        self.point_in_time_recovery_status = input;
83        self
84    }
85    /// <p>The current state of point in time recovery:</p>
86    /// <ul>
87    /// <li>
88    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
89    /// <li>
90    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
91    /// </ul>
92    pub fn get_point_in_time_recovery_status(&self) -> &::std::option::Option<crate::types::PointInTimeRecoveryStatus> {
93        &self.point_in_time_recovery_status
94    }
95    /// <p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional.</p>
96    pub fn recovery_period_in_days(mut self, input: i32) -> Self {
97        self.recovery_period_in_days = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional.</p>
101    pub fn set_recovery_period_in_days(mut self, input: ::std::option::Option<i32>) -> Self {
102        self.recovery_period_in_days = input;
103        self
104    }
105    /// <p>The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional.</p>
106    pub fn get_recovery_period_in_days(&self) -> &::std::option::Option<i32> {
107        &self.recovery_period_in_days
108    }
109    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
110    pub fn earliest_restorable_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
111        self.earliest_restorable_date_time = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
115    pub fn set_earliest_restorable_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
116        self.earliest_restorable_date_time = input;
117        self
118    }
119    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
120    pub fn get_earliest_restorable_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
121        &self.earliest_restorable_date_time
122    }
123    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
124    pub fn latest_restorable_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
125        self.latest_restorable_date_time = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
129    pub fn set_latest_restorable_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
130        self.latest_restorable_date_time = input;
131        self
132    }
133    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
134    pub fn get_latest_restorable_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
135        &self.latest_restorable_date_time
136    }
137    /// Consumes the builder and constructs a [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
138    pub fn build(self) -> crate::types::PointInTimeRecoveryDescription {
139        crate::types::PointInTimeRecoveryDescription {
140            point_in_time_recovery_status: self.point_in_time_recovery_status,
141            recovery_period_in_days: self.recovery_period_in_days,
142            earliest_restorable_date_time: self.earliest_restorable_date_time,
143            latest_restorable_date_time: self.latest_restorable_date_time,
144        }
145    }
146}