Skip to main content

aws_sdk_backup/operation/describe_protected_resource/
_describe_protected_resource_output.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 DescribeProtectedResourceOutput {
6    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
7    pub resource_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.</p>
9    pub resource_type: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
11    pub last_backup_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>The name of the resource that belongs to the specified backup.</p>
13    pub resource_name: ::std::option::Option<::std::string::String>,
14    /// <p>The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.</p>
15    pub last_backup_vault_arn: ::std::option::Option<::std::string::String>,
16    /// <p>The ARN (Amazon Resource Name) of the most recent recovery point.</p>
17    pub last_recovery_point_arn: ::std::option::Option<::std::string::String>,
18    /// <p>The time, in minutes, that the most recent restore job took to complete.</p>
19    pub latest_restore_execution_time_minutes: ::std::option::Option<i64>,
20    /// <p>The creation date of the most recent restore job.</p>
21    pub latest_restore_job_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The date the most recent recovery point was created.</p>
23    pub latest_restore_recovery_point_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
24    _request_id: Option<String>,
25}
26impl DescribeProtectedResourceOutput {
27    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
28    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
29        self.resource_arn.as_deref()
30    }
31    /// <p>The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.</p>
32    pub fn resource_type(&self) -> ::std::option::Option<&str> {
33        self.resource_type.as_deref()
34    }
35    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
36    pub fn last_backup_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.last_backup_time.as_ref()
38    }
39    /// <p>The name of the resource that belongs to the specified backup.</p>
40    pub fn resource_name(&self) -> ::std::option::Option<&str> {
41        self.resource_name.as_deref()
42    }
43    /// <p>The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.</p>
44    pub fn last_backup_vault_arn(&self) -> ::std::option::Option<&str> {
45        self.last_backup_vault_arn.as_deref()
46    }
47    /// <p>The ARN (Amazon Resource Name) of the most recent recovery point.</p>
48    pub fn last_recovery_point_arn(&self) -> ::std::option::Option<&str> {
49        self.last_recovery_point_arn.as_deref()
50    }
51    /// <p>The time, in minutes, that the most recent restore job took to complete.</p>
52    pub fn latest_restore_execution_time_minutes(&self) -> ::std::option::Option<i64> {
53        self.latest_restore_execution_time_minutes
54    }
55    /// <p>The creation date of the most recent restore job.</p>
56    pub fn latest_restore_job_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57        self.latest_restore_job_creation_date.as_ref()
58    }
59    /// <p>The date the most recent recovery point was created.</p>
60    pub fn latest_restore_recovery_point_creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.latest_restore_recovery_point_creation_date.as_ref()
62    }
63}
64impl ::aws_types::request_id::RequestId for DescribeProtectedResourceOutput {
65    fn request_id(&self) -> Option<&str> {
66        self._request_id.as_deref()
67    }
68}
69impl DescribeProtectedResourceOutput {
70    /// Creates a new builder-style object to manufacture [`DescribeProtectedResourceOutput`](crate::operation::describe_protected_resource::DescribeProtectedResourceOutput).
71    pub fn builder() -> crate::operation::describe_protected_resource::builders::DescribeProtectedResourceOutputBuilder {
72        crate::operation::describe_protected_resource::builders::DescribeProtectedResourceOutputBuilder::default()
73    }
74}
75
76/// A builder for [`DescribeProtectedResourceOutput`](crate::operation::describe_protected_resource::DescribeProtectedResourceOutput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeProtectedResourceOutputBuilder {
80    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
81    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
82    pub(crate) last_backup_time: ::std::option::Option<::aws_smithy_types::DateTime>,
83    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
84    pub(crate) last_backup_vault_arn: ::std::option::Option<::std::string::String>,
85    pub(crate) last_recovery_point_arn: ::std::option::Option<::std::string::String>,
86    pub(crate) latest_restore_execution_time_minutes: ::std::option::Option<i64>,
87    pub(crate) latest_restore_job_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
88    pub(crate) latest_restore_recovery_point_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
89    _request_id: Option<String>,
90}
91impl DescribeProtectedResourceOutputBuilder {
92    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
93    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.resource_arn = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
98    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.resource_arn = input;
100        self
101    }
102    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
103    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
104        &self.resource_arn
105    }
106    /// <p>The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.</p>
107    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.resource_type = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.</p>
112    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.resource_type = input;
114        self
115    }
116    /// <p>The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.</p>
117    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
118        &self.resource_type
119    }
120    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
121    pub fn last_backup_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122        self.last_backup_time = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
126    pub fn set_last_backup_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127        self.last_backup_time = input;
128        self
129    }
130    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
131    pub fn get_last_backup_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        &self.last_backup_time
133    }
134    /// <p>The name of the resource that belongs to the specified backup.</p>
135    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.resource_name = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The name of the resource that belongs to the specified backup.</p>
140    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.resource_name = input;
142        self
143    }
144    /// <p>The name of the resource that belongs to the specified backup.</p>
145    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
146        &self.resource_name
147    }
148    /// <p>The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.</p>
149    pub fn last_backup_vault_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.last_backup_vault_arn = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.</p>
154    pub fn set_last_backup_vault_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.last_backup_vault_arn = input;
156        self
157    }
158    /// <p>The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.</p>
159    pub fn get_last_backup_vault_arn(&self) -> &::std::option::Option<::std::string::String> {
160        &self.last_backup_vault_arn
161    }
162    /// <p>The ARN (Amazon Resource Name) of the most recent recovery point.</p>
163    pub fn last_recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.last_recovery_point_arn = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>The ARN (Amazon Resource Name) of the most recent recovery point.</p>
168    pub fn set_last_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.last_recovery_point_arn = input;
170        self
171    }
172    /// <p>The ARN (Amazon Resource Name) of the most recent recovery point.</p>
173    pub fn get_last_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
174        &self.last_recovery_point_arn
175    }
176    /// <p>The time, in minutes, that the most recent restore job took to complete.</p>
177    pub fn latest_restore_execution_time_minutes(mut self, input: i64) -> Self {
178        self.latest_restore_execution_time_minutes = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>The time, in minutes, that the most recent restore job took to complete.</p>
182    pub fn set_latest_restore_execution_time_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
183        self.latest_restore_execution_time_minutes = input;
184        self
185    }
186    /// <p>The time, in minutes, that the most recent restore job took to complete.</p>
187    pub fn get_latest_restore_execution_time_minutes(&self) -> &::std::option::Option<i64> {
188        &self.latest_restore_execution_time_minutes
189    }
190    /// <p>The creation date of the most recent restore job.</p>
191    pub fn latest_restore_job_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
192        self.latest_restore_job_creation_date = ::std::option::Option::Some(input);
193        self
194    }
195    /// <p>The creation date of the most recent restore job.</p>
196    pub fn set_latest_restore_job_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
197        self.latest_restore_job_creation_date = input;
198        self
199    }
200    /// <p>The creation date of the most recent restore job.</p>
201    pub fn get_latest_restore_job_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
202        &self.latest_restore_job_creation_date
203    }
204    /// <p>The date the most recent recovery point was created.</p>
205    pub fn latest_restore_recovery_point_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
206        self.latest_restore_recovery_point_creation_date = ::std::option::Option::Some(input);
207        self
208    }
209    /// <p>The date the most recent recovery point was created.</p>
210    pub fn set_latest_restore_recovery_point_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
211        self.latest_restore_recovery_point_creation_date = input;
212        self
213    }
214    /// <p>The date the most recent recovery point was created.</p>
215    pub fn get_latest_restore_recovery_point_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
216        &self.latest_restore_recovery_point_creation_date
217    }
218    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
219        self._request_id = Some(request_id.into());
220        self
221    }
222
223    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
224        self._request_id = request_id;
225        self
226    }
227    /// Consumes the builder and constructs a [`DescribeProtectedResourceOutput`](crate::operation::describe_protected_resource::DescribeProtectedResourceOutput).
228    pub fn build(self) -> crate::operation::describe_protected_resource::DescribeProtectedResourceOutput {
229        crate::operation::describe_protected_resource::DescribeProtectedResourceOutput {
230            resource_arn: self.resource_arn,
231            resource_type: self.resource_type,
232            last_backup_time: self.last_backup_time,
233            resource_name: self.resource_name,
234            last_backup_vault_arn: self.last_backup_vault_arn,
235            last_recovery_point_arn: self.last_recovery_point_arn,
236            latest_restore_execution_time_minutes: self.latest_restore_execution_time_minutes,
237            latest_restore_job_creation_date: self.latest_restore_job_creation_date,
238            latest_restore_recovery_point_creation_date: self.latest_restore_recovery_point_creation_date,
239            _request_id: self._request_id,
240        }
241    }
242}