aws_sdk_datazone/operation/get_project/
_get_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetProjectOutput {
6 pub domain_id: ::std::string::String,
8 pub id: ::std::string::String,
10 pub name: ::std::string::String,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub project_status: ::std::option::Option<crate::types::ProjectStatus>,
16 pub failure_reasons: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>,
18 pub created_by: ::std::string::String,
20 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub resource_tags: ::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>>,
26 pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
28 pub domain_unit_id: ::std::option::Option<::std::string::String>,
30 pub project_profile_id: ::std::option::Option<::std::string::String>,
32 pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
34 pub environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
36 _request_id: Option<String>,
37}
38impl GetProjectOutput {
39 pub fn domain_id(&self) -> &str {
41 use std::ops::Deref;
42 self.domain_id.deref()
43 }
44 pub fn id(&self) -> &str {
46 use std::ops::Deref;
47 self.id.deref()
48 }
49 pub fn name(&self) -> &str {
51 use std::ops::Deref;
52 self.name.deref()
53 }
54 pub fn description(&self) -> ::std::option::Option<&str> {
56 self.description.as_deref()
57 }
58 pub fn project_status(&self) -> ::std::option::Option<&crate::types::ProjectStatus> {
60 self.project_status.as_ref()
61 }
62 pub fn failure_reasons(&self) -> &[crate::types::ProjectDeletionError] {
66 self.failure_reasons.as_deref().unwrap_or_default()
67 }
68 pub fn created_by(&self) -> &str {
70 use std::ops::Deref;
71 self.created_by.deref()
72 }
73 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75 self.created_at.as_ref()
76 }
77 pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79 self.last_updated_at.as_ref()
80 }
81 pub fn resource_tags(&self) -> &[crate::types::ResourceTag] {
85 self.resource_tags.as_deref().unwrap_or_default()
86 }
87 pub fn glossary_terms(&self) -> &[::std::string::String] {
91 self.glossary_terms.as_deref().unwrap_or_default()
92 }
93 pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
95 self.domain_unit_id.as_deref()
96 }
97 pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
99 self.project_profile_id.as_deref()
100 }
101 pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
105 self.user_parameters.as_deref().unwrap_or_default()
106 }
107 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 pub fn builder() -> crate::operation::get_project::builders::GetProjectOutputBuilder {
142 crate::operation::get_project::builders::GetProjectOutputBuilder::default()
143 }
144}
145
146#[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 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 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.domain_id = input;
177 self
178 }
179 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
181 &self.domain_id
182 }
183 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191 self.id = input;
192 self
193 }
194 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
196 &self.id
197 }
198 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206 self.name = input;
207 self
208 }
209 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
211 &self.name
212 }
213 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.description = input;
221 self
222 }
223 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
225 &self.description
226 }
227 pub fn project_status(mut self, input: crate::types::ProjectStatus) -> Self {
229 self.project_status = ::std::option::Option::Some(input);
230 self
231 }
232 pub fn set_project_status(mut self, input: ::std::option::Option<crate::types::ProjectStatus>) -> Self {
234 self.project_status = input;
235 self
236 }
237 pub fn get_project_status(&self) -> &::std::option::Option<crate::types::ProjectStatus> {
239 &self.project_status
240 }
241 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 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 pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>> {
259 &self.failure_reasons
260 }
261 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 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.created_by = input;
270 self
271 }
272 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
274 &self.created_by
275 }
276 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 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 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
288 &self.created_at
289 }
290 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 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 pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
302 &self.last_updated_at
303 }
304 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 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 pub fn get_resource_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceTag>> {
322 &self.resource_tags
323 }
324 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 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 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
342 &self.glossary_terms
343 }
344 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 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 pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
356 &self.domain_unit_id
357 }
358 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 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 pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
370 &self.project_profile_id
371 }
372 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 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 pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
390 &self.user_parameters
391 }
392 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 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 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 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}