aws_sdk_dynamodb/operation/list_tables/
_list_tables_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>ListTables</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListTablesInput {
7    /// <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>
8    pub exclusive_start_table_name: ::std::option::Option<::std::string::String>,
9    /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
10    pub limit: ::std::option::Option<i32>,
11}
12impl ListTablesInput {
13    /// <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>
14    pub fn exclusive_start_table_name(&self) -> ::std::option::Option<&str> {
15        self.exclusive_start_table_name.as_deref()
16    }
17    /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
18    pub fn limit(&self) -> ::std::option::Option<i32> {
19        self.limit
20    }
21}
22impl ListTablesInput {
23    /// Creates a new builder-style object to manufacture [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
24    pub fn builder() -> crate::operation::list_tables::builders::ListTablesInputBuilder {
25        crate::operation::list_tables::builders::ListTablesInputBuilder::default()
26    }
27}
28
29/// A builder for [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct ListTablesInputBuilder {
33    pub(crate) exclusive_start_table_name: ::std::option::Option<::std::string::String>,
34    pub(crate) limit: ::std::option::Option<i32>,
35}
36impl ListTablesInputBuilder {
37    /// <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>
38    pub fn exclusive_start_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.exclusive_start_table_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <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>
43    pub fn set_exclusive_start_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.exclusive_start_table_name = input;
45        self
46    }
47    /// <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>
48    pub fn get_exclusive_start_table_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.exclusive_start_table_name
50    }
51    /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
52    pub fn limit(mut self, input: i32) -> Self {
53        self.limit = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
57    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
58        self.limit = input;
59        self
60    }
61    /// <p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>
62    pub fn get_limit(&self) -> &::std::option::Option<i32> {
63        &self.limit
64    }
65    /// Consumes the builder and constructs a [`ListTablesInput`](crate::operation::list_tables::ListTablesInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::list_tables::ListTablesInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::list_tables::ListTablesInput {
68            exclusive_start_table_name: self.exclusive_start_table_name,
69            limit: self.limit,
70        })
71    }
72}