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 configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub domain_identifier: ::std::option::Option<::std::string::String>,
16 pub environment_identifier: ::std::option::Option<::std::string::String>,
18 pub name: ::std::option::Option<::std::string::String>,
20 pub props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
22 pub enable_trusted_identity_propagation: ::std::option::Option<bool>,
24 pub scope: ::std::option::Option<crate::types::ConnectionScope>,
26}
27impl CreateConnectionInput {
28 pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
30 self.aws_location.as_ref()
31 }
32 pub fn client_token(&self) -> ::std::option::Option<&str> {
34 self.client_token.as_deref()
35 }
36 pub fn configurations(&self) -> &[crate::types::Configuration] {
40 self.configurations.as_deref().unwrap_or_default()
41 }
42 pub fn description(&self) -> ::std::option::Option<&str> {
44 self.description.as_deref()
45 }
46 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
48 self.domain_identifier.as_deref()
49 }
50 pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
52 self.environment_identifier.as_deref()
53 }
54 pub fn name(&self) -> ::std::option::Option<&str> {
56 self.name.as_deref()
57 }
58 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
60 self.props.as_ref()
61 }
62 pub fn enable_trusted_identity_propagation(&self) -> ::std::option::Option<bool> {
64 self.enable_trusted_identity_propagation
65 }
66 pub fn scope(&self) -> ::std::option::Option<&crate::types::ConnectionScope> {
68 self.scope.as_ref()
69 }
70}
71impl ::std::fmt::Debug for CreateConnectionInput {
72 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
73 let mut formatter = f.debug_struct("CreateConnectionInput");
74 formatter.field("aws_location", &self.aws_location);
75 formatter.field("client_token", &self.client_token);
76 formatter.field("configurations", &self.configurations);
77 formatter.field("description", &"*** Sensitive Data Redacted ***");
78 formatter.field("domain_identifier", &self.domain_identifier);
79 formatter.field("environment_identifier", &self.environment_identifier);
80 formatter.field("name", &self.name);
81 formatter.field("props", &self.props);
82 formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
83 formatter.field("scope", &self.scope);
84 formatter.finish()
85 }
86}
87impl CreateConnectionInput {
88 pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
90 crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
91 }
92}
93
94#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
96#[non_exhaustive]
97pub struct CreateConnectionInputBuilder {
98 pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
99 pub(crate) client_token: ::std::option::Option<::std::string::String>,
100 pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
101 pub(crate) description: ::std::option::Option<::std::string::String>,
102 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
103 pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
104 pub(crate) name: ::std::option::Option<::std::string::String>,
105 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
106 pub(crate) enable_trusted_identity_propagation: ::std::option::Option<bool>,
107 pub(crate) scope: ::std::option::Option<crate::types::ConnectionScope>,
108}
109impl CreateConnectionInputBuilder {
110 pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
112 self.aws_location = ::std::option::Option::Some(input);
113 self
114 }
115 pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
117 self.aws_location = input;
118 self
119 }
120 pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
122 &self.aws_location
123 }
124 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126 self.client_token = ::std::option::Option::Some(input.into());
127 self
128 }
129 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.client_token = input;
132 self
133 }
134 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
136 &self.client_token
137 }
138 pub fn configurations(mut self, input: crate::types::Configuration) -> Self {
144 let mut v = self.configurations.unwrap_or_default();
145 v.push(input);
146 self.configurations = ::std::option::Option::Some(v);
147 self
148 }
149 pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
151 self.configurations = input;
152 self
153 }
154 pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
156 &self.configurations
157 }
158 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.description = ::std::option::Option::Some(input.into());
161 self
162 }
163 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.description = input;
166 self
167 }
168 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
170 &self.description
171 }
172 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.domain_identifier = ::std::option::Option::Some(input.into());
176 self
177 }
178 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.domain_identifier = input;
181 self
182 }
183 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
185 &self.domain_identifier
186 }
187 pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.environment_identifier = ::std::option::Option::Some(input.into());
190 self
191 }
192 pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.environment_identifier = input;
195 self
196 }
197 pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
199 &self.environment_identifier
200 }
201 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.name = ::std::option::Option::Some(input.into());
205 self
206 }
207 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.name = input;
210 self
211 }
212 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
214 &self.name
215 }
216 pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
218 self.props = ::std::option::Option::Some(input);
219 self
220 }
221 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
223 self.props = input;
224 self
225 }
226 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
228 &self.props
229 }
230 pub fn enable_trusted_identity_propagation(mut self, input: bool) -> Self {
232 self.enable_trusted_identity_propagation = ::std::option::Option::Some(input);
233 self
234 }
235 pub fn set_enable_trusted_identity_propagation(mut self, input: ::std::option::Option<bool>) -> Self {
237 self.enable_trusted_identity_propagation = input;
238 self
239 }
240 pub fn get_enable_trusted_identity_propagation(&self) -> &::std::option::Option<bool> {
242 &self.enable_trusted_identity_propagation
243 }
244 pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
246 self.scope = ::std::option::Option::Some(input);
247 self
248 }
249 pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
251 self.scope = input;
252 self
253 }
254 pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
256 &self.scope
257 }
258 pub fn build(
260 self,
261 ) -> ::std::result::Result<crate::operation::create_connection::CreateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
262 ::std::result::Result::Ok(crate::operation::create_connection::CreateConnectionInput {
263 aws_location: self.aws_location,
264 client_token: self.client_token,
265 configurations: self.configurations,
266 description: self.description,
267 domain_identifier: self.domain_identifier,
268 environment_identifier: self.environment_identifier,
269 name: self.name,
270 props: self.props,
271 enable_trusted_identity_propagation: self.enable_trusted_identity_propagation,
272 scope: self.scope,
273 })
274 }
275}
276impl ::std::fmt::Debug for CreateConnectionInputBuilder {
277 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
278 let mut formatter = f.debug_struct("CreateConnectionInputBuilder");
279 formatter.field("aws_location", &self.aws_location);
280 formatter.field("client_token", &self.client_token);
281 formatter.field("configurations", &self.configurations);
282 formatter.field("description", &"*** Sensitive Data Redacted ***");
283 formatter.field("domain_identifier", &self.domain_identifier);
284 formatter.field("environment_identifier", &self.environment_identifier);
285 formatter.field("name", &self.name);
286 formatter.field("props", &self.props);
287 formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
288 formatter.field("scope", &self.scope);
289 formatter.finish()
290 }
291}