aws_sdk_dynamodb/operation/list_backups/_list_backups_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 ListBackupsInput {
6 /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
7 pub table_name: ::std::option::Option<::std::string::String>,
8 /// <p>Maximum number of backups to return at once.</p>
9 pub limit: ::std::option::Option<i32>,
10 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
11 pub time_range_lower_bound: ::std::option::Option<::aws_smithy_types::DateTime>,
12 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
13 pub time_range_upper_bound: ::std::option::Option<::aws_smithy_types::DateTime>,
14 /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (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>
15 pub exclusive_start_backup_arn: ::std::option::Option<::std::string::String>,
16 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
17 /// <p>Where <code>BackupType</code> can be:</p>
18 /// <ul>
19 /// <li>
20 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
21 /// <li>
22 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
23 /// <li>
24 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
25 /// </ul>
26 pub backup_type: ::std::option::Option<crate::types::BackupTypeFilter>,
27}
28impl ListBackupsInput {
29 /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
30 pub fn table_name(&self) -> ::std::option::Option<&str> {
31 self.table_name.as_deref()
32 }
33 /// <p>Maximum number of backups to return at once.</p>
34 pub fn limit(&self) -> ::std::option::Option<i32> {
35 self.limit
36 }
37 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
38 pub fn time_range_lower_bound(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39 self.time_range_lower_bound.as_ref()
40 }
41 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
42 pub fn time_range_upper_bound(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43 self.time_range_upper_bound.as_ref()
44 }
45 /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (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>
46 pub fn exclusive_start_backup_arn(&self) -> ::std::option::Option<&str> {
47 self.exclusive_start_backup_arn.as_deref()
48 }
49 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
50 /// <p>Where <code>BackupType</code> can be:</p>
51 /// <ul>
52 /// <li>
53 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
54 /// <li>
55 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
56 /// <li>
57 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
58 /// </ul>
59 pub fn backup_type(&self) -> ::std::option::Option<&crate::types::BackupTypeFilter> {
60 self.backup_type.as_ref()
61 }
62}
63impl ListBackupsInput {
64 /// Creates a new builder-style object to manufacture [`ListBackupsInput`](crate::operation::list_backups::ListBackupsInput).
65 pub fn builder() -> crate::operation::list_backups::builders::ListBackupsInputBuilder {
66 crate::operation::list_backups::builders::ListBackupsInputBuilder::default()
67 }
68}
69
70/// A builder for [`ListBackupsInput`](crate::operation::list_backups::ListBackupsInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct ListBackupsInputBuilder {
74 pub(crate) table_name: ::std::option::Option<::std::string::String>,
75 pub(crate) limit: ::std::option::Option<i32>,
76 pub(crate) time_range_lower_bound: ::std::option::Option<::aws_smithy_types::DateTime>,
77 pub(crate) time_range_upper_bound: ::std::option::Option<::aws_smithy_types::DateTime>,
78 pub(crate) exclusive_start_backup_arn: ::std::option::Option<::std::string::String>,
79 pub(crate) backup_type: ::std::option::Option<crate::types::BackupTypeFilter>,
80}
81impl ListBackupsInputBuilder {
82 /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
83 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.table_name = ::std::option::Option::Some(input.into());
85 self
86 }
87 /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
88 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.table_name = input;
90 self
91 }
92 /// <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
93 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
94 &self.table_name
95 }
96 /// <p>Maximum number of backups to return at once.</p>
97 pub fn limit(mut self, input: i32) -> Self {
98 self.limit = ::std::option::Option::Some(input);
99 self
100 }
101 /// <p>Maximum number of backups to return at once.</p>
102 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
103 self.limit = input;
104 self
105 }
106 /// <p>Maximum number of backups to return at once.</p>
107 pub fn get_limit(&self) -> &::std::option::Option<i32> {
108 &self.limit
109 }
110 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
111 pub fn time_range_lower_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
112 self.time_range_lower_bound = ::std::option::Option::Some(input);
113 self
114 }
115 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
116 pub fn set_time_range_lower_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
117 self.time_range_lower_bound = input;
118 self
119 }
120 /// <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
121 pub fn get_time_range_lower_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
122 &self.time_range_lower_bound
123 }
124 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
125 pub fn time_range_upper_bound(mut self, input: ::aws_smithy_types::DateTime) -> Self {
126 self.time_range_upper_bound = ::std::option::Option::Some(input);
127 self
128 }
129 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
130 pub fn set_time_range_upper_bound(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
131 self.time_range_upper_bound = input;
132 self
133 }
134 /// <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive.</p>
135 pub fn get_time_range_upper_bound(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
136 &self.time_range_upper_bound
137 }
138 /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (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>
139 pub fn exclusive_start_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.exclusive_start_backup_arn = ::std::option::Option::Some(input.into());
141 self
142 }
143 /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (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>
144 pub fn set_exclusive_start_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.exclusive_start_backup_arn = input;
146 self
147 }
148 /// <p><code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (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>
149 pub fn get_exclusive_start_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
150 &self.exclusive_start_backup_arn
151 }
152 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
153 /// <p>Where <code>BackupType</code> can be:</p>
154 /// <ul>
155 /// <li>
156 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
157 /// <li>
158 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
159 /// <li>
160 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
161 /// </ul>
162 pub fn backup_type(mut self, input: crate::types::BackupTypeFilter) -> Self {
163 self.backup_type = ::std::option::Option::Some(input);
164 self
165 }
166 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
167 /// <p>Where <code>BackupType</code> can be:</p>
168 /// <ul>
169 /// <li>
170 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
171 /// <li>
172 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
173 /// <li>
174 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
175 /// </ul>
176 pub fn set_backup_type(mut self, input: ::std::option::Option<crate::types::BackupTypeFilter>) -> Self {
177 self.backup_type = input;
178 self
179 }
180 /// <p>The backups from the table specified by <code>BackupType</code> are listed.</p>
181 /// <p>Where <code>BackupType</code> can be:</p>
182 /// <ul>
183 /// <li>
184 /// <p><code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p></li>
185 /// <li>
186 /// <p><code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p></li>
187 /// <li>
188 /// <p><code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p></li>
189 /// </ul>
190 pub fn get_backup_type(&self) -> &::std::option::Option<crate::types::BackupTypeFilter> {
191 &self.backup_type
192 }
193 /// Consumes the builder and constructs a [`ListBackupsInput`](crate::operation::list_backups::ListBackupsInput).
194 pub fn build(self) -> ::std::result::Result<crate::operation::list_backups::ListBackupsInput, ::aws_smithy_types::error::operation::BuildError> {
195 ::std::result::Result::Ok(crate::operation::list_backups::ListBackupsInput {
196 table_name: self.table_name,
197 limit: self.limit,
198 time_range_lower_bound: self.time_range_lower_bound,
199 time_range_upper_bound: self.time_range_upper_bound,
200 exclusive_start_backup_arn: self.exclusive_start_backup_arn,
201 backup_type: self.backup_type,
202 })
203 }
204}