aws_sdk_backup/operation/list_copy_jobs/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_copy_jobs::_list_copy_jobs_output::ListCopyJobsOutputBuilder;
3
4pub use crate::operation::list_copy_jobs::_list_copy_jobs_input::ListCopyJobsInputBuilder;
5
6impl crate::operation::list_copy_jobs::builders::ListCopyJobsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::list_copy_jobs::ListCopyJobsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_copy_jobs::ListCopyJobsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_copy_jobs();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListCopyJobs`.
24///
25/// <p>Returns metadata about your copy jobs.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListCopyJobsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::list_copy_jobs::builders::ListCopyJobsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::list_copy_jobs::ListCopyJobsOutput,
35        crate::operation::list_copy_jobs::ListCopyJobsError,
36    > for ListCopyJobsFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::list_copy_jobs::ListCopyJobsOutput,
44            crate::operation::list_copy_jobs::ListCopyJobsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ListCopyJobsFluentBuilder {
51    /// Creates a new `ListCopyJobsFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the ListCopyJobs as a reference.
60    pub fn as_input(&self) -> &crate::operation::list_copy_jobs::builders::ListCopyJobsInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::list_copy_jobs::ListCopyJobsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::list_copy_jobs::ListCopyJobsError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::list_copy_jobs::ListCopyJobs::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::list_copy_jobs::ListCopyJobs::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::list_copy_jobs::ListCopyJobsOutput,
97        crate::operation::list_copy_jobs::ListCopyJobsError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::list_copy_jobs::paginator::ListCopyJobsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::list_copy_jobs::paginator::ListCopyJobsPaginator {
115        crate::operation::list_copy_jobs::paginator::ListCopyJobsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.</p>
118    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.next_token(input.into());
120        self
121    }
122    /// <p>The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.</p>
123    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_next_token(input);
125        self
126    }
127    /// <p>The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.</p>
128    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_next_token()
130    }
131    /// <p>The maximum number of items to be returned.</p>
132    pub fn max_results(mut self, input: i32) -> Self {
133        self.inner = self.inner.max_results(input);
134        self
135    }
136    /// <p>The maximum number of items to be returned.</p>
137    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
138        self.inner = self.inner.set_max_results(input);
139        self
140    }
141    /// <p>The maximum number of items to be returned.</p>
142    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
143        self.inner.get_max_results()
144    }
145    /// <p>Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).</p>
146    pub fn by_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.by_resource_arn(input.into());
148        self
149    }
150    /// <p>Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).</p>
151    pub fn set_by_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_by_resource_arn(input);
153        self
154    }
155    /// <p>Returns only copy jobs that match the specified resource Amazon Resource Name (ARN).</p>
156    pub fn get_by_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_by_resource_arn()
158    }
159    /// <p>Returns only copy jobs that are in the specified state.</p>
160    pub fn by_state(mut self, input: crate::types::CopyJobState) -> Self {
161        self.inner = self.inner.by_state(input);
162        self
163    }
164    /// <p>Returns only copy jobs that are in the specified state.</p>
165    pub fn set_by_state(mut self, input: ::std::option::Option<crate::types::CopyJobState>) -> Self {
166        self.inner = self.inner.set_by_state(input);
167        self
168    }
169    /// <p>Returns only copy jobs that are in the specified state.</p>
170    pub fn get_by_state(&self) -> &::std::option::Option<crate::types::CopyJobState> {
171        self.inner.get_by_state()
172    }
173    /// <p>Returns only copy jobs that were created before the specified date.</p>
174    pub fn by_created_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
175        self.inner = self.inner.by_created_before(input);
176        self
177    }
178    /// <p>Returns only copy jobs that were created before the specified date.</p>
179    pub fn set_by_created_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
180        self.inner = self.inner.set_by_created_before(input);
181        self
182    }
183    /// <p>Returns only copy jobs that were created before the specified date.</p>
184    pub fn get_by_created_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
185        self.inner.get_by_created_before()
186    }
187    /// <p>Returns only copy jobs that were created after the specified date.</p>
188    pub fn by_created_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
189        self.inner = self.inner.by_created_after(input);
190        self
191    }
192    /// <p>Returns only copy jobs that were created after the specified date.</p>
193    pub fn set_by_created_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
194        self.inner = self.inner.set_by_created_after(input);
195        self
196    }
197    /// <p>Returns only copy jobs that were created after the specified date.</p>
198    pub fn get_by_created_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
199        self.inner.get_by_created_after()
200    }
201    /// <p>Returns only backup jobs for the specified resources:</p>
202    /// <ul>
203    /// <li>
204    /// <p><code>Aurora</code> for Amazon Aurora</p></li>
205    /// <li>
206    /// <p><code>CloudFormation</code> for CloudFormation</p></li>
207    /// <li>
208    /// <p><code>DocumentDB</code> for Amazon DocumentDB (with MongoDB compatibility)</p></li>
209    /// <li>
210    /// <p><code>DynamoDB</code> for Amazon DynamoDB</p></li>
211    /// <li>
212    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
213    /// <li>
214    /// <p><code>EC2</code> for Amazon Elastic Compute Cloud</p></li>
215    /// <li>
216    /// <p><code>EFS</code> for Amazon Elastic File System</p></li>
217    /// <li>
218    /// <p><code>FSx</code> for Amazon FSx</p></li>
219    /// <li>
220    /// <p><code>Neptune</code> for Amazon Neptune</p></li>
221    /// <li>
222    /// <p><code>RDS</code> for Amazon Relational Database Service</p></li>
223    /// <li>
224    /// <p><code>Redshift</code> for Amazon Redshift</p></li>
225    /// <li>
226    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
227    /// <li>
228    /// <p><code>SAP HANA on Amazon EC2</code> for SAP HANA databases on Amazon Elastic Compute Cloud instances</p></li>
229    /// <li>
230    /// <p><code>Storage Gateway</code> for Storage Gateway</p></li>
231    /// <li>
232    /// <p><code>Timestream</code> for Amazon Timestream</p></li>
233    /// <li>
234    /// <p><code>VirtualMachine</code> for VMware virtual machines</p></li>
235    /// </ul>
236    pub fn by_resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237        self.inner = self.inner.by_resource_type(input.into());
238        self
239    }
240    /// <p>Returns only backup jobs for the specified resources:</p>
241    /// <ul>
242    /// <li>
243    /// <p><code>Aurora</code> for Amazon Aurora</p></li>
244    /// <li>
245    /// <p><code>CloudFormation</code> for CloudFormation</p></li>
246    /// <li>
247    /// <p><code>DocumentDB</code> for Amazon DocumentDB (with MongoDB compatibility)</p></li>
248    /// <li>
249    /// <p><code>DynamoDB</code> for Amazon DynamoDB</p></li>
250    /// <li>
251    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
252    /// <li>
253    /// <p><code>EC2</code> for Amazon Elastic Compute Cloud</p></li>
254    /// <li>
255    /// <p><code>EFS</code> for Amazon Elastic File System</p></li>
256    /// <li>
257    /// <p><code>FSx</code> for Amazon FSx</p></li>
258    /// <li>
259    /// <p><code>Neptune</code> for Amazon Neptune</p></li>
260    /// <li>
261    /// <p><code>RDS</code> for Amazon Relational Database Service</p></li>
262    /// <li>
263    /// <p><code>Redshift</code> for Amazon Redshift</p></li>
264    /// <li>
265    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
266    /// <li>
267    /// <p><code>SAP HANA on Amazon EC2</code> for SAP HANA databases on Amazon Elastic Compute Cloud instances</p></li>
268    /// <li>
269    /// <p><code>Storage Gateway</code> for Storage Gateway</p></li>
270    /// <li>
271    /// <p><code>Timestream</code> for Amazon Timestream</p></li>
272    /// <li>
273    /// <p><code>VirtualMachine</code> for VMware virtual machines</p></li>
274    /// </ul>
275    pub fn set_by_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276        self.inner = self.inner.set_by_resource_type(input);
277        self
278    }
279    /// <p>Returns only backup jobs for the specified resources:</p>
280    /// <ul>
281    /// <li>
282    /// <p><code>Aurora</code> for Amazon Aurora</p></li>
283    /// <li>
284    /// <p><code>CloudFormation</code> for CloudFormation</p></li>
285    /// <li>
286    /// <p><code>DocumentDB</code> for Amazon DocumentDB (with MongoDB compatibility)</p></li>
287    /// <li>
288    /// <p><code>DynamoDB</code> for Amazon DynamoDB</p></li>
289    /// <li>
290    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
291    /// <li>
292    /// <p><code>EC2</code> for Amazon Elastic Compute Cloud</p></li>
293    /// <li>
294    /// <p><code>EFS</code> for Amazon Elastic File System</p></li>
295    /// <li>
296    /// <p><code>FSx</code> for Amazon FSx</p></li>
297    /// <li>
298    /// <p><code>Neptune</code> for Amazon Neptune</p></li>
299    /// <li>
300    /// <p><code>RDS</code> for Amazon Relational Database Service</p></li>
301    /// <li>
302    /// <p><code>Redshift</code> for Amazon Redshift</p></li>
303    /// <li>
304    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
305    /// <li>
306    /// <p><code>SAP HANA on Amazon EC2</code> for SAP HANA databases on Amazon Elastic Compute Cloud instances</p></li>
307    /// <li>
308    /// <p><code>Storage Gateway</code> for Storage Gateway</p></li>
309    /// <li>
310    /// <p><code>Timestream</code> for Amazon Timestream</p></li>
311    /// <li>
312    /// <p><code>VirtualMachine</code> for VMware virtual machines</p></li>
313    /// </ul>
314    pub fn get_by_resource_type(&self) -> &::std::option::Option<::std::string::String> {
315        self.inner.get_by_resource_type()
316    }
317    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, <code>arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault</code>.</p>
318    pub fn by_destination_vault_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319        self.inner = self.inner.by_destination_vault_arn(input.into());
320        self
321    }
322    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, <code>arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault</code>.</p>
323    pub fn set_by_destination_vault_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
324        self.inner = self.inner.set_by_destination_vault_arn(input);
325        self
326    }
327    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, <code>arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault</code>.</p>
328    pub fn get_by_destination_vault_arn(&self) -> &::std::option::Option<::std::string::String> {
329        self.inner.get_by_destination_vault_arn()
330    }
331    /// <p>The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.</p>
332    pub fn by_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333        self.inner = self.inner.by_account_id(input.into());
334        self
335    }
336    /// <p>The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.</p>
337    pub fn set_by_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
338        self.inner = self.inner.set_by_account_id(input);
339        self
340    }
341    /// <p>The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.</p>
342    pub fn get_by_account_id(&self) -> &::std::option::Option<::std::string::String> {
343        self.inner.get_by_account_id()
344    }
345    /// <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
346    pub fn by_complete_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
347        self.inner = self.inner.by_complete_before(input);
348        self
349    }
350    /// <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
351    pub fn set_by_complete_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
352        self.inner = self.inner.set_by_complete_before(input);
353        self
354    }
355    /// <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
356    pub fn get_by_complete_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
357        self.inner.get_by_complete_before()
358    }
359    /// <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
360    pub fn by_complete_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
361        self.inner = self.inner.by_complete_after(input);
362        self
363    }
364    /// <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
365    pub fn set_by_complete_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
366        self.inner = self.inner.set_by_complete_after(input);
367        self
368    }
369    /// <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC).</p>
370    pub fn get_by_complete_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
371        self.inner.get_by_complete_after()
372    }
373    /// <p>This is a filter to list child (nested) jobs based on parent job ID.</p>
374    pub fn by_parent_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
375        self.inner = self.inner.by_parent_job_id(input.into());
376        self
377    }
378    /// <p>This is a filter to list child (nested) jobs based on parent job ID.</p>
379    pub fn set_by_parent_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380        self.inner = self.inner.set_by_parent_job_id(input);
381        self
382    }
383    /// <p>This is a filter to list child (nested) jobs based on parent job ID.</p>
384    pub fn get_by_parent_job_id(&self) -> &::std::option::Option<::std::string::String> {
385        self.inner.get_by_parent_job_id()
386    }
387    /// <p>This is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input.</p>
388    /// <p>Example strings may include <code>AccessDenied</code>, <code>SUCCESS</code>, <code>AGGREGATE_ALL</code>, and <code>INVALIDPARAMETERS</code>.</p>
389    /// <p>View <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html">Monitoring</a> for a list of accepted strings.</p>
390    /// <p>The the value ANY returns count of all message categories.</p>
391    /// <p><code>AGGREGATE_ALL</code> aggregates job counts for all message categories and returns the sum.</p>
392    pub fn by_message_category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
393        self.inner = self.inner.by_message_category(input.into());
394        self
395    }
396    /// <p>This is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input.</p>
397    /// <p>Example strings may include <code>AccessDenied</code>, <code>SUCCESS</code>, <code>AGGREGATE_ALL</code>, and <code>INVALIDPARAMETERS</code>.</p>
398    /// <p>View <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html">Monitoring</a> for a list of accepted strings.</p>
399    /// <p>The the value ANY returns count of all message categories.</p>
400    /// <p><code>AGGREGATE_ALL</code> aggregates job counts for all message categories and returns the sum.</p>
401    pub fn set_by_message_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
402        self.inner = self.inner.set_by_message_category(input);
403        self
404    }
405    /// <p>This is an optional parameter that can be used to filter out jobs with a MessageCategory which matches the value you input.</p>
406    /// <p>Example strings may include <code>AccessDenied</code>, <code>SUCCESS</code>, <code>AGGREGATE_ALL</code>, and <code>INVALIDPARAMETERS</code>.</p>
407    /// <p>View <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html">Monitoring</a> for a list of accepted strings.</p>
408    /// <p>The the value ANY returns count of all message categories.</p>
409    /// <p><code>AGGREGATE_ALL</code> aggregates job counts for all message categories and returns the sum.</p>
410    pub fn get_by_message_category(&self) -> &::std::option::Option<::std::string::String> {
411        self.inner.get_by_message_category()
412    }
413    /// <p>Filters copy jobs by the specified source recovery point ARN.</p>
414    pub fn by_source_recovery_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
415        self.inner = self.inner.by_source_recovery_point_arn(input.into());
416        self
417    }
418    /// <p>Filters copy jobs by the specified source recovery point ARN.</p>
419    pub fn set_by_source_recovery_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
420        self.inner = self.inner.set_by_source_recovery_point_arn(input);
421        self
422    }
423    /// <p>Filters copy jobs by the specified source recovery point ARN.</p>
424    pub fn get_by_source_recovery_point_arn(&self) -> &::std::option::Option<::std::string::String> {
425        self.inner.get_by_source_recovery_point_arn()
426    }
427}