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}
19impl UpdateProjectInput {
20    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
21    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
22        self.domain_identifier.as_deref()
23    }
24    /// <p>The identifier of the project that is to be updated.</p>
25    pub fn identifier(&self) -> ::std::option::Option<&str> {
26        self.identifier.as_deref()
27    }
28    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
37    ///
38    /// 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()`.
39    pub fn glossary_terms(&self) -> &[::std::string::String] {
40        self.glossary_terms.as_deref().unwrap_or_default()
41    }
42    /// <p>The environment deployment details of the project.</p>
43    pub fn environment_deployment_details(&self) -> ::std::option::Option<&crate::types::EnvironmentDeploymentDetails> {
44        self.environment_deployment_details.as_ref()
45    }
46}
47impl ::std::fmt::Debug for UpdateProjectInput {
48    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
49        let mut formatter = f.debug_struct("UpdateProjectInput");
50        formatter.field("domain_identifier", &self.domain_identifier);
51        formatter.field("identifier", &self.identifier);
52        formatter.field("name", &"*** Sensitive Data Redacted ***");
53        formatter.field("description", &"*** Sensitive Data Redacted ***");
54        formatter.field("glossary_terms", &self.glossary_terms);
55        formatter.field("environment_deployment_details", &self.environment_deployment_details);
56        formatter.finish()
57    }
58}
59impl UpdateProjectInput {
60    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
61    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
62        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
63    }
64}
65
66/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
68#[non_exhaustive]
69pub struct UpdateProjectInputBuilder {
70    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
71    pub(crate) identifier: ::std::option::Option<::std::string::String>,
72    pub(crate) name: ::std::option::Option<::std::string::String>,
73    pub(crate) description: ::std::option::Option<::std::string::String>,
74    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
75    pub(crate) environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
76}
77impl UpdateProjectInputBuilder {
78    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
79    /// This field is required.
80    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.domain_identifier = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
85    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.domain_identifier = input;
87        self
88    }
89    /// <p>The ID of the Amazon DataZone domain where a project is being updated.</p>
90    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
91        &self.domain_identifier
92    }
93    /// <p>The identifier of the project that is to be updated.</p>
94    /// This field is required.
95    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.identifier = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The identifier of the project that is to be updated.</p>
100    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.identifier = input;
102        self
103    }
104    /// <p>The identifier of the project that is to be updated.</p>
105    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
106        &self.identifier
107    }
108    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
109    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.name = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
114    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.name = input;
116        self
117    }
118    /// <p>The name to be updated as part of the <code>UpdateProject</code> action.</p>
119    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
120        &self.name
121    }
122    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
123    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.description = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
128    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.description = input;
130        self
131    }
132    /// <p>The description to be updated as part of the <code>UpdateProject</code> action.</p>
133    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
134        &self.description
135    }
136    /// Appends an item to `glossary_terms`.
137    ///
138    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
139    ///
140    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
141    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        let mut v = self.glossary_terms.unwrap_or_default();
143        v.push(input.into());
144        self.glossary_terms = ::std::option::Option::Some(v);
145        self
146    }
147    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
148    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
149        self.glossary_terms = input;
150        self
151    }
152    /// <p>The glossary terms to be updated as part of the <code>UpdateProject</code> action.</p>
153    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
154        &self.glossary_terms
155    }
156    /// <p>The environment deployment details of the project.</p>
157    pub fn environment_deployment_details(mut self, input: crate::types::EnvironmentDeploymentDetails) -> Self {
158        self.environment_deployment_details = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>The environment deployment details of the project.</p>
162    pub fn set_environment_deployment_details(mut self, input: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>) -> Self {
163        self.environment_deployment_details = input;
164        self
165    }
166    /// <p>The environment deployment details of the project.</p>
167    pub fn get_environment_deployment_details(&self) -> &::std::option::Option<crate::types::EnvironmentDeploymentDetails> {
168        &self.environment_deployment_details
169    }
170    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
171    pub fn build(
172        self,
173    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
174        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
175            domain_identifier: self.domain_identifier,
176            identifier: self.identifier,
177            name: self.name,
178            description: self.description,
179            glossary_terms: self.glossary_terms,
180            environment_deployment_details: self.environment_deployment_details,
181        })
182    }
183}
184impl ::std::fmt::Debug for UpdateProjectInputBuilder {
185    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
186        let mut formatter = f.debug_struct("UpdateProjectInputBuilder");
187        formatter.field("domain_identifier", &self.domain_identifier);
188        formatter.field("identifier", &self.identifier);
189        formatter.field("name", &"*** Sensitive Data Redacted ***");
190        formatter.field("description", &"*** Sensitive Data Redacted ***");
191        formatter.field("glossary_terms", &self.glossary_terms);
192        formatter.field("environment_deployment_details", &self.environment_deployment_details);
193        formatter.finish()
194    }
195}