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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
// 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 UpdateEventDataStoreOutput {
    /// <p>The ARN of the event data store.</p>
    pub event_data_store_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the event data store.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The status of an event data store.</p>
    pub status: ::std::option::Option<crate::types::EventDataStoreStatus>,
    /// <p>The advanced event selectors that are applied to the event data store.</p>
    pub advanced_event_selectors: ::std::option::Option<::std::vec::Vec<crate::types::AdvancedEventSelector>>,
    /// <p>Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.</p>
    pub multi_region_enabled: ::std::option::Option<bool>,
    /// <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    pub organization_enabled: ::std::option::Option<bool>,
    /// <p>The retention period, in days.</p>
    pub retention_period: ::std::option::Option<i32>,
    /// <p>Indicates whether termination protection is enabled for the event data store.</p>
    pub termination_protection_enabled: ::std::option::Option<bool>,
    /// <p>The timestamp that shows when an event data store was first created.</p>
    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp that shows when the event data store was last updated. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p>
    /// <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The billing mode for the event data store.</p>
    pub billing_mode: ::std::option::Option<crate::types::BillingMode>,
    /// <p>Indicates the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html">Lake query federation</a> status. The status is <code>ENABLED</code> if Lake query federation is enabled, or <code>DISABLED</code> if Lake query federation is disabled. You cannot delete an event data store if the <code>FederationStatus</code> is <code>ENABLED</code>.</p>
    pub federation_status: ::std::option::Option<crate::types::FederationStatus>,
    /// <p>If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.</p>
    pub federation_role_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateEventDataStoreOutput {
    /// <p>The ARN of the event data store.</p>
    pub fn event_data_store_arn(&self) -> ::std::option::Option<&str> {
        self.event_data_store_arn.as_deref()
    }
    /// <p>The name of the event data store.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The status of an event data store.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::EventDataStoreStatus> {
        self.status.as_ref()
    }
    /// <p>The advanced event selectors that are applied to the event data store.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.advanced_event_selectors.is_none()`.
    pub fn advanced_event_selectors(&self) -> &[crate::types::AdvancedEventSelector] {
        self.advanced_event_selectors.as_deref().unwrap_or_default()
    }
    /// <p>Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.</p>
    pub fn multi_region_enabled(&self) -> ::std::option::Option<bool> {
        self.multi_region_enabled
    }
    /// <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    pub fn organization_enabled(&self) -> ::std::option::Option<bool> {
        self.organization_enabled
    }
    /// <p>The retention period, in days.</p>
    pub fn retention_period(&self) -> ::std::option::Option<i32> {
        self.retention_period
    }
    /// <p>Indicates whether termination protection is enabled for the event data store.</p>
    pub fn termination_protection_enabled(&self) -> ::std::option::Option<bool> {
        self.termination_protection_enabled
    }
    /// <p>The timestamp that shows when an event data store was first created.</p>
    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_timestamp.as_ref()
    }
    /// <p>The timestamp that shows when the event data store was last updated. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    pub fn updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_timestamp.as_ref()
    }
    /// <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p>
    /// <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The billing mode for the event data store.</p>
    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
        self.billing_mode.as_ref()
    }
    /// <p>Indicates the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html">Lake query federation</a> status. The status is <code>ENABLED</code> if Lake query federation is enabled, or <code>DISABLED</code> if Lake query federation is disabled. You cannot delete an event data store if the <code>FederationStatus</code> is <code>ENABLED</code>.</p>
    pub fn federation_status(&self) -> ::std::option::Option<&crate::types::FederationStatus> {
        self.federation_status.as_ref()
    }
    /// <p>If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.</p>
    pub fn federation_role_arn(&self) -> ::std::option::Option<&str> {
        self.federation_role_arn.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateEventDataStoreOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateEventDataStoreOutput {
    /// Creates a new builder-style object to manufacture [`UpdateEventDataStoreOutput`](crate::operation::update_event_data_store::UpdateEventDataStoreOutput).
    pub fn builder() -> crate::operation::update_event_data_store::builders::UpdateEventDataStoreOutputBuilder {
        crate::operation::update_event_data_store::builders::UpdateEventDataStoreOutputBuilder::default()
    }
}

/// A builder for [`UpdateEventDataStoreOutput`](crate::operation::update_event_data_store::UpdateEventDataStoreOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateEventDataStoreOutputBuilder {
    pub(crate) event_data_store_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::EventDataStoreStatus>,
    pub(crate) advanced_event_selectors: ::std::option::Option<::std::vec::Vec<crate::types::AdvancedEventSelector>>,
    pub(crate) multi_region_enabled: ::std::option::Option<bool>,
    pub(crate) organization_enabled: ::std::option::Option<bool>,
    pub(crate) retention_period: ::std::option::Option<i32>,
    pub(crate) termination_protection_enabled: ::std::option::Option<bool>,
    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
    pub(crate) federation_status: ::std::option::Option<crate::types::FederationStatus>,
    pub(crate) federation_role_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateEventDataStoreOutputBuilder {
    /// <p>The ARN of the event data store.</p>
    pub fn event_data_store_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_data_store_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the event data store.</p>
    pub fn set_event_data_store_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_data_store_arn = input;
        self
    }
    /// <p>The ARN of the event data store.</p>
    pub fn get_event_data_store_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_data_store_arn
    }
    /// <p>The name of the event data store.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the event data store.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the event data store.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The status of an event data store.</p>
    pub fn status(mut self, input: crate::types::EventDataStoreStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of an event data store.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::EventDataStoreStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of an event data store.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::EventDataStoreStatus> {
        &self.status
    }
    /// Appends an item to `advanced_event_selectors`.
    ///
    /// To override the contents of this collection use [`set_advanced_event_selectors`](Self::set_advanced_event_selectors).
    ///
    /// <p>The advanced event selectors that are applied to the event data store.</p>
    pub fn advanced_event_selectors(mut self, input: crate::types::AdvancedEventSelector) -> Self {
        let mut v = self.advanced_event_selectors.unwrap_or_default();
        v.push(input);
        self.advanced_event_selectors = ::std::option::Option::Some(v);
        self
    }
    /// <p>The advanced event selectors that are applied to the event data store.</p>
    pub fn set_advanced_event_selectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AdvancedEventSelector>>) -> Self {
        self.advanced_event_selectors = input;
        self
    }
    /// <p>The advanced event selectors that are applied to the event data store.</p>
    pub fn get_advanced_event_selectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AdvancedEventSelector>> {
        &self.advanced_event_selectors
    }
    /// <p>Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.</p>
    pub fn multi_region_enabled(mut self, input: bool) -> Self {
        self.multi_region_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.</p>
    pub fn set_multi_region_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.multi_region_enabled = input;
        self
    }
    /// <p>Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.</p>
    pub fn get_multi_region_enabled(&self) -> &::std::option::Option<bool> {
        &self.multi_region_enabled
    }
    /// <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    pub fn organization_enabled(mut self, input: bool) -> Self {
        self.organization_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    pub fn set_organization_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.organization_enabled = input;
        self
    }
    /// <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    pub fn get_organization_enabled(&self) -> &::std::option::Option<bool> {
        &self.organization_enabled
    }
    /// <p>The retention period, in days.</p>
    pub fn retention_period(mut self, input: i32) -> Self {
        self.retention_period = ::std::option::Option::Some(input);
        self
    }
    /// <p>The retention period, in days.</p>
    pub fn set_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
        self.retention_period = input;
        self
    }
    /// <p>The retention period, in days.</p>
    pub fn get_retention_period(&self) -> &::std::option::Option<i32> {
        &self.retention_period
    }
    /// <p>Indicates whether termination protection is enabled for the event data store.</p>
    pub fn termination_protection_enabled(mut self, input: bool) -> Self {
        self.termination_protection_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether termination protection is enabled for the event data store.</p>
    pub fn set_termination_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.termination_protection_enabled = input;
        self
    }
    /// <p>Indicates whether termination protection is enabled for the event data store.</p>
    pub fn get_termination_protection_enabled(&self) -> &::std::option::Option<bool> {
        &self.termination_protection_enabled
    }
    /// <p>The timestamp that shows when an event data store was first created.</p>
    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp that shows when an event data store was first created.</p>
    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_timestamp = input;
        self
    }
    /// <p>The timestamp that shows when an event data store was first created.</p>
    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_timestamp
    }
    /// <p>The timestamp that shows when the event data store was last updated. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    pub fn updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp that shows when the event data store was last updated. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    pub fn set_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_timestamp = input;
        self
    }
    /// <p>The timestamp that shows when the event data store was last updated. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    pub fn get_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_timestamp
    }
    /// <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p>
    /// <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p>
    /// <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p>
    /// <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The billing mode for the event data store.</p>
    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
        self.billing_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The billing mode for the event data store.</p>
    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
        self.billing_mode = input;
        self
    }
    /// <p>The billing mode for the event data store.</p>
    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
        &self.billing_mode
    }
    /// <p>Indicates the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html">Lake query federation</a> status. The status is <code>ENABLED</code> if Lake query federation is enabled, or <code>DISABLED</code> if Lake query federation is disabled. You cannot delete an event data store if the <code>FederationStatus</code> is <code>ENABLED</code>.</p>
    pub fn federation_status(mut self, input: crate::types::FederationStatus) -> Self {
        self.federation_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html">Lake query federation</a> status. The status is <code>ENABLED</code> if Lake query federation is enabled, or <code>DISABLED</code> if Lake query federation is disabled. You cannot delete an event data store if the <code>FederationStatus</code> is <code>ENABLED</code>.</p>
    pub fn set_federation_status(mut self, input: ::std::option::Option<crate::types::FederationStatus>) -> Self {
        self.federation_status = input;
        self
    }
    /// <p>Indicates the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html">Lake query federation</a> status. The status is <code>ENABLED</code> if Lake query federation is enabled, or <code>DISABLED</code> if Lake query federation is disabled. You cannot delete an event data store if the <code>FederationStatus</code> is <code>ENABLED</code>.</p>
    pub fn get_federation_status(&self) -> &::std::option::Option<crate::types::FederationStatus> {
        &self.federation_status
    }
    /// <p>If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.</p>
    pub fn federation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.federation_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.</p>
    pub fn set_federation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.federation_role_arn = input;
        self
    }
    /// <p>If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.</p>
    pub fn get_federation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.federation_role_arn
    }
    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 [`UpdateEventDataStoreOutput`](crate::operation::update_event_data_store::UpdateEventDataStoreOutput).
    pub fn build(self) -> crate::operation::update_event_data_store::UpdateEventDataStoreOutput {
        crate::operation::update_event_data_store::UpdateEventDataStoreOutput {
            event_data_store_arn: self.event_data_store_arn,
            name: self.name,
            status: self.status,
            advanced_event_selectors: self.advanced_event_selectors,
            multi_region_enabled: self.multi_region_enabled,
            organization_enabled: self.organization_enabled,
            retention_period: self.retention_period,
            termination_protection_enabled: self.termination_protection_enabled,
            created_timestamp: self.created_timestamp,
            updated_timestamp: self.updated_timestamp,
            kms_key_id: self.kms_key_id,
            billing_mode: self.billing_mode,
            federation_status: self.federation_status,
            federation_role_arn: self.federation_role_arn,
            _request_id: self._request_id,
        }
    }
}