1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetAssetOutput {
6 pub id: ::std::string::String,
8 pub name: ::std::string::String,
10 pub type_identifier: ::std::string::String,
12 pub type_revision: ::std::string::String,
14 pub external_identifier: ::std::option::Option<::std::string::String>,
16 pub revision: ::std::string::String,
18 pub description: ::std::option::Option<::std::string::String>,
20 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub created_by: ::std::option::Option<::std::string::String>,
24 pub first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
26 pub first_revision_created_by: ::std::option::Option<::std::string::String>,
28 pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30 pub governed_glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32 pub owning_project_id: ::std::string::String,
34 pub domain_id: ::std::string::String,
36 pub listing: ::std::option::Option<crate::types::AssetListingDetails>,
38 pub forms_output: ::std::vec::Vec<crate::types::FormOutput>,
40 pub read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
42 pub latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
44 _request_id: Option<String>,
45}
46impl GetAssetOutput {
47 pub fn id(&self) -> &str {
49 use std::ops::Deref;
50 self.id.deref()
51 }
52 pub fn name(&self) -> &str {
54 use std::ops::Deref;
55 self.name.deref()
56 }
57 pub fn type_identifier(&self) -> &str {
59 use std::ops::Deref;
60 self.type_identifier.deref()
61 }
62 pub fn type_revision(&self) -> &str {
64 use std::ops::Deref;
65 self.type_revision.deref()
66 }
67 pub fn external_identifier(&self) -> ::std::option::Option<&str> {
69 self.external_identifier.as_deref()
70 }
71 pub fn revision(&self) -> &str {
73 use std::ops::Deref;
74 self.revision.deref()
75 }
76 pub fn description(&self) -> ::std::option::Option<&str> {
78 self.description.as_deref()
79 }
80 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
82 self.created_at.as_ref()
83 }
84 pub fn created_by(&self) -> ::std::option::Option<&str> {
86 self.created_by.as_deref()
87 }
88 pub fn first_revision_created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
90 self.first_revision_created_at.as_ref()
91 }
92 pub fn first_revision_created_by(&self) -> ::std::option::Option<&str> {
94 self.first_revision_created_by.as_deref()
95 }
96 pub fn glossary_terms(&self) -> &[::std::string::String] {
100 self.glossary_terms.as_deref().unwrap_or_default()
101 }
102 pub fn governed_glossary_terms(&self) -> &[::std::string::String] {
106 self.governed_glossary_terms.as_deref().unwrap_or_default()
107 }
108 pub fn owning_project_id(&self) -> &str {
110 use std::ops::Deref;
111 self.owning_project_id.deref()
112 }
113 pub fn domain_id(&self) -> &str {
115 use std::ops::Deref;
116 self.domain_id.deref()
117 }
118 pub fn listing(&self) -> ::std::option::Option<&crate::types::AssetListingDetails> {
120 self.listing.as_ref()
121 }
122 pub fn forms_output(&self) -> &[crate::types::FormOutput] {
124 use std::ops::Deref;
125 self.forms_output.deref()
126 }
127 pub fn read_only_forms_output(&self) -> &[crate::types::FormOutput] {
131 self.read_only_forms_output.as_deref().unwrap_or_default()
132 }
133 pub fn latest_time_series_data_point_forms_output(&self) -> &[crate::types::TimeSeriesDataPointSummaryFormOutput] {
137 self.latest_time_series_data_point_forms_output.as_deref().unwrap_or_default()
138 }
139}
140impl ::std::fmt::Debug for GetAssetOutput {
141 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
142 let mut formatter = f.debug_struct("GetAssetOutput");
143 formatter.field("id", &self.id);
144 formatter.field("name", &"*** Sensitive Data Redacted ***");
145 formatter.field("type_identifier", &self.type_identifier);
146 formatter.field("type_revision", &self.type_revision);
147 formatter.field("external_identifier", &self.external_identifier);
148 formatter.field("revision", &self.revision);
149 formatter.field("description", &"*** Sensitive Data Redacted ***");
150 formatter.field("created_at", &self.created_at);
151 formatter.field("created_by", &self.created_by);
152 formatter.field("first_revision_created_at", &self.first_revision_created_at);
153 formatter.field("first_revision_created_by", &self.first_revision_created_by);
154 formatter.field("glossary_terms", &self.glossary_terms);
155 formatter.field("governed_glossary_terms", &self.governed_glossary_terms);
156 formatter.field("owning_project_id", &self.owning_project_id);
157 formatter.field("domain_id", &self.domain_id);
158 formatter.field("listing", &self.listing);
159 formatter.field("forms_output", &self.forms_output);
160 formatter.field("read_only_forms_output", &self.read_only_forms_output);
161 formatter.field(
162 "latest_time_series_data_point_forms_output",
163 &self.latest_time_series_data_point_forms_output,
164 );
165 formatter.field("_request_id", &self._request_id);
166 formatter.finish()
167 }
168}
169impl ::aws_types::request_id::RequestId for GetAssetOutput {
170 fn request_id(&self) -> Option<&str> {
171 self._request_id.as_deref()
172 }
173}
174impl GetAssetOutput {
175 pub fn builder() -> crate::operation::get_asset::builders::GetAssetOutputBuilder {
177 crate::operation::get_asset::builders::GetAssetOutputBuilder::default()
178 }
179}
180
181#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
183#[non_exhaustive]
184pub struct GetAssetOutputBuilder {
185 pub(crate) id: ::std::option::Option<::std::string::String>,
186 pub(crate) name: ::std::option::Option<::std::string::String>,
187 pub(crate) type_identifier: ::std::option::Option<::std::string::String>,
188 pub(crate) type_revision: ::std::option::Option<::std::string::String>,
189 pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
190 pub(crate) revision: ::std::option::Option<::std::string::String>,
191 pub(crate) description: ::std::option::Option<::std::string::String>,
192 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
193 pub(crate) created_by: ::std::option::Option<::std::string::String>,
194 pub(crate) first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
195 pub(crate) first_revision_created_by: ::std::option::Option<::std::string::String>,
196 pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
197 pub(crate) governed_glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
198 pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
199 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
200 pub(crate) listing: ::std::option::Option<crate::types::AssetListingDetails>,
201 pub(crate) forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
202 pub(crate) read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
203 pub(crate) latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
204 _request_id: Option<String>,
205}
206impl GetAssetOutputBuilder {
207 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210 self.id = ::std::option::Option::Some(input.into());
211 self
212 }
213 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215 self.id = input;
216 self
217 }
218 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
220 &self.id
221 }
222 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.name = ::std::option::Option::Some(input.into());
226 self
227 }
228 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.name = input;
231 self
232 }
233 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
235 &self.name
236 }
237 pub fn type_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.type_identifier = ::std::option::Option::Some(input.into());
241 self
242 }
243 pub fn set_type_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.type_identifier = input;
246 self
247 }
248 pub fn get_type_identifier(&self) -> &::std::option::Option<::std::string::String> {
250 &self.type_identifier
251 }
252 pub fn type_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255 self.type_revision = ::std::option::Option::Some(input.into());
256 self
257 }
258 pub fn set_type_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.type_revision = input;
261 self
262 }
263 pub fn get_type_revision(&self) -> &::std::option::Option<::std::string::String> {
265 &self.type_revision
266 }
267 pub fn external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269 self.external_identifier = ::std::option::Option::Some(input.into());
270 self
271 }
272 pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274 self.external_identifier = input;
275 self
276 }
277 pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
279 &self.external_identifier
280 }
281 pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284 self.revision = ::std::option::Option::Some(input.into());
285 self
286 }
287 pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289 self.revision = input;
290 self
291 }
292 pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
294 &self.revision
295 }
296 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
298 self.description = ::std::option::Option::Some(input.into());
299 self
300 }
301 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
303 self.description = input;
304 self
305 }
306 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
308 &self.description
309 }
310 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
312 self.created_at = ::std::option::Option::Some(input);
313 self
314 }
315 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
317 self.created_at = input;
318 self
319 }
320 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
322 &self.created_at
323 }
324 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326 self.created_by = ::std::option::Option::Some(input.into());
327 self
328 }
329 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.created_by = input;
332 self
333 }
334 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
336 &self.created_by
337 }
338 pub fn first_revision_created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
340 self.first_revision_created_at = ::std::option::Option::Some(input);
341 self
342 }
343 pub fn set_first_revision_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
345 self.first_revision_created_at = input;
346 self
347 }
348 pub fn get_first_revision_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
350 &self.first_revision_created_at
351 }
352 pub fn first_revision_created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354 self.first_revision_created_by = ::std::option::Option::Some(input.into());
355 self
356 }
357 pub fn set_first_revision_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
359 self.first_revision_created_by = input;
360 self
361 }
362 pub fn get_first_revision_created_by(&self) -> &::std::option::Option<::std::string::String> {
364 &self.first_revision_created_by
365 }
366 pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
372 let mut v = self.glossary_terms.unwrap_or_default();
373 v.push(input.into());
374 self.glossary_terms = ::std::option::Option::Some(v);
375 self
376 }
377 pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
379 self.glossary_terms = input;
380 self
381 }
382 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
384 &self.glossary_terms
385 }
386 pub fn governed_glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
392 let mut v = self.governed_glossary_terms.unwrap_or_default();
393 v.push(input.into());
394 self.governed_glossary_terms = ::std::option::Option::Some(v);
395 self
396 }
397 pub fn set_governed_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
399 self.governed_glossary_terms = input;
400 self
401 }
402 pub fn get_governed_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
404 &self.governed_glossary_terms
405 }
406 pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
409 self.owning_project_id = ::std::option::Option::Some(input.into());
410 self
411 }
412 pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
414 self.owning_project_id = input;
415 self
416 }
417 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
419 &self.owning_project_id
420 }
421 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
424 self.domain_id = ::std::option::Option::Some(input.into());
425 self
426 }
427 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
429 self.domain_id = input;
430 self
431 }
432 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
434 &self.domain_id
435 }
436 pub fn listing(mut self, input: crate::types::AssetListingDetails) -> Self {
438 self.listing = ::std::option::Option::Some(input);
439 self
440 }
441 pub fn set_listing(mut self, input: ::std::option::Option<crate::types::AssetListingDetails>) -> Self {
443 self.listing = input;
444 self
445 }
446 pub fn get_listing(&self) -> &::std::option::Option<crate::types::AssetListingDetails> {
448 &self.listing
449 }
450 pub fn forms_output(mut self, input: crate::types::FormOutput) -> Self {
456 let mut v = self.forms_output.unwrap_or_default();
457 v.push(input);
458 self.forms_output = ::std::option::Option::Some(v);
459 self
460 }
461 pub fn set_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
463 self.forms_output = input;
464 self
465 }
466 pub fn get_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
468 &self.forms_output
469 }
470 pub fn read_only_forms_output(mut self, input: crate::types::FormOutput) -> Self {
476 let mut v = self.read_only_forms_output.unwrap_or_default();
477 v.push(input);
478 self.read_only_forms_output = ::std::option::Option::Some(v);
479 self
480 }
481 pub fn set_read_only_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
483 self.read_only_forms_output = input;
484 self
485 }
486 pub fn get_read_only_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
488 &self.read_only_forms_output
489 }
490 pub fn latest_time_series_data_point_forms_output(mut self, input: crate::types::TimeSeriesDataPointSummaryFormOutput) -> Self {
496 let mut v = self.latest_time_series_data_point_forms_output.unwrap_or_default();
497 v.push(input);
498 self.latest_time_series_data_point_forms_output = ::std::option::Option::Some(v);
499 self
500 }
501 pub fn set_latest_time_series_data_point_forms_output(
503 mut self,
504 input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
505 ) -> Self {
506 self.latest_time_series_data_point_forms_output = input;
507 self
508 }
509 pub fn get_latest_time_series_data_point_forms_output(
511 &self,
512 ) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>> {
513 &self.latest_time_series_data_point_forms_output
514 }
515 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
516 self._request_id = Some(request_id.into());
517 self
518 }
519
520 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
521 self._request_id = request_id;
522 self
523 }
524 pub fn build(self) -> ::std::result::Result<crate::operation::get_asset::GetAssetOutput, ::aws_smithy_types::error::operation::BuildError> {
535 ::std::result::Result::Ok(crate::operation::get_asset::GetAssetOutput {
536 id: self.id.ok_or_else(|| {
537 ::aws_smithy_types::error::operation::BuildError::missing_field(
538 "id",
539 "id was not specified but it is required when building GetAssetOutput",
540 )
541 })?,
542 name: self.name.ok_or_else(|| {
543 ::aws_smithy_types::error::operation::BuildError::missing_field(
544 "name",
545 "name was not specified but it is required when building GetAssetOutput",
546 )
547 })?,
548 type_identifier: self.type_identifier.ok_or_else(|| {
549 ::aws_smithy_types::error::operation::BuildError::missing_field(
550 "type_identifier",
551 "type_identifier was not specified but it is required when building GetAssetOutput",
552 )
553 })?,
554 type_revision: self.type_revision.ok_or_else(|| {
555 ::aws_smithy_types::error::operation::BuildError::missing_field(
556 "type_revision",
557 "type_revision was not specified but it is required when building GetAssetOutput",
558 )
559 })?,
560 external_identifier: self.external_identifier,
561 revision: self.revision.ok_or_else(|| {
562 ::aws_smithy_types::error::operation::BuildError::missing_field(
563 "revision",
564 "revision was not specified but it is required when building GetAssetOutput",
565 )
566 })?,
567 description: self.description,
568 created_at: self.created_at,
569 created_by: self.created_by,
570 first_revision_created_at: self.first_revision_created_at,
571 first_revision_created_by: self.first_revision_created_by,
572 glossary_terms: self.glossary_terms,
573 governed_glossary_terms: self.governed_glossary_terms,
574 owning_project_id: self.owning_project_id.ok_or_else(|| {
575 ::aws_smithy_types::error::operation::BuildError::missing_field(
576 "owning_project_id",
577 "owning_project_id was not specified but it is required when building GetAssetOutput",
578 )
579 })?,
580 domain_id: self.domain_id.ok_or_else(|| {
581 ::aws_smithy_types::error::operation::BuildError::missing_field(
582 "domain_id",
583 "domain_id was not specified but it is required when building GetAssetOutput",
584 )
585 })?,
586 listing: self.listing,
587 forms_output: self.forms_output.ok_or_else(|| {
588 ::aws_smithy_types::error::operation::BuildError::missing_field(
589 "forms_output",
590 "forms_output was not specified but it is required when building GetAssetOutput",
591 )
592 })?,
593 read_only_forms_output: self.read_only_forms_output,
594 latest_time_series_data_point_forms_output: self.latest_time_series_data_point_forms_output,
595 _request_id: self._request_id,
596 })
597 }
598}
599impl ::std::fmt::Debug for GetAssetOutputBuilder {
600 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
601 let mut formatter = f.debug_struct("GetAssetOutputBuilder");
602 formatter.field("id", &self.id);
603 formatter.field("name", &"*** Sensitive Data Redacted ***");
604 formatter.field("type_identifier", &self.type_identifier);
605 formatter.field("type_revision", &self.type_revision);
606 formatter.field("external_identifier", &self.external_identifier);
607 formatter.field("revision", &self.revision);
608 formatter.field("description", &"*** Sensitive Data Redacted ***");
609 formatter.field("created_at", &self.created_at);
610 formatter.field("created_by", &self.created_by);
611 formatter.field("first_revision_created_at", &self.first_revision_created_at);
612 formatter.field("first_revision_created_by", &self.first_revision_created_by);
613 formatter.field("glossary_terms", &self.glossary_terms);
614 formatter.field("governed_glossary_terms", &self.governed_glossary_terms);
615 formatter.field("owning_project_id", &self.owning_project_id);
616 formatter.field("domain_id", &self.domain_id);
617 formatter.field("listing", &self.listing);
618 formatter.field("forms_output", &self.forms_output);
619 formatter.field("read_only_forms_output", &self.read_only_forms_output);
620 formatter.field(
621 "latest_time_series_data_point_forms_output",
622 &self.latest_time_series_data_point_forms_output,
623 );
624 formatter.field("_request_id", &self._request_id);
625 formatter.finish()
626 }
627}