aws_sdk_datazone/operation/get_project/
_get_project_output.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 GetProjectOutput {
6    /// <p>The ID of the Amazon DataZone domain in which the project exists.</p>
7    pub domain_id: ::std::string::String,
8    /// <p>&gt;The ID of the project.</p>
9    pub id: ::std::string::String,
10    /// <p>The name of the project.</p>
11    pub name: ::std::string::String,
12    /// <p>The description of the project.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The status of the project.</p>
15    pub project_status: ::std::option::Option<crate::types::ProjectStatus>,
16    /// <p>Specifies the error message that is returned if the operation cannot be successfully completed.</p>
17    pub failure_reasons: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>,
18    /// <p>The Amazon DataZone user who created the project.</p>
19    pub created_by: ::std::string::String,
20    /// <p>The timestamp of when the project was created.</p>
21    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>The timestamp of when the project was last updated.</p>
23    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The resource tags of the project.</p>
25    pub resource_tags: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>,
26    /// <p>The business glossary terms that can be used in the project.</p>
27    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
28    /// <p>The ID of the domain unit.</p>
29    pub domain_unit_id: ::std::option::Option<::std::string::String>,
30    /// <p>The ID of the project profile of a project.</p>
31    pub project_profile_id: ::std::option::Option<::std::string::String>,
32    /// <p>The user parameters of a project.</p>
33    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
34    /// <p>The environment deployment status of a project.</p>
35    pub environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
36    _request_id: Option<String>,
37}
38impl GetProjectOutput {
39    /// <p>The ID of the Amazon DataZone domain in which the project exists.</p>
40    pub fn domain_id(&self) -> &str {
41        use std::ops::Deref;
42        self.domain_id.deref()
43    }
44    /// <p>&gt;The ID of the project.</p>
45    pub fn id(&self) -> &str {
46        use std::ops::Deref;
47        self.id.deref()
48    }
49    /// <p>The name of the project.</p>
50    pub fn name(&self) -> &str {
51        use std::ops::Deref;
52        self.name.deref()
53    }
54    /// <p>The description of the project.</p>
55    pub fn description(&self) -> ::std::option::Option<&str> {
56        self.description.as_deref()
57    }
58    /// <p>The status of the project.</p>
59    pub fn project_status(&self) -> ::std::option::Option<&crate::types::ProjectStatus> {
60        self.project_status.as_ref()
61    }
62    /// <p>Specifies the error message that is returned if the operation cannot be successfully completed.</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 `.failure_reasons.is_none()`.
65    pub fn failure_reasons(&self) -> &[crate::types::ProjectDeletionError] {
66        self.failure_reasons.as_deref().unwrap_or_default()
67    }
68    /// <p>The Amazon DataZone user who created the project.</p>
69    pub fn created_by(&self) -> &str {
70        use std::ops::Deref;
71        self.created_by.deref()
72    }
73    /// <p>The timestamp of when the project was created.</p>
74    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75        self.created_at.as_ref()
76    }
77    /// <p>The timestamp of when the project was last updated.</p>
78    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79        self.last_updated_at.as_ref()
80    }
81    /// <p>The resource tags of the project.</p>
82    ///
83    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_tags.is_none()`.
84    pub fn resource_tags(&self) -> &[crate::types::ResourceTag] {
85        self.resource_tags.as_deref().unwrap_or_default()
86    }
87    /// <p>The business glossary terms that can be used in the project.</p>
88    ///
89    /// 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()`.
90    pub fn glossary_terms(&self) -> &[::std::string::String] {
91        self.glossary_terms.as_deref().unwrap_or_default()
92    }
93    /// <p>The ID of the domain unit.</p>
94    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
95        self.domain_unit_id.as_deref()
96    }
97    /// <p>The ID of the project profile of a project.</p>
98    pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
99        self.project_profile_id.as_deref()
100    }
101    /// <p>The user parameters of a project.</p>
102    ///
103    /// 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()`.
104    pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
105        self.user_parameters.as_deref().unwrap_or_default()
106    }
107    /// <p>The environment deployment status of a project.</p>
108    pub fn environment_deployment_details(&self) -> ::std::option::Option<&crate::types::EnvironmentDeploymentDetails> {
109        self.environment_deployment_details.as_ref()
110    }
111}
112impl ::std::fmt::Debug for GetProjectOutput {
113    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
114        let mut formatter = f.debug_struct("GetProjectOutput");
115        formatter.field("domain_id", &self.domain_id);
116        formatter.field("id", &self.id);
117        formatter.field("name", &"*** Sensitive Data Redacted ***");
118        formatter.field("description", &"*** Sensitive Data Redacted ***");
119        formatter.field("project_status", &self.project_status);
120        formatter.field("failure_reasons", &self.failure_reasons);
121        formatter.field("created_by", &self.created_by);
122        formatter.field("created_at", &self.created_at);
123        formatter.field("last_updated_at", &self.last_updated_at);
124        formatter.field("resource_tags", &self.resource_tags);
125        formatter.field("glossary_terms", &self.glossary_terms);
126        formatter.field("domain_unit_id", &self.domain_unit_id);
127        formatter.field("project_profile_id", &self.project_profile_id);
128        formatter.field("user_parameters", &self.user_parameters);
129        formatter.field("environment_deployment_details", &self.environment_deployment_details);
130        formatter.field("_request_id", &self._request_id);
131        formatter.finish()
132    }
133}
134impl ::aws_types::request_id::RequestId for GetProjectOutput {
135    fn request_id(&self) -> Option<&str> {
136        self._request_id.as_deref()
137    }
138}
139impl GetProjectOutput {
140    /// Creates a new builder-style object to manufacture [`GetProjectOutput`](crate::operation::get_project::GetProjectOutput).
141    pub fn builder() -> crate::operation::get_project::builders::GetProjectOutputBuilder {
142        crate::operation::get_project::builders::GetProjectOutputBuilder::default()
143    }
144}
145
146/// A builder for [`GetProjectOutput`](crate::operation::get_project::GetProjectOutput).
147#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
148#[non_exhaustive]
149pub struct GetProjectOutputBuilder {
150    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
151    pub(crate) id: ::std::option::Option<::std::string::String>,
152    pub(crate) name: ::std::option::Option<::std::string::String>,
153    pub(crate) description: ::std::option::Option<::std::string::String>,
154    pub(crate) project_status: ::std::option::Option<crate::types::ProjectStatus>,
155    pub(crate) failure_reasons: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>,
156    pub(crate) created_by: ::std::option::Option<::std::string::String>,
157    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
158    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
159    pub(crate) resource_tags: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>,
160    pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
161    pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
162    pub(crate) project_profile_id: ::std::option::Option<::std::string::String>,
163    pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
164    pub(crate) environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
165    _request_id: Option<String>,
166}
167impl GetProjectOutputBuilder {
168    /// <p>The ID of the Amazon DataZone domain in which the project exists.</p>
169    /// This field is required.
170    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.domain_id = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The ID of the Amazon DataZone domain in which the project exists.</p>
175    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.domain_id = input;
177        self
178    }
179    /// <p>The ID of the Amazon DataZone domain in which the project exists.</p>
180    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
181        &self.domain_id
182    }
183    /// <p>&gt;The ID of the project.</p>
184    /// This field is required.
185    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.id = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>&gt;The ID of the project.</p>
190    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.id = input;
192        self
193    }
194    /// <p>&gt;The ID of the project.</p>
195    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
196        &self.id
197    }
198    /// <p>The name of the project.</p>
199    /// This field is required.
200    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.name = ::std::option::Option::Some(input.into());
202        self
203    }
204    /// <p>The name of the project.</p>
205    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.name = input;
207        self
208    }
209    /// <p>The name of the project.</p>
210    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
211        &self.name
212    }
213    /// <p>The description of the project.</p>
214    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.description = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The description of the project.</p>
219    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.description = input;
221        self
222    }
223    /// <p>The description of the project.</p>
224    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
225        &self.description
226    }
227    /// <p>The status of the project.</p>
228    pub fn project_status(mut self, input: crate::types::ProjectStatus) -> Self {
229        self.project_status = ::std::option::Option::Some(input);
230        self
231    }
232    /// <p>The status of the project.</p>
233    pub fn set_project_status(mut self, input: ::std::option::Option<crate::types::ProjectStatus>) -> Self {
234        self.project_status = input;
235        self
236    }
237    /// <p>The status of the project.</p>
238    pub fn get_project_status(&self) -> &::std::option::Option<crate::types::ProjectStatus> {
239        &self.project_status
240    }
241    /// Appends an item to `failure_reasons`.
242    ///
243    /// To override the contents of this collection use [`set_failure_reasons`](Self::set_failure_reasons).
244    ///
245    /// <p>Specifies the error message that is returned if the operation cannot be successfully completed.</p>
246    pub fn failure_reasons(mut self, input: crate::types::ProjectDeletionError) -> Self {
247        let mut v = self.failure_reasons.unwrap_or_default();
248        v.push(input);
249        self.failure_reasons = ::std::option::Option::Some(v);
250        self
251    }
252    /// <p>Specifies the error message that is returned if the operation cannot be successfully completed.</p>
253    pub fn set_failure_reasons(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>) -> Self {
254        self.failure_reasons = input;
255        self
256    }
257    /// <p>Specifies the error message that is returned if the operation cannot be successfully completed.</p>
258    pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>> {
259        &self.failure_reasons
260    }
261    /// <p>The Amazon DataZone user who created the project.</p>
262    /// This field is required.
263    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264        self.created_by = ::std::option::Option::Some(input.into());
265        self
266    }
267    /// <p>The Amazon DataZone user who created the project.</p>
268    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.created_by = input;
270        self
271    }
272    /// <p>The Amazon DataZone user who created the project.</p>
273    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
274        &self.created_by
275    }
276    /// <p>The timestamp of when the project was created.</p>
277    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
278        self.created_at = ::std::option::Option::Some(input);
279        self
280    }
281    /// <p>The timestamp of when the project was created.</p>
282    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
283        self.created_at = input;
284        self
285    }
286    /// <p>The timestamp of when the project was created.</p>
287    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
288        &self.created_at
289    }
290    /// <p>The timestamp of when the project was last updated.</p>
291    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
292        self.last_updated_at = ::std::option::Option::Some(input);
293        self
294    }
295    /// <p>The timestamp of when the project was last updated.</p>
296    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
297        self.last_updated_at = input;
298        self
299    }
300    /// <p>The timestamp of when the project was last updated.</p>
301    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
302        &self.last_updated_at
303    }
304    /// Appends an item to `resource_tags`.
305    ///
306    /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
307    ///
308    /// <p>The resource tags of the project.</p>
309    pub fn resource_tags(mut self, input: crate::types::ResourceTag) -> Self {
310        let mut v = self.resource_tags.unwrap_or_default();
311        v.push(input);
312        self.resource_tags = ::std::option::Option::Some(v);
313        self
314    }
315    /// <p>The resource tags of the project.</p>
316    pub fn set_resource_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>) -> Self {
317        self.resource_tags = input;
318        self
319    }
320    /// <p>The resource tags of the project.</p>
321    pub fn get_resource_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>> {
322        &self.resource_tags
323    }
324    /// Appends an item to `glossary_terms`.
325    ///
326    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
327    ///
328    /// <p>The business glossary terms that can be used in the project.</p>
329    pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
330        let mut v = self.glossary_terms.unwrap_or_default();
331        v.push(input.into());
332        self.glossary_terms = ::std::option::Option::Some(v);
333        self
334    }
335    /// <p>The business glossary terms that can be used in the project.</p>
336    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
337        self.glossary_terms = input;
338        self
339    }
340    /// <p>The business glossary terms that can be used in the project.</p>
341    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
342        &self.glossary_terms
343    }
344    /// <p>The ID of the domain unit.</p>
345    pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346        self.domain_unit_id = ::std::option::Option::Some(input.into());
347        self
348    }
349    /// <p>The ID of the domain unit.</p>
350    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351        self.domain_unit_id = input;
352        self
353    }
354    /// <p>The ID of the domain unit.</p>
355    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
356        &self.domain_unit_id
357    }
358    /// <p>The ID of the project profile of a project.</p>
359    pub fn project_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360        self.project_profile_id = ::std::option::Option::Some(input.into());
361        self
362    }
363    /// <p>The ID of the project profile of a project.</p>
364    pub fn set_project_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365        self.project_profile_id = input;
366        self
367    }
368    /// <p>The ID of the project profile of a project.</p>
369    pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
370        &self.project_profile_id
371    }
372    /// Appends an item to `user_parameters`.
373    ///
374    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
375    ///
376    /// <p>The user parameters of a project.</p>
377    pub fn user_parameters(mut self, input: crate::types::EnvironmentConfigurationUserParameter) -> Self {
378        let mut v = self.user_parameters.unwrap_or_default();
379        v.push(input);
380        self.user_parameters = ::std::option::Option::Some(v);
381        self
382    }
383    /// <p>The user parameters of a project.</p>
384    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
385        self.user_parameters = input;
386        self
387    }
388    /// <p>The user parameters of a project.</p>
389    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
390        &self.user_parameters
391    }
392    /// <p>The environment deployment status of a project.</p>
393    pub fn environment_deployment_details(mut self, input: crate::types::EnvironmentDeploymentDetails) -> Self {
394        self.environment_deployment_details = ::std::option::Option::Some(input);
395        self
396    }
397    /// <p>The environment deployment status of a project.</p>
398    pub fn set_environment_deployment_details(mut self, input: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>) -> Self {
399        self.environment_deployment_details = input;
400        self
401    }
402    /// <p>The environment deployment status of a project.</p>
403    pub fn get_environment_deployment_details(&self) -> &::std::option::Option<crate::types::EnvironmentDeploymentDetails> {
404        &self.environment_deployment_details
405    }
406    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
407        self._request_id = Some(request_id.into());
408        self
409    }
410
411    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
412        self._request_id = request_id;
413        self
414    }
415    /// Consumes the builder and constructs a [`GetProjectOutput`](crate::operation::get_project::GetProjectOutput).
416    /// This method will fail if any of the following fields are not set:
417    /// - [`domain_id`](crate::operation::get_project::builders::GetProjectOutputBuilder::domain_id)
418    /// - [`id`](crate::operation::get_project::builders::GetProjectOutputBuilder::id)
419    /// - [`name`](crate::operation::get_project::builders::GetProjectOutputBuilder::name)
420    /// - [`created_by`](crate::operation::get_project::builders::GetProjectOutputBuilder::created_by)
421    pub fn build(self) -> ::std::result::Result<crate::operation::get_project::GetProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
422        ::std::result::Result::Ok(crate::operation::get_project::GetProjectOutput {
423            domain_id: self.domain_id.ok_or_else(|| {
424                ::aws_smithy_types::error::operation::BuildError::missing_field(
425                    "domain_id",
426                    "domain_id was not specified but it is required when building GetProjectOutput",
427                )
428            })?,
429            id: self.id.ok_or_else(|| {
430                ::aws_smithy_types::error::operation::BuildError::missing_field(
431                    "id",
432                    "id was not specified but it is required when building GetProjectOutput",
433                )
434            })?,
435            name: self.name.ok_or_else(|| {
436                ::aws_smithy_types::error::operation::BuildError::missing_field(
437                    "name",
438                    "name was not specified but it is required when building GetProjectOutput",
439                )
440            })?,
441            description: self.description,
442            project_status: self.project_status,
443            failure_reasons: self.failure_reasons,
444            created_by: self.created_by.ok_or_else(|| {
445                ::aws_smithy_types::error::operation::BuildError::missing_field(
446                    "created_by",
447                    "created_by was not specified but it is required when building GetProjectOutput",
448                )
449            })?,
450            created_at: self.created_at,
451            last_updated_at: self.last_updated_at,
452            resource_tags: self.resource_tags,
453            glossary_terms: self.glossary_terms,
454            domain_unit_id: self.domain_unit_id,
455            project_profile_id: self.project_profile_id,
456            user_parameters: self.user_parameters,
457            environment_deployment_details: self.environment_deployment_details,
458            _request_id: self._request_id,
459        })
460    }
461}
462impl ::std::fmt::Debug for GetProjectOutputBuilder {
463    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
464        let mut formatter = f.debug_struct("GetProjectOutputBuilder");
465        formatter.field("domain_id", &self.domain_id);
466        formatter.field("id", &self.id);
467        formatter.field("name", &"*** Sensitive Data Redacted ***");
468        formatter.field("description", &"*** Sensitive Data Redacted ***");
469        formatter.field("project_status", &self.project_status);
470        formatter.field("failure_reasons", &self.failure_reasons);
471        formatter.field("created_by", &self.created_by);
472        formatter.field("created_at", &self.created_at);
473        formatter.field("last_updated_at", &self.last_updated_at);
474        formatter.field("resource_tags", &self.resource_tags);
475        formatter.field("glossary_terms", &self.glossary_terms);
476        formatter.field("domain_unit_id", &self.domain_unit_id);
477        formatter.field("project_profile_id", &self.project_profile_id);
478        formatter.field("user_parameters", &self.user_parameters);
479        formatter.field("environment_deployment_details", &self.environment_deployment_details);
480        formatter.field("_request_id", &self._request_id);
481        formatter.finish()
482    }
483}