aws-sdk-acmpca 0.25.0

AWS SDK for AWS Certificate Manager Private Certificate Authority
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, std::fmt::Debug)]
pub struct GetCertificateOutput {
    /// <p>The base64 PEM-encoded certificate specified by the <code>CertificateArn</code> parameter.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
    /// <p>The base64 PEM-encoded certificate chain that chains up to the root CA certificate that you used to sign your private CA certificate. </p>
    #[doc(hidden)]
    pub certificate_chain: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetCertificateOutput {
    /// <p>The base64 PEM-encoded certificate specified by the <code>CertificateArn</code> parameter.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The base64 PEM-encoded certificate chain that chains up to the root CA certificate that you used to sign your private CA certificate. </p>
    pub fn certificate_chain(&self) -> std::option::Option<&str> {
        self.certificate_chain.as_deref()
    }
}
impl aws_http::request_id::RequestId for GetCertificateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetCertificateOutput {
    /// Creates a new builder-style object to manufacture [`GetCertificateOutput`](crate::operation::get_certificate::GetCertificateOutput).
    pub fn builder() -> crate::operation::get_certificate::builders::GetCertificateOutputBuilder {
        crate::operation::get_certificate::builders::GetCertificateOutputBuilder::default()
    }
}

/// A builder for [`GetCertificateOutput`](crate::operation::get_certificate::GetCertificateOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetCertificateOutputBuilder {
    pub(crate) certificate: std::option::Option<std::string::String>,
    pub(crate) certificate_chain: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetCertificateOutputBuilder {
    /// <p>The base64 PEM-encoded certificate specified by the <code>CertificateArn</code> parameter.</p>
    pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
        self.certificate = Some(input.into());
        self
    }
    /// <p>The base64 PEM-encoded certificate specified by the <code>CertificateArn</code> parameter.</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 chain that chains up to the root CA certificate that you used to sign your private CA certificate. </p>
    pub fn certificate_chain(mut self, input: impl Into<std::string::String>) -> Self {
        self.certificate_chain = Some(input.into());
        self
    }
    /// <p>The base64 PEM-encoded certificate chain that chains up to the root CA certificate that you used to sign your private CA certificate. </p>
    pub fn set_certificate_chain(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.certificate_chain = input;
        self
    }
    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 [`GetCertificateOutput`](crate::operation::get_certificate::GetCertificateOutput).
    pub fn build(self) -> crate::operation::get_certificate::GetCertificateOutput {
        crate::operation::get_certificate::GetCertificateOutput {
            certificate: self.certificate,
            certificate_chain: self.certificate_chain,
            _request_id: self._request_id,
        }
    }
}