aws_sdk_datazone/operation/update_connection/
_update_connection_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateConnectionInput {
6 pub domain_identifier: ::std::option::Option<::std::string::String>,
8 pub identifier: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
14 pub props: ::std::option::Option<crate::types::ConnectionPropertiesPatch>,
16}
17impl UpdateConnectionInput {
18 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
20 self.domain_identifier.as_deref()
21 }
22 pub fn identifier(&self) -> ::std::option::Option<&str> {
24 self.identifier.as_deref()
25 }
26 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
32 self.aws_location.as_ref()
33 }
34 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesPatch> {
36 self.props.as_ref()
37 }
38}
39impl ::std::fmt::Debug for UpdateConnectionInput {
40 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41 let mut formatter = f.debug_struct("UpdateConnectionInput");
42 formatter.field("domain_identifier", &self.domain_identifier);
43 formatter.field("identifier", &self.identifier);
44 formatter.field("description", &"*** Sensitive Data Redacted ***");
45 formatter.field("aws_location", &self.aws_location);
46 formatter.field("props", &self.props);
47 formatter.finish()
48 }
49}
50impl UpdateConnectionInput {
51 pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
53 crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
54 }
55}
56
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct UpdateConnectionInputBuilder {
61 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
62 pub(crate) identifier: ::std::option::Option<::std::string::String>,
63 pub(crate) description: ::std::option::Option<::std::string::String>,
64 pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
65 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesPatch>,
66}
67impl UpdateConnectionInputBuilder {
68 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.domain_identifier = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.domain_identifier = input;
77 self
78 }
79 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
81 &self.domain_identifier
82 }
83 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.identifier = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.identifier = input;
92 self
93 }
94 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
96 &self.identifier
97 }
98 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.description = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.description = input;
106 self
107 }
108 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
110 &self.description
111 }
112 pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
114 self.aws_location = ::std::option::Option::Some(input);
115 self
116 }
117 pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
119 self.aws_location = input;
120 self
121 }
122 pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
124 &self.aws_location
125 }
126 pub fn props(mut self, input: crate::types::ConnectionPropertiesPatch) -> Self {
128 self.props = ::std::option::Option::Some(input);
129 self
130 }
131 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesPatch>) -> Self {
133 self.props = input;
134 self
135 }
136 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesPatch> {
138 &self.props
139 }
140 pub fn build(
142 self,
143 ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
144 ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
145 domain_identifier: self.domain_identifier,
146 identifier: self.identifier,
147 description: self.description,
148 aws_location: self.aws_location,
149 props: self.props,
150 })
151 }
152}
153impl ::std::fmt::Debug for UpdateConnectionInputBuilder {
154 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
155 let mut formatter = f.debug_struct("UpdateConnectionInputBuilder");
156 formatter.field("domain_identifier", &self.domain_identifier);
157 formatter.field("identifier", &self.identifier);
158 formatter.field("description", &"*** Sensitive Data Redacted ***");
159 formatter.field("aws_location", &self.aws_location);
160 formatter.field("props", &self.props);
161 formatter.finish()
162 }
163}