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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>(Discontinued) Includes details about the failed S3 resources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FailedS3Resource {
    /// <p>(Discontinued) The failed S3 resources.</p>
    #[doc(hidden)]
    pub failed_item: std::option::Option<crate::model::S3Resource>,
    /// <p>(Discontinued) The status code of a failed item.</p>
    #[doc(hidden)]
    pub error_code: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The error message of a failed item.</p>
    #[doc(hidden)]
    pub error_message: std::option::Option<std::string::String>,
}
impl FailedS3Resource {
    /// <p>(Discontinued) The failed S3 resources.</p>
    pub fn failed_item(&self) -> std::option::Option<&crate::model::S3Resource> {
        self.failed_item.as_ref()
    }
    /// <p>(Discontinued) The status code of a failed item.</p>
    pub fn error_code(&self) -> std::option::Option<&str> {
        self.error_code.as_deref()
    }
    /// <p>(Discontinued) The error message of a failed item.</p>
    pub fn error_message(&self) -> std::option::Option<&str> {
        self.error_message.as_deref()
    }
}
/// See [`FailedS3Resource`](crate::model::FailedS3Resource).
pub mod failed_s3_resource {

    /// A builder for [`FailedS3Resource`](crate::model::FailedS3Resource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) failed_item: std::option::Option<crate::model::S3Resource>,
        pub(crate) error_code: std::option::Option<std::string::String>,
        pub(crate) error_message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>(Discontinued) The failed S3 resources.</p>
        pub fn failed_item(mut self, input: crate::model::S3Resource) -> Self {
            self.failed_item = Some(input);
            self
        }
        /// <p>(Discontinued) The failed S3 resources.</p>
        pub fn set_failed_item(
            mut self,
            input: std::option::Option<crate::model::S3Resource>,
        ) -> Self {
            self.failed_item = input;
            self
        }
        /// <p>(Discontinued) The status code of a failed item.</p>
        pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_code = Some(input.into());
            self
        }
        /// <p>(Discontinued) The status code of a failed item.</p>
        pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.error_code = input;
            self
        }
        /// <p>(Discontinued) The error message of a failed item.</p>
        pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.error_message = Some(input.into());
            self
        }
        /// <p>(Discontinued) The error message of a failed item.</p>
        pub fn set_error_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.error_message = input;
            self
        }
        /// Consumes the builder and constructs a [`FailedS3Resource`](crate::model::FailedS3Resource).
        pub fn build(self) -> crate::model::FailedS3Resource {
            crate::model::FailedS3Resource {
                failed_item: self.failed_item,
                error_code: self.error_code,
                error_message: self.error_message,
            }
        }
    }
}
impl FailedS3Resource {
    /// Creates a new builder-style object to manufacture [`FailedS3Resource`](crate::model::FailedS3Resource).
    pub fn builder() -> crate::model::failed_s3_resource::Builder {
        crate::model::failed_s3_resource::Builder::default()
    }
}

/// <p>(Discontinued) Contains information about the S3 resource. This data type is used as a request parameter in the <code>DisassociateS3Resources</code> action and can be used as a response parameter in the <code>AssociateS3Resources</code> and <code>UpdateS3Resources</code> actions. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3Resource {
    /// <p>(Discontinued) The name of the S3 bucket.</p>
    #[doc(hidden)]
    pub bucket_name: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The prefix of the S3 bucket.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
}
impl S3Resource {
    /// <p>(Discontinued) The name of the S3 bucket.</p>
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// <p>(Discontinued) The prefix of the S3 bucket.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
}
/// See [`S3Resource`](crate::model::S3Resource).
pub mod s3_resource {

    /// A builder for [`S3Resource`](crate::model::S3Resource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>(Discontinued) The name of the S3 bucket.</p>
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// <p>(Discontinued) The name of the S3 bucket.</p>
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// Consumes the builder and constructs a [`S3Resource`](crate::model::S3Resource).
        pub fn build(self) -> crate::model::S3Resource {
            crate::model::S3Resource {
                bucket_name: self.bucket_name,
                prefix: self.prefix,
            }
        }
    }
}
impl S3Resource {
    /// Creates a new builder-style object to manufacture [`S3Resource`](crate::model::S3Resource).
    pub fn builder() -> crate::model::s3_resource::Builder {
        crate::model::s3_resource::Builder::default()
    }
}

