Struct aws_sdk_acm::model::extended_key_usage::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for ExtendedKeyUsage.
Implementations§
source§impl Builder
impl Builder
sourcepub fn name(self, input: ExtendedKeyUsageName) -> Self
pub fn name(self, input: ExtendedKeyUsageName) -> Self
The name of an Extended Key Usage value.
sourcepub fn set_name(self, input: Option<ExtendedKeyUsageName>) -> Self
pub fn set_name(self, input: Option<ExtendedKeyUsageName>) -> Self
The name of an Extended Key Usage value.
Examples found in repository?
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495
pub(crate) fn deser_structure_crate_model_extended_key_usage<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ExtendedKeyUsage>,
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::extended_key_usage::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() {
"Name" => {
builder = builder.set_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::ExtendedKeyUsageName::from(u.as_ref())
})
})
.transpose()?,
);
}
"OID" => {
builder = builder.set_oid(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 oid(self, input: impl Into<String>) -> Self
pub fn oid(self, input: impl Into<String>) -> Self
An object identifier (OID) for the extension value. OIDs are strings of numbers separated by periods. The following OIDs are defined in RFC 3280 and RFC 5280.
-
1.3.6.1.5.5.7.3.1 (TLS_WEB_SERVER_AUTHENTICATION) -
1.3.6.1.5.5.7.3.2 (TLS_WEB_CLIENT_AUTHENTICATION) -
1.3.6.1.5.5.7.3.3 (CODE_SIGNING) -
1.3.6.1.5.5.7.3.4 (EMAIL_PROTECTION) -
1.3.6.1.5.5.7.3.8 (TIME_STAMPING) -
1.3.6.1.5.5.7.3.9 (OCSP_SIGNING) -
1.3.6.1.5.5.7.3.5 (IPSEC_END_SYSTEM) -
1.3.6.1.5.5.7.3.6 (IPSEC_TUNNEL) -
1.3.6.1.5.5.7.3.7 (IPSEC_USER)
sourcepub fn set_oid(self, input: Option<String>) -> Self
pub fn set_oid(self, input: Option<String>) -> Self
An object identifier (OID) for the extension value. OIDs are strings of numbers separated by periods. The following OIDs are defined in RFC 3280 and RFC 5280.
-
1.3.6.1.5.5.7.3.1 (TLS_WEB_SERVER_AUTHENTICATION) -
1.3.6.1.5.5.7.3.2 (TLS_WEB_CLIENT_AUTHENTICATION) -
1.3.6.1.5.5.7.3.3 (CODE_SIGNING) -
1.3.6.1.5.5.7.3.4 (EMAIL_PROTECTION) -
1.3.6.1.5.5.7.3.8 (TIME_STAMPING) -
1.3.6.1.5.5.7.3.9 (OCSP_SIGNING) -
1.3.6.1.5.5.7.3.5 (IPSEC_END_SYSTEM) -
1.3.6.1.5.5.7.3.6 (IPSEC_TUNNEL) -
1.3.6.1.5.5.7.3.7 (IPSEC_USER)
Examples found in repository?
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495
pub(crate) fn deser_structure_crate_model_extended_key_usage<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ExtendedKeyUsage>,
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::extended_key_usage::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() {
"Name" => {
builder = builder.set_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::ExtendedKeyUsageName::from(u.as_ref())
})
})
.transpose()?,
);
}
"OID" => {
builder = builder.set_oid(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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) -> ExtendedKeyUsage
pub fn build(self) -> ExtendedKeyUsage
Consumes the builder and constructs a ExtendedKeyUsage.
Examples found in repository?
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495
pub(crate) fn deser_structure_crate_model_extended_key_usage<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ExtendedKeyUsage>,
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::extended_key_usage::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() {
"Name" => {
builder = builder.set_name(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::ExtendedKeyUsageName::from(u.as_ref())
})
})
.transpose()?,
);
}
"OID" => {
builder = builder.set_oid(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}