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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
// 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 DescribeOrganizationOutput {
    /// <p>The identifier of an organization.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The alias for an organization.</p>
    pub alias: ::std::option::Option<::std::string::String>,
    /// <p>The state of an organization.</p>
    pub state: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the directory associated with an WorkMail organization.</p>
    pub directory_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of directory associated with the WorkMail organization.</p>
    pub directory_type: ::std::option::Option<::std::string::String>,
    /// <p>The default mail domain associated with the organization.</p>
    pub default_mail_domain: ::std::option::Option<::std::string::String>,
    /// <p>The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.</p>
    pub completed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.</p>
    pub error_message: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the organization.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The user ID of the migration admin if migration is enabled for the organization.</p>
    pub migration_admin: ::std::option::Option<::std::string::String>,
    /// <p>Indicates if interoperability is enabled for this organization.</p>
    pub interoperability_enabled: bool,
    _request_id: Option<String>,
}
impl DescribeOrganizationOutput {
    /// <p>The identifier of an organization.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The alias for an organization.</p>
    pub fn alias(&self) -> ::std::option::Option<&str> {
        self.alias.as_deref()
    }
    /// <p>The state of an organization.</p>
    pub fn state(&self) -> ::std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The identifier for the directory associated with an WorkMail organization.</p>
    pub fn directory_id(&self) -> ::std::option::Option<&str> {
        self.directory_id.as_deref()
    }
    /// <p>The type of directory associated with the WorkMail organization.</p>
    pub fn directory_type(&self) -> ::std::option::Option<&str> {
        self.directory_type.as_deref()
    }
    /// <p>The default mail domain associated with the organization.</p>
    pub fn default_mail_domain(&self) -> ::std::option::Option<&str> {
        self.default_mail_domain.as_deref()
    }
    /// <p>The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.</p>
    pub fn completed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completed_date.as_ref()
    }
    /// <p>(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.</p>
    pub fn error_message(&self) -> ::std::option::Option<&str> {
        self.error_message.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the organization.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The user ID of the migration admin if migration is enabled for the organization.</p>
    pub fn migration_admin(&self) -> ::std::option::Option<&str> {
        self.migration_admin.as_deref()
    }
    /// <p>Indicates if interoperability is enabled for this organization.</p>
    pub fn interoperability_enabled(&self) -> bool {
        self.interoperability_enabled
    }
}
impl ::aws_http::request_id::RequestId for DescribeOrganizationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeOrganizationOutput {
    /// Creates a new builder-style object to manufacture [`DescribeOrganizationOutput`](crate::operation::describe_organization::DescribeOrganizationOutput).
    pub fn builder() -> crate::operation::describe_organization::builders::DescribeOrganizationOutputBuilder {
        crate::operation::describe_organization::builders::DescribeOrganizationOutputBuilder::default()
    }
}

/// A builder for [`DescribeOrganizationOutput`](crate::operation::describe_organization::DescribeOrganizationOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeOrganizationOutputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) alias: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<::std::string::String>,
    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
    pub(crate) directory_type: ::std::option::Option<::std::string::String>,
    pub(crate) default_mail_domain: ::std::option::Option<::std::string::String>,
    pub(crate) completed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) error_message: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) migration_admin: ::std::option::Option<::std::string::String>,
    pub(crate) interoperability_enabled: ::std::option::Option<bool>,
    _request_id: Option<String>,
}
impl DescribeOrganizationOutputBuilder {
    /// <p>The identifier of an organization.</p>
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of an organization.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The identifier of an organization.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The alias for an organization.</p>
    pub fn alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alias = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The alias for an organization.</p>
    pub fn set_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alias = input;
        self
    }
    /// <p>The alias for an organization.</p>
    pub fn get_alias(&self) -> &::std::option::Option<::std::string::String> {
        &self.alias
    }
    /// <p>The state of an organization.</p>
    pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The state of an organization.</p>
    pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of an organization.</p>
    pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
        &self.state
    }
    /// <p>The identifier for the directory associated with an WorkMail organization.</p>
    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.directory_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the directory associated with an WorkMail organization.</p>
    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.directory_id = input;
        self
    }
    /// <p>The identifier for the directory associated with an WorkMail organization.</p>
    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.directory_id
    }
    /// <p>The type of directory associated with the WorkMail organization.</p>
    pub fn directory_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.directory_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of directory associated with the WorkMail organization.</p>
    pub fn set_directory_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.directory_type = input;
        self
    }
    /// <p>The type of directory associated with the WorkMail organization.</p>
    pub fn get_directory_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.directory_type
    }
    /// <p>The default mail domain associated with the organization.</p>
    pub fn default_mail_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.default_mail_domain = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The default mail domain associated with the organization.</p>
    pub fn set_default_mail_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.default_mail_domain = input;
        self
    }
    /// <p>The default mail domain associated with the organization.</p>
    pub fn get_default_mail_domain(&self) -> &::std::option::Option<::std::string::String> {
        &self.default_mail_domain
    }
    /// <p>The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.</p>
    pub fn completed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completed_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.</p>
    pub fn set_completed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completed_date = input;
        self
    }
    /// <p>The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.</p>
    pub fn get_completed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completed_date
    }
    /// <p>(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.</p>
    pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.</p>
    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_message = input;
        self
    }
    /// <p>(Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.</p>
    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_message
    }
    /// <p>The Amazon Resource Name (ARN) of the organization.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the organization.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the organization.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The user ID of the migration admin if migration is enabled for the organization.</p>
    pub fn migration_admin(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.migration_admin = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user ID of the migration admin if migration is enabled for the organization.</p>
    pub fn set_migration_admin(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.migration_admin = input;
        self
    }
    /// <p>The user ID of the migration admin if migration is enabled for the organization.</p>
    pub fn get_migration_admin(&self) -> &::std::option::Option<::std::string::String> {
        &self.migration_admin
    }
    /// <p>Indicates if interoperability is enabled for this organization.</p>
    pub fn interoperability_enabled(mut self, input: bool) -> Self {
        self.interoperability_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates if interoperability is enabled for this organization.</p>
    pub fn set_interoperability_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.interoperability_enabled = input;
        self
    }
    /// <p>Indicates if interoperability is enabled for this organization.</p>
    pub fn get_interoperability_enabled(&self) -> &::std::option::Option<bool> {
        &self.interoperability_enabled
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeOrganizationOutput`](crate::operation::describe_organization::DescribeOrganizationOutput).
    pub fn build(self) -> crate::operation::describe_organization::DescribeOrganizationOutput {
        crate::operation::describe_organization::DescribeOrganizationOutput {
            organization_id: self.organization_id,
            alias: self.alias,
            state: self.state,
            directory_id: self.directory_id,
            directory_type: self.directory_type,
            default_mail_domain: self.default_mail_domain,
            completed_date: self.completed_date,
            error_message: self.error_message,
            arn: self.arn,
            migration_admin: self.migration_admin,
            interoperability_enabled: self.interoperability_enabled.unwrap_or_default(),
            _request_id: self._request_id,
        }
    }
}