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 pub enable_trusted_identity_propagation: ::std::option::Option<bool>,
22 pub scope: ::std::option::Option<crate::types::ConnectionScope>,
24}
25impl CreateConnectionInput {
26 pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
28 self.aws_location.as_ref()
29 }
30 pub fn client_token(&self) -> ::std::option::Option<&str> {
32 self.client_token.as_deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
40 self.domain_identifier.as_deref()
41 }
42 pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
44 self.environment_identifier.as_deref()
45 }
46 pub fn name(&self) -> ::std::option::Option<&str> {
48 self.name.as_deref()
49 }
50 pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
52 self.props.as_ref()
53 }
54 pub fn enable_trusted_identity_propagation(&self) -> ::std::option::Option<bool> {
56 self.enable_trusted_identity_propagation
57 }
58 pub fn scope(&self) -> ::std::option::Option<&crate::types::ConnectionScope> {
60 self.scope.as_ref()
61 }
62}
63impl ::std::fmt::Debug for CreateConnectionInput {
64 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
65 let mut formatter = f.debug_struct("CreateConnectionInput");
66 formatter.field("aws_location", &self.aws_location);
67 formatter.field("client_token", &self.client_token);
68 formatter.field("description", &"*** Sensitive Data Redacted ***");
69 formatter.field("domain_identifier", &self.domain_identifier);
70 formatter.field("environment_identifier", &self.environment_identifier);
71 formatter.field("name", &self.name);
72 formatter.field("props", &self.props);
73 formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
74 formatter.field("scope", &self.scope);
75 formatter.finish()
76 }
77}
78impl CreateConnectionInput {
79 pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
81 crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
82 }
83}
84
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
87#[non_exhaustive]
88pub struct CreateConnectionInputBuilder {
89 pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
90 pub(crate) client_token: ::std::option::Option<::std::string::String>,
91 pub(crate) description: ::std::option::Option<::std::string::String>,
92 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
93 pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
94 pub(crate) name: ::std::option::Option<::std::string::String>,
95 pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
96 pub(crate) enable_trusted_identity_propagation: ::std::option::Option<bool>,
97 pub(crate) scope: ::std::option::Option<crate::types::ConnectionScope>,
98}
99impl CreateConnectionInputBuilder {
100 pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
102 self.aws_location = ::std::option::Option::Some(input);
103 self
104 }
105 pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
107 self.aws_location = input;
108 self
109 }
110 pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
112 &self.aws_location
113 }
114 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.client_token = ::std::option::Option::Some(input.into());
117 self
118 }
119 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.client_token = input;
122 self
123 }
124 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
126 &self.client_token
127 }
128 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.description = ::std::option::Option::Some(input.into());
131 self
132 }
133 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.description = input;
136 self
137 }
138 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140 &self.description
141 }
142 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.domain_identifier = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.domain_identifier = input;
151 self
152 }
153 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
155 &self.domain_identifier
156 }
157 pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.environment_identifier = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.environment_identifier = input;
165 self
166 }
167 pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
169 &self.environment_identifier
170 }
171 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174 self.name = ::std::option::Option::Some(input.into());
175 self
176 }
177 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179 self.name = input;
180 self
181 }
182 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
184 &self.name
185 }
186 pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
188 self.props = ::std::option::Option::Some(input);
189 self
190 }
191 pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
193 self.props = input;
194 self
195 }
196 pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
198 &self.props
199 }
200 pub fn enable_trusted_identity_propagation(mut self, input: bool) -> Self {
202 self.enable_trusted_identity_propagation = ::std::option::Option::Some(input);
203 self
204 }
205 pub fn set_enable_trusted_identity_propagation(mut self, input: ::std::option::Option<bool>) -> Self {
207 self.enable_trusted_identity_propagation = input;
208 self
209 }
210 pub fn get_enable_trusted_identity_propagation(&self) -> &::std::option::Option<bool> {
212 &self.enable_trusted_identity_propagation
213 }
214 pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
216 self.scope = ::std::option::Option::Some(input);
217 self
218 }
219 pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
221 self.scope = input;
222 self
223 }
224 pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
226 &self.scope
227 }
228 pub fn build(
230 self,
231 ) -> ::std::result::Result<crate::operation::create_connection::CreateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
232 ::std::result::Result::Ok(crate::operation::create_connection::CreateConnectionInput {
233 aws_location: self.aws_location,
234 client_token: self.client_token,
235 description: self.description,
236 domain_identifier: self.domain_identifier,
237 environment_identifier: self.environment_identifier,
238 name: self.name,
239 props: self.props,
240 enable_trusted_identity_propagation: self.enable_trusted_identity_propagation,
241 scope: self.scope,
242 })
243 }
244}
245impl ::std::fmt::Debug for CreateConnectionInputBuilder {
246 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
247 let mut formatter = f.debug_struct("CreateConnectionInputBuilder");
248 formatter.field("aws_location", &self.aws_location);
249 formatter.field("client_token", &self.client_token);
250 formatter.field("description", &"*** Sensitive Data Redacted ***");
251 formatter.field("domain_identifier", &self.domain_identifier);
252 formatter.field("environment_identifier", &self.environment_identifier);
253 formatter.field("name", &self.name);
254 formatter.field("props", &self.props);
255 formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
256 formatter.field("scope", &self.scope);
257 formatter.finish()
258 }
259}