/// <p>(Discontinued) The S3 resources whose classification types you want to update. This data type is used as a request parameter in the <code>UpdateS3Resources</code> action. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3ResourceClassificationUpdate {
    /// <p>(Discontinued) The name of the S3 bucket whose classification types you want to update.</p>
    #[doc(hidden)]
    pub bucket_name: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The prefix of the S3 bucket whose classification types you want to update.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic. </p>
    #[doc(hidden)]
    pub classification_type_update: std::option::Option<crate::model::ClassificationTypeUpdate>,
}
impl S3ResourceClassificationUpdate {
    /// <p>(Discontinued) The name of the S3 bucket whose classification types you want to update.</p>
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// <p>(Discontinued) The prefix of the S3 bucket whose classification types you want to update.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic. </p>
    pub fn classification_type_update(
        &self,
    ) -> std::option::Option<&crate::model::ClassificationTypeUpdate> {
        self.classification_type_update.as_ref()
    }
}
/// See [`S3ResourceClassificationUpdate`](crate::model::S3ResourceClassificationUpdate).
pub mod s3_resource_classification_update {

    /// A builder for [`S3ResourceClassificationUpdate`](crate::model::S3ResourceClassificationUpdate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) classification_type_update:
            std::option::Option<crate::model::ClassificationTypeUpdate>,
    }
    impl Builder {
        /// <p>(Discontinued) The name of the S3 bucket whose classification types you want to update.</p>
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// <p>(Discontinued) The name of the S3 bucket whose classification types you want to update.</p>
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket whose classification types you want to update.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket whose classification types you want to update.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic. </p>
        pub fn classification_type_update(
            mut self,
            input: crate::model::ClassificationTypeUpdate,
        ) -> Self {
            self.classification_type_update = Some(input);
            self
        }
        /// <p>(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic. </p>
        pub fn set_classification_type_update(
            mut self,
            input: std::option::Option<crate::model::ClassificationTypeUpdate>,
        ) -> Self {
            self.classification_type_update = input;
            self
        }
        /// Consumes the builder and constructs a [`S3ResourceClassificationUpdate`](crate::model::S3ResourceClassificationUpdate).
        pub fn build(self) -> crate::model::S3ResourceClassificationUpdate {
            crate::model::S3ResourceClassificationUpdate {
                bucket_name: self.bucket_name,
                prefix: self.prefix,
                classification_type_update: self.classification_type_update,
            }
        }
    }
}
impl S3ResourceClassificationUpdate {
    /// Creates a new builder-style object to manufacture [`S3ResourceClassificationUpdate`](crate::model::S3ResourceClassificationUpdate).
    pub fn builder() -> crate::model::s3_resource_classification_update::Builder {
        crate::model::s3_resource_classification_update::Builder::default()
    }
}

/// <p>(Discontinued) The classification type that Amazon Macie Classic applies to the associated S3 resources. At least one of the classification types (<code>oneTime</code> or <code>continuous</code>) must be specified. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassificationTypeUpdate {
    /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
    #[doc(hidden)]
    pub one_time: std::option::Option<crate::model::S3OneTimeClassificationType>,
    /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic. </p>
    #[doc(hidden)]
    pub continuous: std::option::Option<crate::model::S3ContinuousClassificationType>,
}
impl ClassificationTypeUpdate {
    /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
    pub fn one_time(&self) -> std::option::Option<&crate::model::S3OneTimeClassificationType> {
        self.one_time.as_ref()
    }
    /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic. </p>
    pub fn continuous(&self) -> std::option::Option<&crate::model::S3ContinuousClassificationType> {
        self.continuous.as_ref()
    }
}
/// See [`ClassificationTypeUpdate`](crate::model::ClassificationTypeUpdate).
pub mod classification_type_update {

