aws_sdk_datazone/operation/create_connection/
_create_connection_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateConnectionInput {
6 pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
8 pub client_token: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub domain_identifier: ::std::option::Option<::std::string::String>,
14 pub environment_identifier: ::std::option::Option<::std::string::String>,
16 pub name: ::std::option::Option<::std::string::String>,
18 pub props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
20}
21impl CreateConnectionInput {
22 pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
24 self.aws_location.as_ref()
25 }
26 pub fn client_token(&self) -> ::std::option::Option<&str> {
28 self.client_token.as_deref()
29 }
30 pub fn description(&self) -> ::std::option::Option<&str> {
32 self.description.as_deref()
33 }
34 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
36 self.domain_identifier.as_deref()
37 }
38 pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
40 self.environment_identifier.as_deref()
41 }
42 pub fn name(&self) -> ::std::option::Option<&str> {
44 self.name.as_deref()
45 }
46 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
48 self.props.as_ref()
49 }
50}
51impl ::std::fmt::Debug for CreateConnectionInput {
52 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53 let mut formatter = f.debug_struct("CreateConnectionInput");
54 formatter.field("aws_location", &self.aws_location);
55 formatter.field("client_token", &self.client_token);
56 formatter.field("description", &"*** Sensitive Data Redacted ***");
57 formatter.field("domain_identifier", &self.domain_identifier);
58 formatter.field("environment_identifier", &self.environment_identifier);
59 formatter.field("name", &self.name);
60 formatter.field("props", &self.props);
61 formatter.finish()
62 }
63}
64impl CreateConnectionInput {
65 pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
67 crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
68 }
69}
70
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateConnectionInputBuilder {
75 pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
76 pub(crate) client_token: ::std::option::Option<::std::string::String>,
77 pub(crate) description: ::std::option::Option<::std::string::String>,
78 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
79 pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
80 pub(crate) name: ::std::option::Option<::std::string::String>,
81 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
82}
83impl CreateConnectionInputBuilder {
84 pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
86 self.aws_location = ::std::option::Option::Some(input);
87 self
88 }
89 pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
91 self.aws_location = input;
92 self
93 }
94 pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
96 &self.aws_location
97 }
98 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.client_token = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.client_token = input;
106 self
107 }
108 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
110 &self.client_token
111 }
112 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.description = ::std::option::Option::Some(input.into());
115 self
116 }
117 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.description = input;
120 self
121 }
122 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
124 &self.description
125 }
126 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.domain_identifier = ::std::option::Option::Some(input.into());
130 self
131 }
132 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.domain_identifier = input;
135 self
136 }
137 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
139 &self.domain_identifier
140 }
141 pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.environment_identifier = ::std::option::Option::Some(input.into());
145 self
146 }
147 pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.environment_identifier = input;
150 self
151 }
152 pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
154 &self.environment_identifier
155 }
156 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.name = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.name = input;
165 self
166 }
167 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
169 &self.name
170 }
171 pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
173 self.props = ::std::option::Option::Some(input);
174 self
175 }
176 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
178 self.props = input;
179 self
180 }
181 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
183 &self.props
184 }
185 pub fn build(
187 self,
188 ) -> ::std::result::Result<crate::operation::create_connection::CreateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
189 ::std::result::Result::Ok(crate::operation::create_connection::CreateConnectionInput {
190 aws_location: self.aws_location,
191 client_token: self.client_token,
192 description: self.description,
193 domain_identifier: self.domain_identifier,
194 environment_identifier: self.environment_identifier,
195 name: self.name,
196 props: self.props,
197 })
198 }
199}
200impl ::std::fmt::Debug for CreateConnectionInputBuilder {
201 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
202 let mut formatter = f.debug_struct("CreateConnectionInputBuilder");
203 formatter.field("aws_location", &self.aws_location);
204 formatter.field("client_token", &self.client_token);
205 formatter.field("description", &"*** Sensitive Data Redacted ***");
206 formatter.field("domain_identifier", &self.domain_identifier);
207 formatter.field("environment_identifier", &self.environment_identifier);
208 formatter.field("name", &self.name);
209 formatter.field("props", &self.props);
210 formatter.finish()
211 }
212}