aws-sdk-acm 1.105.0

AWS SDK for AWS Certificate Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ExportCertificateOutput {
    /// <p>The base64 PEM-encoded certificate.</p>
    pub certificate: ::std::option::Option<::std::string::String>,
    /// <p>The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.</p>
    pub certificate_chain: ::std::option::Option<::std::string::String>,
    /// <p>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.</p>
    pub private_key: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ExportCertificateOutput {
    /// <p>The base64 PEM-encoded certificate.</p>
    pub fn certificate(&self) -> ::std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.</p>
    pub fn certificate_chain(&self) -> ::std::option::Option<&str> {
        self.certificate_chain.as_deref()
    }
    /// <p>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.</p>
    pub fn private_key(&self) -> ::std::option::Option<&str> {
        self.private_key.as_deref()
    }
}
impl ::std::fmt::Debug for ExportCertificateOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExportCertificateOutput");
        formatter.field("certificate", &self.certificate);
        formatter.field("certificate_chain", &self.certificate_chain);
        formatter.field("private_key", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for ExportCertificateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ExportCertificateOutput {
    /// Creates a new builder-style object to manufacture [`ExportCertificateOutput`](crate::operation::export_certificate::ExportCertificateOutput).
    pub fn builder() -> crate::operation::export_certificate::builders::ExportCertificateOutputBuilder {
        crate::operation::export_certificate::builders::ExportCertificateOutputBuilder::default()
    }
}

/// A builder for [`ExportCertificateOutput`](crate::operation::export_certificate::ExportCertificateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ExportCertificateOutputBuilder {
    pub(crate) certificate: ::std::option::Option<::std::string::String>,
    pub(crate) certificate_chain: ::std::option::Option<::std::string::String>,
    pub(crate) private_key: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ExportCertificateOutputBuilder {
    /// <p>The base64 PEM-encoded certificate.</p>
    pub fn certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The base64 PEM-encoded certificate.</p>
    pub fn set_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate = input;
        self
    }
    /// <p>The base64 PEM-encoded certificate.</p>
    pub fn get_certificate(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate
    }
    /// <p>The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.</p>
    pub fn certificate_chain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_chain = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.</p>
    pub fn set_certificate_chain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_chain = input;
        self
    }
    /// <p>The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.</p>
    pub fn get_certificate_chain(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_chain
    }
    /// <p>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.</p>
    pub fn private_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.private_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>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.</p>
    pub fn set_private_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.private_key = input;
        self
    }
    /// <p>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.</p>
    pub fn get_private_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.private_key
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ExportCertificateOutput`](crate::operation::export_certificate::ExportCertificateOutput).
    pub fn build(self) -> crate::operation::export_certificate::ExportCertificateOutput {
        crate::operation::export_certificate::ExportCertificateOutput {
            certificate: self.certificate,
            certificate_chain: self.certificate_chain,
            private_key: self.private_key,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for ExportCertificateOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExportCertificateOutputBuilder");
        formatter.field("certificate", &self.certificate);
        formatter.field("certificate_chain", &self.certificate_chain);
        formatter.field("private_key", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}