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 pub scope: ::std::option::Option<crate::types::ConnectionScope>,
28 _request_id: Option<String>,
29}
30impl UpdateConnectionOutput {
31 pub fn connection_id(&self) -> &str {
33 use std::ops::Deref;
34 self.connection_id.deref()
35 }
36 pub fn description(&self) -> ::std::option::Option<&str> {
38 self.description.as_deref()
39 }
40 pub fn domain_id(&self) -> &str {
42 use std::ops::Deref;
43 self.domain_id.deref()
44 }
45 pub fn domain_unit_id(&self) -> &str {
47 use std::ops::Deref;
48 self.domain_unit_id.deref()
49 }
50 pub fn environment_id(&self) -> ::std::option::Option<&str> {
52 self.environment_id.as_deref()
53 }
54 pub fn name(&self) -> &str {
56 use std::ops::Deref;
57 self.name.deref()
58 }
59 pub fn physical_endpoints(&self) -> &[crate::types::PhysicalEndpoint] {
61 use std::ops::Deref;
62 self.physical_endpoints.deref()
63 }
64 pub fn project_id(&self) -> ::std::option::Option<&str> {
66 self.project_id.as_deref()
67 }
68 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesOutput> {
70 self.props.as_ref()
71 }
72 pub fn r#type(&self) -> &crate::types::ConnectionType {
74 &self.r#type
75 }
76 pub fn scope(&self) -> ::std::option::Option<&crate::types::ConnectionScope> {
78 self.scope.as_ref()
79 }
80}
81impl ::std::fmt::Debug for UpdateConnectionOutput {
82 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83 let mut formatter = f.debug_struct("UpdateConnectionOutput");
84 formatter.field("connection_id", &self.connection_id);
85 formatter.field("description", &"*** Sensitive Data Redacted ***");
86 formatter.field("domain_id", &self.domain_id);
87 formatter.field("domain_unit_id", &self.domain_unit_id);
88 formatter.field("environment_id", &self.environment_id);
89 formatter.field("name", &self.name);
90 formatter.field("physical_endpoints", &self.physical_endpoints);
91 formatter.field("project_id", &self.project_id);
92 formatter.field("props", &self.props);
93 formatter.field("r#type", &self.r#type);
94 formatter.field("scope", &self.scope);
95 formatter.field("_request_id", &self._request_id);
96 formatter.finish()
97 }
98}
99impl ::aws_types::request_id::RequestId for UpdateConnectionOutput {
100 fn request_id(&self) -> Option<&str> {
101 self._request_id.as_deref()
102 }
103}
104impl UpdateConnectionOutput {
105 pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionOutputBuilder {
107 crate::operation::update_connection::builders::UpdateConnectionOutputBuilder::default()
108 }
109}
110
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
113#[non_exhaustive]
114pub struct UpdateConnectionOutputBuilder {
115 pub(crate) connection_id: ::std::option::Option<::std::string::String>,
116 pub(crate) description: ::std::option::Option<::std::string::String>,
117 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
118 pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
119 pub(crate) environment_id: ::std::option::Option<::std::string::String>,
120 pub(crate) name: ::std::option::Option<::std::string::String>,
121 pub(crate) physical_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>>,
122 pub(crate) project_id: ::std::option::Option<::std::string::String>,
123 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesOutput>,
124 pub(crate) r#type: ::std::option::Option<crate::types::ConnectionType>,
125 pub(crate) scope: ::std::option::Option<crate::types::ConnectionScope>,
126 _request_id: Option<String>,
127}
128impl UpdateConnectionOutputBuilder {
129 pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.connection_id = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.connection_id = input;
138 self
139 }
140 pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
142 &self.connection_id
143 }
144 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.description = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.description = input;
152 self
153 }
154 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156 &self.description
157 }
158 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.domain_id = ::std::option::Option::Some(input.into());
162 self
163 }
164 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.domain_id = input;
167 self
168 }
169 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
171 &self.domain_id
172 }
173 pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.domain_unit_id = ::std::option::Option::Some(input.into());
177 self
178 }
179 pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.domain_unit_id = input;
182 self
183 }
184 pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
186 &self.domain_unit_id
187 }
188 pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190 self.environment_id = ::std::option::Option::Some(input.into());
191 self
192 }
193 pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.environment_id = input;
196 self
197 }
198 pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
200 &self.environment_id
201 }
202 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205 self.name = ::std::option::Option::Some(input.into());
206 self
207 }
208 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.name = input;
211 self
212 }
213 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
215 &self.name
216 }
217 pub fn physical_endpoints(mut self, input: crate::types::PhysicalEndpoint) -> Self {
223 let mut v = self.physical_endpoints.unwrap_or_default();
224 v.push(input);
225 self.physical_endpoints = ::std::option::Option::Some(v);
226 self
227 }
228 pub fn set_physical_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>>) -> Self {
230 self.physical_endpoints = input;
231 self
232 }
233 pub fn get_physical_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PhysicalEndpoint>> {
235 &self.physical_endpoints
236 }
237 pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 self.project_id = ::std::option::Option::Some(input.into());
240 self
241 }
242 pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.project_id = input;
245 self
246 }
247 pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
249 &self.project_id
250 }
251 pub fn props(mut self, input: crate::types::ConnectionPropertiesOutput) -> Self {
253 self.props = ::std::option::Option::Some(input);
254 self
255 }
256 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesOutput>) -> Self {
258 self.props = input;
259 self
260 }
261 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesOutput> {
263 &self.props
264 }
265 pub fn r#type(mut self, input: crate::types::ConnectionType) -> Self {
268 self.r#type = ::std::option::Option::Some(input);
269 self
270 }
271 pub fn set_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
273 self.r#type = input;
274 self
275 }
276 pub fn get_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
278 &self.r#type
279 }
280 pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
282 self.scope = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
287 self.scope = input;
288 self
289 }
290 pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
292 &self.scope
293 }
294 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
295 self._request_id = Some(request_id.into());
296 self
297 }
298
299 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
300 self._request_id = request_id;
301 self
302 }
303 pub fn build(
312 self,
313 ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionOutput, ::aws_smithy_types::error::operation::BuildError> {
314 ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionOutput {
315 connection_id: self.connection_id.ok_or_else(|| {
316 ::aws_smithy_types::error::operation::BuildError::missing_field(
317 "connection_id",
318 "connection_id was not specified but it is required when building UpdateConnectionOutput",
319 )
320 })?,
321 description: self.description,
322 domain_id: self.domain_id.ok_or_else(|| {
323 ::aws_smithy_types::error::operation::BuildError::missing_field(
324 "domain_id",
325 "domain_id was not specified but it is required when building UpdateConnectionOutput",
326 )
327 })?,
328 domain_unit_id: self.domain_unit_id.ok_or_else(|| {
329 ::aws_smithy_types::error::operation::BuildError::missing_field(
330 "domain_unit_id",
331 "domain_unit_id was not specified but it is required when building UpdateConnectionOutput",
332 )
333 })?,
334 environment_id: self.environment_id,
335 name: self.name.ok_or_else(|| {
336 ::aws_smithy_types::error::operation::BuildError::missing_field(
337 "name",
338 "name was not specified but it is required when building UpdateConnectionOutput",
339 )
340 })?,
341 physical_endpoints: self.physical_endpoints.ok_or_else(|| {
342 ::aws_smithy_types::error::operation::BuildError::missing_field(
343 "physical_endpoints",
344 "physical_endpoints was not specified but it is required when building UpdateConnectionOutput",
345 )
346 })?,
347 project_id: self.project_id,
348 props: self.props,
349 r#type: self.r#type.ok_or_else(|| {
350 ::aws_smithy_types::error::operation::BuildError::missing_field(
351 "r#type",
352 "r#type was not specified but it is required when building UpdateConnectionOutput",
353 )
354 })?,
355 scope: self.scope,
356 _request_id: self._request_id,
357 })
358 }
359}
360impl ::std::fmt::Debug for UpdateConnectionOutputBuilder {
361 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
362 let mut formatter = f.debug_struct("UpdateConnectionOutputBuilder");
363 formatter.field("connection_id", &self.connection_id);
364 formatter.field("description", &"*** Sensitive Data Redacted ***");
365 formatter.field("domain_id", &self.domain_id);
366 formatter.field("domain_unit_id", &self.domain_unit_id);
367 formatter.field("environment_id", &self.environment_id);
368 formatter.field("name", &self.name);
369 formatter.field("physical_endpoints", &self.physical_endpoints);
370 formatter.field("project_id", &self.project_id);
371 formatter.field("props", &self.props);
372 formatter.field("r#type", &self.r#type);
373 formatter.field("scope", &self.scope);
374 formatter.field("_request_id", &self._request_id);
375 formatter.finish()
376 }
377}