aws_sdk_dsql/operation/delete_cluster/
_delete_cluster_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteClusterOutput {
7 pub identifier: ::std::string::String,
9 pub arn: ::std::string::String,
11 pub status: crate::types::ClusterStatus,
13 pub creation_time: ::aws_smithy_types::DateTime,
15 #[deprecated(
17 note = "The deletionProtectionEnabled field is deprecated in the DeleteCluster API. To check deletion protection status, use the GetCluster API instead.",
18 since = "5/13/2025"
19 )]
20 pub deletion_protection_enabled: bool,
21 _request_id: Option<String>,
22}
23impl DeleteClusterOutput {
24 pub fn identifier(&self) -> &str {
26 use std::ops::Deref;
27 self.identifier.deref()
28 }
29 pub fn arn(&self) -> &str {
31 use std::ops::Deref;
32 self.arn.deref()
33 }
34 pub fn status(&self) -> &crate::types::ClusterStatus {
36 &self.status
37 }
38 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
40 &self.creation_time
41 }
42 #[deprecated(
44 note = "The deletionProtectionEnabled field is deprecated in the DeleteCluster API. To check deletion protection status, use the GetCluster API instead.",
45 since = "5/13/2025"
46 )]
47 pub fn deletion_protection_enabled(&self) -> bool {
48 self.deletion_protection_enabled
49 }
50}
51impl ::aws_types::request_id::RequestId for DeleteClusterOutput {
52 fn request_id(&self) -> Option<&str> {
53 self._request_id.as_deref()
54 }
55}
56impl DeleteClusterOutput {
57 pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder {
59 crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder::default()
60 }
61}
62
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
65#[non_exhaustive]
66pub struct DeleteClusterOutputBuilder {
67 pub(crate) identifier: ::std::option::Option<::std::string::String>,
68 pub(crate) arn: ::std::option::Option<::std::string::String>,
69 pub(crate) status: ::std::option::Option<crate::types::ClusterStatus>,
70 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
71 pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
72 _request_id: Option<String>,
73}
74impl DeleteClusterOutputBuilder {
75 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.identifier = ::std::option::Option::Some(input.into());
79 self
80 }
81 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.identifier = input;
84 self
85 }
86 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
88 &self.identifier
89 }
90 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.arn = ::std::option::Option::Some(input.into());
94 self
95 }
96 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.arn = input;
99 self
100 }
101 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
103 &self.arn
104 }
105 pub fn status(mut self, input: crate::types::ClusterStatus) -> Self {
108 self.status = ::std::option::Option::Some(input);
109 self
110 }
111 pub fn set_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
113 self.status = input;
114 self
115 }
116 pub fn get_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
118 &self.status
119 }
120 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
123 self.creation_time = ::std::option::Option::Some(input);
124 self
125 }
126 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
128 self.creation_time = input;
129 self
130 }
131 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
133 &self.creation_time
134 }
135 #[deprecated(
138 note = "The deletionProtectionEnabled field is deprecated in the DeleteCluster API. To check deletion protection status, use the GetCluster API instead.",
139 since = "5/13/2025"
140 )]
141 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
142 self.deletion_protection_enabled = ::std::option::Option::Some(input);
143 self
144 }
145 #[deprecated(
147 note = "The deletionProtectionEnabled field is deprecated in the DeleteCluster API. To check deletion protection status, use the GetCluster API instead.",
148 since = "5/13/2025"
149 )]
150 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
151 self.deletion_protection_enabled = input;
152 self
153 }
154 #[deprecated(
156 note = "The deletionProtectionEnabled field is deprecated in the DeleteCluster API. To check deletion protection status, use the GetCluster API instead.",
157 since = "5/13/2025"
158 )]
159 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
160 &self.deletion_protection_enabled
161 }
162 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
163 self._request_id = Some(request_id.into());
164 self
165 }
166
167 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
168 self._request_id = request_id;
169 self
170 }
171 pub fn build(
179 self,
180 ) -> ::std::result::Result<crate::operation::delete_cluster::DeleteClusterOutput, ::aws_smithy_types::error::operation::BuildError> {
181 ::std::result::Result::Ok(crate::operation::delete_cluster::DeleteClusterOutput {
182 identifier: self.identifier.ok_or_else(|| {
183 ::aws_smithy_types::error::operation::BuildError::missing_field(
184 "identifier",
185 "identifier was not specified but it is required when building DeleteClusterOutput",
186 )
187 })?,
188 arn: self.arn.ok_or_else(|| {
189 ::aws_smithy_types::error::operation::BuildError::missing_field(
190 "arn",
191 "arn was not specified but it is required when building DeleteClusterOutput",
192 )
193 })?,
194 status: self.status.ok_or_else(|| {
195 ::aws_smithy_types::error::operation::BuildError::missing_field(
196 "status",
197 "status was not specified but it is required when building DeleteClusterOutput",
198 )
199 })?,
200 creation_time: self.creation_time.ok_or_else(|| {
201 ::aws_smithy_types::error::operation::BuildError::missing_field(
202 "creation_time",
203 "creation_time was not specified but it is required when building DeleteClusterOutput",
204 )
205 })?,
206 deletion_protection_enabled: self.deletion_protection_enabled.ok_or_else(|| {
207 ::aws_smithy_types::error::operation::BuildError::missing_field(
208 "deletion_protection_enabled",
209 "deletion_protection_enabled was not specified but it is required when building DeleteClusterOutput",
210 )
211 })?,
212 _request_id: self._request_id,
213 })
214 }
215}