aws_sdk_dynamodb/operation/list_backups/_list_backups_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 ListBackupsOutput {
6 /// <p>List of <code>BackupSummary</code> objects.</p>
7 pub backup_summaries: ::std::option::Option<::std::vec::Vec<crate::types::BackupSummary>>,
8 /// <p>The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
9 /// <p>If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p>
10 /// <p>If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned.</p>
11 pub last_evaluated_backup_arn: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl ListBackupsOutput {
15 /// <p>List of <code>BackupSummary</code> objects.</p>
16 ///
17 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.backup_summaries.is_none()`.
18 pub fn backup_summaries(&self) -> &[crate::types::BackupSummary] {
19 self.backup_summaries.as_deref().unwrap_or_default()
20 }
21 /// <p>The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
22 /// <p>If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p>
23 /// <p>If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned.</p>
24 pub fn last_evaluated_backup_arn(&self) -> ::std::option::Option<&str> {
25 self.last_evaluated_backup_arn.as_deref()
26 }
27}
28impl ::aws_types::request_id::RequestId for ListBackupsOutput {
29 fn request_id(&self) -> Option<&str> {
30 self._request_id.as_deref()
31 }
32}
33impl ListBackupsOutput {
34 /// Creates a new builder-style object to manufacture [`ListBackupsOutput`](crate::operation::list_backups::ListBackupsOutput).
35 pub fn builder() -> crate::operation::list_backups::builders::ListBackupsOutputBuilder {
36 crate::operation::list_backups::builders::ListBackupsOutputBuilder::default()
37 }
38}
39
40/// A builder for [`ListBackupsOutput`](crate::operation::list_backups::ListBackupsOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct ListBackupsOutputBuilder {
44 pub(crate) backup_summaries: ::std::option::Option<::std::vec::Vec<crate::types::BackupSummary>>,
45 pub(crate) last_evaluated_backup_arn: ::std::option::Option<::std::string::String>,
46 _request_id: Option<String>,
47}
48impl ListBackupsOutputBuilder {
49 /// Appends an item to `backup_summaries`.
50 ///
51 /// To override the contents of this collection use [`set_backup_summaries`](Self::set_backup_summaries).
52 ///
53 /// <p>List of <code>BackupSummary</code> objects.</p>
54 pub fn backup_summaries(mut self, input: crate::types::BackupSummary) -> Self {
55 let mut v = self.backup_summaries.unwrap_or_default();
56 v.push(input);
57 self.backup_summaries = ::std::option::Option::Some(v);
58 self
59 }
60 /// <p>List of <code>BackupSummary</code> objects.</p>
61 pub fn set_backup_summaries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BackupSummary>>) -> Self {
62 self.backup_summaries = input;
63 self
64 }
65 /// <p>List of <code>BackupSummary</code> objects.</p>
66 pub fn get_backup_summaries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BackupSummary>> {
67 &self.backup_summaries
68 }
69 /// <p>The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
70 /// <p>If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p>
71 /// <p>If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned.</p>
72 pub fn last_evaluated_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.last_evaluated_backup_arn = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <p>The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
77 /// <p>If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p>
78 /// <p>If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned.</p>
79 pub fn set_last_evaluated_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.last_evaluated_backup_arn = input;
81 self
82 }
83 /// <p>The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results.</p>
84 /// <p>If <code>LastEvaluatedBackupArn</code> is empty, then the last page of results has been processed and there are no more results to be retrieved.</p>
85 /// <p>If <code>LastEvaluatedBackupArn</code> is not empty, this may or may not indicate that there is more data to be returned. All results are guaranteed to have been returned if and only if no value for <code>LastEvaluatedBackupArn</code> is returned.</p>
86 pub fn get_last_evaluated_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
87 &self.last_evaluated_backup_arn
88 }
89 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
90 self._request_id = Some(request_id.into());
91 self
92 }
93
94 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
95 self._request_id = request_id;
96 self
97 }
98 /// Consumes the builder and constructs a [`ListBackupsOutput`](crate::operation::list_backups::ListBackupsOutput).
99 pub fn build(self) -> crate::operation::list_backups::ListBackupsOutput {
100 crate::operation::list_backups::ListBackupsOutput {
101 backup_summaries: self.backup_summaries,
102 last_evaluated_backup_arn: self.last_evaluated_backup_arn,
103 _request_id: self._request_id,
104 }
105 }
106}