pub struct Builder { /* private fields */ }Expand description
A builder for ListEventSourceMappingsOutput.
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 that's returned when the response doesn't contain all event source mappings.
sourcepub fn set_next_marker(self, input: Option<String>) -> Self
pub fn set_next_marker(self, input: Option<String>) -> Self
A pagination token that's returned when the response doesn't contain all event source mappings.
Examples found in repository?
src/json_deser.rs (lines 4794-4800)
4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823
pub(crate) fn deser_operation_crate_operation_list_event_source_mappings(
value: &[u8],
mut builder: crate::output::list_event_source_mappings_output::Builder,
) -> Result<
crate::output::list_event_source_mappings_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() {
"EventSourceMappings" => {
builder = builder.set_event_source_mappings(
crate::json_deser::deser_list_com_amazonaws_lambda_event_source_mappings_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 event_source_mappings(
self,
input: EventSourceMappingConfiguration
) -> Self
pub fn event_source_mappings(
self,
input: EventSourceMappingConfiguration
) -> Self
Appends an item to event_source_mappings.
To override the contents of this collection use set_event_source_mappings.
A list of event source mappings.
sourcepub fn set_event_source_mappings(
self,
input: Option<Vec<EventSourceMappingConfiguration>>
) -> Self
pub fn set_event_source_mappings(
self,
input: Option<Vec<EventSourceMappingConfiguration>>
) -> Self
A list of event source mappings.
Examples found in repository?
src/json_deser.rs (lines 4789-4791)
4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823
pub(crate) fn deser_operation_crate_operation_list_event_source_mappings(
value: &[u8],
mut builder: crate::output::list_event_source_mappings_output::Builder,
) -> Result<
crate::output::list_event_source_mappings_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() {
"EventSourceMappings" => {
builder = builder.set_event_source_mappings(
crate::json_deser::deser_list_com_amazonaws_lambda_event_source_mappings_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) -> ListEventSourceMappingsOutput
pub fn build(self) -> ListEventSourceMappingsOutput
Consumes the builder and constructs a ListEventSourceMappingsOutput.
Examples found in repository?
src/operation_deser.rs (line 4771)
4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773
pub fn parse_list_event_source_mappings_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ListEventSourceMappingsOutput,
crate::error::ListEventSourceMappingsError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_event_source_mappings_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_event_source_mappings(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListEventSourceMappingsError::unhandled)?;
output.build()
})
}