Struct aws_sdk_acm::output::export_certificate_output::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for ExportCertificateOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn certificate(self, input: impl Into<String>) -> Self
pub fn certificate(self, input: impl Into<String>) -> Self
The base64 PEM-encoded certificate.
sourcepub fn set_certificate(self, input: Option<String>) -> Self
pub fn set_certificate(self, input: Option<String>) -> Self
The base64 PEM-encoded certificate.
Examples found in repository?
src/json_deser.rs (lines 514-520)
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
pub(crate) fn deser_operation_crate_operation_export_certificate(
value: &[u8],
mut builder: crate::output::export_certificate_output::Builder,
) -> Result<
crate::output::export_certificate_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Certificate" => {
builder = builder.set_certificate(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"CertificateChain" => {
builder = builder.set_certificate_chain(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"PrivateKey" => {
builder = builder.set_private_key(
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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn certificate_chain(self, input: impl Into<String>) -> Self
pub fn certificate_chain(self, input: impl Into<String>) -> Self
The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.
sourcepub fn set_certificate_chain(self, input: Option<String>) -> Self
pub fn set_certificate_chain(self, input: Option<String>) -> Self
The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.
Examples found in repository?
src/json_deser.rs (lines 523-529)
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
pub(crate) fn deser_operation_crate_operation_export_certificate(
value: &[u8],
mut builder: crate::output::export_certificate_output::Builder,
) -> Result<
crate::output::export_certificate_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Certificate" => {
builder = builder.set_certificate(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"CertificateChain" => {
builder = builder.set_certificate_chain(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"PrivateKey" => {
builder = builder.set_private_key(
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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn private_key(self, input: impl Into<String>) -> Self
pub fn private_key(self, input: impl Into<String>) -> Self
The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.
sourcepub fn set_private_key(self, input: Option<String>) -> Self
pub fn set_private_key(self, input: Option<String>) -> Self
The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.
Examples found in repository?
src/json_deser.rs (lines 532-538)
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
pub(crate) fn deser_operation_crate_operation_export_certificate(
value: &[u8],
mut builder: crate::output::export_certificate_output::Builder,
) -> Result<
crate::output::export_certificate_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Certificate" => {
builder = builder.set_certificate(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"CertificateChain" => {
builder = builder.set_certificate_chain(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"PrivateKey" => {
builder = builder.set_private_key(
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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn build(self) -> ExportCertificateOutput
pub fn build(self) -> ExportCertificateOutput
Consumes the builder and constructs a ExportCertificateOutput.
Examples found in repository?
src/operation_deser.rs (line 396)
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
pub fn parse_export_certificate_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ExportCertificateOutput, crate::error::ExportCertificateError>
{
Ok({
#[allow(unused_mut)]
let mut output = crate::output::export_certificate_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_export_certificate(
response.body().as_ref(),
output,
)
.map_err(crate::error::ExportCertificateError::unhandled)?;
output.build()
})
}