pub struct Builder { /* private fields */ }
Expand description
A builder for VirtualGatewayBackendDefaults
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn client_policy(self, input: VirtualGatewayClientPolicy) -> Self
pub fn client_policy(self, input: VirtualGatewayClientPolicy) -> Self
A reference to an object that represents a client policy.
sourcepub fn set_client_policy(self, input: Option<VirtualGatewayClientPolicy>) -> Self
pub fn set_client_policy(self, input: Option<VirtualGatewayClientPolicy>) -> Self
A reference to an object that represents a client policy.
Examples found in repository?
src/json_deser.rs (lines 4345-4347)
4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370
pub(crate) fn deser_structure_crate_model_virtual_gateway_backend_defaults<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayBackendDefaults>,
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::virtual_gateway_backend_defaults::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() {
"clientPolicy" => {
builder = builder.set_client_policy(
crate::json_deser::deser_structure_crate_model_virtual_gateway_client_policy(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) -> VirtualGatewayBackendDefaults
pub fn build(self) -> VirtualGatewayBackendDefaults
Consumes the builder and constructs a VirtualGatewayBackendDefaults
.
Examples found in repository?
src/json_deser.rs (line 4362)
4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370
pub(crate) fn deser_structure_crate_model_virtual_gateway_backend_defaults<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayBackendDefaults>,
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::virtual_gateway_backend_defaults::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() {
"clientPolicy" => {
builder = builder.set_client_policy(
crate::json_deser::deser_structure_crate_model_virtual_gateway_client_policy(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",
),
),
}
}