Struct aws_sdk_lambda::output::list_layers_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListLayersOutput
.
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
A pagination token returned when the response doesn't contain all layers.
sourcepub fn set_next_marker(self, input: Option<String>) -> Self
pub fn set_next_marker(self, input: Option<String>) -> Self
A pagination token returned when the response doesn't contain all layers.
Examples found in repository?
src/json_deser.rs (lines 5068-5074)
5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097
pub(crate) fn deser_operation_crate_operation_list_layers(
value: &[u8],
mut builder: crate::output::list_layers_output::Builder,
) -> Result<
crate::output::list_layers_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() {
"Layers" => {
builder = builder.set_layers(
crate::json_deser::deser_list_com_amazonaws_lambda_layers_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 layers(self, input: LayersListItem) -> Self
pub fn layers(self, input: LayersListItem) -> Self
Appends an item to layers
.
To override the contents of this collection use set_layers
.
A list of function layers.
sourcepub fn set_layers(self, input: Option<Vec<LayersListItem>>) -> Self
pub fn set_layers(self, input: Option<Vec<LayersListItem>>) -> Self
A list of function layers.
Examples found in repository?
src/json_deser.rs (lines 5063-5065)
5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097
pub(crate) fn deser_operation_crate_operation_list_layers(
value: &[u8],
mut builder: crate::output::list_layers_output::Builder,
) -> Result<
crate::output::list_layers_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() {
"Layers" => {
builder = builder.set_layers(
crate::json_deser::deser_list_com_amazonaws_lambda_layers_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) -> ListLayersOutput
pub fn build(self) -> ListLayersOutput
Consumes the builder and constructs a ListLayersOutput
.
Examples found in repository?
src/operation_deser.rs (line 5257)
5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259
pub fn parse_list_layers_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListLayersOutput, crate::error::ListLayersError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_layers_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_layers(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListLayersError::unhandled)?;
output.build()
})
}