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