aws_sdk_datazone/operation/update_project/
_update_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 UpdateProjectInput {
6    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the project that is to be updated.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The resource tags of the project.</p>
15    pub resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
17    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18    /// <p>The ID of the domain unit.</p>
19    pub domain_unit_id: ::std::option::Option<::std::string::String>,
20    /// <p>The environment deployment details of the project.</p>
21    pub environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
22    /// <p>The user parameters of the project.</p>
23    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
24    /// <p>The project profile version to which the project should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
25    pub project_profile_version: ::std::option::Option<::std::string::String>,
26}
27impl UpdateProjectInput {
28    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
29    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
30        self.domain_identifier.as_deref()
31    }
32    /// <p>The identifier of the project that is to be updated.</p>
33    pub fn identifier(&self) -> ::std::option::Option<&str> {
34        self.identifier.as_deref()
35    }
36    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
37    pub fn name(&self) -> ::std::option::Option<&str> {
38        self.name.as_deref()
39    }
40    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44    /// <p>The resource tags of the project.</p>
45    pub fn resource_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46        self.resource_tags.as_ref()
47    }
48    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</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 `.glossary_terms.is_none()`.
51    pub fn glossary_terms(&self) -> &[::std::string::String] {
52        self.glossary_terms.as_deref().unwrap_or_default()
53    }
54    /// <p>The ID of the domain unit.</p>
55    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
56        self.domain_unit_id.as_deref()
57    }
58    /// <p>The environment deployment details of the project.</p>
59    pub fn environment_deployment_details(&self) -> ::std::option::Option<&crate::types::EnvironmentDeploymentDetails> {
60        self.environment_deployment_details.as_ref()
61    }
62    /// <p>The user parameters of the project.</p>
63    ///
64    /// 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()`.
65    pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
66        self.user_parameters.as_deref().unwrap_or_default()
67    }
68    /// <p>The project profile version to which the project should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
69    pub fn project_profile_version(&self) -> ::std::option::Option<&str> {
70        self.project_profile_version.as_deref()
71    }
72}
73impl ::std::fmt::Debug for UpdateProjectInput {
74    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
75        let mut formatter = f.debug_struct("UpdateProjectInput");
76        formatter.field("domain_identifier", &self.domain_identifier);
77        formatter.field("identifier", &self.identifier);
78        formatter.field("name", &"*** Sensitive Data Redacted ***");
79        formatter.field("description", &"*** Sensitive Data Redacted ***");
80        formatter.field("resource_tags", &self.resource_tags);
81        formatter.field("glossary_terms", &self.glossary_terms);
82        formatter.field("domain_unit_id", &self.domain_unit_id);
83        formatter.field("environment_deployment_details", &self.environment_deployment_details);
84        formatter.field("user_parameters", &self.user_parameters);
85        formatter.field("project_profile_version", &self.project_profile_version);
86        formatter.finish()
87    }
88}
89impl UpdateProjectInput {
90    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
91    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
92        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
93    }
94}
95
96/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
97#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
98#[non_exhaustive]
99pub struct UpdateProjectInputBuilder {
100    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
101    pub(crate) identifier: ::std::option::Option<::std::string::String>,
102    pub(crate) name: ::std::option::Option<::std::string::String>,
103    pub(crate) description: ::std::option::Option<::std::string::String>,
104    pub(crate) resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
105    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
106    pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
107    pub(crate) environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
108    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
109    pub(crate) project_profile_version: ::std::option::Option<::std::string::String>,
110}
111impl UpdateProjectInputBuilder {
112    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
113    /// This field is required.
114    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.domain_identifier = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
119    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.domain_identifier = input;
121        self
122    }
123    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
124    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
125        &self.domain_identifier
126    }
127    /// <p>The identifier of the project that is to be updated.</p>
128    /// This field is required.
129    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.identifier = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The identifier of the project that is to be updated.</p>
134    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.identifier = input;
136        self
137    }
138    /// <p>The identifier of the project that is to be updated.</p>
139    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
140        &self.identifier
141    }
142    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
143    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.name = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
148    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.name = input;
150        self
151    }
152    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
153    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
154        &self.name
155    }
156    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
157    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.description = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
162    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.description = input;
164        self
165    }
166    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
167    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
168        &self.description
169    }
170    /// Adds a key-value pair to `resource_tags`.
171    ///
172    /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
173    ///
174    /// <p>The resource tags of the project.</p>
175    pub fn resource_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
176        let mut hash_map = self.resource_tags.unwrap_or_default();
177        hash_map.insert(k.into(), v.into());
178        self.resource_tags = ::std::option::Option::Some(hash_map);
179        self
180    }
181    /// <p>The resource tags of the project.</p>
182    pub fn set_resource_tags(
183        mut self,
184        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
185    ) -> Self {
186        self.resource_tags = input;
187        self
188    }
189    /// <p>The resource tags of the project.</p>
190    pub fn get_resource_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
191        &self.resource_tags
192    }
193    /// Appends an item to `glossary_terms`.
194    ///
195    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
196    ///
197    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
198    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        let mut v = self.glossary_terms.unwrap_or_default();
200        v.push(input.into());
201        self.glossary_terms = ::std::option::Option::Some(v);
202        self
203    }
204    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
205    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
206        self.glossary_terms = input;
207        self
208    }
209    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
210    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
211        &self.glossary_terms
212    }
213    /// <p>The ID of the domain unit.</p>
214    pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.domain_unit_id = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The ID of the domain unit.</p>
219    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.domain_unit_id = input;
221        self
222    }
223    /// <p>The ID of the domain unit.</p>
224    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
225        &self.domain_unit_id
226    }
227    /// <p>The environment deployment details of the project.</p>
228    pub fn environment_deployment_details(mut self, input: crate::types::EnvironmentDeploymentDetails) -> Self {
229        self.environment_deployment_details = ::std::option::Option::Some(input);
230        self
231    }
232    /// <p>The environment deployment details of the project.</p>
233    pub fn set_environment_deployment_details(mut self, input: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>) -> Self {
234        self.environment_deployment_details = input;
235        self
236    }
237    /// <p>The environment deployment details of the project.</p>
238    pub fn get_environment_deployment_details(&self) -> &::std::option::Option<crate::types::EnvironmentDeploymentDetails> {
239        &self.environment_deployment_details
240    }
241    /// Appends an item to `user_parameters`.
242    ///
243    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
244    ///
245    /// <p>The user parameters of the project.</p>
246    pub fn user_parameters(mut self, input: crate::types::EnvironmentConfigurationUserParameter) -> Self {
247        let mut v = self.user_parameters.unwrap_or_default();
248        v.push(input);
249        self.user_parameters = ::std::option::Option::Some(v);
250        self
251    }
252    /// <p>The user parameters of the project.</p>
253    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
254        self.user_parameters = input;
255        self
256    }
257    /// <p>The user parameters of the project.</p>
258    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
259        &self.user_parameters
260    }
261    /// <p>The project profile version to which the project should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
262    pub fn project_profile_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263        self.project_profile_version = ::std::option::Option::Some(input.into());
264        self
265    }
266    /// <p>The project profile version to which the project should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
267    pub fn set_project_profile_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.project_profile_version = input;
269        self
270    }
271    /// <p>The project profile version to which the project should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
272    pub fn get_project_profile_version(&self) -> &::std::option::Option<::std::string::String> {
273        &self.project_profile_version
274    }
275    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
276    pub fn build(
277        self,
278    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
279        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
280            domain_identifier: self.domain_identifier,
281            identifier: self.identifier,
282            name: self.name,
283            description: self.description,
284            resource_tags: self.resource_tags,
285            glossary_terms: self.glossary_terms,
286            domain_unit_id: self.domain_unit_id,
287            environment_deployment_details: self.environment_deployment_details,
288            user_parameters: self.user_parameters,
289            project_profile_version: self.project_profile_version,
290        })
291    }
292}
293impl ::std::fmt::Debug for UpdateProjectInputBuilder {
294    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
295        let mut formatter = f.debug_struct("UpdateProjectInputBuilder");
296        formatter.field("domain_identifier", &self.domain_identifier);
297        formatter.field("identifier", &self.identifier);
298        formatter.field("name", &"*** Sensitive Data Redacted ***");
299        formatter.field("description", &"*** Sensitive Data Redacted ***");
300        formatter.field("resource_tags", &self.resource_tags);
301        formatter.field("glossary_terms", &self.glossary_terms);
302        formatter.field("domain_unit_id", &self.domain_unit_id);
303        formatter.field("environment_deployment_details", &self.environment_deployment_details);
304        formatter.field("user_parameters", &self.user_parameters);
305        formatter.field("project_profile_version", &self.project_profile_version);
306        formatter.finish()
307    }
308}