Struct aws_sdk_lambda::model::self_managed_event_source::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SelfManagedEventSource
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn endpoints(self, k: EndPointType, v: Vec<String>) -> Self
pub fn endpoints(self, k: EndPointType, v: Vec<String>) -> Self
Adds a key-value pair to endpoints
.
To override the contents of this collection use set_endpoints
.
The list of bootstrap servers for your Kafka brokers in the following format: "KAFKA_BOOTSTRAP_SERVERS": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]
.
sourcepub fn set_endpoints(
self,
input: Option<HashMap<EndPointType, Vec<String>>>
) -> Self
pub fn set_endpoints(
self,
input: Option<HashMap<EndPointType, Vec<String>>>
) -> Self
The list of bootstrap servers for your Kafka brokers in the following format: "KAFKA_BOOTSTRAP_SERVERS": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]
.
Examples found in repository?
src/json_deser.rs (lines 7698-7702)
7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725
pub(crate) fn deser_structure_crate_model_self_managed_event_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SelfManagedEventSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::self_managed_event_source::Builder::default();
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() {
"Endpoints" => {
builder = builder.set_endpoints(
crate::json_deser::deser_map_com_amazonaws_lambda_endpoints(
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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> SelfManagedEventSource
pub fn build(self) -> SelfManagedEventSource
Consumes the builder and constructs a SelfManagedEventSource
.
Examples found in repository?
src/json_deser.rs (line 7717)
7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725
pub(crate) fn deser_structure_crate_model_self_managed_event_source<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SelfManagedEventSource>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::self_managed_event_source::Builder::default();
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() {
"Endpoints" => {
builder = builder.set_endpoints(
crate::json_deser::deser_map_com_amazonaws_lambda_endpoints(
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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}