pub struct Builder { /* private fields */ }
Expand description
A builder for ListVersionsByFunctionOutput
.
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 5272-5278)
5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308
pub(crate) fn deser_operation_crate_operation_list_versions_by_function(
value: &[u8],
mut builder: crate::output::list_versions_by_function_output::Builder,
) -> Result<
crate::output::list_versions_by_function_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() {
"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()?,
);
}
"Versions" => {
builder = builder.set_versions(
crate::json_deser::deser_list_com_amazonaws_lambda_function_list(
tokens,
)?,
);
}
_ => 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 versions(self, input: FunctionConfiguration) -> Self
pub fn versions(self, input: FunctionConfiguration) -> Self
Appends an item to versions
.
To override the contents of this collection use set_versions
.
A list of Lambda function versions.
sourcepub fn set_versions(self, input: Option<Vec<FunctionConfiguration>>) -> Self
pub fn set_versions(self, input: Option<Vec<FunctionConfiguration>>) -> Self
A list of Lambda function versions.
Examples found in repository?
src/json_deser.rs (lines 5281-5285)
5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308
pub(crate) fn deser_operation_crate_operation_list_versions_by_function(
value: &[u8],
mut builder: crate::output::list_versions_by_function_output::Builder,
) -> Result<
crate::output::list_versions_by_function_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() {
"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()?,
);
}
"Versions" => {
builder = builder.set_versions(
crate::json_deser::deser_list_com_amazonaws_lambda_function_list(
tokens,
)?,
);
}
_ => 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) -> ListVersionsByFunctionOutput
pub fn build(self) -> ListVersionsByFunctionOutput
Consumes the builder and constructs a ListVersionsByFunctionOutput
.
Examples found in repository?
src/operation_deser.rs (line 5695)
5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697
pub fn parse_list_versions_by_function_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ListVersionsByFunctionOutput,
crate::error::ListVersionsByFunctionError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_versions_by_function_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_versions_by_function(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListVersionsByFunctionError::unhandled)?;
output.build()
})
}