Skip to main content

aws_sdk_datazone/operation/create_project/
_create_project_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 CreateProjectInput {
6    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the Amazon DataZone project.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the Amazon DataZone project.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The resource tags of the project.</p>
13    pub resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
15    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
17    pub domain_unit_id: ::std::option::Option<::std::string::String>,
18    /// <p>The ID of the project profile.</p>
19    pub project_profile_id: ::std::option::Option<::std::string::String>,
20    /// <p>The user parameters of the project.</p>
21    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
22    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
23    pub project_category: ::std::option::Option<::std::string::String>,
24    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
25    pub project_execution_role: ::std::option::Option<::std::string::String>,
26    /// <p>The members to be assigned to the project.</p>
27    pub membership_assignments: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>,
28}
29impl CreateProjectInput {
30    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
31    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
32        self.domain_identifier.as_deref()
33    }
34    /// <p>The name of the Amazon DataZone project.</p>
35    pub fn name(&self) -> ::std::option::Option<&str> {
36        self.name.as_deref()
37    }
38    /// <p>The description of the Amazon DataZone project.</p>
39    pub fn description(&self) -> ::std::option::Option<&str> {
40        self.description.as_deref()
41    }
42    /// <p>The resource tags of the project.</p>
43    pub fn resource_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44        self.resource_tags.as_ref()
45    }
46    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
47    ///
48    /// 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()`.
49    pub fn glossary_terms(&self) -> &[::std::string::String] {
50        self.glossary_terms.as_deref().unwrap_or_default()
51    }
52    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
53    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
54        self.domain_unit_id.as_deref()
55    }
56    /// <p>The ID of the project profile.</p>
57    pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
58        self.project_profile_id.as_deref()
59    }
60    /// <p>The user parameters of the project.</p>
61    ///
62    /// 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()`.
63    pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
64        self.user_parameters.as_deref().unwrap_or_default()
65    }
66    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
67    pub fn project_category(&self) -> ::std::option::Option<&str> {
68        self.project_category.as_deref()
69    }
70    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
71    pub fn project_execution_role(&self) -> ::std::option::Option<&str> {
72        self.project_execution_role.as_deref()
73    }
74    /// <p>The members to be assigned to the project.</p>
75    ///
76    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.membership_assignments.is_none()`.
77    pub fn membership_assignments(&self) -> &[crate::types::ProjectMembershipAssignment] {
78        self.membership_assignments.as_deref().unwrap_or_default()
79    }
80}
81impl ::std::fmt::Debug for CreateProjectInput {
82    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83        let mut formatter = f.debug_struct("CreateProjectInput");
84        formatter.field("domain_identifier", &self.domain_identifier);
85        formatter.field("name", &"*** Sensitive Data Redacted ***");
86        formatter.field("description", &"*** Sensitive Data Redacted ***");
87        formatter.field("resource_tags", &self.resource_tags);
88        formatter.field("glossary_terms", &self.glossary_terms);
89        formatter.field("domain_unit_id", &self.domain_unit_id);
90        formatter.field("project_profile_id", &self.project_profile_id);
91        formatter.field("user_parameters", &self.user_parameters);
92        formatter.field("project_category", &self.project_category);
93        formatter.field("project_execution_role", &self.project_execution_role);
94        formatter.field("membership_assignments", &self.membership_assignments);
95        formatter.finish()
96    }
97}
98impl CreateProjectInput {
99    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
100    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
101        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
102    }
103}
104
105/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
106#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
107#[non_exhaustive]
108pub struct CreateProjectInputBuilder {
109    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
110    pub(crate) name: ::std::option::Option<::std::string::String>,
111    pub(crate) description: ::std::option::Option<::std::string::String>,
112    pub(crate) resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
113    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
114    pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
115    pub(crate) project_profile_id: ::std::option::Option<::std::string::String>,
116    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
117    pub(crate) project_category: ::std::option::Option<::std::string::String>,
118    pub(crate) project_execution_role: ::std::option::Option<::std::string::String>,
119    pub(crate) membership_assignments: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>,
120}
121impl CreateProjectInputBuilder {
122    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
123    /// This field is required.
124    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.domain_identifier = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
129    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.domain_identifier = input;
131        self
132    }
133    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
134    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
135        &self.domain_identifier
136    }
137    /// <p>The name of the Amazon DataZone project.</p>
138    /// This field is required.
139    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.name = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The name of the Amazon DataZone project.</p>
144    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.name = input;
146        self
147    }
148    /// <p>The name of the Amazon DataZone project.</p>
149    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
150        &self.name
151    }
152    /// <p>The description of the Amazon DataZone project.</p>
153    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.description = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The description of the Amazon DataZone project.</p>
158    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.description = input;
160        self
161    }
162    /// <p>The description of the Amazon DataZone project.</p>
163    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164        &self.description
165    }
166    /// Adds a key-value pair to `resource_tags`.
167    ///
168    /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
169    ///
170    /// <p>The resource tags of the project.</p>
171    pub fn resource_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
172        let mut hash_map = self.resource_tags.unwrap_or_default();
173        hash_map.insert(k.into(), v.into());
174        self.resource_tags = ::std::option::Option::Some(hash_map);
175        self
176    }
177    /// <p>The resource tags of the project.</p>
178    pub fn set_resource_tags(
179        mut self,
180        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
181    ) -> Self {
182        self.resource_tags = input;
183        self
184    }
185    /// <p>The resource tags of the project.</p>
186    pub fn get_resource_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
187        &self.resource_tags
188    }
189    /// Appends an item to `glossary_terms`.
190    ///
191    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
192    ///
193    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
194    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        let mut v = self.glossary_terms.unwrap_or_default();
196        v.push(input.into());
197        self.glossary_terms = ::std::option::Option::Some(v);
198        self
199    }
200    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
201    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
202        self.glossary_terms = input;
203        self
204    }
205    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
206    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
207        &self.glossary_terms
208    }
209    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
210    pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.domain_unit_id = ::std::option::Option::Some(input.into());
212        self
213    }
214    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
215    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216        self.domain_unit_id = input;
217        self
218    }
219    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
220    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
221        &self.domain_unit_id
222    }
223    /// <p>The ID of the project profile.</p>
224    pub fn project_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225        self.project_profile_id = ::std::option::Option::Some(input.into());
226        self
227    }
228    /// <p>The ID of the project profile.</p>
229    pub fn set_project_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.project_profile_id = input;
231        self
232    }
233    /// <p>The ID of the project profile.</p>
234    pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
235        &self.project_profile_id
236    }
237    /// Appends an item to `user_parameters`.
238    ///
239    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
240    ///
241    /// <p>The user parameters of the project.</p>
242    pub fn user_parameters(mut self, input: crate::types::EnvironmentConfigurationUserParameter) -> Self {
243        let mut v = self.user_parameters.unwrap_or_default();
244        v.push(input);
245        self.user_parameters = ::std::option::Option::Some(v);
246        self
247    }
248    /// <p>The user parameters of the project.</p>
249    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
250        self.user_parameters = input;
251        self
252    }
253    /// <p>The user parameters of the project.</p>
254    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
255        &self.user_parameters
256    }
257    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
258    pub fn project_category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259        self.project_category = ::std::option::Option::Some(input.into());
260        self
261    }
262    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
263    pub fn set_project_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
264        self.project_category = input;
265        self
266    }
267    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
268    pub fn get_project_category(&self) -> &::std::option::Option<::std::string::String> {
269        &self.project_category
270    }
271    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
272    pub fn project_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273        self.project_execution_role = ::std::option::Option::Some(input.into());
274        self
275    }
276    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
277    pub fn set_project_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278        self.project_execution_role = input;
279        self
280    }
281    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
282    pub fn get_project_execution_role(&self) -> &::std::option::Option<::std::string::String> {
283        &self.project_execution_role
284    }
285    /// Appends an item to `membership_assignments`.
286    ///
287    /// To override the contents of this collection use [`set_membership_assignments`](Self::set_membership_assignments).
288    ///
289    /// <p>The members to be assigned to the project.</p>
290    pub fn membership_assignments(mut self, input: crate::types::ProjectMembershipAssignment) -> Self {
291        let mut v = self.membership_assignments.unwrap_or_default();
292        v.push(input);
293        self.membership_assignments = ::std::option::Option::Some(v);
294        self
295    }
296    /// <p>The members to be assigned to the project.</p>
297    pub fn set_membership_assignments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>) -> Self {
298        self.membership_assignments = input;
299        self
300    }
301    /// <p>The members to be assigned to the project.</p>
302    pub fn get_membership_assignments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>> {
303        &self.membership_assignments
304    }
305    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
306    pub fn build(
307        self,
308    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
309        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
310            domain_identifier: self.domain_identifier,
311            name: self.name,
312            description: self.description,
313            resource_tags: self.resource_tags,
314            glossary_terms: self.glossary_terms,
315            domain_unit_id: self.domain_unit_id,
316            project_profile_id: self.project_profile_id,
317            user_parameters: self.user_parameters,
318            project_category: self.project_category,
319            project_execution_role: self.project_execution_role,
320            membership_assignments: self.membership_assignments,
321        })
322    }
323}
324impl ::std::fmt::Debug for CreateProjectInputBuilder {
325    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
326        let mut formatter = f.debug_struct("CreateProjectInputBuilder");
327        formatter.field("domain_identifier", &self.domain_identifier);
328        formatter.field("name", &"*** Sensitive Data Redacted ***");
329        formatter.field("description", &"*** Sensitive Data Redacted ***");
330        formatter.field("resource_tags", &self.resource_tags);
331        formatter.field("glossary_terms", &self.glossary_terms);
332        formatter.field("domain_unit_id", &self.domain_unit_id);
333        formatter.field("project_profile_id", &self.project_profile_id);
334        formatter.field("user_parameters", &self.user_parameters);
335        formatter.field("project_category", &self.project_category);
336        formatter.field("project_execution_role", &self.project_execution_role);
337        formatter.field("membership_assignments", &self.membership_assignments);
338        formatter.finish()
339    }
340}