Struct aws_sdk_appmesh::model::client_policy_tls::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ClientPolicyTls
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn enforce(self, input: bool) -> Self
pub fn enforce(self, input: bool) -> Self
Whether the policy is enforced. The default is True
, if a value isn't specified.
sourcepub fn set_enforce(self, input: Option<bool>) -> Self
pub fn set_enforce(self, input: Option<bool>) -> Self
Whether the policy is enforced. The default is True
, if a value isn't specified.
Examples found in repository?
src/json_deser.rs (lines 8480-8484)
8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
pub(crate) fn deser_structure_crate_model_client_policy_tls<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ClientPolicyTls>,
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::client_policy_tls::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() {
"enforce" => {
builder = builder.set_enforce(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ports" => {
builder = builder.set_ports(
crate::json_deser::deser_set_com_amazonaws_appmesh_port_set(
tokens,
)?,
);
}
"certificate" => {
builder = builder.set_certificate(
crate::json_deser::deser_union_crate_model_client_tls_certificate(tokens)?
);
}
"validation" => {
builder = builder.set_validation(
crate::json_deser::deser_structure_crate_model_tls_validation_context(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 ports(self, input: i32) -> Self
pub fn ports(self, input: i32) -> Self
Appends an item to ports
.
To override the contents of this collection use set_ports
.
One or more ports that the policy is enforced for.
sourcepub fn set_ports(self, input: Option<Vec<i32>>) -> Self
pub fn set_ports(self, input: Option<Vec<i32>>) -> Self
One or more ports that the policy is enforced for.
Examples found in repository?
src/json_deser.rs (lines 8487-8491)
8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
pub(crate) fn deser_structure_crate_model_client_policy_tls<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ClientPolicyTls>,
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::client_policy_tls::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() {
"enforce" => {
builder = builder.set_enforce(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ports" => {
builder = builder.set_ports(
crate::json_deser::deser_set_com_amazonaws_appmesh_port_set(
tokens,
)?,
);
}
"certificate" => {
builder = builder.set_certificate(
crate::json_deser::deser_union_crate_model_client_tls_certificate(tokens)?
);
}
"validation" => {
builder = builder.set_validation(
crate::json_deser::deser_structure_crate_model_tls_validation_context(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 certificate(self, input: ClientTlsCertificate) -> Self
pub fn certificate(self, input: ClientTlsCertificate) -> Self
A reference to an object that represents a client's TLS certificate.
sourcepub fn set_certificate(self, input: Option<ClientTlsCertificate>) -> Self
pub fn set_certificate(self, input: Option<ClientTlsCertificate>) -> Self
A reference to an object that represents a client's TLS certificate.
Examples found in repository?
src/json_deser.rs (lines 8494-8496)
8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
pub(crate) fn deser_structure_crate_model_client_policy_tls<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ClientPolicyTls>,
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::client_policy_tls::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() {
"enforce" => {
builder = builder.set_enforce(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ports" => {
builder = builder.set_ports(
crate::json_deser::deser_set_com_amazonaws_appmesh_port_set(
tokens,
)?,
);
}
"certificate" => {
builder = builder.set_certificate(
crate::json_deser::deser_union_crate_model_client_tls_certificate(tokens)?
);
}
"validation" => {
builder = builder.set_validation(
crate::json_deser::deser_structure_crate_model_tls_validation_context(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 validation(self, input: TlsValidationContext) -> Self
pub fn validation(self, input: TlsValidationContext) -> Self
A reference to an object that represents a TLS validation context.
sourcepub fn set_validation(self, input: Option<TlsValidationContext>) -> Self
pub fn set_validation(self, input: Option<TlsValidationContext>) -> Self
A reference to an object that represents a TLS validation context.
Examples found in repository?
src/json_deser.rs (lines 8499-8501)
8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
pub(crate) fn deser_structure_crate_model_client_policy_tls<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ClientPolicyTls>,
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::client_policy_tls::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() {
"enforce" => {
builder = builder.set_enforce(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ports" => {
builder = builder.set_ports(
crate::json_deser::deser_set_com_amazonaws_appmesh_port_set(
tokens,
)?,
);
}
"certificate" => {
builder = builder.set_certificate(
crate::json_deser::deser_union_crate_model_client_tls_certificate(tokens)?
);
}
"validation" => {
builder = builder.set_validation(
crate::json_deser::deser_structure_crate_model_tls_validation_context(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) -> ClientPolicyTls
pub fn build(self) -> ClientPolicyTls
Consumes the builder and constructs a ClientPolicyTls
.
Examples found in repository?
src/json_deser.rs (line 8516)
8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
pub(crate) fn deser_structure_crate_model_client_policy_tls<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ClientPolicyTls>,
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::client_policy_tls::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() {
"enforce" => {
builder = builder.set_enforce(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ports" => {
builder = builder.set_ports(
crate::json_deser::deser_set_com_amazonaws_appmesh_port_set(
tokens,
)?,
);
}
"certificate" => {
builder = builder.set_certificate(
crate::json_deser::deser_union_crate_model_client_tls_certificate(tokens)?
);
}
"validation" => {
builder = builder.set_validation(
crate::json_deser::deser_structure_crate_model_tls_validation_context(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",
),
),
}
}