aws-sdk-pcaconnectorad 0.2.0

AWS SDK for PcaConnectorAd
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 UpdateTemplateInput {
    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a>.</p>
    pub template_arn: ::std::option::Option<::std::string::String>,
    /// <p>Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.</p>
    pub definition: ::std::option::Option<crate::types::TemplateDefinition>,
    /// <p>This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.</p>
    pub reenroll_all_certificate_holders: ::std::option::Option<bool>,
}
impl UpdateTemplateInput {
    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a>.</p>
    pub fn template_arn(&self) -> ::std::option::Option<&str> {
        self.template_arn.as_deref()
    }
    /// <p>Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.</p>
    pub fn definition(&self) -> ::std::option::Option<&crate::types::TemplateDefinition> {
        self.definition.as_ref()
    }
    /// <p>This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.</p>
    pub fn reenroll_all_certificate_holders(&self) -> ::std::option::Option<bool> {
        self.reenroll_all_certificate_holders
    }
}
impl UpdateTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
    pub fn builder() -> crate::operation::update_template::builders::UpdateTemplateInputBuilder {
        crate::operation::update_template::builders::UpdateTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateTemplateInputBuilder {
    pub(crate) template_arn: ::std::option::Option<::std::string::String>,
    pub(crate) definition: ::std::option::Option<crate::types::TemplateDefinition>,
    pub(crate) reenroll_all_certificate_holders: ::std::option::Option<bool>,
}
impl UpdateTemplateInputBuilder {
    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a>.</p>
    pub fn template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.template_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a>.</p>
    pub fn set_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a>.</p>
    pub fn get_template_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.template_arn
    }
    /// <p>Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.</p>
    pub fn definition(mut self, input: crate::types::TemplateDefinition) -> Self {
        self.definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::TemplateDefinition>) -> Self {
        self.definition = input;
        self
    }
    /// <p>Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::TemplateDefinition> {
        &self.definition
    }
    /// <p>This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.</p>
    pub fn reenroll_all_certificate_holders(mut self, input: bool) -> Self {
        self.reenroll_all_certificate_holders = ::std::option::Option::Some(input);
        self
    }
    /// <p>This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.</p>
    pub fn set_reenroll_all_certificate_holders(mut self, input: ::std::option::Option<bool>) -> Self {
        self.reenroll_all_certificate_holders = input;
        self
    }
    /// <p>This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.</p>
    pub fn get_reenroll_all_certificate_holders(&self) -> &::std::option::Option<bool> {
        &self.reenroll_all_certificate_holders
    }
    /// Consumes the builder and constructs a [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_template::UpdateTemplateInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_template::UpdateTemplateInput {
            template_arn: self.template_arn,
            definition: self.definition,
            reenroll_all_certificate_holders: self.reenroll_all_certificate_holders,
        })
    }
}