aws_sdk_transfer/operation/update_certificate/_update_certificate_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateCertificateInput {
6 /// <p>The identifier of the certificate object that you are updating.</p>
7 pub certificate_id: ::std::option::Option<::std::string::String>,
8 /// <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>
9 pub active_date: ::std::option::Option<::aws_smithy_types::DateTime>,
10 /// <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>
11 pub inactive_date: ::std::option::Option<::aws_smithy_types::DateTime>,
12 /// <p>A short description to help identify the certificate.</p>
13 pub description: ::std::option::Option<::std::string::String>,
14}
15impl UpdateCertificateInput {
16 /// <p>The identifier of the certificate object that you are updating.</p>
17 pub fn certificate_id(&self) -> ::std::option::Option<&str> {
18 self.certificate_id.as_deref()
19 }
20 /// <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>
21 pub fn active_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
22 self.active_date.as_ref()
23 }
24 /// <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>
25 pub fn inactive_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
26 self.inactive_date.as_ref()
27 }
28 /// <p>A short description to help identify the certificate.</p>
29 pub fn description(&self) -> ::std::option::Option<&str> {
30 self.description.as_deref()
31 }
32}
33impl UpdateCertificateInput {
34 /// Creates a new builder-style object to manufacture [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
35 pub fn builder() -> crate::operation::update_certificate::builders::UpdateCertificateInputBuilder {
36 crate::operation::update_certificate::builders::UpdateCertificateInputBuilder::default()
37 }
38}
39
40/// A builder for [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateCertificateInputBuilder {
44 pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
45 pub(crate) active_date: ::std::option::Option<::aws_smithy_types::DateTime>,
46 pub(crate) inactive_date: ::std::option::Option<::aws_smithy_types::DateTime>,
47 pub(crate) description: ::std::option::Option<::std::string::String>,
48}
49impl UpdateCertificateInputBuilder {
50 /// <p>The identifier of the certificate object that you are updating.</p>
51 /// This field is required.
52 pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.certificate_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The identifier of the certificate object that you are updating.</p>
57 pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.certificate_id = input;
59 self
60 }
61 /// <p>The identifier of the certificate object that you are updating.</p>
62 pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.certificate_id
64 }
65 /// <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>
66 pub fn active_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
67 self.active_date = ::std::option::Option::Some(input);
68 self
69 }
70 /// <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>
71 pub fn set_active_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
72 self.active_date = input;
73 self
74 }
75 /// <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>
76 pub fn get_active_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
77 &self.active_date
78 }
79 /// <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>
80 pub fn inactive_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
81 self.inactive_date = ::std::option::Option::Some(input);
82 self
83 }
84 /// <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>
85 pub fn set_inactive_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
86 self.inactive_date = input;
87 self
88 }
89 /// <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>
90 pub fn get_inactive_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
91 &self.inactive_date
92 }
93 /// <p>A short description to help identify the certificate.</p>
94 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.description = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>A short description to help identify the certificate.</p>
99 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.description = input;
101 self
102 }
103 /// <p>A short description to help identify the certificate.</p>
104 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
105 &self.description
106 }
107 /// Consumes the builder and constructs a [`UpdateCertificateInput`](crate::operation::update_certificate::UpdateCertificateInput).
108 pub fn build(
109 self,
110 ) -> ::std::result::Result<crate::operation::update_certificate::UpdateCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::update_certificate::UpdateCertificateInput {
112 certificate_id: self.certificate_id,
113 active_date: self.active_date,
114 inactive_date: self.inactive_date,
115 description: self.description,
116 })
117 }
118}