aws_sdk_databasemigration/operation/describe_applicable_individual_assessments/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_applicable_individual_assessments::_describe_applicable_individual_assessments_output::DescribeApplicableIndividualAssessmentsOutputBuilder;
3
4pub use crate::operation::describe_applicable_individual_assessments::_describe_applicable_individual_assessments_input::DescribeApplicableIndividualAssessmentsInputBuilder;
5
6impl crate::operation::describe_applicable_individual_assessments::builders::DescribeApplicableIndividualAssessmentsInputBuilder {
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_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_applicable_individual_assessments();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeApplicableIndividualAssessments`.
24///
25/// <p>Provides a list of individual assessments that you can specify for a new premigration assessment run, given one or more parameters.</p>
26/// <p>If you specify an existing migration task, this operation provides the default individual assessments you can specify for that task. Otherwise, the specified parameters model elements of a possible migration task on which to base a premigration assessment run.</p>
27/// <p>To use these migration task modeling parameters, you must specify an existing replication instance, a source database engine, a target database engine, and a migration type. This combination of parameters potentially limits the default individual assessments available for an assessment run created for a corresponding migration task.</p>
28/// <p>If you specify no parameters, this operation provides a list of all possible individual assessments that you can specify for an assessment run. If you specify any one of the task modeling parameters, you must specify all of them or the operation cannot provide a list of individual assessments. The only parameter that you can specify alone is for an existing migration task. The specified task definition then determines the default list of individual assessments that you can specify in an assessment run for the task.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct DescribeApplicableIndividualAssessmentsFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::describe_applicable_individual_assessments::builders::DescribeApplicableIndividualAssessmentsInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsOutput,
38        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsError,
39    > for DescribeApplicableIndividualAssessmentsFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsOutput,
47            crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl DescribeApplicableIndividualAssessmentsFluentBuilder {
54    /// Creates a new `DescribeApplicableIndividualAssessmentsFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the DescribeApplicableIndividualAssessments as a reference.
63    pub fn as_input(
64        &self,
65    ) -> &crate::operation::describe_applicable_individual_assessments::builders::DescribeApplicableIndividualAssessmentsInputBuilder {
66        &self.inner
67    }
68    /// Sends the request and returns the response.
69    ///
70    /// If an error occurs, an `SdkError` will be returned with additional details that
71    /// can be matched against.
72    ///
73    /// By default, any retryable failures will be retried twice. Retry behavior
74    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75    /// set when configuring the client.
76    pub async fn send(
77        self,
78    ) -> ::std::result::Result<
79        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsOutput,
80        ::aws_smithy_runtime_api::client::result::SdkError<
81            crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsError,
82            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83        >,
84    > {
85        let input = self
86            .inner
87            .build()
88            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89        let runtime_plugins =
90            crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessments::operation_runtime_plugins(
91                self.handle.runtime_plugins.clone(),
92                &self.handle.conf,
93                self.config_override,
94            );
95        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessments::orchestrate(&runtime_plugins, input)
96            .await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsOutput,
104        crate::operation::describe_applicable_individual_assessments::DescribeApplicableIndividualAssessmentsError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// Create a paginator for this request
119    ///
120    /// Paginators are used by calling [`send().await`](crate::operation::describe_applicable_individual_assessments::paginator::DescribeApplicableIndividualAssessmentsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
121    pub fn into_paginator(
122        self,
123    ) -> crate::operation::describe_applicable_individual_assessments::paginator::DescribeApplicableIndividualAssessmentsPaginator {
124        crate::operation::describe_applicable_individual_assessments::paginator::DescribeApplicableIndividualAssessmentsPaginator::new(
125            self.handle,
126            self.inner,
127        )
128    }
129    /// <p>Amazon Resource Name (ARN) of a migration task on which you want to base the default list of individual assessments.</p>
130    pub fn replication_task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.replication_task_arn(input.into());
132        self
133    }
134    /// <p>Amazon Resource Name (ARN) of a migration task on which you want to base the default list of individual assessments.</p>
135    pub fn set_replication_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_replication_task_arn(input);
137        self
138    }
139    /// <p>Amazon Resource Name (ARN) of a migration task on which you want to base the default list of individual assessments.</p>
140    pub fn get_replication_task_arn(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_replication_task_arn()
142    }
143    /// <p>ARN of a replication instance on which you want to base the default list of individual assessments.</p>
144    pub fn replication_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.replication_instance_arn(input.into());
146        self
147    }
148    /// <p>ARN of a replication instance on which you want to base the default list of individual assessments.</p>
149    pub fn set_replication_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_replication_instance_arn(input);
151        self
152    }
153    /// <p>ARN of a replication instance on which you want to base the default list of individual assessments.</p>
154    pub fn get_replication_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_replication_instance_arn()
156    }
157    /// <p>Amazon Resource Name (ARN) of a serverless replication on which you want to base the default list of individual assessments.</p>
158    pub fn replication_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.replication_config_arn(input.into());
160        self
161    }
162    /// <p>Amazon Resource Name (ARN) of a serverless replication on which you want to base the default list of individual assessments.</p>
163    pub fn set_replication_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_replication_config_arn(input);
165        self
166    }
167    /// <p>Amazon Resource Name (ARN) of a serverless replication on which you want to base the default list of individual assessments.</p>
168    pub fn get_replication_config_arn(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_replication_config_arn()
170    }
171    /// <p>Name of a database engine that the specified replication instance supports as a source.</p>
172    pub fn source_engine_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.inner = self.inner.source_engine_name(input.into());
174        self
175    }
176    /// <p>Name of a database engine that the specified replication instance supports as a source.</p>
177    pub fn set_source_engine_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.inner = self.inner.set_source_engine_name(input);
179        self
180    }
181    /// <p>Name of a database engine that the specified replication instance supports as a source.</p>
182    pub fn get_source_engine_name(&self) -> &::std::option::Option<::std::string::String> {
183        self.inner.get_source_engine_name()
184    }
185    /// <p>Name of a database engine that the specified replication instance supports as a target.</p>
186    pub fn target_engine_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.inner = self.inner.target_engine_name(input.into());
188        self
189    }
190    /// <p>Name of a database engine that the specified replication instance supports as a target.</p>
191    pub fn set_target_engine_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.inner = self.inner.set_target_engine_name(input);
193        self
194    }
195    /// <p>Name of a database engine that the specified replication instance supports as a target.</p>
196    pub fn get_target_engine_name(&self) -> &::std::option::Option<::std::string::String> {
197        self.inner.get_target_engine_name()
198    }
199    /// <p>Name of the migration type that each provided individual assessment must support.</p>
200    pub fn migration_type(mut self, input: crate::types::MigrationTypeValue) -> Self {
201        self.inner = self.inner.migration_type(input);
202        self
203    }
204    /// <p>Name of the migration type that each provided individual assessment must support.</p>
205    pub fn set_migration_type(mut self, input: ::std::option::Option<crate::types::MigrationTypeValue>) -> Self {
206        self.inner = self.inner.set_migration_type(input);
207        self
208    }
209    /// <p>Name of the migration type that each provided individual assessment must support.</p>
210    pub fn get_migration_type(&self) -> &::std::option::Option<crate::types::MigrationTypeValue> {
211        self.inner.get_migration_type()
212    }
213    /// <p>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>
214    pub fn max_records(mut self, input: i32) -> Self {
215        self.inner = self.inner.max_records(input);
216        self
217    }
218    /// <p>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>
219    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
220        self.inner = self.inner.set_max_records(input);
221        self
222    }
223    /// <p>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>
224    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
225        self.inner.get_max_records()
226    }
227    /// <p>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>
228    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.inner = self.inner.marker(input.into());
230        self
231    }
232    /// <p>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>
233    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234        self.inner = self.inner.set_marker(input);
235        self
236    }
237    /// <p>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>
238    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
239        self.inner.get_marker()
240    }
241}