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}
21impl CreateConnectionInput {
22    /// <p>The location where the connection is created.</p>
23    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
24        self.aws_location.as_ref()
25    }
26    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
27    pub fn client_token(&self) -> ::std::option::Option<&str> {
28        self.client_token.as_deref()
29    }
30    /// <p>A connection description.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>The ID of the domain where the connection is created.</p>
35    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
36        self.domain_identifier.as_deref()
37    }
38    /// <p>The ID of the environment where the connection is created.</p>
39    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
40        self.environment_identifier.as_deref()
41    }
42    /// <p>The connection name.</p>
43    pub fn name(&self) -> ::std::option::Option<&str> {
44        self.name.as_deref()
45    }
46    /// <p>The connection props.</p>
47    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    /// Creates a new builder-style object to manufacture [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
66    pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
67        crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
68    }
69}
70
71/// A builder for [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
72#[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    /// <p>The location where the connection is created.</p>
85    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
86        self.aws_location = ::std::option::Option::Some(input);
87        self
88    }
89    /// <p>The location where the connection is created.</p>
90    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
91        self.aws_location = input;
92        self
93    }
94    /// <p>The location where the connection is created.</p>
95    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
96        &self.aws_location
97    }
98    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
99    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    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
104    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.client_token = input;
106        self
107    }
108    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
109    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
110        &self.client_token
111    }
112    /// <p>A connection description.</p>
113    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    /// <p>A connection description.</p>
118    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.description = input;
120        self
121    }
122    /// <p>A connection description.</p>
123    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
124        &self.description
125    }
126    /// <p>The ID of the domain where the connection is created.</p>
127    /// This field is required.
128    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    /// <p>The ID of the domain where the connection is created.</p>
133    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.domain_identifier = input;
135        self
136    }
137    /// <p>The ID of the domain where the connection is created.</p>
138    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
139        &self.domain_identifier
140    }
141    /// <p>The ID of the environment where the connection is created.</p>
142    /// This field is required.
143    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    /// <p>The ID of the environment where the connection is created.</p>
148    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.environment_identifier = input;
150        self
151    }
152    /// <p>The ID of the environment where the connection is created.</p>
153    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
154        &self.environment_identifier
155    }
156    /// <p>The connection name.</p>
157    /// This field is required.
158    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    /// <p>The connection name.</p>
163    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.name = input;
165        self
166    }
167    /// <p>The connection name.</p>
168    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
169        &self.name
170    }
171    /// <p>The connection props.</p>
172    pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
173        self.props = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>The connection props.</p>
177    pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
178        self.props = input;
179        self
180    }
181    /// <p>The connection props.</p>
182    pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
183        &self.props
184    }
185    /// Consumes the builder and constructs a [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
186    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}