1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// 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,
})
}
}