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