aws_sdk_ec2/types/
_disable_fast_snapshot_restore_error_item.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DisableFastSnapshotRestoreErrorItem {
7 pub snapshot_id: ::std::option::Option<::std::string::String>,
9 pub fast_snapshot_restore_state_errors: ::std::option::Option<::std::vec::Vec<crate::types::DisableFastSnapshotRestoreStateErrorItem>>,
11}
12impl DisableFastSnapshotRestoreErrorItem {
13 pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
15 self.snapshot_id.as_deref()
16 }
17 pub fn fast_snapshot_restore_state_errors(&self) -> &[crate::types::DisableFastSnapshotRestoreStateErrorItem] {
21 self.fast_snapshot_restore_state_errors.as_deref().unwrap_or_default()
22 }
23}
24impl DisableFastSnapshotRestoreErrorItem {
25 pub fn builder() -> crate::types::builders::DisableFastSnapshotRestoreErrorItemBuilder {
27 crate::types::builders::DisableFastSnapshotRestoreErrorItemBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct DisableFastSnapshotRestoreErrorItemBuilder {
35 pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
36 pub(crate) fast_snapshot_restore_state_errors: ::std::option::Option<::std::vec::Vec<crate::types::DisableFastSnapshotRestoreStateErrorItem>>,
37}
38impl DisableFastSnapshotRestoreErrorItemBuilder {
39 pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.snapshot_id = ::std::option::Option::Some(input.into());
42 self
43 }
44 pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.snapshot_id = input;
47 self
48 }
49 pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
51 &self.snapshot_id
52 }
53 pub fn fast_snapshot_restore_state_errors(mut self, input: crate::types::DisableFastSnapshotRestoreStateErrorItem) -> Self {
59 let mut v = self.fast_snapshot_restore_state_errors.unwrap_or_default();
60 v.push(input);
61 self.fast_snapshot_restore_state_errors = ::std::option::Option::Some(v);
62 self
63 }
64 pub fn set_fast_snapshot_restore_state_errors(
66 mut self,
67 input: ::std::option::Option<::std::vec::Vec<crate::types::DisableFastSnapshotRestoreStateErrorItem>>,
68 ) -> Self {
69 self.fast_snapshot_restore_state_errors = input;
70 self
71 }
72 pub fn get_fast_snapshot_restore_state_errors(
74 &self,
75 ) -> &::std::option::Option<::std::vec::Vec<crate::types::DisableFastSnapshotRestoreStateErrorItem>> {
76 &self.fast_snapshot_restore_state_errors
77 }
78 pub fn build(self) -> crate::types::DisableFastSnapshotRestoreErrorItem {
80 crate::types::DisableFastSnapshotRestoreErrorItem {
81 snapshot_id: self.snapshot_id,
82 fast_snapshot_restore_state_errors: self.fast_snapshot_restore_state_errors,
83 }
84 }
85}