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>A connection description.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The ID of the domain where the connection is created.</p>
13    pub domain_identifier: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of the environment where the connection is created.</p>
15    pub environment_identifier: ::std::option::Option<::std::string::String>,
16    /// <p>The connection name.</p>
17    pub name: ::std::option::Option<::std::string::String>,
18    /// <p>The connection props.</p>
19    pub props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
20    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
21    pub enable_trusted_identity_propagation: ::std::option::Option<bool>,
22    /// <p>The scope of the connection.</p>
23    pub scope: ::std::option::Option<crate::types::ConnectionScope>,
24}
25impl CreateConnectionInput {
26    /// <p>The location where the connection is created.</p>
27    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
28        self.aws_location.as_ref()
29    }
30    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
31    pub fn client_token(&self) -> ::std::option::Option<&str> {
32        self.client_token.as_deref()
33    }
34    /// <p>A connection description.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The ID of the domain where the connection is created.</p>
39    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
40        self.domain_identifier.as_deref()
41    }
42    /// <p>The ID of the environment where the connection is created.</p>
43    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
44        self.environment_identifier.as_deref()
45    }
46    /// <p>The connection name.</p>
47    pub fn name(&self) -> ::std::option::Option<&str> {
48        self.name.as_deref()
49    }
50    /// <p>The connection props.</p>
51    pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
52        self.props.as_ref()
53    }
54    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
55    pub fn enable_trusted_identity_propagation(&self) -> ::std::option::Option<bool> {
56        self.enable_trusted_identity_propagation
57    }
58    /// <p>The scope of the connection.</p>
59    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    /// Creates a new builder-style object to manufacture [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
80    pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
81        crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
82    }
83}
84
85/// A builder for [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
86#[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    /// <p>The location where the connection is created.</p>
101    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
102        self.aws_location = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The location where the connection is created.</p>
106    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
107        self.aws_location = input;
108        self
109    }
110    /// <p>The location where the connection is created.</p>
111    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
112        &self.aws_location
113    }
114    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
115    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    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
120    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.client_token = input;
122        self
123    }
124    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
125    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
126        &self.client_token
127    }
128    /// <p>A connection description.</p>
129    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    /// <p>A connection description.</p>
134    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.description = input;
136        self
137    }
138    /// <p>A connection description.</p>
139    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140        &self.description
141    }
142    /// <p>The ID of the domain where the connection is created.</p>
143    /// This field is required.
144    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    /// <p>The ID of the domain where the connection is created.</p>
149    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.domain_identifier = input;
151        self
152    }
153    /// <p>The ID of the domain where the connection is created.</p>
154    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
155        &self.domain_identifier
156    }
157    /// <p>The ID of the environment where the connection is created.</p>
158    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    /// <p>The ID of the environment where the connection is created.</p>
163    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.environment_identifier = input;
165        self
166    }
167    /// <p>The ID of the environment where the connection is created.</p>
168    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
169        &self.environment_identifier
170    }
171    /// <p>The connection name.</p>
172    /// This field is required.
173    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    /// <p>The connection name.</p>
178    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.name = input;
180        self
181    }
182    /// <p>The connection name.</p>
183    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
184        &self.name
185    }
186    /// <p>The connection props.</p>
187    pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
188        self.props = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The connection props.</p>
192    pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
193        self.props = input;
194        self
195    }
196    /// <p>The connection props.</p>
197    pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
198        &self.props
199    }
200    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
201    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    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
206    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    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
211    pub fn get_enable_trusted_identity_propagation(&self) -> &::std::option::Option<bool> {
212        &self.enable_trusted_identity_propagation
213    }
214    /// <p>The scope of the connection.</p>
215    pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
216        self.scope = ::std::option::Option::Some(input);
217        self
218    }
219    /// <p>The scope of the connection.</p>
220    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
221        self.scope = input;
222        self
223    }
224    /// <p>The scope of the connection.</p>
225    pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
226        &self.scope
227    }
228    /// Consumes the builder and constructs a [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
229    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}