    /// A builder for [`ClassificationTypeUpdate`](crate::model::ClassificationTypeUpdate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) one_time: std::option::Option<crate::model::S3OneTimeClassificationType>,
        pub(crate) continuous: std::option::Option<crate::model::S3ContinuousClassificationType>,
    }
    impl Builder {
        /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
        pub fn one_time(mut self, input: crate::model::S3OneTimeClassificationType) -> Self {
            self.one_time = Some(input);
            self
        }
        /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
        pub fn set_one_time(
            mut self,
            input: std::option::Option<crate::model::S3OneTimeClassificationType>,
        ) -> Self {
            self.one_time = input;
            self
        }
        /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic. </p>
        pub fn continuous(mut self, input: crate::model::S3ContinuousClassificationType) -> Self {
            self.continuous = Some(input);
            self
        }
        /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic. </p>
        pub fn set_continuous(
            mut self,
            input: std::option::Option<crate::model::S3ContinuousClassificationType>,
        ) -> Self {
            self.continuous = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassificationTypeUpdate`](crate::model::ClassificationTypeUpdate).
        pub fn build(self) -> crate::model::ClassificationTypeUpdate {
            crate::model::ClassificationTypeUpdate {
                one_time: self.one_time,
                continuous: self.continuous,
            }
        }
    }
}
impl ClassificationTypeUpdate {
    /// Creates a new builder-style object to manufacture [`ClassificationTypeUpdate`](crate::model::ClassificationTypeUpdate).
    pub fn builder() -> crate::model::classification_type_update::Builder {
        crate::model::classification_type_update::Builder::default()
    }
}

/// When writing a match expression against `S3ContinuousClassificationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let s3continuousclassificationtype = unimplemented!();
/// match s3continuousclassificationtype {
///     S3ContinuousClassificationType::Full => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `s3continuousclassificationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `S3ContinuousClassificationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `S3ContinuousClassificationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `S3ContinuousClassificationType::NewFeature` is defined.
/// Specifically, when `s3continuousclassificationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `S3ContinuousClassificationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum S3ContinuousClassificationType {
    #[allow(missing_docs)] // documentation missing in model
    Full,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for S3ContinuousClassificationType {
    fn from(s: &str) -> Self {
        match s {
            "FULL" => S3ContinuousClassificationType::Full,
            other => S3ContinuousClassificationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for S3ContinuousClassificationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(S3ContinuousClassificationType::from(s))
    }
}
impl S3ContinuousClassificationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            S3ContinuousClassificationType::Full => "FULL",
            S3ContinuousClassificationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["FULL"]
    }
}
impl AsRef<str> for S3ContinuousClassificationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `S3OneTimeClassificationType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let s3onetimeclassificationtype = unimplemented!();
/// match s3onetimeclassificationtype {
///     S3OneTimeClassificationType::Full => { /* ... */ },
///     S3OneTimeClassificationType::None => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `s3onetimeclassificationtype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `S3OneTimeClassificationType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `S3OneTimeClassificationType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `S3OneTimeClassificationType::NewFeature` is defined.
/// Specifically, when `s3onetimeclassificationtype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `S3OneTimeClassificationType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum S3OneTimeClassificationType {
    #[allow(missing_docs)] // documentation missing in model
    Full,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for S3OneTimeClassificationType {
    fn from(s: &str) -> Self {
        match s {
            "FULL" => S3OneTimeClassificationType::Full,
            "NONE" => S3OneTimeClassificationType::None,
            other => S3OneTimeClassificationType::Unknown(crate::types::UnknownVariantValue(
                other.to_owned(),
            )),
        }
    }
}
impl std::str::FromStr for S3OneTimeClassificationType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(S3OneTimeClassificationType::from(s))
    }
}
impl S3OneTimeClassificationType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            S3OneTimeClassificationType::Full => "FULL",
            S3OneTimeClassificationType::None => "NONE",
            S3OneTimeClassificationType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["FULL", "NONE"]
    }
}
impl AsRef<str> for S3OneTimeClassificationType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification. This data type is used as a request parameter in the <code>AssociateS3Resources</code> action and a response parameter in the <code>ListS3Resources</code> action. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct S3ResourceClassification {
    /// <p>(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
    #[doc(hidden)]
    pub bucket_name: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
    #[doc(hidden)]
    pub prefix: std::option::Option<std::string::String>,
    /// <p>(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic. </p>
    #[doc(hidden)]
    pub classification_type: std::option::Option<crate::model::ClassificationType>,
}
impl S3ResourceClassification {
    /// <p>(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
    pub fn bucket_name(&self) -> std::option::Option<&str> {
        self.bucket_name.as_deref()
    }
    /// <p>(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
    pub fn prefix(&self) -> std::option::Option<&str> {
        self.prefix.as_deref()
    }
    /// <p>(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic. </p>
    pub fn classification_type(&self) -> std::option::Option<&crate::model::ClassificationType> {
        self.classification_type.as_ref()
    }
}
/// See [`S3ResourceClassification`](crate::model::S3ResourceClassification).
pub mod s3_resource_classification {

