aws_sdk_dsql/operation/update_cluster/
_update_cluster_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateClusterOutput {
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 _request_id: Option<String>,
16}
17impl UpdateClusterOutput {
18 pub fn identifier(&self) -> &str {
20 use std::ops::Deref;
21 self.identifier.deref()
22 }
23 pub fn arn(&self) -> &str {
25 use std::ops::Deref;
26 self.arn.deref()
27 }
28 pub fn status(&self) -> &crate::types::ClusterStatus {
30 &self.status
31 }
32 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
34 &self.creation_time
35 }
36}
37impl ::aws_types::request_id::RequestId for UpdateClusterOutput {
38 fn request_id(&self) -> Option<&str> {
39 self._request_id.as_deref()
40 }
41}
42impl UpdateClusterOutput {
43 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterOutputBuilder {
45 crate::operation::update_cluster::builders::UpdateClusterOutputBuilder::default()
46 }
47}
48
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct UpdateClusterOutputBuilder {
53 pub(crate) identifier: ::std::option::Option<::std::string::String>,
54 pub(crate) arn: ::std::option::Option<::std::string::String>,
55 pub(crate) status: ::std::option::Option<crate::types::ClusterStatus>,
56 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
57 _request_id: Option<String>,
58}
59impl UpdateClusterOutputBuilder {
60 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.identifier = ::std::option::Option::Some(input.into());
64 self
65 }
66 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.identifier = input;
69 self
70 }
71 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
73 &self.identifier
74 }
75 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.arn = ::std::option::Option::Some(input.into());
79 self
80 }
81 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.arn = input;
84 self
85 }
86 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
88 &self.arn
89 }
90 pub fn status(mut self, input: crate::types::ClusterStatus) -> Self {
93 self.status = ::std::option::Option::Some(input);
94 self
95 }
96 pub fn set_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
98 self.status = input;
99 self
100 }
101 pub fn get_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
103 &self.status
104 }
105 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
108 self.creation_time = ::std::option::Option::Some(input);
109 self
110 }
111 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
113 self.creation_time = input;
114 self
115 }
116 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
118 &self.creation_time
119 }
120 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
121 self._request_id = Some(request_id.into());
122 self
123 }
124
125 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
126 self._request_id = request_id;
127 self
128 }
129 pub fn build(
136 self,
137 ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterOutput, ::aws_smithy_types::error::operation::BuildError> {
138 ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterOutput {
139 identifier: self.identifier.ok_or_else(|| {
140 ::aws_smithy_types::error::operation::BuildError::missing_field(
141 "identifier",
142 "identifier was not specified but it is required when building UpdateClusterOutput",
143 )
144 })?,
145 arn: self.arn.ok_or_else(|| {
146 ::aws_smithy_types::error::operation::BuildError::missing_field(
147 "arn",
148 "arn was not specified but it is required when building UpdateClusterOutput",
149 )
150 })?,
151 status: self.status.ok_or_else(|| {
152 ::aws_smithy_types::error::operation::BuildError::missing_field(
153 "status",
154 "status was not specified but it is required when building UpdateClusterOutput",
155 )
156 })?,
157 creation_time: self.creation_time.ok_or_else(|| {
158 ::aws_smithy_types::error::operation::BuildError::missing_field(
159 "creation_time",
160 "creation_time was not specified but it is required when building UpdateClusterOutput",
161 )
162 })?,
163 _request_id: self._request_id,
164 })
165 }
166}