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 GetPolicyOutput {
    /// <p>The policy attached to the private CA as a JSON document.</p>
    #[doc(hidden)]
    pub policy: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetPolicyOutput {
    /// <p>The policy attached to the private CA as a JSON document.</p>
    pub fn policy(&self) -> std::option::Option<&str> {
        self.policy.as_deref()
    }
}
impl aws_http::request_id::RequestId for GetPolicyOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetPolicyOutput {
    /// Creates a new builder-style object to manufacture [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput).
    pub fn builder() -> crate::operation::get_policy::builders::GetPolicyOutputBuilder {
        crate::operation::get_policy::builders::GetPolicyOutputBuilder::default()
    }
}

/// A builder for [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetPolicyOutputBuilder {
    pub(crate) policy: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl GetPolicyOutputBuilder {
    /// <p>The policy attached to the private CA as a JSON document.</p>
    pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
        self.policy = Some(input.into());
        self
    }
    /// <p>The policy attached to the private CA as a JSON document.</p>
    pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.policy = 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 [`GetPolicyOutput`](crate::operation::get_policy::GetPolicyOutput).
    pub fn build(self) -> crate::operation::get_policy::GetPolicyOutput {
        crate::operation::get_policy::GetPolicyOutput {
            policy: self.policy,
            _request_id: self._request_id,
        }
    }
}