Struct aws_sdk_lambda::output::list_aliases_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListAliasesOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn next_marker(self, input: impl Into<String>) -> Self
pub fn next_marker(self, input: impl Into<String>) -> Self
The pagination token that's included if more results are available.
sourcepub fn set_next_marker(self, input: Option<String>) -> Self
pub fn set_next_marker(self, input: Option<String>) -> Self
The pagination token that's included if more results are available.
Examples found in repository?
src/json_deser.rs (lines 4686-4692)
4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715
pub(crate) fn deser_operation_crate_operation_list_aliases(
value: &[u8],
mut builder: crate::output::list_aliases_output::Builder,
) -> Result<
crate::output::list_aliases_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() {
"Aliases" => {
builder = builder.set_aliases(
crate::json_deser::deser_list_com_amazonaws_lambda_alias_list(tokens)?,
);
}
"NextMarker" => {
builder = builder.set_next_marker(
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 aliases(self, input: AliasConfiguration) -> Self
pub fn aliases(self, input: AliasConfiguration) -> Self
Appends an item to aliases
.
To override the contents of this collection use set_aliases
.
A list of aliases.
sourcepub fn set_aliases(self, input: Option<Vec<AliasConfiguration>>) -> Self
pub fn set_aliases(self, input: Option<Vec<AliasConfiguration>>) -> Self
A list of aliases.
Examples found in repository?
src/json_deser.rs (lines 4681-4683)
4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715
pub(crate) fn deser_operation_crate_operation_list_aliases(
value: &[u8],
mut builder: crate::output::list_aliases_output::Builder,
) -> Result<
crate::output::list_aliases_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() {
"Aliases" => {
builder = builder.set_aliases(
crate::json_deser::deser_list_com_amazonaws_lambda_alias_list(tokens)?,
);
}
"NextMarker" => {
builder = builder.set_next_marker(
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) -> ListAliasesOutput
pub fn build(self) -> ListAliasesOutput
Consumes the builder and constructs a ListAliasesOutput
.
Examples found in repository?
src/operation_deser.rs (line 4571)
4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573
pub fn parse_list_aliases_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListAliasesOutput, crate::error::ListAliasesError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_aliases_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_aliases(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListAliasesError::unhandled)?;
output.build()
})
}