aws_sdk_dynamodb/operation/list_tables/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_tables::_list_tables_output::ListTablesOutputBuilder;
3
4pub use crate::operation::list_tables::_list_tables_input::ListTablesInputBuilder;
5
6impl crate::operation::list_tables::builders::ListTablesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9 crate::operation::list_tables::ListTablesOutput,
10 ::aws_smithy_runtime_api::client::result::SdkError<
11 crate::operation::list_tables::ListTablesError,
12 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13 >
14 > {
15 let mut fluent_builder = client.list_tables();
16 fluent_builder.inner = self;
17 fluent_builder.send().await
18 }
19 }
20/// Fluent builder constructing a request to `ListTables`.
21///
22/// <p>Returns an array of table names associated with the current account and endpoint. The output from <code>ListTables</code> is paginated, with each page returning a maximum of 100 table names.</p>
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
24pub struct ListTablesFluentBuilder {
25 handle: ::std::sync::Arc<crate::client::Handle>,
26 inner: crate::operation::list_tables::builders::ListTablesInputBuilder,
27config_override: ::std::option::Option<crate::config::Builder>,
28 }
29impl
30 crate::client::customize::internal::CustomizableSend<
31 crate::operation::list_tables::ListTablesOutput,
32 crate::operation::list_tables::ListTablesError,
33 > for ListTablesFluentBuilder
34 {
35 fn send(
36 self,
37 config_override: crate::config::Builder,
38 ) -> crate::client::customize::internal::BoxFuture<
39 crate::client::customize::internal::SendResult<
40 crate::operation::list_tables::ListTablesOutput,
41 crate::operation::list_tables::ListTablesError,
42 >,
43 > {
44 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45 }
46 }
47impl ListTablesFluentBuilder {
48 /// Creates a new `ListTablesFluentBuilder`.
49 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50 Self {
51 handle,
52 inner: ::std::default::Default::default(),
53 config_override: ::std::option::Option::None,
54 }
55 }
56 /// Access the ListTables as a reference.
57 pub fn as_input(&self) -> &crate::operation::list_tables::builders::ListTablesInputBuilder {
58 &self.inner
59 }
60 /// Sends the request and returns the response.
61 ///
62 /// If an error occurs, an `SdkError` will be returned with additional details that
63 /// can be matched against.
64 ///
65 /// By default, any retryable failures will be retried twice. Retry behavior
66 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67 /// set when configuring the client.
68 pub async fn send(self) -> ::std::result::Result<crate::operation::list_tables::ListTablesOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tables::ListTablesError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
69 let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
70 let runtime_plugins = crate::operation::list_tables::ListTables::operation_runtime_plugins(
71 self.handle.runtime_plugins.clone(),
72 &self.handle.conf,
73 self.config_override,
74 );
75 crate::operation::list_tables::ListTables::orchestrate(&runtime_plugins, input).await
76 }
77
78 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
79 pub fn customize(
80 self,
81 ) -> crate::client::customize::CustomizableOperation<crate::operation::list_tables::ListTablesOutput, crate::operation::list_tables::ListTablesError, Self> {
82 crate::client::customize::CustomizableOperation::new(self)
83 }
84 pub(crate) fn config_override(
85 mut self,
86 config_override: impl ::std::convert::Into<crate::config::Builder>,
87 ) -> Self {
88 self.set_config_override(::std::option::Option::Some(config_override.into()));
89 self
90 }
91
92 pub(crate) fn set_config_override(
93 &mut self,
94 config_override: ::std::option::Option<crate::config::Builder>,
95 ) -> &mut Self {
96 self.config_override = config_override;
97 self
98 }
99 /// Create a paginator for this request
100 ///
101 /// Paginators are used by calling [`send().await`](crate::operation::list_tables::paginator::ListTablesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
102 pub fn into_paginator(self) -> crate::operation::list_tables::paginator::ListTablesPaginator {
103 crate::operation::list_tables::paginator::ListTablesPaginator::new(self.handle, self.inner)
104 }
105 /// <p>The first table name that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedTableName</code> in a previous operation, so that you can obtain the next page of results.</p>
106 pub fn exclusive_start_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.inner = self.inner.exclusive_start_table_name(input.into());
108 self
109 }
110 /// <p>The first table name that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedTableName</code> in a previous operation, so that you can obtain the next page of results.</p>
111 pub fn set_exclusive_start_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.inner = self.inner.set_exclusive_start_table_name(input);
113 self
114 }
115 /// <p>The first table name that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedTableName</code> in a previous operation, so that you can obtain the next page of results.</p>
116 pub fn get_exclusive_start_table_name(&self) -> &::std::option::Option<::std::string::String> {
117 self.inner.get_exclusive_start_table_name()
118 }
119 /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
120 pub fn limit(mut self, input: i32) -> Self {
121 self.inner = self.inner.limit(input);
122 self
123 }
124 /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
125 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
126 self.inner = self.inner.set_limit(input);
127 self
128 }
129 /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
130 pub fn get_limit(&self) -> &::std::option::Option<i32> {
131 self.inner.get_limit()
132 }
133}
134