aws_sdk_redshift/types/
_snapshot_error_message.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SnapshotErrorMessage {
7 pub snapshot_identifier: ::std::option::Option<::std::string::String>,
9 pub snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
11 pub failure_code: ::std::option::Option<::std::string::String>,
13 pub failure_reason: ::std::option::Option<::std::string::String>,
15}
16impl SnapshotErrorMessage {
17 pub fn snapshot_identifier(&self) -> ::std::option::Option<&str> {
19 self.snapshot_identifier.as_deref()
20 }
21 pub fn snapshot_cluster_identifier(&self) -> ::std::option::Option<&str> {
23 self.snapshot_cluster_identifier.as_deref()
24 }
25 pub fn failure_code(&self) -> ::std::option::Option<&str> {
27 self.failure_code.as_deref()
28 }
29 pub fn failure_reason(&self) -> ::std::option::Option<&str> {
31 self.failure_reason.as_deref()
32 }
33}
34impl SnapshotErrorMessage {
35 pub fn builder() -> crate::types::builders::SnapshotErrorMessageBuilder {
37 crate::types::builders::SnapshotErrorMessageBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct SnapshotErrorMessageBuilder {
45 pub(crate) snapshot_identifier: ::std::option::Option<::std::string::String>,
46 pub(crate) snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
47 pub(crate) failure_code: ::std::option::Option<::std::string::String>,
48 pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
49}
50impl SnapshotErrorMessageBuilder {
51 pub fn snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.snapshot_identifier = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.snapshot_identifier = input;
59 self
60 }
61 pub fn get_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
63 &self.snapshot_identifier
64 }
65 pub fn snapshot_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.snapshot_cluster_identifier = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_snapshot_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.snapshot_cluster_identifier = input;
73 self
74 }
75 pub fn get_snapshot_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
77 &self.snapshot_cluster_identifier
78 }
79 pub fn failure_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.failure_code = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_failure_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.failure_code = input;
87 self
88 }
89 pub fn get_failure_code(&self) -> &::std::option::Option<::std::string::String> {
91 &self.failure_code
92 }
93 pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.failure_reason = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.failure_reason = input;
101 self
102 }
103 pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
105 &self.failure_reason
106 }
107 pub fn build(self) -> crate::types::SnapshotErrorMessage {
109 crate::types::SnapshotErrorMessage {
110 snapshot_identifier: self.snapshot_identifier,
111 snapshot_cluster_identifier: self.snapshot_cluster_identifier,
112 failure_code: self.failure_code,
113 failure_reason: self.failure_reason,
114 }
115 }
116}