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    /// This field is required.
171    pub fn environment_profile_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.environment_profile_identifier = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
176    pub fn set_environment_profile_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.environment_profile_identifier = input;
178        self
179    }
180    /// <p>The identifier of the environment profile that is used to create this Amazon DataZone environment.</p>
181    pub fn get_environment_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
182        &self.environment_profile_identifier
183    }
184    /// Appends an item to `user_parameters`.
185    ///
186    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
187    ///
188    /// <p>The user parameters of this Amazon DataZone environment.</p>
189    pub fn user_parameters(mut self, input: crate::types::EnvironmentParameter) -> Self {
190        let mut v = self.user_parameters.unwrap_or_default();
191        v.push(input);
192        self.user_parameters = ::std::option::Option::Some(v);
193        self
194    }
195    /// <p>The user parameters of this Amazon DataZone environment.</p>
196    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>>) -> Self {
197        self.user_parameters = input;
198        self
199    }
200    /// <p>The user parameters of this Amazon DataZone environment.</p>
201    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentParameter>> {
202        &self.user_parameters
203    }
204    /// Appends an item to `glossary_terms`.
205    ///
206    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
207    ///
208    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
209    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        let mut v = self.glossary_terms.unwrap_or_default();
211        v.push(input.into());
212        self.glossary_terms = ::std::option::Option::Some(v);
213        self
214    }
215    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
216    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
217        self.glossary_terms = input;
218        self
219    }
220    /// <p>The glossary terms that can be used in this Amazon DataZone environment.</p>
221    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
222        &self.glossary_terms
223    }
224    /// <p>The ID of the account in which the environment is being created.</p>
225    pub fn environment_account_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226        self.environment_account_identifier = ::std::option::Option::Some(input.into());
227        self
228    }
229    /// <p>The ID of the account in which the environment is being created.</p>
230    pub fn set_environment_account_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231        self.environment_account_identifier = input;
232        self
233    }
234    /// <p>The ID of the account in which the environment is being created.</p>
235    pub fn get_environment_account_identifier(&self) -> &::std::option::Option<::std::string::String> {
236        &self.environment_account_identifier
237    }
238    /// <p>The region of the account in which the environment is being created.</p>
239    pub fn environment_account_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240        self.environment_account_region = ::std::option::Option::Some(input.into());
241        self
242    }
243    /// <p>The region of the account in which the environment is being created.</p>
244    pub fn set_environment_account_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245        self.environment_account_region = input;
246        self
247    }
248    /// <p>The region of the account in which the environment is being created.</p>
249    pub fn get_environment_account_region(&self) -> &::std::option::Option<::std::string::String> {
250        &self.environment_account_region
251    }
252    /// <p>The ID of the blueprint with which the environment is being created.</p>
253    pub fn environment_blueprint_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        self.environment_blueprint_identifier = ::std::option::Option::Some(input.into());
255        self
256    }
257    /// <p>The ID of the blueprint with which the environment is being created.</p>
258    pub fn set_environment_blueprint_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.environment_blueprint_identifier = input;
260        self
261    }
262    /// <p>The ID of the blueprint with which the environment is being created.</p>
263    pub fn get_environment_blueprint_identifier(&self) -> &::std::option::Option<::std::string::String> {
264        &self.environment_blueprint_identifier
265    }
266    /// <p>The deployment order of the environment.</p>
267    pub fn deployment_order(mut self, input: i32) -> Self {
268        self.deployment_order = ::std::option::Option::Some(input);
269        self
270    }
271    /// <p>The deployment order of the environment.</p>
272    pub fn set_deployment_order(mut self, input: ::std::option::Option<i32>) -> Self {
273        self.deployment_order = input;
274        self
275    }
276    /// <p>The deployment order of the environment.</p>
277    pub fn get_deployment_order(&self) -> &::std::option::Option<i32> {
278        &self.deployment_order
279    }
280    /// <p>The configuration ID of the environment.</p>
281    pub fn environment_configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282        self.environment_configuration_id = ::std::option::Option::Some(input.into());
283        self
284    }
285    /// <p>The configuration ID of the environment.</p>
286    pub fn set_environment_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287        self.environment_configuration_id = input;
288        self
289    }
290    /// <p>The configuration ID of the environment.</p>
291    pub fn get_environment_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
292        &self.environment_configuration_id
293    }
294    /// Consumes the builder and constructs a [`CreateEnvironmentInput`](crate::operation::create_environment::CreateEnvironmentInput).
295    pub fn build(
296        self,
297    ) -> ::std::result::Result<crate::operation::create_environment::CreateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
298        ::std::result::Result::Ok(crate::operation::create_environment::CreateEnvironmentInput {
299            project_identifier: self.project_identifier,
300            domain_identifier: self.domain_identifier,
301            description: self.description,
302            name: self.name,
303            environment_profile_identifier: self.environment_profile_identifier,
304            user_parameters: self.user_parameters,
305            glossary_terms: self.glossary_terms,
306            environment_account_identifier: self.environment_account_identifier,
307            environment_account_region: self.environment_account_region,
308            environment_blueprint_identifier: self.environment_blueprint_identifier,
309            deployment_order: self.deployment_order,
310            environment_configuration_id: self.environment_configuration_id,
311        })
312    }
313}