aws-sdk-acmpca 1.55.0

AWS SDK for AWS Certificate Manager Private Certificate Authority
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Defines a <code>PolicyInformation</code> qualifier. Amazon Web Services Private CA supports the <a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.4">certification practice statement (CPS) qualifier</a> defined in RFC 5280.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Qualifier {
    /// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
    pub cps_uri: ::std::string::String,
}
impl Qualifier {
    /// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
    pub fn cps_uri(&self) -> &str {
        use std::ops::Deref;
        self.cps_uri.deref()
    }
}
impl Qualifier {
    /// Creates a new builder-style object to manufacture [`Qualifier`](crate::types::Qualifier).
    pub fn builder() -> crate::types::builders::QualifierBuilder {
        crate::types::builders::QualifierBuilder::default()
    }
}

/// A builder for [`Qualifier`](crate::types::Qualifier).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct QualifierBuilder {
    pub(crate) cps_uri: ::std::option::Option<::std::string::String>,
}
impl QualifierBuilder {
    /// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
    /// This field is required.
    pub fn cps_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cps_uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
    pub fn set_cps_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cps_uri = input;
        self
    }
    /// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
    pub fn get_cps_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.cps_uri
    }
    /// Consumes the builder and constructs a [`Qualifier`](crate::types::Qualifier).
    /// This method will fail if any of the following fields are not set:
    /// - [`cps_uri`](crate::types::builders::QualifierBuilder::cps_uri)
    pub fn build(self) -> ::std::result::Result<crate::types::Qualifier, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Qualifier {
            cps_uri: self.cps_uri.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "cps_uri",
                    "cps_uri was not specified but it is required when building Qualifier",
                )
            })?,
        })
    }
}