Struct aws_sdk_dynamodb::output::list_tables_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListTablesOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn table_names(self, input: impl Into<String>) -> Self
pub fn table_names(self, input: impl Into<String>) -> Self
Appends an item to table_names
.
To override the contents of this collection use set_table_names
.
The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.
If LastEvaluatedTableName
also appears in the output, you can use this value as the ExclusiveStartTableName
parameter in a subsequent ListTables
request and obtain the next page of results.
sourcepub fn set_table_names(self, input: Option<Vec<String>>) -> Self
pub fn set_table_names(self, input: Option<Vec<String>>) -> Self
The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.
If LastEvaluatedTableName
also appears in the output, you can use this value as the ExclusiveStartTableName
parameter in a subsequent ListTables
request and obtain the next page of results.
Examples found in repository?
3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206
pub(crate) fn deser_operation_crate_operation_list_tables(
value: &[u8],
mut builder: crate::output::list_tables_output::Builder,
) -> Result<
crate::output::list_tables_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"TableNames" => {
builder = builder.set_table_names(
crate::json_deser::deser_list_com_amazonaws_dynamodb_table_name_list(
tokens,
)?,
);
}
"LastEvaluatedTableName" => {
builder = builder.set_last_evaluated_table_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn last_evaluated_table_name(self, input: impl Into<String>) -> Self
pub fn last_evaluated_table_name(self, input: impl Into<String>) -> Self
The name of the last table in the current page of results. Use this value as the ExclusiveStartTableName
in a new request to obtain the next page of results, until all the table names are returned.
If you do not receive a LastEvaluatedTableName
value in the response, this means that there are no more table names to be retrieved.
sourcepub fn set_last_evaluated_table_name(self, input: Option<String>) -> Self
pub fn set_last_evaluated_table_name(self, input: Option<String>) -> Self
The name of the last table in the current page of results. Use this value as the ExclusiveStartTableName
in a new request to obtain the next page of results, until all the table names are returned.
If you do not receive a LastEvaluatedTableName
value in the response, this means that there are no more table names to be retrieved.
Examples found in repository?
3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206
pub(crate) fn deser_operation_crate_operation_list_tables(
value: &[u8],
mut builder: crate::output::list_tables_output::Builder,
) -> Result<
crate::output::list_tables_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"TableNames" => {
builder = builder.set_table_names(
crate::json_deser::deser_list_com_amazonaws_dynamodb_table_name_list(
tokens,
)?,
);
}
"LastEvaluatedTableName" => {
builder = builder.set_last_evaluated_table_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn build(self) -> ListTablesOutput
pub fn build(self) -> ListTablesOutput
Consumes the builder and constructs a ListTablesOutput
.
Examples found in repository?
3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488
pub fn parse_list_tables_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListTablesOutput, crate::error::ListTablesError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_tables_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_tables(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListTablesError::unhandled)?;
output.build()
})
}