pub struct Builder { /* private fields */ }
Expand description
A builder for VirtualGatewayTlsValidationContext
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn trust(self, input: VirtualGatewayTlsValidationContextTrust) -> Self
pub fn trust(self, input: VirtualGatewayTlsValidationContextTrust) -> Self
A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.
sourcepub fn set_trust(
self,
input: Option<VirtualGatewayTlsValidationContextTrust>
) -> Self
pub fn set_trust(
self,
input: Option<VirtualGatewayTlsValidationContextTrust>
) -> Self
A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.
Examples found in repository?
src/json_deser.rs (lines 9383-9385)
9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413
pub(crate) fn deser_structure_crate_model_virtual_gateway_tls_validation_context<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayTlsValidationContext>,
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_tls_validation_context::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() {
"trust" => {
builder = builder.set_trust(
crate::json_deser::deser_union_crate_model_virtual_gateway_tls_validation_context_trust(tokens)?
);
}
"subjectAlternativeNames" => {
builder = builder.set_subject_alternative_names(
crate::json_deser::deser_structure_crate_model_subject_alternative_names(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 subject_alternative_names(self, input: SubjectAlternativeNames) -> Self
pub fn subject_alternative_names(self, input: SubjectAlternativeNames) -> Self
A reference to an object that represents the SANs for a virtual gateway's listener's Transport Layer Security (TLS) validation context.
sourcepub fn set_subject_alternative_names(
self,
input: Option<SubjectAlternativeNames>
) -> Self
pub fn set_subject_alternative_names(
self,
input: Option<SubjectAlternativeNames>
) -> Self
A reference to an object that represents the SANs for a virtual gateway's listener's Transport Layer Security (TLS) validation context.
Examples found in repository?
src/json_deser.rs (lines 9388-9390)
9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413
pub(crate) fn deser_structure_crate_model_virtual_gateway_tls_validation_context<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayTlsValidationContext>,
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_tls_validation_context::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() {
"trust" => {
builder = builder.set_trust(
crate::json_deser::deser_union_crate_model_virtual_gateway_tls_validation_context_trust(tokens)?
);
}
"subjectAlternativeNames" => {
builder = builder.set_subject_alternative_names(
crate::json_deser::deser_structure_crate_model_subject_alternative_names(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) -> VirtualGatewayTlsValidationContext
pub fn build(self) -> VirtualGatewayTlsValidationContext
Consumes the builder and constructs a VirtualGatewayTlsValidationContext
.
Examples found in repository?
src/json_deser.rs (line 9405)
9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413
pub(crate) fn deser_structure_crate_model_virtual_gateway_tls_validation_context<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VirtualGatewayTlsValidationContext>,
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_tls_validation_context::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() {
"trust" => {
builder = builder.set_trust(
crate::json_deser::deser_union_crate_model_virtual_gateway_tls_validation_context_trust(tokens)?
);
}
"subjectAlternativeNames" => {
builder = builder.set_subject_alternative_names(
crate::json_deser::deser_structure_crate_model_subject_alternative_names(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",
),
),
}
}