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}
23impl CreateProjectInput {
24    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
25    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
26        self.domain_identifier.as_deref()
27    }
28    /// <p>The name of the Amazon DataZone project.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The description of the Amazon DataZone project.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>The resource tags of the project.</p>
37    pub fn resource_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
38        self.resource_tags.as_ref()
39    }
40    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
41    ///
42    /// 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()`.
43    pub fn glossary_terms(&self) -> &[::std::string::String] {
44        self.glossary_terms.as_deref().unwrap_or_default()
45    }
46    /// <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>
47    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
48        self.domain_unit_id.as_deref()
49    }
50    /// <p>The ID of the project profile.</p>
51    pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
52        self.project_profile_id.as_deref()
53    }
54    /// <p>The user parameters of the project.</p>
55    ///
56    /// 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()`.
57    pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
58        self.user_parameters.as_deref().unwrap_or_default()
59    }
60}
61impl ::std::fmt::Debug for CreateProjectInput {
62    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
63        let mut formatter = f.debug_struct("CreateProjectInput");
64        formatter.field("domain_identifier", &self.domain_identifier);
65        formatter.field("name", &"*** Sensitive Data Redacted ***");
66        formatter.field("description", &"*** Sensitive Data Redacted ***");
67        formatter.field("resource_tags", &self.resource_tags);
68        formatter.field("glossary_terms", &self.glossary_terms);
69        formatter.field("domain_unit_id", &self.domain_unit_id);
70        formatter.field("project_profile_id", &self.project_profile_id);
71        formatter.field("user_parameters", &self.user_parameters);
72        formatter.finish()
73    }
74}
75impl CreateProjectInput {
76    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
77    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
78        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
79    }
80}
81
82/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
84#[non_exhaustive]
85pub struct CreateProjectInputBuilder {
86    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
87    pub(crate) name: ::std::option::Option<::std::string::String>,
88    pub(crate) description: ::std::option::Option<::std::string::String>,
89    pub(crate) resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
90    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
91    pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
92    pub(crate) project_profile_id: ::std::option::Option<::std::string::String>,
93    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
94}
95impl CreateProjectInputBuilder {
96    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
97    /// This field is required.
98    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.domain_identifier = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
103    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.domain_identifier = input;
105        self
106    }
107    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
108    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
109        &self.domain_identifier
110    }
111    /// <p>The name of the Amazon DataZone project.</p>
112    /// This field is required.
113    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.name = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>The name of the Amazon DataZone project.</p>
118    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.name = input;
120        self
121    }
122    /// <p>The name of the Amazon DataZone project.</p>
123    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
124        &self.name
125    }
126    /// <p>The description of the Amazon DataZone project.</p>
127    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.description = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>The description of the Amazon DataZone project.</p>
132    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.description = input;
134        self
135    }
136    /// <p>The description of the Amazon DataZone project.</p>
137    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
138        &self.description
139    }
140    /// Adds a key-value pair to `resource_tags`.
141    ///
142    /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
143    ///
144    /// <p>The resource tags of the project.</p>
145    pub fn resource_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
146        let mut hash_map = self.resource_tags.unwrap_or_default();
147        hash_map.insert(k.into(), v.into());
148        self.resource_tags = ::std::option::Option::Some(hash_map);
149        self
150    }
151    /// <p>The resource tags of the project.</p>
152    pub fn set_resource_tags(
153        mut self,
154        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
155    ) -> Self {
156        self.resource_tags = input;
157        self
158    }
159    /// <p>The resource tags of the project.</p>
160    pub fn get_resource_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
161        &self.resource_tags
162    }
163    /// Appends an item to `glossary_terms`.
164    ///
165    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
166    ///
167    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
168    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169        let mut v = self.glossary_terms.unwrap_or_default();
170        v.push(input.into());
171        self.glossary_terms = ::std::option::Option::Some(v);
172        self
173    }
174    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
175    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
176        self.glossary_terms = input;
177        self
178    }
179    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
180    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
181        &self.glossary_terms
182    }
183    /// <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>
184    pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.domain_unit_id = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <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>
189    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.domain_unit_id = input;
191        self
192    }
193    /// <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>
194    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.domain_unit_id
196    }
197    /// <p>The ID of the project profile.</p>
198    pub fn project_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.project_profile_id = ::std::option::Option::Some(input.into());
200        self
201    }
202    /// <p>The ID of the project profile.</p>
203    pub fn set_project_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.project_profile_id = input;
205        self
206    }
207    /// <p>The ID of the project profile.</p>
208    pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
209        &self.project_profile_id
210    }
211    /// Appends an item to `user_parameters`.
212    ///
213    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
214    ///
215    /// <p>The user parameters of the project.</p>
216    pub fn user_parameters(mut self, input: crate::types::EnvironmentConfigurationUserParameter) -> Self {
217        let mut v = self.user_parameters.unwrap_or_default();
218        v.push(input);
219        self.user_parameters = ::std::option::Option::Some(v);
220        self
221    }
222    /// <p>The user parameters of the project.</p>
223    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
224        self.user_parameters = input;
225        self
226    }
227    /// <p>The user parameters of the project.</p>
228    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
229        &self.user_parameters
230    }
231    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
232    pub fn build(
233        self,
234    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
235        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
236            domain_identifier: self.domain_identifier,
237            name: self.name,
238            description: self.description,
239            resource_tags: self.resource_tags,
240            glossary_terms: self.glossary_terms,
241            domain_unit_id: self.domain_unit_id,
242            project_profile_id: self.project_profile_id,
243            user_parameters: self.user_parameters,
244        })
245    }
246}
247impl ::std::fmt::Debug for CreateProjectInputBuilder {
248    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
249        let mut formatter = f.debug_struct("CreateProjectInputBuilder");
250        formatter.field("domain_identifier", &self.domain_identifier);
251        formatter.field("name", &"*** Sensitive Data Redacted ***");
252        formatter.field("description", &"*** Sensitive Data Redacted ***");
253        formatter.field("resource_tags", &self.resource_tags);
254        formatter.field("glossary_terms", &self.glossary_terms);
255        formatter.field("domain_unit_id", &self.domain_unit_id);
256        formatter.field("project_profile_id", &self.project_profile_id);
257        formatter.field("user_parameters", &self.user_parameters);
258        formatter.finish()
259    }
260}