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
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
// 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::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ValidationExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    InvalidBlock,
    #[allow(missing_docs)] // documentation missing in model
    InvalidBlockToken,
    #[allow(missing_docs)] // documentation missing in model
    InvalidContentEncoding,
    #[allow(missing_docs)] // documentation missing in model
    InvalidCustomerKey,
    #[allow(missing_docs)] // documentation missing in model
    InvalidDependencyRequest,
    #[allow(missing_docs)] // documentation missing in model
    InvalidPageToken,
    #[allow(missing_docs)] // documentation missing in model
    InvalidParameterValue,
    #[allow(missing_docs)] // documentation missing in model
    InvalidSnapshotId,
    #[allow(missing_docs)] // documentation missing in model
    InvalidTag,
    #[allow(missing_docs)] // documentation missing in model
    InvalidVolumeSize,
    #[allow(missing_docs)] // documentation missing in model
    UnrelatedSnapshots,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ValidationExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "INVALID_BLOCK" => ValidationExceptionReason::InvalidBlock,
            "INVALID_BLOCK_TOKEN" => ValidationExceptionReason::InvalidBlockToken,
            "INVALID_CONTENT_ENCODING" => ValidationExceptionReason::InvalidContentEncoding,
            "INVALID_CUSTOMER_KEY" => ValidationExceptionReason::InvalidCustomerKey,
            "INVALID_DEPENDENCY_REQUEST" => ValidationExceptionReason::InvalidDependencyRequest,
            "INVALID_PAGE_TOKEN" => ValidationExceptionReason::InvalidPageToken,
            "INVALID_PARAMETER_VALUE" => ValidationExceptionReason::InvalidParameterValue,
            "INVALID_SNAPSHOT_ID" => ValidationExceptionReason::InvalidSnapshotId,
            "INVALID_TAG" => ValidationExceptionReason::InvalidTag,
            "INVALID_VOLUME_SIZE" => ValidationExceptionReason::InvalidVolumeSize,
            "UNRELATED_SNAPSHOTS" => ValidationExceptionReason::UnrelatedSnapshots,
            other => ValidationExceptionReason::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ValidationExceptionReason {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ValidationExceptionReason::from(s))
    }
}
impl ValidationExceptionReason {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ValidationExceptionReason::InvalidBlock => "INVALID_BLOCK",
            ValidationExceptionReason::InvalidBlockToken => "INVALID_BLOCK_TOKEN",
            ValidationExceptionReason::InvalidContentEncoding => "INVALID_CONTENT_ENCODING",
            ValidationExceptionReason::InvalidCustomerKey => "INVALID_CUSTOMER_KEY",
            ValidationExceptionReason::InvalidDependencyRequest => "INVALID_DEPENDENCY_REQUEST",
            ValidationExceptionReason::InvalidPageToken => "INVALID_PAGE_TOKEN",
            ValidationExceptionReason::InvalidParameterValue => "INVALID_PARAMETER_VALUE",
            ValidationExceptionReason::InvalidSnapshotId => "INVALID_SNAPSHOT_ID",
            ValidationExceptionReason::InvalidTag => "INVALID_TAG",
            ValidationExceptionReason::InvalidVolumeSize => "INVALID_VOLUME_SIZE",
            ValidationExceptionReason::UnrelatedSnapshots => "UNRELATED_SNAPSHOTS",
            ValidationExceptionReason::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "INVALID_BLOCK",
            "INVALID_BLOCK_TOKEN",
            "INVALID_CONTENT_ENCODING",
            "INVALID_CUSTOMER_KEY",
            "INVALID_DEPENDENCY_REQUEST",
            "INVALID_PAGE_TOKEN",
            "INVALID_PARAMETER_VALUE",
            "INVALID_SNAPSHOT_ID",
            "INVALID_TAG",
            "INVALID_VOLUME_SIZE",
            "UNRELATED_SNAPSHOTS",
        ]
    }
}
impl AsRef<str> for ValidationExceptionReason {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[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 ServiceQuotaExceededExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyServiceQuotaExceeded,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ServiceQuotaExceededExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_SERVICE_QUOTA_EXCEEDED" => {
                ServiceQuotaExceededExceptionReason::DependencyServiceQuotaExceeded
            }
            other => ServiceQuotaExceededExceptionReason::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ServiceQuotaExceededExceptionReason {
    type Err = std::convert::Infallible;

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

#[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 ResourceNotFoundExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyResourceNotFound,
    #[allow(missing_docs)] // documentation missing in model
    SnapshotNotFound,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ResourceNotFoundExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_RESOURCE_NOT_FOUND" => {
                ResourceNotFoundExceptionReason::DependencyResourceNotFound
            }
            "SNAPSHOT_NOT_FOUND" => ResourceNotFoundExceptionReason::SnapshotNotFound,
            other => ResourceNotFoundExceptionReason::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ResourceNotFoundExceptionReason {
    type Err = std::convert::Infallible;

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

#[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 RequestThrottledExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    AccountThrottled,
    #[allow(missing_docs)] // documentation missing in model
    DependencyRequestThrottled,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for RequestThrottledExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "ACCOUNT_THROTTLED" => RequestThrottledExceptionReason::AccountThrottled,
            "DEPENDENCY_REQUEST_THROTTLED" => {
                RequestThrottledExceptionReason::DependencyRequestThrottled
            }
            other => RequestThrottledExceptionReason::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for RequestThrottledExceptionReason {
    type Err = std::convert::Infallible;

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

#[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 AccessDeniedExceptionReason {
    #[allow(missing_docs)] // documentation missing in model
    DependencyAccessDenied,
    #[allow(missing_docs)] // documentation missing in model
    UnauthorizedAccount,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AccessDeniedExceptionReason {
    fn from(s: &str) -> Self {
        match s {
            "DEPENDENCY_ACCESS_DENIED" => AccessDeniedExceptionReason::DependencyAccessDenied,
            "UNAUTHORIZED_ACCOUNT" => AccessDeniedExceptionReason::UnauthorizedAccount,
            other => AccessDeniedExceptionReason::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AccessDeniedExceptionReason {
    type Err = std::convert::Infallible;

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

/// <p>Describes a tag.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
    /// <p>The key of the tag.</p>
    pub key: std::option::Option<std::string::String>,
    /// <p>The value of the tag.</p>
    pub value: std::option::Option<std::string::String>,
}
impl Tag {
    /// <p>The key of the tag.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The value of the tag.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
impl std::fmt::Debug for Tag {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Tag");
        formatter.field("key", &self.key);
        formatter.field("value", &self.value);
        formatter.finish()
    }
}
/// See [`Tag`](crate::model::Tag)
pub mod tag {
    /// A builder for [`Tag`](crate::model::Tag)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The key of the tag.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The key of the tag.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The value of the tag.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of the tag.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Tag`](crate::model::Tag)
        pub fn build(self) -> crate::model::Tag {
            crate::model::Tag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl Tag {
    /// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag)
    pub fn builder() -> crate::model::tag::Builder {
        crate::model::tag::Builder::default()
    }
}

#[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 Status {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Error,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for Status {
    fn from(s: &str) -> Self {
        match s {
            "completed" => Status::Completed,
            "error" => Status::Error,
            "pending" => Status::Pending,
            other => Status::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for Status {
    type Err = std::convert::Infallible;

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

#[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 ChecksumAlgorithm {
    #[allow(missing_docs)] // documentation missing in model
    ChecksumAlgorithmSha256,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ChecksumAlgorithm {
    fn from(s: &str) -> Self {
        match s {
            "SHA256" => ChecksumAlgorithm::ChecksumAlgorithmSha256,
            other => ChecksumAlgorithm::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ChecksumAlgorithm {
    type Err = std::convert::Infallible;

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

/// <p>A block of data in an Amazon Elastic Block Store snapshot.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Block {
    /// <p>The block index.</p>
    pub block_index: std::option::Option<i32>,
    /// <p>The block token for the block index.</p>
    pub block_token: std::option::Option<std::string::String>,
}
impl Block {
    /// <p>The block index.</p>
    pub fn block_index(&self) -> std::option::Option<i32> {
        self.block_index
    }
    /// <p>The block token for the block index.</p>
    pub fn block_token(&self) -> std::option::Option<&str> {
        self.block_token.as_deref()
    }
}
impl std::fmt::Debug for Block {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Block");
        formatter.field("block_index", &self.block_index);
        formatter.field("block_token", &self.block_token);
        formatter.finish()
    }
}
/// See [`Block`](crate::model::Block)
pub mod block {
    /// A builder for [`Block`](crate::model::Block)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) block_index: std::option::Option<i32>,
        pub(crate) block_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The block index.</p>
        pub fn block_index(mut self, input: i32) -> Self {
            self.block_index = Some(input);
            self
        }
        /// <p>The block index.</p>
        pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
            self.block_index = input;
            self
        }
        /// <p>The block token for the block index.</p>
        pub fn block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index.</p>
        pub fn set_block_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.block_token = input;
            self
        }
        /// Consumes the builder and constructs a [`Block`](crate::model::Block)
        pub fn build(self) -> crate::model::Block {
            crate::model::Block {
                block_index: self.block_index,
                block_token: self.block_token,
            }
        }
    }
}
impl Block {
    /// Creates a new builder-style object to manufacture [`Block`](crate::model::Block)
    pub fn builder() -> crate::model::block::Builder {
        crate::model::block::Builder::default()
    }
}

/// <p>A block of data in an Amazon Elastic Block Store snapshot that is different from another snapshot of
/// the same volume/snapshot lineage.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ChangedBlock {
    /// <p>The block index.</p>
    pub block_index: std::option::Option<i32>,
    /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in
    /// the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot
    /// does not have the changed block that is on the second snapshot.</p>
    pub first_block_token: std::option::Option<std::string::String>,
    /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in
    /// the <code>ListChangedBlocks</code> operation.</p>
    pub second_block_token: std::option::Option<std::string::String>,
}
impl ChangedBlock {
    /// <p>The block index.</p>
    pub fn block_index(&self) -> std::option::Option<i32> {
        self.block_index
    }
    /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in
    /// the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot
    /// does not have the changed block that is on the second snapshot.</p>
    pub fn first_block_token(&self) -> std::option::Option<&str> {
        self.first_block_token.as_deref()
    }
    /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in
    /// the <code>ListChangedBlocks</code> operation.</p>
    pub fn second_block_token(&self) -> std::option::Option<&str> {
        self.second_block_token.as_deref()
    }
}
impl std::fmt::Debug for ChangedBlock {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ChangedBlock");
        formatter.field("block_index", &self.block_index);
        formatter.field("first_block_token", &self.first_block_token);
        formatter.field("second_block_token", &self.second_block_token);
        formatter.finish()
    }
}
/// See [`ChangedBlock`](crate::model::ChangedBlock)
pub mod changed_block {
    /// A builder for [`ChangedBlock`](crate::model::ChangedBlock)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) block_index: std::option::Option<i32>,
        pub(crate) first_block_token: std::option::Option<std::string::String>,
        pub(crate) second_block_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The block index.</p>
        pub fn block_index(mut self, input: i32) -> Self {
            self.block_index = Some(input);
            self
        }
        /// <p>The block index.</p>
        pub fn set_block_index(mut self, input: std::option::Option<i32>) -> Self {
            self.block_index = input;
            self
        }
        /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in
        /// the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot
        /// does not have the changed block that is on the second snapshot.</p>
        pub fn first_block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.first_block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in
        /// the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot
        /// does not have the changed block that is on the second snapshot.</p>
        pub fn set_first_block_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.first_block_token = input;
            self
        }
        /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in
        /// the <code>ListChangedBlocks</code> operation.</p>
        pub fn second_block_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.second_block_token = Some(input.into());
            self
        }
        /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in
        /// the <code>ListChangedBlocks</code> operation.</p>
        pub fn set_second_block_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.second_block_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ChangedBlock`](crate::model::ChangedBlock)
        pub fn build(self) -> crate::model::ChangedBlock {
            crate::model::ChangedBlock {
                block_index: self.block_index,
                first_block_token: self.first_block_token,
                second_block_token: self.second_block_token,
            }
        }
    }
}
impl ChangedBlock {
    /// Creates a new builder-style object to manufacture [`ChangedBlock`](crate::model::ChangedBlock)
    pub fn builder() -> crate::model::changed_block::Builder {
        crate::model::changed_block::Builder::default()
    }
}

#[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 ChecksumAggregationMethod {
    #[allow(missing_docs)] // documentation missing in model
    ChecksumAggregationLinear,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ChecksumAggregationMethod {
    fn from(s: &str) -> Self {
        match s {
            "LINEAR" => ChecksumAggregationMethod::ChecksumAggregationLinear,
            other => ChecksumAggregationMethod::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ChecksumAggregationMethod {
    type Err = std::convert::Infallible;

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