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