aws_sdk_databasemigration/operation/describe_replication_instance_task_logs/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_replication_instance_task_logs::_describe_replication_instance_task_logs_output::DescribeReplicationInstanceTaskLogsOutputBuilder;
3
4pub use crate::operation::describe_replication_instance_task_logs::_describe_replication_instance_task_logs_input::DescribeReplicationInstanceTaskLogsInputBuilder;
5
6impl crate::operation::describe_replication_instance_task_logs::builders::DescribeReplicationInstanceTaskLogsInputBuilder {
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_instance_task_logs::DescribeReplicationInstanceTaskLogsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_replication_instance_task_logs();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeReplicationInstanceTaskLogs`.
24///
25/// <p>Returns information about the task logs for the specified task.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeReplicationInstanceTaskLogsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_replication_instance_task_logs::builders::DescribeReplicationInstanceTaskLogsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsOutput,
35        crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsError,
36    > for DescribeReplicationInstanceTaskLogsFluentBuilder
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::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsOutput,
44            crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeReplicationInstanceTaskLogsFluentBuilder {
51    /// Creates a new `DescribeReplicationInstanceTaskLogsFluentBuilder`.
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 DescribeReplicationInstanceTaskLogs as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_replication_instance_task_logs::builders::DescribeReplicationInstanceTaskLogsInputBuilder {
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::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsError,
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 =
85            crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogs::operation_runtime_plugins(
86                self.handle.runtime_plugins.clone(),
87                &self.handle.conf,
88                self.config_override,
89            );
90        crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogs::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsOutput,
98        crate::operation::describe_replication_instance_task_logs::DescribeReplicationInstanceTaskLogsError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// Create a paginator for this request
113    ///
114    /// Paginators are used by calling [`send().await`](crate::operation::describe_replication_instance_task_logs::paginator::DescribeReplicationInstanceTaskLogsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115    pub fn into_paginator(
116        self,
117    ) -> crate::operation::describe_replication_instance_task_logs::paginator::DescribeReplicationInstanceTaskLogsPaginator {
118        crate::operation::describe_replication_instance_task_logs::paginator::DescribeReplicationInstanceTaskLogsPaginator::new(
119            self.handle,
120            self.inner,
121        )
122    }
123    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
124    pub fn replication_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.inner = self.inner.replication_instance_arn(input.into());
126        self
127    }
128    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
129    pub fn set_replication_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.inner = self.inner.set_replication_instance_arn(input);
131        self
132    }
133    /// <p>The Amazon Resource Name (ARN) of the replication instance.</p>
134    pub fn get_replication_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
135        self.inner.get_replication_instance_arn()
136    }
137    /// <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>
138    /// <p>Default: 100</p>
139    /// <p>Constraints: Minimum 20, maximum 100.</p>
140    pub fn max_records(mut self, input: i32) -> Self {
141        self.inner = self.inner.max_records(input);
142        self
143    }
144    /// <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>
145    /// <p>Default: 100</p>
146    /// <p>Constraints: Minimum 20, maximum 100.</p>
147    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
148        self.inner = self.inner.set_max_records(input);
149        self
150    }
151    /// <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>
152    /// <p>Default: 100</p>
153    /// <p>Constraints: Minimum 20, maximum 100.</p>
154    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
155        self.inner.get_max_records()
156    }
157    /// <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>
158    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.marker(input.into());
160        self
161    }
162    /// <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>
163    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_marker(input);
165        self
166    }
167    /// <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>
168    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_marker()
170    }
171}