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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// 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 UpdateCertificateInput {
/// <p>The identifier of the certificate object that you are updating.</p>
pub certificate_id: ::std::option::Option<::std::string::String>,
/// <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA.</p>
pub active_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
pub inactive_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>A short description to help identify the certificate.</p>
pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateCertificateInput {
/// <p>The identifier of the certificate object that you are updating.</p>
pub fn certificate_id(&self) -> ::std::option::Option<&str> {
self.certificate_id.as_deref()
}
/// <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA.</p>
pub fn active_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.active_date.as_ref()
}
/// <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
pub fn inactive_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.inactive_date.as_ref()
}
/// <p>A short description to help identify the certificate.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
}
impl UpdateCertificateInput {
/// Creates a new builder-style object to manufacture [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
pub fn builder() -> crate::operation::update_certificate::builders::UpdateCertificateInputBuilder {
crate::operation::update_certificate::builders::UpdateCertificateInputBuilder::default()
}
}
/// A builder for [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCertificateInputBuilder {
pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
pub(crate) active_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) inactive_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateCertificateInputBuilder {
/// <p>The identifier of the certificate object that you are updating.</p>
/// This field is required.
pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the certificate object that you are updating.</p>
pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_id = input;
self
}
/// <p>The identifier of the certificate object that you are updating.</p>
pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_id
}
/// <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA.</p>
pub fn active_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.active_date = ::std::option::Option::Some(input);
self
}
/// <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA.</p>
pub fn set_active_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.active_date = input;
self
}
/// <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA.</p>
pub fn get_active_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.active_date
}
/// <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
pub fn inactive_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.inactive_date = ::std::option::Option::Some(input);
self
}
/// <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
pub fn set_inactive_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.inactive_date = input;
self
}
/// <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
pub fn get_inactive_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.inactive_date
}
/// <p>A short description to help identify the certificate.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>A short description to help identify the certificate.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A short description to help identify the certificate.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// Consumes the builder and constructs a [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_certificate::UpdateCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_certificate::UpdateCertificateInput {
certificate_id: self.certificate_id,
active_date: self.active_date,
inactive_date: self.inactive_date,
description: self.description,
})
}
}