Skip to main content

aws_sdk_redshiftserverless/types/
_recovery_point.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The automatically created recovery point of a namespace. Recovery points are created every 30 minutes and kept for 24 hours.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RecoveryPoint {
7    /// <p>The unique identifier of the recovery point.</p>
8    pub recovery_point_id: ::std::option::Option<::std::string::String>,
9    /// <p>The time the recovery point is created.</p>
10    pub recovery_point_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The total size of the data in the recovery point in megabytes.</p>
12    pub total_size_in_mega_bytes: ::std::option::Option<f64>,
13    /// <p>The name of the namespace the recovery point is associated with.</p>
14    pub namespace_name: ::std::option::Option<::std::string::String>,
15    /// <p>The name of the workgroup the recovery point is associated with.</p>
16    pub workgroup_name: ::std::option::Option<::std::string::String>,
17    /// <p>The Amazon Resource Name (ARN) of the namespace the recovery point is associated with.</p>
18    pub namespace_arn: ::std::option::Option<::std::string::String>,
19}
20impl RecoveryPoint {
21    /// <p>The unique identifier of the recovery point.</p>
22    pub fn recovery_point_id(&self) -> ::std::option::Option<&str> {
23        self.recovery_point_id.as_deref()
24    }
25    /// <p>The time the recovery point is created.</p>
26    pub fn recovery_point_create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.recovery_point_create_time.as_ref()
28    }
29    /// <p>The total size of the data in the recovery point in megabytes.</p>
30    pub fn total_size_in_mega_bytes(&self) -> ::std::option::Option<f64> {
31        self.total_size_in_mega_bytes
32    }
33    /// <p>The name of the namespace the recovery point is associated with.</p>
34    pub fn namespace_name(&self) -> ::std::option::Option<&str> {
35        self.namespace_name.as_deref()
36    }
37    /// <p>The name of the workgroup the recovery point is associated with.</p>
38    pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
39        self.workgroup_name.as_deref()
40    }
41    /// <p>The Amazon Resource Name (ARN) of the namespace the recovery point is associated with.</p>
42    pub fn namespace_arn(&self) -> ::std::option::Option<&str> {
43        self.namespace_arn.as_deref()
44    }
45}
46impl RecoveryPoint {
47    /// Creates a new builder-style object to manufacture [`RecoveryPoint`](crate::types::RecoveryPoint).
48    pub fn builder() -> crate::types::builders::RecoveryPointBuilder {
49        crate::types::builders::RecoveryPointBuilder::default()
50    }
51}
52
53/// A builder for [`RecoveryPoint`](crate::types::RecoveryPoint).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct RecoveryPointBuilder {
57    pub(crate) recovery_point_id: ::std::option::Option<::std::string::String>,
58    pub(crate) recovery_point_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
59    pub(crate) total_size_in_mega_bytes: ::std::option::Option<f64>,
60    pub(crate) namespace_name: ::std::option::Option<::std::string::String>,
61    pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
62    pub(crate) namespace_arn: ::std::option::Option<::std::string::String>,
63}
64impl RecoveryPointBuilder {
65    /// <p>The unique identifier of the recovery point.</p>
66    pub fn recovery_point_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.recovery_point_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The unique identifier of the recovery point.</p>
71    pub fn set_recovery_point_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.recovery_point_id = input;
73        self
74    }
75    /// <p>The unique identifier of the recovery point.</p>
76    pub fn get_recovery_point_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.recovery_point_id
78    }
79    /// <p>The time the recovery point is created.</p>
80    pub fn recovery_point_create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
81        self.recovery_point_create_time = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The time the recovery point is created.</p>
85    pub fn set_recovery_point_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
86        self.recovery_point_create_time = input;
87        self
88    }
89    /// <p>The time the recovery point is created.</p>
90    pub fn get_recovery_point_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
91        &self.recovery_point_create_time
92    }
93    /// <p>The total size of the data in the recovery point in megabytes.</p>
94    pub fn total_size_in_mega_bytes(mut self, input: f64) -> Self {
95        self.total_size_in_mega_bytes = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The total size of the data in the recovery point in megabytes.</p>
99    pub fn set_total_size_in_mega_bytes(mut self, input: ::std::option::Option<f64>) -> Self {
100        self.total_size_in_mega_bytes = input;
101        self
102    }
103    /// <p>The total size of the data in the recovery point in megabytes.</p>
104    pub fn get_total_size_in_mega_bytes(&self) -> &::std::option::Option<f64> {
105        &self.total_size_in_mega_bytes
106    }
107    /// <p>The name of the namespace the recovery point is associated with.</p>
108    pub fn namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.namespace_name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the namespace the recovery point is associated with.</p>
113    pub fn set_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.namespace_name = input;
115        self
116    }
117    /// <p>The name of the namespace the recovery point is associated with.</p>
118    pub fn get_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.namespace_name
120    }
121    /// <p>The name of the workgroup the recovery point is associated with.</p>
122    pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.workgroup_name = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The name of the workgroup the recovery point is associated with.</p>
127    pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.workgroup_name = input;
129        self
130    }
131    /// <p>The name of the workgroup the recovery point is associated with.</p>
132    pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
133        &self.workgroup_name
134    }
135    /// <p>The Amazon Resource Name (ARN) of the namespace the recovery point is associated with.</p>
136    pub fn namespace_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.namespace_arn = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The Amazon Resource Name (ARN) of the namespace the recovery point is associated with.</p>
141    pub fn set_namespace_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.namespace_arn = input;
143        self
144    }
145    /// <p>The Amazon Resource Name (ARN) of the namespace the recovery point is associated with.</p>
146    pub fn get_namespace_arn(&self) -> &::std::option::Option<::std::string::String> {
147        &self.namespace_arn
148    }
149    /// Consumes the builder and constructs a [`RecoveryPoint`](crate::types::RecoveryPoint).
150    pub fn build(self) -> crate::types::RecoveryPoint {
151        crate::types::RecoveryPoint {
152            recovery_point_id: self.recovery_point_id,
153            recovery_point_create_time: self.recovery_point_create_time,
154            total_size_in_mega_bytes: self.total_size_in_mega_bytes,
155            namespace_name: self.namespace_name,
156            workgroup_name: self.workgroup_name,
157            namespace_arn: self.namespace_arn,
158        }
159    }
160}