    /// A builder for [`S3ResourceClassification`](crate::model::S3ResourceClassification).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket_name: std::option::Option<std::string::String>,
        pub(crate) prefix: std::option::Option<std::string::String>,
        pub(crate) classification_type: std::option::Option<crate::model::ClassificationType>,
    }
    impl Builder {
        /// <p>(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
        pub fn bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket_name = Some(input.into());
            self
        }
        /// <p>(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
        pub fn set_bucket_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket_name = input;
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
        pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.prefix = Some(input.into());
            self
        }
        /// <p>(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.</p>
        pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.prefix = input;
            self
        }
        /// <p>(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic. </p>
        pub fn classification_type(mut self, input: crate::model::ClassificationType) -> Self {
            self.classification_type = Some(input);
            self
        }
        /// <p>(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic. </p>
        pub fn set_classification_type(
            mut self,
            input: std::option::Option<crate::model::ClassificationType>,
        ) -> Self {
            self.classification_type = input;
            self
        }
        /// Consumes the builder and constructs a [`S3ResourceClassification`](crate::model::S3ResourceClassification).
        pub fn build(self) -> crate::model::S3ResourceClassification {
            crate::model::S3ResourceClassification {
                bucket_name: self.bucket_name,
                prefix: self.prefix,
                classification_type: self.classification_type,
            }
        }
    }
}
impl S3ResourceClassification {
    /// Creates a new builder-style object to manufacture [`S3ResourceClassification`](crate::model::S3ResourceClassification).
    pub fn builder() -> crate::model::s3_resource_classification::Builder {
        crate::model::s3_resource_classification::Builder::default()
    }
}

/// <p>(Discontinued) The classification type that Amazon Macie Classic applies to the associated S3 resources.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClassificationType {
    /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
    #[doc(hidden)]
    pub one_time: std::option::Option<crate::model::S3OneTimeClassificationType>,
    /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.</p>
    #[doc(hidden)]
    pub continuous: std::option::Option<crate::model::S3ContinuousClassificationType>,
}
impl ClassificationType {
    /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
    pub fn one_time(&self) -> std::option::Option<&crate::model::S3OneTimeClassificationType> {
        self.one_time.as_ref()
    }
    /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.</p>
    pub fn continuous(&self) -> std::option::Option<&crate::model::S3ContinuousClassificationType> {
        self.continuous.as_ref()
    }
}
/// See [`ClassificationType`](crate::model::ClassificationType).
pub mod classification_type {

    /// A builder for [`ClassificationType`](crate::model::ClassificationType).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) one_time: std::option::Option<crate::model::S3OneTimeClassificationType>,
        pub(crate) continuous: std::option::Option<crate::model::S3ContinuousClassificationType>,
    }
    impl Builder {
        /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
        pub fn one_time(mut self, input: crate::model::S3OneTimeClassificationType) -> Self {
            self.one_time = Some(input);
            self
        }
        /// <p>(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket. </p>
        pub fn set_one_time(
            mut self,
            input: std::option::Option<crate::model::S3OneTimeClassificationType>,
        ) -> Self {
            self.one_time = input;
            self
        }
        /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.</p>
        pub fn continuous(mut self, input: crate::model::S3ContinuousClassificationType) -> Self {
            self.continuous = Some(input);
            self
        }
        /// <p>(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.</p>
        pub fn set_continuous(
            mut self,
            input: std::option::Option<crate::model::S3ContinuousClassificationType>,
        ) -> Self {
            self.continuous = input;
            self
        }
        /// Consumes the builder and constructs a [`ClassificationType`](crate::model::ClassificationType).
        pub fn build(self) -> crate::model::ClassificationType {
            crate::model::ClassificationType {
                one_time: self.one_time,
                continuous: self.continuous,
            }
        }
    }
}
impl ClassificationType {
    /// Creates a new builder-style object to manufacture [`ClassificationType`](crate::model::ClassificationType).
    pub fn builder() -> crate::model::classification_type::Builder {
        crate::model::classification_type::Builder::default()
    }
}

/// <p>(Discontinued) Contains information about the Amazon Macie Classic member account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MemberAccount {
    /// <p>(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.</p>
    #[doc(hidden)]
    pub account_id: std::option::Option<std::string::String>,
}
impl MemberAccount {
    /// <p>(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.</p>
    pub fn account_id(&self) -> std::option::Option<&str> {
        self.account_id.as_deref()
    }
}
/// See [`MemberAccount`](crate::model::MemberAccount).
pub mod member_account {

    /// A builder for [`MemberAccount`](crate::model::MemberAccount).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) account_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.</p>
        pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.account_id = Some(input.into());
            self
        }
        /// <p>(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.</p>
        pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.account_id = input;
            self
        }
        /// Consumes the builder and constructs a [`MemberAccount`](crate::model::MemberAccount).
        pub fn build(self) -> crate::model::MemberAccount {
            crate::model::MemberAccount {
                account_id: self.account_id,
            }
        }
    }
}
impl MemberAccount {
    /// Creates a new builder-style object to manufacture [`MemberAccount`](crate::model::MemberAccount).
    pub fn builder() -> crate::model::member_account::Builder {
        crate::model::member_account::Builder::default()
    }
}