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 glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26 pub domain_unit_id: ::std::option::Option<::std::string::String>,
28 pub project_profile_id: ::std::option::Option<::std::string::String>,
30 pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
32 pub environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
34 _request_id: Option<String>,
35}
36impl GetProjectOutput {
37 pub fn domain_id(&self) -> &str {
39 use std::ops::Deref;
40 self.domain_id.deref()
41 }
42 pub fn id(&self) -> &str {
44 use std::ops::Deref;
45 self.id.deref()
46 }
47 pub fn name(&self) -> &str {
49 use std::ops::Deref;
50 self.name.deref()
51 }
52 pub fn description(&self) -> ::std::option::Option<&str> {
54 self.description.as_deref()
55 }
56 pub fn project_status(&self) -> ::std::option::Option<&crate::types::ProjectStatus> {
58 self.project_status.as_ref()
59 }
60 pub fn failure_reasons(&self) -> &[crate::types::ProjectDeletionError] {
64 self.failure_reasons.as_deref().unwrap_or_default()
65 }
66 pub fn created_by(&self) -> &str {
68 use std::ops::Deref;
69 self.created_by.deref()
70 }
71 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73 self.created_at.as_ref()
74 }
75 pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
77 self.last_updated_at.as_ref()
78 }
79 pub fn glossary_terms(&self) -> &[::std::string::String] {
83 self.glossary_terms.as_deref().unwrap_or_default()
84 }
85 pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
87 self.domain_unit_id.as_deref()
88 }
89 pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
91 self.project_profile_id.as_deref()
92 }
93 pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
97 self.user_parameters.as_deref().unwrap_or_default()
98 }
99 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 pub fn builder() -> crate::operation::get_project::builders::GetProjectOutputBuilder {
133 crate::operation::get_project::builders::GetProjectOutputBuilder::default()
134 }
135}
136
137#[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 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 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.domain_id = input;
167 self
168 }
169 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
171 &self.domain_id
172 }
173 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.id = input;
182 self
183 }
184 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
186 &self.id
187 }
188 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196 self.name = input;
197 self
198 }
199 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
201 &self.name
202 }
203 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.description = input;
211 self
212 }
213 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
215 &self.description
216 }
217 pub fn project_status(mut self, input: crate::types::ProjectStatus) -> Self {
219 self.project_status = ::std::option::Option::Some(input);
220 self
221 }
222 pub fn set_project_status(mut self, input: ::std::option::Option<crate::types::ProjectStatus>) -> Self {
224 self.project_status = input;
225 self
226 }
227 pub fn get_project_status(&self) -> &::std::option::Option<crate::types::ProjectStatus> {
229 &self.project_status
230 }
231 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 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 pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>> {
249 &self.failure_reasons
250 }
251 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 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.created_by = input;
260 self
261 }
262 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
264 &self.created_by
265 }
266 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 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 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
278 &self.created_at
279 }
280 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 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 pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
292 &self.last_updated_at
293 }
294 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 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 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
312 &self.glossary_terms
313 }
314 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 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 pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
326 &self.domain_unit_id
327 }
328 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 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 pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
340 &self.project_profile_id
341 }
342 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 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 pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
360 &self.user_parameters
361 }
362 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 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 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 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}