pub struct Builder { /* private fields */ }
Expand description
A builder for AwsLambdaFunctionEnvironment
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn variables(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn variables(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to variables
.
To override the contents of this collection use set_variables
.
Environment variable key-value pairs.
sourcepub fn set_variables(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_variables(self, input: Option<HashMap<String, String>>) -> Self
Environment variable key-value pairs.
Examples found in repository?
src/json_deser.rs (lines 27921-27923)
27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951
pub(crate) fn deser_structure_crate_model_aws_lambda_function_environment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsLambdaFunctionEnvironment>,
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::aws_lambda_function_environment::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() {
"Variables" => {
builder = builder.set_variables(
crate::json_deser::deser_map_com_amazonaws_securityhub_field_map(tokens)?
);
}
"Error" => {
builder = builder.set_error(
crate::json_deser::deser_structure_crate_model_aws_lambda_function_environment_error(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 error(self, input: AwsLambdaFunctionEnvironmentError) -> Self
pub fn error(self, input: AwsLambdaFunctionEnvironmentError) -> Self
An AwsLambdaFunctionEnvironmentError
object.
sourcepub fn set_error(self, input: Option<AwsLambdaFunctionEnvironmentError>) -> Self
pub fn set_error(self, input: Option<AwsLambdaFunctionEnvironmentError>) -> Self
An AwsLambdaFunctionEnvironmentError
object.
Examples found in repository?
src/json_deser.rs (lines 27926-27928)
27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951
pub(crate) fn deser_structure_crate_model_aws_lambda_function_environment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsLambdaFunctionEnvironment>,
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::aws_lambda_function_environment::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() {
"Variables" => {
builder = builder.set_variables(
crate::json_deser::deser_map_com_amazonaws_securityhub_field_map(tokens)?
);
}
"Error" => {
builder = builder.set_error(
crate::json_deser::deser_structure_crate_model_aws_lambda_function_environment_error(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) -> AwsLambdaFunctionEnvironment
pub fn build(self) -> AwsLambdaFunctionEnvironment
Consumes the builder and constructs a AwsLambdaFunctionEnvironment
.
Examples found in repository?
src/json_deser.rs (line 27943)
27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951
pub(crate) fn deser_structure_crate_model_aws_lambda_function_environment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsLambdaFunctionEnvironment>,
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::aws_lambda_function_environment::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() {
"Variables" => {
builder = builder.set_variables(
crate::json_deser::deser_map_com_amazonaws_securityhub_field_map(tokens)?
);
}
"Error" => {
builder = builder.set_error(
crate::json_deser::deser_structure_crate_model_aws_lambda_function_environment_error(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",
),
),
}
}