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