aws_sdk_datazone/operation/update_connection/
_update_connection_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateConnectionOutput {
6 pub connection_id: ::std::string::String,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub domain_id: ::std::string::String,
12 pub domain_unit_id: ::std::string::String,
14 pub environment_id: ::std::option::Option<::std::string::String>,
16 pub name: ::std::string::String,
18 pub physical_endpoints: ::std::vec::Vec<crate::types::PhysicalEndpoint>,
20 pub project_id: ::std::option::Option<::std::string::String>,
22 pub props: ::std::option::Option<crate::types::ConnectionPropertiesOutput>,
24 pub r#type: crate::types::ConnectionType,
26 _request_id: Option<String>,
27}
28impl UpdateConnectionOutput {
29 pub fn connection_id(&self) -> &str {
31 use std::ops::Deref;
32 self.connection_id.deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 pub fn domain_id(&self) -> &str {
40 use std::ops::Deref;
41 self.domain_id.deref()
42 }
43 pub fn domain_unit_id(&self) -> &str {
45 use std::ops::Deref;
46 self.domain_unit_id.deref()
47 }
48 pub fn environment_id(&self) -> ::std::option::Option<&str> {
50 self.environment_id.as_deref()
51 }
52 pub fn name(&self) -> &str {
54 use std::ops::Deref;
55 self.name.deref()
56 }
57 pub fn physical_endpoints(&self) -> &[crate::types::PhysicalEndpoint] {
59 use std::ops::Deref;
60 self.physical_endpoints.deref()
61 }
62 pub fn project_id(&self) -> ::std::option::Option<&str> {
64 self.project_id.as_deref()
65 }
66 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesOutput> {
68 self.props.as_ref()
69 }
70 pub fn r#type(&self) -> &crate::types::ConnectionType {
72 &self.r#type
73 }
74}
75impl ::std::fmt::Debug for UpdateConnectionOutput {
76 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77 let mut formatter = f.debug_struct("UpdateConnectionOutput");
78 formatter.field("connection_id", &self.connection_id);
79 formatter.field("description", &"*** Sensitive Data Redacted ***");
80 formatter.field("domain_id", &self.domain_id);
81 formatter.field("domain_unit_id", &self.domain_unit_id);
82 formatter.field("environment_id", &self.environment_id);
83 formatter.field("name", &self.name);
84 formatter.field("physical_endpoints", &self.physical_endpoints);
85 formatter.field("project_id", &self.project_id);
86 formatter.field("props", &self.props);
87 formatter.field("r#type", &self.r#type);
88 formatter.field("_request_id", &self._request_id);
89 formatter.finish()
90 }
91}
92impl ::aws_types::request_id::RequestId for UpdateConnectionOutput {
93 fn request_id(&self) -> Option<&str> {
94 self._request_id.as_deref()
95 }
96}
97impl UpdateConnectionOutput {
98 pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionOutputBuilder {
100 crate::operation::update_connection::builders::UpdateConnectionOutputBuilder::default()
101 }
102}
103
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
106#[non_exhaustive]
107pub struct UpdateConnectionOutputBuilder {
108 pub(crate) connection_id: ::std::option::Option<::std::string::String>,
109 pub(crate) description: ::std::option::Option<::std::string::String>,
110 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
111 pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
112 pub(crate) environment_id: ::std::option::Option<::std::string::String>,
113 pub(crate) name: ::std::option::Option<::std::string::String>,
114 pub(crate) physical_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>>,
115 pub(crate) project_id: ::std::option::Option<::std::string::String>,
116 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesOutput>,
117 pub(crate) r#type: ::std::option::Option<crate::types::ConnectionType>,
118 _request_id: Option<String>,
119}
120impl UpdateConnectionOutputBuilder {
121 pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.connection_id = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.connection_id = input;
130 self
131 }
132 pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
134 &self.connection_id
135 }
136 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.description = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.description = input;
144 self
145 }
146 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
148 &self.description
149 }
150 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.domain_id = ::std::option::Option::Some(input.into());
154 self
155 }
156 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.domain_id = input;
159 self
160 }
161 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
163 &self.domain_id
164 }
165 pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.domain_unit_id = ::std::option::Option::Some(input.into());
169 self
170 }
171 pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.domain_unit_id = input;
174 self
175 }
176 pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
178 &self.domain_unit_id
179 }
180 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182 self.environment_id = ::std::option::Option::Some(input.into());
183 self
184 }
185 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.environment_id = input;
188 self
189 }
190 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
192 &self.environment_id
193 }
194 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197 self.name = ::std::option::Option::Some(input.into());
198 self
199 }
200 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202 self.name = input;
203 self
204 }
205 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
207 &self.name
208 }
209 pub fn physical_endpoints(mut self, input: crate::types::PhysicalEndpoint) -> Self {
215 let mut v = self.physical_endpoints.unwrap_or_default();
216 v.push(input);
217 self.physical_endpoints = ::std::option::Option::Some(v);
218 self
219 }
220 pub fn set_physical_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>>) -> Self {
222 self.physical_endpoints = input;
223 self
224 }
225 pub fn get_physical_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>> {
227 &self.physical_endpoints
228 }
229 pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.project_id = ::std::option::Option::Some(input.into());
232 self
233 }
234 pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.project_id = input;
237 self
238 }
239 pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
241 &self.project_id
242 }
243 pub fn props(mut self, input: crate::types::ConnectionPropertiesOutput) -> Self {
245 self.props = ::std::option::Option::Some(input);
246 self
247 }
248 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesOutput>) -> Self {
250 self.props = input;
251 self
252 }
253 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesOutput> {
255 &self.props
256 }
257 pub fn r#type(mut self, input: crate::types::ConnectionType) -> Self {
260 self.r#type = ::std::option::Option::Some(input);
261 self
262 }
263 pub fn set_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
265 self.r#type = input;
266 self
267 }
268 pub fn get_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
270 &self.r#type
271 }
272 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
273 self._request_id = Some(request_id.into());
274 self
275 }
276
277 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
278 self._request_id = request_id;
279 self
280 }
281 pub fn build(
290 self,
291 ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionOutput, ::aws_smithy_types::error::operation::BuildError> {
292 ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionOutput {
293 connection_id: self.connection_id.ok_or_else(|| {
294 ::aws_smithy_types::error::operation::BuildError::missing_field(
295 "connection_id",
296 "connection_id was not specified but it is required when building UpdateConnectionOutput",
297 )
298 })?,
299 description: self.description,
300 domain_id: self.domain_id.ok_or_else(|| {
301 ::aws_smithy_types::error::operation::BuildError::missing_field(
302 "domain_id",
303 "domain_id was not specified but it is required when building UpdateConnectionOutput",
304 )
305 })?,
306 domain_unit_id: self.domain_unit_id.ok_or_else(|| {
307 ::aws_smithy_types::error::operation::BuildError::missing_field(
308 "domain_unit_id",
309 "domain_unit_id was not specified but it is required when building UpdateConnectionOutput",
310 )
311 })?,
312 environment_id: self.environment_id,
313 name: self.name.ok_or_else(|| {
314 ::aws_smithy_types::error::operation::BuildError::missing_field(
315 "name",
316 "name was not specified but it is required when building UpdateConnectionOutput",
317 )
318 })?,
319 physical_endpoints: self.physical_endpoints.ok_or_else(|| {
320 ::aws_smithy_types::error::operation::BuildError::missing_field(
321 "physical_endpoints",
322 "physical_endpoints was not specified but it is required when building UpdateConnectionOutput",
323 )
324 })?,
325 project_id: self.project_id,
326 props: self.props,
327 r#type: self.r#type.ok_or_else(|| {
328 ::aws_smithy_types::error::operation::BuildError::missing_field(
329 "r#type",
330 "r#type was not specified but it is required when building UpdateConnectionOutput",
331 )
332 })?,
333 _request_id: self._request_id,
334 })
335 }
336}
337impl ::std::fmt::Debug for UpdateConnectionOutputBuilder {
338 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
339 let mut formatter = f.debug_struct("UpdateConnectionOutputBuilder");
340 formatter.field("connection_id", &self.connection_id);
341 formatter.field("description", &"*** Sensitive Data Redacted ***");
342 formatter.field("domain_id", &self.domain_id);
343 formatter.field("domain_unit_id", &self.domain_unit_id);
344 formatter.field("environment_id", &self.environment_id);
345 formatter.field("name", &self.name);
346 formatter.field("physical_endpoints", &self.physical_endpoints);
347 formatter.field("project_id", &self.project_id);
348 formatter.field("props", &self.props);
349 formatter.field("r#type", &self.r#type);
350 formatter.field("_request_id", &self._request_id);
351 formatter.finish()
352 }
353}