Skip to main content

aws_sdk_workspacesweb/types/
_certificate_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The summary of the certificate.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CertificateSummary {
7    /// <p>A hexadecimal identifier for the certificate.</p>
8    pub thumbprint: ::std::option::Option<::std::string::String>,
9    /// <p>The entity the certificate belongs to.</p>
10    pub subject: ::std::option::Option<::std::string::String>,
11    /// <p>The entity that issued the certificate.</p>
12    pub issuer: ::std::option::Option<::std::string::String>,
13    /// <p>The certificate is not valid before this date.</p>
14    pub not_valid_before: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The certificate is not valid after this date.</p>
16    pub not_valid_after: ::std::option::Option<::aws_smithy_types::DateTime>,
17}
18impl CertificateSummary {
19    /// <p>A hexadecimal identifier for the certificate.</p>
20    pub fn thumbprint(&self) -> ::std::option::Option<&str> {
21        self.thumbprint.as_deref()
22    }
23    /// <p>The entity the certificate belongs to.</p>
24    pub fn subject(&self) -> ::std::option::Option<&str> {
25        self.subject.as_deref()
26    }
27    /// <p>The entity that issued the certificate.</p>
28    pub fn issuer(&self) -> ::std::option::Option<&str> {
29        self.issuer.as_deref()
30    }
31    /// <p>The certificate is not valid before this date.</p>
32    pub fn not_valid_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
33        self.not_valid_before.as_ref()
34    }
35    /// <p>The certificate is not valid after this date.</p>
36    pub fn not_valid_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.not_valid_after.as_ref()
38    }
39}
40impl CertificateSummary {
41    /// Creates a new builder-style object to manufacture [`CertificateSummary`](crate::types::CertificateSummary).
42    pub fn builder() -> crate::types::builders::CertificateSummaryBuilder {
43        crate::types::builders::CertificateSummaryBuilder::default()
44    }
45}
46
47/// A builder for [`CertificateSummary`](crate::types::CertificateSummary).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct CertificateSummaryBuilder {
51    pub(crate) thumbprint: ::std::option::Option<::std::string::String>,
52    pub(crate) subject: ::std::option::Option<::std::string::String>,
53    pub(crate) issuer: ::std::option::Option<::std::string::String>,
54    pub(crate) not_valid_before: ::std::option::Option<::aws_smithy_types::DateTime>,
55    pub(crate) not_valid_after: ::std::option::Option<::aws_smithy_types::DateTime>,
56}
57impl CertificateSummaryBuilder {
58    /// <p>A hexadecimal identifier for the certificate.</p>
59    pub fn thumbprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.thumbprint = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>A hexadecimal identifier for the certificate.</p>
64    pub fn set_thumbprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.thumbprint = input;
66        self
67    }
68    /// <p>A hexadecimal identifier for the certificate.</p>
69    pub fn get_thumbprint(&self) -> &::std::option::Option<::std::string::String> {
70        &self.thumbprint
71    }
72    /// <p>The entity the certificate belongs to.</p>
73    pub fn subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.subject = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The entity the certificate belongs to.</p>
78    pub fn set_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.subject = input;
80        self
81    }
82    /// <p>The entity the certificate belongs to.</p>
83    pub fn get_subject(&self) -> &::std::option::Option<::std::string::String> {
84        &self.subject
85    }
86    /// <p>The entity that issued the certificate.</p>
87    pub fn issuer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.issuer = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The entity that issued the certificate.</p>
92    pub fn set_issuer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.issuer = input;
94        self
95    }
96    /// <p>The entity that issued the certificate.</p>
97    pub fn get_issuer(&self) -> &::std::option::Option<::std::string::String> {
98        &self.issuer
99    }
100    /// <p>The certificate is not valid before this date.</p>
101    pub fn not_valid_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
102        self.not_valid_before = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The certificate is not valid before this date.</p>
106    pub fn set_not_valid_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
107        self.not_valid_before = input;
108        self
109    }
110    /// <p>The certificate is not valid before this date.</p>
111    pub fn get_not_valid_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
112        &self.not_valid_before
113    }
114    /// <p>The certificate is not valid after this date.</p>
115    pub fn not_valid_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
116        self.not_valid_after = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The certificate is not valid after this date.</p>
120    pub fn set_not_valid_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
121        self.not_valid_after = input;
122        self
123    }
124    /// <p>The certificate is not valid after this date.</p>
125    pub fn get_not_valid_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
126        &self.not_valid_after
127    }
128    /// Consumes the builder and constructs a [`CertificateSummary`](crate::types::CertificateSummary).
129    pub fn build(self) -> crate::types::CertificateSummary {
130        crate::types::CertificateSummary {
131            thumbprint: self.thumbprint,
132            subject: self.subject,
133            issuer: self.issuer,
134            not_valid_before: self.not_valid_before,
135            not_valid_after: self.not_valid_after,
136        }
137    }
138}