aws_sdk_datazone/operation/create_environment/
_create_environment_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, ::std::fmt::Debug)]
5pub struct CreateEnvironmentInput {
6    /// <p>The identifier of the Amazon DataZone project in which this environment is created.</p>
7    pub project_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the Amazon DataZone domain in which the environment is created.</p>
9    pub domain_identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the Amazon DataZone environment.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the Amazon DataZone environment.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
15    pub environment_profile_identifier: ::std::option::Option<::std::string::String>,
16    /// <p>The user parameters of this Amazon DataZone environment.</p>
17    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>,
18    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
19    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20    /// <p>The ID of the account in which the environment is being created.</p>
21    pub environment_account_identifier: ::std::option::Option<::std::string::String>,
22    /// <p>The region of the account in which the environment is being created.</p>
23    pub environment_account_region: ::std::option::Option<::std::string::String>,
24    /// <p>The ID of the blueprint with which the environment is being created.</p>
25    pub environment_blueprint_identifier: ::std::option::Option<::std::string::String>,
26    /// <p>The deployment order of the environment.</p>
27    pub deployment_order: ::std::option::Option<i32>,
28    /// <p>The configuration ID of the environment.</p>
29    pub environment_configuration_id: ::std::option::Option<::std::string::String>,
30}
31impl CreateEnvironmentInput {
32    /// <p>The identifier of the Amazon DataZone project in which this environment is created.</p>
33    pub fn project_identifier(&self) -> ::std::option::Option<&str> {
34        self.project_identifier.as_deref()
35    }
36    /// <p>The identifier of the Amazon DataZone domain in which the environment is created.</p>
37    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
38        self.domain_identifier.as_deref()
39    }
40    /// <p>The description of the Amazon DataZone environment.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44    /// <p>The name of the Amazon DataZone environment.</p>
45    pub fn name(&self) -> ::std::option::Option<&str> {
46        self.name.as_deref()
47    }
48    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
49    pub fn environment_profile_identifier(&self) -> ::std::option::Option<&str> {
50        self.environment_profile_identifier.as_deref()
51    }
52    /// <p>The user parameters of this Amazon DataZone environment.</p>
53    ///
54    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_parameters.is_none()`.
55    pub fn user_parameters(&self) -> &[crate::types::EnvironmentParameter] {
56        self.user_parameters.as_deref().unwrap_or_default()
57    }
58    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
59    ///
60    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.glossary_terms.is_none()`.
61    pub fn glossary_terms(&self) -> &[::std::string::String] {
62        self.glossary_terms.as_deref().unwrap_or_default()
63    }
64    /// <p>The ID of the account in which the environment is being created.</p>
65    pub fn environment_account_identifier(&self) -> ::std::option::Option<&str> {
66        self.environment_account_identifier.as_deref()
67    }
68    /// <p>The region of the account in which the environment is being created.</p>
69    pub fn environment_account_region(&self) -> ::std::option::Option<&str> {
70        self.environment_account_region.as_deref()
71    }
72    /// <p>The ID of the blueprint with which the environment is being created.</p>
73    pub fn environment_blueprint_identifier(&self) -> ::std::option::Option<&str> {
74        self.environment_blueprint_identifier.as_deref()
75    }
76    /// <p>The deployment order of the environment.</p>
77    pub fn deployment_order(&self) -> ::std::option::Option<i32> {
78        self.deployment_order
79    }
80    /// <p>The configuration ID of the environment.</p>
81    pub fn environment_configuration_id(&self) -> ::std::option::Option<&str> {
82        self.environment_configuration_id.as_deref()
83    }
84}
85impl CreateEnvironmentInput {
86    /// Creates a new builder-style object to manufacture [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
87    pub fn builder() -> crate::operation::create_environment::builders::CreateEnvironmentInputBuilder {
88        crate::operation::create_environment::builders::CreateEnvironmentInputBuilder::default()
89    }
90}
91
92/// A builder for [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
94#[non_exhaustive]
95pub struct CreateEnvironmentInputBuilder {
96    pub(crate) project_identifier: ::std::option::Option<::std::string::String>,
97    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
98    pub(crate) description: ::std::option::Option<::std::string::String>,
99    pub(crate) name: ::std::option::Option<::std::string::String>,
100    pub(crate) environment_profile_identifier: ::std::option::Option<::std::string::String>,
101    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>,
102    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
103    pub(crate) environment_account_identifier: ::std::option::Option<::std::string::String>,
104    pub(crate) environment_account_region: ::std::option::Option<::std::string::String>,
105    pub(crate) environment_blueprint_identifier: ::std::option::Option<::std::string::String>,
106    pub(crate) deployment_order: ::std::option::Option<i32>,
107    pub(crate) environment_configuration_id: ::std::option::Option<::std::string::String>,
108}
109impl CreateEnvironmentInputBuilder {
110    /// <p>The identifier of the Amazon DataZone project in which this environment is created.</p>
111    /// This field is required.
112    pub fn project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.project_identifier = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>The identifier of the Amazon DataZone project in which this environment is created.</p>
117    pub fn set_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.project_identifier = input;
119        self
120    }
121    /// <p>The identifier of the Amazon DataZone project in which this environment is created.</p>
122    pub fn get_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
123        &self.project_identifier
124    }
125    /// <p>The identifier of the Amazon DataZone domain in which the environment is created.</p>
126    /// This field is required.
127    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.domain_identifier = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>The identifier of the Amazon DataZone domain in which the environment is created.</p>
132    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.domain_identifier = input;
134        self
135    }
136    /// <p>The identifier of the Amazon DataZone domain in which the environment is created.</p>
137    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
138        &self.domain_identifier
139    }
140    /// <p>The description of the Amazon DataZone environment.</p>
141    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.description = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The description of the Amazon DataZone environment.</p>
146    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.description = input;
148        self
149    }
150    /// <p>The description of the Amazon DataZone environment.</p>
151    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
152        &self.description
153    }
154    /// <p>The name of the Amazon DataZone environment.</p>
155    /// This field is required.
156    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.name = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The name of the Amazon DataZone environment.</p>
161    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.name = input;
163        self
164    }
165    /// <p>The name of the Amazon DataZone environment.</p>
166    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
167        &self.name
168    }
169    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
170    pub fn environment_profile_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.environment_profile_identifier = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
175    pub fn set_environment_profile_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.environment_profile_identifier = input;
177        self
178    }
179    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
180    pub fn get_environment_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
181        &self.environment_profile_identifier
182    }
183    /// Appends an item to `user_parameters`.
184    ///
185    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
186    ///
187    /// <p>The user parameters of this Amazon DataZone environment.</p>
188    pub fn user_parameters(mut self, input: crate::types::EnvironmentParameter) -> Self {
189        let mut v = self.user_parameters.unwrap_or_default();
190        v.push(input);
191        self.user_parameters = ::std::option::Option::Some(v);
192        self
193    }
194    /// <p>The user parameters of this Amazon DataZone environment.</p>
195    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>) -> Self {
196        self.user_parameters = input;
197        self
198    }
199    /// <p>The user parameters of this Amazon DataZone environment.</p>
200    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>> {
201        &self.user_parameters
202    }
203    /// Appends an item to `glossary_terms`.
204    ///
205    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
206    ///
207    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
208    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        let mut v = self.glossary_terms.unwrap_or_default();
210        v.push(input.into());
211        self.glossary_terms = ::std::option::Option::Some(v);
212        self
213    }
214    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
215    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
216        self.glossary_terms = input;
217        self
218    }
219    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
220    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
221        &self.glossary_terms
222    }
223    /// <p>The ID of the account in which the environment is being created.</p>
224    pub fn environment_account_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.environment_account_identifier = ::std::option::Option::Some(input.into());
226        self
227    }
228    /// <p>The ID of the account in which the environment is being created.</p>
229    pub fn set_environment_account_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.environment_account_identifier = input;
231        self
232    }
233    /// <p>The ID of the account in which the environment is being created.</p>
234    pub fn get_environment_account_identifier(&self) -> &::std::option::Option<::std::string::String> {
235        &self.environment_account_identifier
236    }
237    /// <p>The region of the account in which the environment is being created.</p>
238    pub fn environment_account_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        self.environment_account_region = ::std::option::Option::Some(input.into());
240        self
241    }
242    /// <p>The region of the account in which the environment is being created.</p>
243    pub fn set_environment_account_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.environment_account_region = input;
245        self
246    }
247    /// <p>The region of the account in which the environment is being created.</p>
248    pub fn get_environment_account_region(&self) -> &::std::option::Option<::std::string::String> {
249        &self.environment_account_region
250    }
251    /// <p>The ID of the blueprint with which the environment is being created.</p>
252    pub fn environment_blueprint_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.environment_blueprint_identifier = ::std::option::Option::Some(input.into());
254        self
255    }
256    /// <p>The ID of the blueprint with which the environment is being created.</p>
257    pub fn set_environment_blueprint_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.environment_blueprint_identifier = input;
259        self
260    }
261    /// <p>The ID of the blueprint with which the environment is being created.</p>
262    pub fn get_environment_blueprint_identifier(&self) -> &::std::option::Option<::std::string::String> {
263        &self.environment_blueprint_identifier
264    }
265    /// <p>The deployment order of the environment.</p>
266    pub fn deployment_order(mut self, input: i32) -> Self {
267        self.deployment_order = ::std::option::Option::Some(input);
268        self
269    }
270    /// <p>The deployment order of the environment.</p>
271    pub fn set_deployment_order(mut self, input: ::std::option::Option<i32>) -> Self {
272        self.deployment_order = input;
273        self
274    }
275    /// <p>The deployment order of the environment.</p>
276    pub fn get_deployment_order(&self) -> &::std::option::Option<i32> {
277        &self.deployment_order
278    }
279    /// <p>The configuration ID of the environment.</p>
280    pub fn environment_configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.environment_configuration_id = ::std::option::Option::Some(input.into());
282        self
283    }
284    /// <p>The configuration ID of the environment.</p>
285    pub fn set_environment_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286        self.environment_configuration_id = input;
287        self
288    }
289    /// <p>The configuration ID of the environment.</p>
290    pub fn get_environment_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
291        &self.environment_configuration_id
292    }
293    /// Consumes the builder and constructs a [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
294    pub fn build(
295        self,
296    ) -> ::std::result::Result<crate::operation::create_environment::CreateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
297        ::std::result::Result::Ok(crate::operation::create_environment::CreateEnvironmentInput {
298            project_identifier: self.project_identifier,
299            domain_identifier: self.domain_identifier,
300            description: self.description,
301            name: self.name,
302            environment_profile_identifier: self.environment_profile_identifier,
303            user_parameters: self.user_parameters,
304            glossary_terms: self.glossary_terms,
305            environment_account_identifier: self.environment_account_identifier,
306            environment_account_region: self.environment_account_region,
307            environment_blueprint_identifier: self.environment_blueprint_identifier,
308            deployment_order: self.deployment_order,
309            environment_configuration_id: self.environment_configuration_id,
310        })
311    }
312}