Skip to main content

aws_sdk_iot/types/
_outgoing_certificate.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A certificate that has been transferred but not yet accepted.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct OutgoingCertificate {
7    /// <p>The certificate ARN.</p>
8    pub certificate_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The certificate ID.</p>
10    pub certificate_id: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon Web Services account to which the transfer was made.</p>
12    pub transferred_to: ::std::option::Option<::std::string::String>,
13    /// <p>The date the transfer was initiated.</p>
14    pub transfer_date: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The transfer message.</p>
16    pub transfer_message: ::std::option::Option<::std::string::String>,
17    /// <p>The certificate creation date.</p>
18    pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
19}
20impl OutgoingCertificate {
21    /// <p>The certificate ARN.</p>
22    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
23        self.certificate_arn.as_deref()
24    }
25    /// <p>The certificate ID.</p>
26    pub fn certificate_id(&self) -> ::std::option::Option<&str> {
27        self.certificate_id.as_deref()
28    }
29    /// <p>The Amazon Web Services account to which the transfer was made.</p>
30    pub fn transferred_to(&self) -> ::std::option::Option<&str> {
31        self.transferred_to.as_deref()
32    }
33    /// <p>The date the transfer was initiated.</p>
34    pub fn transfer_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
35        self.transfer_date.as_ref()
36    }
37    /// <p>The transfer message.</p>
38    pub fn transfer_message(&self) -> ::std::option::Option<&str> {
39        self.transfer_message.as_deref()
40    }
41    /// <p>The certificate creation date.</p>
42    pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.creation_date.as_ref()
44    }
45}
46impl OutgoingCertificate {
47    /// Creates a new builder-style object to manufacture [`OutgoingCertificate`](crate::types::OutgoingCertificate).
48    pub fn builder() -> crate::types::builders::OutgoingCertificateBuilder {
49        crate::types::builders::OutgoingCertificateBuilder::default()
50    }
51}
52
53/// A builder for [`OutgoingCertificate`](crate::types::OutgoingCertificate).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct OutgoingCertificateBuilder {
57    pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
58    pub(crate) certificate_id: ::std::option::Option<::std::string::String>,
59    pub(crate) transferred_to: ::std::option::Option<::std::string::String>,
60    pub(crate) transfer_date: ::std::option::Option<::aws_smithy_types::DateTime>,
61    pub(crate) transfer_message: ::std::option::Option<::std::string::String>,
62    pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
63}
64impl OutgoingCertificateBuilder {
65    /// <p>The certificate ARN.</p>
66    pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.certificate_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The certificate ARN.</p>
71    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.certificate_arn = input;
73        self
74    }
75    /// <p>The certificate ARN.</p>
76    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.certificate_arn
78    }
79    /// <p>The certificate ID.</p>
80    pub fn certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.certificate_id = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The certificate ID.</p>
85    pub fn set_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.certificate_id = input;
87        self
88    }
89    /// <p>The certificate ID.</p>
90    pub fn get_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
91        &self.certificate_id
92    }
93    /// <p>The Amazon Web Services account to which the transfer was made.</p>
94    pub fn transferred_to(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.transferred_to = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The Amazon Web Services account to which the transfer was made.</p>
99    pub fn set_transferred_to(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.transferred_to = input;
101        self
102    }
103    /// <p>The Amazon Web Services account to which the transfer was made.</p>
104    pub fn get_transferred_to(&self) -> &::std::option::Option<::std::string::String> {
105        &self.transferred_to
106    }
107    /// <p>The date the transfer was initiated.</p>
108    pub fn transfer_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
109        self.transfer_date = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>The date the transfer was initiated.</p>
113    pub fn set_transfer_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
114        self.transfer_date = input;
115        self
116    }
117    /// <p>The date the transfer was initiated.</p>
118    pub fn get_transfer_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
119        &self.transfer_date
120    }
121    /// <p>The transfer message.</p>
122    pub fn transfer_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.transfer_message = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The transfer message.</p>
127    pub fn set_transfer_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.transfer_message = input;
129        self
130    }
131    /// <p>The transfer message.</p>
132    pub fn get_transfer_message(&self) -> &::std::option::Option<::std::string::String> {
133        &self.transfer_message
134    }
135    /// <p>The certificate creation date.</p>
136    pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
137        self.creation_date = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The certificate creation date.</p>
141    pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
142        self.creation_date = input;
143        self
144    }
145    /// <p>The certificate creation date.</p>
146    pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
147        &self.creation_date
148    }
149    /// Consumes the builder and constructs a [`OutgoingCertificate`](crate::types::OutgoingCertificate).
150    pub fn build(self) -> crate::types::OutgoingCertificate {
151        crate::types::OutgoingCertificate {
152            certificate_arn: self.certificate_arn,
153            certificate_id: self.certificate_id,
154            transferred_to: self.transferred_to,
155            transfer_date: self.transfer_date,
156            transfer_message: self.transfer_message,
157            creation_date: self.creation_date,
158        }
159    }
160}