aws_sdk_databasemigration/operation/describe_replication_task_assessment_results/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_replication_task_assessment_results::_describe_replication_task_assessment_results_output::DescribeReplicationTaskAssessmentResultsOutputBuilder;
3
4pub use crate::operation::describe_replication_task_assessment_results::_describe_replication_task_assessment_results_input::DescribeReplicationTaskAssessmentResultsInputBuilder;
5
6impl crate::operation::describe_replication_task_assessment_results::builders::DescribeReplicationTaskAssessmentResultsInputBuilder {
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::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_replication_task_assessment_results();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeReplicationTaskAssessmentResults`.
24///
25/// <p>Returns the task assessment results from the Amazon S3 bucket that DMS creates in your Amazon Web Services account. This action always returns the latest results.</p>
26/// <p>For more information about DMS task assessments, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.AssessmentReport.html">Creating a task assessment report</a> in the <i>Database Migration Service User Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeReplicationTaskAssessmentResultsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::describe_replication_task_assessment_results::builders::DescribeReplicationTaskAssessmentResultsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsOutput,
36        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsError,
37    > for DescribeReplicationTaskAssessmentResultsFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsOutput,
45            crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl DescribeReplicationTaskAssessmentResultsFluentBuilder {
52    /// Creates a new `DescribeReplicationTaskAssessmentResultsFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the DescribeReplicationTaskAssessmentResults as a reference.
61    pub fn as_input(
62        &self,
63    ) -> &crate::operation::describe_replication_task_assessment_results::builders::DescribeReplicationTaskAssessmentResultsInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins =
88            crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResults::operation_runtime_plugins(
89                self.handle.runtime_plugins.clone(),
90                &self.handle.conf,
91                self.config_override,
92            );
93        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResults::orchestrate(&runtime_plugins, input)
94            .await
95    }
96
97    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98    pub fn customize(
99        self,
100    ) -> crate::client::customize::CustomizableOperation<
101        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsOutput,
102        crate::operation::describe_replication_task_assessment_results::DescribeReplicationTaskAssessmentResultsError,
103        Self,
104    > {
105        crate::client::customize::CustomizableOperation::new(self)
106    }
107    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108        self.set_config_override(::std::option::Option::Some(config_override.into()));
109        self
110    }
111
112    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113        self.config_override = config_override;
114        self
115    }
116    /// Create a paginator for this request
117    ///
118    /// Paginators are used by calling [`send().await`](crate::operation::describe_replication_task_assessment_results::paginator::DescribeReplicationTaskAssessmentResultsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
119    pub fn into_paginator(
120        self,
121    ) -> crate::operation::describe_replication_task_assessment_results::paginator::DescribeReplicationTaskAssessmentResultsPaginator {
122        crate::operation::describe_replication_task_assessment_results::paginator::DescribeReplicationTaskAssessmentResultsPaginator::new(
123            self.handle,
124            self.inner,
125        )
126    }
127    /// <p>The Amazon Resource Name (ARN) string that uniquely identifies the task. When this input parameter is specified, the API returns only one result and ignore the values of the <code>MaxRecords</code> and <code>Marker</code> parameters.</p>
128    pub fn replication_task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.replication_task_arn(input.into());
130        self
131    }
132    /// <p>The Amazon Resource Name (ARN) string that uniquely identifies the task. When this input parameter is specified, the API returns only one result and ignore the values of the <code>MaxRecords</code> and <code>Marker</code> parameters.</p>
133    pub fn set_replication_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_replication_task_arn(input);
135        self
136    }
137    /// <p>The Amazon Resource Name (ARN) string that uniquely identifies the task. When this input parameter is specified, the API returns only one result and ignore the values of the <code>MaxRecords</code> and <code>Marker</code> parameters.</p>
138    pub fn get_replication_task_arn(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_replication_task_arn()
140    }
141    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
142    /// <p>Default: 100</p>
143    /// <p>Constraints: Minimum 20, maximum 100.</p>
144    pub fn max_records(mut self, input: i32) -> Self {
145        self.inner = self.inner.max_records(input);
146        self
147    }
148    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
149    /// <p>Default: 100</p>
150    /// <p>Constraints: Minimum 20, maximum 100.</p>
151    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
152        self.inner = self.inner.set_max_records(input);
153        self
154    }
155    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
156    /// <p>Default: 100</p>
157    /// <p>Constraints: Minimum 20, maximum 100.</p>
158    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
159        self.inner.get_max_records()
160    }
161    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
162    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.inner = self.inner.marker(input.into());
164        self
165    }
166    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
167    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.inner = self.inner.set_marker(input);
169        self
170    }
171    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
172    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_marker()
174    }
175}