aws_sdk_sesv2/operation/create_tenant/
_create_tenant_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a newly created tenant.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateTenantOutput {
7    /// <p>The name of the tenant.</p>
8    pub tenant_name: ::std::option::Option<::std::string::String>,
9    /// <p>A unique identifier for the tenant.</p>
10    pub tenant_id: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon Resource Name (ARN) of the tenant.</p>
12    pub tenant_arn: ::std::option::Option<::std::string::String>,
13    /// <p>The date and time when the tenant was created.</p>
14    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>An array of objects that define the tags (keys and values) associated with the tenant.</p>
16    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
17    /// <p>The status of email sending capability for the tenant.</p>
18    pub sending_status: ::std::option::Option<crate::types::SendingStatus>,
19    _request_id: Option<String>,
20}
21impl CreateTenantOutput {
22    /// <p>The name of the tenant.</p>
23    pub fn tenant_name(&self) -> ::std::option::Option<&str> {
24        self.tenant_name.as_deref()
25    }
26    /// <p>A unique identifier for the tenant.</p>
27    pub fn tenant_id(&self) -> ::std::option::Option<&str> {
28        self.tenant_id.as_deref()
29    }
30    /// <p>The Amazon Resource Name (ARN) of the tenant.</p>
31    pub fn tenant_arn(&self) -> ::std::option::Option<&str> {
32        self.tenant_arn.as_deref()
33    }
34    /// <p>The date and time when the tenant was created.</p>
35    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
36        self.created_timestamp.as_ref()
37    }
38    /// <p>An array of objects that define the tags (keys and values) associated with the tenant.</p>
39    ///
40    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
41    pub fn tags(&self) -> &[crate::types::Tag] {
42        self.tags.as_deref().unwrap_or_default()
43    }
44    /// <p>The status of email sending capability for the tenant.</p>
45    pub fn sending_status(&self) -> ::std::option::Option<&crate::types::SendingStatus> {
46        self.sending_status.as_ref()
47    }
48}
49impl ::aws_types::request_id::RequestId for CreateTenantOutput {
50    fn request_id(&self) -> Option<&str> {
51        self._request_id.as_deref()
52    }
53}
54impl CreateTenantOutput {
55    /// Creates a new builder-style object to manufacture [`CreateTenantOutput`](crate::operation::create_tenant::CreateTenantOutput).
56    pub fn builder() -> crate::operation::create_tenant::builders::CreateTenantOutputBuilder {
57        crate::operation::create_tenant::builders::CreateTenantOutputBuilder::default()
58    }
59}
60
61/// A builder for [`CreateTenantOutput`](crate::operation::create_tenant::CreateTenantOutput).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct CreateTenantOutputBuilder {
65    pub(crate) tenant_name: ::std::option::Option<::std::string::String>,
66    pub(crate) tenant_id: ::std::option::Option<::std::string::String>,
67    pub(crate) tenant_arn: ::std::option::Option<::std::string::String>,
68    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
69    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
70    pub(crate) sending_status: ::std::option::Option<crate::types::SendingStatus>,
71    _request_id: Option<String>,
72}
73impl CreateTenantOutputBuilder {
74    /// <p>The name of the tenant.</p>
75    pub fn tenant_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.tenant_name = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The name of the tenant.</p>
80    pub fn set_tenant_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.tenant_name = input;
82        self
83    }
84    /// <p>The name of the tenant.</p>
85    pub fn get_tenant_name(&self) -> &::std::option::Option<::std::string::String> {
86        &self.tenant_name
87    }
88    /// <p>A unique identifier for the tenant.</p>
89    pub fn tenant_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.tenant_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>A unique identifier for the tenant.</p>
94    pub fn set_tenant_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.tenant_id = input;
96        self
97    }
98    /// <p>A unique identifier for the tenant.</p>
99    pub fn get_tenant_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.tenant_id
101    }
102    /// <p>The Amazon Resource Name (ARN) of the tenant.</p>
103    pub fn tenant_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.tenant_arn = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The Amazon Resource Name (ARN) of the tenant.</p>
108    pub fn set_tenant_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.tenant_arn = input;
110        self
111    }
112    /// <p>The Amazon Resource Name (ARN) of the tenant.</p>
113    pub fn get_tenant_arn(&self) -> &::std::option::Option<::std::string::String> {
114        &self.tenant_arn
115    }
116    /// <p>The date and time when the tenant was created.</p>
117    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
118        self.created_timestamp = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The date and time when the tenant was created.</p>
122    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
123        self.created_timestamp = input;
124        self
125    }
126    /// <p>The date and time when the tenant was created.</p>
127    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
128        &self.created_timestamp
129    }
130    /// Appends an item to `tags`.
131    ///
132    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
133    ///
134    /// <p>An array of objects that define the tags (keys and values) associated with the tenant.</p>
135    pub fn tags(mut self, input: crate::types::Tag) -> Self {
136        let mut v = self.tags.unwrap_or_default();
137        v.push(input);
138        self.tags = ::std::option::Option::Some(v);
139        self
140    }
141    /// <p>An array of objects that define the tags (keys and values) associated with the tenant.</p>
142    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
143        self.tags = input;
144        self
145    }
146    /// <p>An array of objects that define the tags (keys and values) associated with the tenant.</p>
147    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
148        &self.tags
149    }
150    /// <p>The status of email sending capability for the tenant.</p>
151    pub fn sending_status(mut self, input: crate::types::SendingStatus) -> Self {
152        self.sending_status = ::std::option::Option::Some(input);
153        self
154    }
155    /// <p>The status of email sending capability for the tenant.</p>
156    pub fn set_sending_status(mut self, input: ::std::option::Option<crate::types::SendingStatus>) -> Self {
157        self.sending_status = input;
158        self
159    }
160    /// <p>The status of email sending capability for the tenant.</p>
161    pub fn get_sending_status(&self) -> &::std::option::Option<crate::types::SendingStatus> {
162        &self.sending_status
163    }
164    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
165        self._request_id = Some(request_id.into());
166        self
167    }
168
169    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
170        self._request_id = request_id;
171        self
172    }
173    /// Consumes the builder and constructs a [`CreateTenantOutput`](crate::operation::create_tenant::CreateTenantOutput).
174    pub fn build(self) -> crate::operation::create_tenant::CreateTenantOutput {
175        crate::operation::create_tenant::CreateTenantOutput {
176            tenant_name: self.tenant_name,
177            tenant_id: self.tenant_id,
178            tenant_arn: self.tenant_arn,
179            created_timestamp: self.created_timestamp,
180            tags: self.tags,
181            sending_status: self.sending_status,
182            _request_id: self._request_id,
183        }
184    }
185}