Struct aws_sdk_acm::output::get_certificate_output::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for GetCertificateOutput.
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 ACM-issued certificate corresponding to the ARN specified as input.
sourcepub fn set_certificate(self, input: Option<String>) -> Self
pub fn set_certificate(self, input: Option<String>) -> Self
The ACM-issued certificate corresponding to the ARN specified as input.
Examples found in repository?
src/json_deser.rs (lines 675-681)
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713
pub(crate) fn deser_operation_crate_operation_get_certificate(
value: &[u8],
mut builder: crate::output::get_certificate_output::Builder,
) -> Result<
crate::output::get_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()?,
);
}
_ => 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
Certificates forming the requested certificate's chain of trust. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs.
sourcepub fn set_certificate_chain(self, input: Option<String>) -> Self
pub fn set_certificate_chain(self, input: Option<String>) -> Self
Certificates forming the requested certificate's chain of trust. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs.
Examples found in repository?
src/json_deser.rs (lines 684-690)
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713
pub(crate) fn deser_operation_crate_operation_get_certificate(
value: &[u8],
mut builder: crate::output::get_certificate_output::Builder,
) -> Result<
crate::output::get_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()?,
);
}
_ => 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) -> GetCertificateOutput
pub fn build(self) -> GetCertificateOutput
Consumes the builder and constructs a GetCertificateOutput.
Examples found in repository?
src/operation_deser.rs (line 560)
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562
pub fn parse_get_certificate_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetCertificateOutput, crate::error::GetCertificateError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_certificate_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_get_certificate(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetCertificateError::unhandled)?;
output.build()
})
}