Skip to main content

aws_sdk_datazone/operation/create_connection/
_create_connection_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateConnectionInput {
6    /// <p>The location where the connection is created.</p>
7    pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
8    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
9    pub client_token: ::std::option::Option<::std::string::String>,
10    /// <p>The configurations of the connection.</p>
11    pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
12    /// <p>A connection description.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of the domain where the connection is created.</p>
15    pub domain_identifier: ::std::option::Option<::std::string::String>,
16    /// <p>The ID of the environment where the connection is created.</p>
17    pub environment_identifier: ::std::option::Option<::std::string::String>,
18    /// <p>The connection name.</p>
19    pub name: ::std::option::Option<::std::string::String>,
20    /// <p>The connection props.</p>
21    pub props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
22    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
23    pub enable_trusted_identity_propagation: ::std::option::Option<bool>,
24    /// <p>The scope of the connection.</p>
25    pub scope: ::std::option::Option<crate::types::ConnectionScope>,
26}
27impl CreateConnectionInput {
28    /// <p>The location where the connection is created.</p>
29    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
30        self.aws_location.as_ref()
31    }
32    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
33    pub fn client_token(&self) -> ::std::option::Option<&str> {
34        self.client_token.as_deref()
35    }
36    /// <p>The configurations of the connection.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.configurations.is_none()`.
39    pub fn configurations(&self) -> &[crate::types::Configuration] {
40        self.configurations.as_deref().unwrap_or_default()
41    }
42    /// <p>A connection description.</p>
43    pub fn description(&self) -> ::std::option::Option<&str> {
44        self.description.as_deref()
45    }
46    /// <p>The ID of the domain where the connection is created.</p>
47    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
48        self.domain_identifier.as_deref()
49    }
50    /// <p>The ID of the environment where the connection is created.</p>
51    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
52        self.environment_identifier.as_deref()
53    }
54    /// <p>The connection name.</p>
55    pub fn name(&self) -> ::std::option::Option<&str> {
56        self.name.as_deref()
57    }
58    /// <p>The connection props.</p>
59    pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
60        self.props.as_ref()
61    }
62    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
63    pub fn enable_trusted_identity_propagation(&self) -> ::std::option::Option<bool> {
64        self.enable_trusted_identity_propagation
65    }
66    /// <p>The scope of the connection.</p>
67    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    /// Creates a new builder-style object to manufacture [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
89    pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
90        crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
91    }
92}
93
94/// A builder for [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
95#[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    /// <p>The location where the connection is created.</p>
111    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
112        self.aws_location = ::std::option::Option::Some(input);
113        self
114    }
115    /// <p>The location where the connection is created.</p>
116    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
117        self.aws_location = input;
118        self
119    }
120    /// <p>The location where the connection is created.</p>
121    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
122        &self.aws_location
123    }
124    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
125    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    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
130    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.client_token = input;
132        self
133    }
134    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
135    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
136        &self.client_token
137    }
138    /// Appends an item to `configurations`.
139    ///
140    /// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
141    ///
142    /// <p>The configurations of the connection.</p>
143    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    /// <p>The configurations of the connection.</p>
150    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    /// <p>The configurations of the connection.</p>
155    pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
156        &self.configurations
157    }
158    /// <p>A connection description.</p>
159    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    /// <p>A connection description.</p>
164    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.description = input;
166        self
167    }
168    /// <p>A connection description.</p>
169    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
170        &self.description
171    }
172    /// <p>The ID of the domain where the connection is created.</p>
173    /// This field is required.
174    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    /// <p>The ID of the domain where the connection is created.</p>
179    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.domain_identifier = input;
181        self
182    }
183    /// <p>The ID of the domain where the connection is created.</p>
184    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
185        &self.domain_identifier
186    }
187    /// <p>The ID of the environment where the connection is created.</p>
188    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    /// <p>The ID of the environment where the connection is created.</p>
193    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.environment_identifier = input;
195        self
196    }
197    /// <p>The ID of the environment where the connection is created.</p>
198    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
199        &self.environment_identifier
200    }
201    /// <p>The connection name.</p>
202    /// This field is required.
203    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    /// <p>The connection name.</p>
208    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.name = input;
210        self
211    }
212    /// <p>The connection name.</p>
213    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
214        &self.name
215    }
216    /// <p>The connection props.</p>
217    pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
218        self.props = ::std::option::Option::Some(input);
219        self
220    }
221    /// <p>The connection props.</p>
222    pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
223        self.props = input;
224        self
225    }
226    /// <p>The connection props.</p>
227    pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
228        &self.props
229    }
230    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
231    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    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
236    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    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
241    pub fn get_enable_trusted_identity_propagation(&self) -> &::std::option::Option<bool> {
242        &self.enable_trusted_identity_propagation
243    }
244    /// <p>The scope of the connection.</p>
245    pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
246        self.scope = ::std::option::Option::Some(input);
247        self
248    }
249    /// <p>The scope of the connection.</p>
250    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
251        self.scope = input;
252        self
253    }
254    /// <p>The scope of the connection.</p>
255    pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
256        &self.scope
257    }
258    /// Consumes the builder and constructs a [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
259    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}