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 owning_project_id: ::std::string::String,
32 pub domain_id: ::std::string::String,
34 pub listing: ::std::option::Option<crate::types::AssetListingDetails>,
36 pub forms_output: ::std::vec::Vec<crate::types::FormOutput>,
38 pub read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
40 pub latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
42 _request_id: Option<String>,
43}
44impl GetAssetOutput {
45 pub fn id(&self) -> &str {
47 use std::ops::Deref;
48 self.id.deref()
49 }
50 pub fn name(&self) -> &str {
52 use std::ops::Deref;
53 self.name.deref()
54 }
55 pub fn type_identifier(&self) -> &str {
57 use std::ops::Deref;
58 self.type_identifier.deref()
59 }
60 pub fn type_revision(&self) -> &str {
62 use std::ops::Deref;
63 self.type_revision.deref()
64 }
65 pub fn external_identifier(&self) -> ::std::option::Option<&str> {
67 self.external_identifier.as_deref()
68 }
69 pub fn revision(&self) -> &str {
71 use std::ops::Deref;
72 self.revision.deref()
73 }
74 pub fn description(&self) -> ::std::option::Option<&str> {
76 self.description.as_deref()
77 }
78 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
80 self.created_at.as_ref()
81 }
82 pub fn created_by(&self) -> ::std::option::Option<&str> {
84 self.created_by.as_deref()
85 }
86 pub fn first_revision_created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
88 self.first_revision_created_at.as_ref()
89 }
90 pub fn first_revision_created_by(&self) -> ::std::option::Option<&str> {
92 self.first_revision_created_by.as_deref()
93 }
94 pub fn glossary_terms(&self) -> &[::std::string::String] {
98 self.glossary_terms.as_deref().unwrap_or_default()
99 }
100 pub fn owning_project_id(&self) -> &str {
102 use std::ops::Deref;
103 self.owning_project_id.deref()
104 }
105 pub fn domain_id(&self) -> &str {
107 use std::ops::Deref;
108 self.domain_id.deref()
109 }
110 pub fn listing(&self) -> ::std::option::Option<&crate::types::AssetListingDetails> {
112 self.listing.as_ref()
113 }
114 pub fn forms_output(&self) -> &[crate::types::FormOutput] {
116 use std::ops::Deref;
117 self.forms_output.deref()
118 }
119 pub fn read_only_forms_output(&self) -> &[crate::types::FormOutput] {
123 self.read_only_forms_output.as_deref().unwrap_or_default()
124 }
125 pub fn latest_time_series_data_point_forms_output(&self) -> &[crate::types::TimeSeriesDataPointSummaryFormOutput] {
129 self.latest_time_series_data_point_forms_output.as_deref().unwrap_or_default()
130 }
131}
132impl ::std::fmt::Debug for GetAssetOutput {
133 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
134 let mut formatter = f.debug_struct("GetAssetOutput");
135 formatter.field("id", &self.id);
136 formatter.field("name", &"*** Sensitive Data Redacted ***");
137 formatter.field("type_identifier", &self.type_identifier);
138 formatter.field("type_revision", &self.type_revision);
139 formatter.field("external_identifier", &self.external_identifier);
140 formatter.field("revision", &self.revision);
141 formatter.field("description", &"*** Sensitive Data Redacted ***");
142 formatter.field("created_at", &self.created_at);
143 formatter.field("created_by", &self.created_by);
144 formatter.field("first_revision_created_at", &self.first_revision_created_at);
145 formatter.field("first_revision_created_by", &self.first_revision_created_by);
146 formatter.field("glossary_terms", &self.glossary_terms);
147 formatter.field("owning_project_id", &self.owning_project_id);
148 formatter.field("domain_id", &self.domain_id);
149 formatter.field("listing", &self.listing);
150 formatter.field("forms_output", &self.forms_output);
151 formatter.field("read_only_forms_output", &self.read_only_forms_output);
152 formatter.field(
153 "latest_time_series_data_point_forms_output",
154 &self.latest_time_series_data_point_forms_output,
155 );
156 formatter.field("_request_id", &self._request_id);
157 formatter.finish()
158 }
159}
160impl ::aws_types::request_id::RequestId for GetAssetOutput {
161 fn request_id(&self) -> Option<&str> {
162 self._request_id.as_deref()
163 }
164}
165impl GetAssetOutput {
166 pub fn builder() -> crate::operation::get_asset::builders::GetAssetOutputBuilder {
168 crate::operation::get_asset::builders::GetAssetOutputBuilder::default()
169 }
170}
171
172#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
174#[non_exhaustive]
175pub struct GetAssetOutputBuilder {
176 pub(crate) id: ::std::option::Option<::std::string::String>,
177 pub(crate) name: ::std::option::Option<::std::string::String>,
178 pub(crate) type_identifier: ::std::option::Option<::std::string::String>,
179 pub(crate) type_revision: ::std::option::Option<::std::string::String>,
180 pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
181 pub(crate) revision: ::std::option::Option<::std::string::String>,
182 pub(crate) description: ::std::option::Option<::std::string::String>,
183 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
184 pub(crate) created_by: ::std::option::Option<::std::string::String>,
185 pub(crate) first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
186 pub(crate) first_revision_created_by: ::std::option::Option<::std::string::String>,
187 pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
188 pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
189 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
190 pub(crate) listing: ::std::option::Option<crate::types::AssetListingDetails>,
191 pub(crate) forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
192 pub(crate) read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
193 pub(crate) latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
194 _request_id: Option<String>,
195}
196impl GetAssetOutputBuilder {
197 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.id = ::std::option::Option::Some(input.into());
201 self
202 }
203 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.id = input;
206 self
207 }
208 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
210 &self.id
211 }
212 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.name = ::std::option::Option::Some(input.into());
216 self
217 }
218 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.name = input;
221 self
222 }
223 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
225 &self.name
226 }
227 pub fn type_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.type_identifier = ::std::option::Option::Some(input.into());
231 self
232 }
233 pub fn set_type_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.type_identifier = input;
236 self
237 }
238 pub fn get_type_identifier(&self) -> &::std::option::Option<::std::string::String> {
240 &self.type_identifier
241 }
242 pub fn type_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245 self.type_revision = ::std::option::Option::Some(input.into());
246 self
247 }
248 pub fn set_type_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250 self.type_revision = input;
251 self
252 }
253 pub fn get_type_revision(&self) -> &::std::option::Option<::std::string::String> {
255 &self.type_revision
256 }
257 pub fn external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259 self.external_identifier = ::std::option::Option::Some(input.into());
260 self
261 }
262 pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
264 self.external_identifier = input;
265 self
266 }
267 pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
269 &self.external_identifier
270 }
271 pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274 self.revision = ::std::option::Option::Some(input.into());
275 self
276 }
277 pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279 self.revision = input;
280 self
281 }
282 pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
284 &self.revision
285 }
286 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
288 self.description = ::std::option::Option::Some(input.into());
289 self
290 }
291 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
293 self.description = input;
294 self
295 }
296 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
298 &self.description
299 }
300 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
302 self.created_at = ::std::option::Option::Some(input);
303 self
304 }
305 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
307 self.created_at = input;
308 self
309 }
310 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
312 &self.created_at
313 }
314 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316 self.created_by = ::std::option::Option::Some(input.into());
317 self
318 }
319 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
321 self.created_by = input;
322 self
323 }
324 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
326 &self.created_by
327 }
328 pub fn first_revision_created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
330 self.first_revision_created_at = ::std::option::Option::Some(input);
331 self
332 }
333 pub fn set_first_revision_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
335 self.first_revision_created_at = input;
336 self
337 }
338 pub fn get_first_revision_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
340 &self.first_revision_created_at
341 }
342 pub fn first_revision_created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
344 self.first_revision_created_by = ::std::option::Option::Some(input.into());
345 self
346 }
347 pub fn set_first_revision_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349 self.first_revision_created_by = input;
350 self
351 }
352 pub fn get_first_revision_created_by(&self) -> &::std::option::Option<::std::string::String> {
354 &self.first_revision_created_by
355 }
356 pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362 let mut v = self.glossary_terms.unwrap_or_default();
363 v.push(input.into());
364 self.glossary_terms = ::std::option::Option::Some(v);
365 self
366 }
367 pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
369 self.glossary_terms = input;
370 self
371 }
372 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
374 &self.glossary_terms
375 }
376 pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
379 self.owning_project_id = ::std::option::Option::Some(input.into());
380 self
381 }
382 pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
384 self.owning_project_id = input;
385 self
386 }
387 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
389 &self.owning_project_id
390 }
391 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
394 self.domain_id = ::std::option::Option::Some(input.into());
395 self
396 }
397 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
399 self.domain_id = input;
400 self
401 }
402 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
404 &self.domain_id
405 }
406 pub fn listing(mut self, input: crate::types::AssetListingDetails) -> Self {
408 self.listing = ::std::option::Option::Some(input);
409 self
410 }
411 pub fn set_listing(mut self, input: ::std::option::Option<crate::types::AssetListingDetails>) -> Self {
413 self.listing = input;
414 self
415 }
416 pub fn get_listing(&self) -> &::std::option::Option<crate::types::AssetListingDetails> {
418 &self.listing
419 }
420 pub fn forms_output(mut self, input: crate::types::FormOutput) -> Self {
426 let mut v = self.forms_output.unwrap_or_default();
427 v.push(input);
428 self.forms_output = ::std::option::Option::Some(v);
429 self
430 }
431 pub fn set_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
433 self.forms_output = input;
434 self
435 }
436 pub fn get_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
438 &self.forms_output
439 }
440 pub fn read_only_forms_output(mut self, input: crate::types::FormOutput) -> Self {
446 let mut v = self.read_only_forms_output.unwrap_or_default();
447 v.push(input);
448 self.read_only_forms_output = ::std::option::Option::Some(v);
449 self
450 }
451 pub fn set_read_only_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
453 self.read_only_forms_output = input;
454 self
455 }
456 pub fn get_read_only_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
458 &self.read_only_forms_output
459 }
460 pub fn latest_time_series_data_point_forms_output(mut self, input: crate::types::TimeSeriesDataPointSummaryFormOutput) -> Self {
466 let mut v = self.latest_time_series_data_point_forms_output.unwrap_or_default();
467 v.push(input);
468 self.latest_time_series_data_point_forms_output = ::std::option::Option::Some(v);
469 self
470 }
471 pub fn set_latest_time_series_data_point_forms_output(
473 mut self,
474 input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
475 ) -> Self {
476 self.latest_time_series_data_point_forms_output = input;
477 self
478 }
479 pub fn get_latest_time_series_data_point_forms_output(
481 &self,
482 ) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>> {
483 &self.latest_time_series_data_point_forms_output
484 }
485 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
486 self._request_id = Some(request_id.into());
487 self
488 }
489
490 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
491 self._request_id = request_id;
492 self
493 }
494 pub fn build(self) -> ::std::result::Result<crate::operation::get_asset::GetAssetOutput, ::aws_smithy_types::error::operation::BuildError> {
505 ::std::result::Result::Ok(crate::operation::get_asset::GetAssetOutput {
506 id: self.id.ok_or_else(|| {
507 ::aws_smithy_types::error::operation::BuildError::missing_field(
508 "id",
509 "id was not specified but it is required when building GetAssetOutput",
510 )
511 })?,
512 name: self.name.ok_or_else(|| {
513 ::aws_smithy_types::error::operation::BuildError::missing_field(
514 "name",
515 "name was not specified but it is required when building GetAssetOutput",
516 )
517 })?,
518 type_identifier: self.type_identifier.ok_or_else(|| {
519 ::aws_smithy_types::error::operation::BuildError::missing_field(
520 "type_identifier",
521 "type_identifier was not specified but it is required when building GetAssetOutput",
522 )
523 })?,
524 type_revision: self.type_revision.ok_or_else(|| {
525 ::aws_smithy_types::error::operation::BuildError::missing_field(
526 "type_revision",
527 "type_revision was not specified but it is required when building GetAssetOutput",
528 )
529 })?,
530 external_identifier: self.external_identifier,
531 revision: self.revision.ok_or_else(|| {
532 ::aws_smithy_types::error::operation::BuildError::missing_field(
533 "revision",
534 "revision was not specified but it is required when building GetAssetOutput",
535 )
536 })?,
537 description: self.description,
538 created_at: self.created_at,
539 created_by: self.created_by,
540 first_revision_created_at: self.first_revision_created_at,
541 first_revision_created_by: self.first_revision_created_by,
542 glossary_terms: self.glossary_terms,
543 owning_project_id: self.owning_project_id.ok_or_else(|| {
544 ::aws_smithy_types::error::operation::BuildError::missing_field(
545 "owning_project_id",
546 "owning_project_id was not specified but it is required when building GetAssetOutput",
547 )
548 })?,
549 domain_id: self.domain_id.ok_or_else(|| {
550 ::aws_smithy_types::error::operation::BuildError::missing_field(
551 "domain_id",
552 "domain_id was not specified but it is required when building GetAssetOutput",
553 )
554 })?,
555 listing: self.listing,
556 forms_output: self.forms_output.ok_or_else(|| {
557 ::aws_smithy_types::error::operation::BuildError::missing_field(
558 "forms_output",
559 "forms_output was not specified but it is required when building GetAssetOutput",
560 )
561 })?,
562 read_only_forms_output: self.read_only_forms_output,
563 latest_time_series_data_point_forms_output: self.latest_time_series_data_point_forms_output,
564 _request_id: self._request_id,
565 })
566 }
567}
568impl ::std::fmt::Debug for GetAssetOutputBuilder {
569 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
570 let mut formatter = f.debug_struct("GetAssetOutputBuilder");
571 formatter.field("id", &self.id);
572 formatter.field("name", &"*** Sensitive Data Redacted ***");
573 formatter.field("type_identifier", &self.type_identifier);
574 formatter.field("type_revision", &self.type_revision);
575 formatter.field("external_identifier", &self.external_identifier);
576 formatter.field("revision", &self.revision);
577 formatter.field("description", &"*** Sensitive Data Redacted ***");
578 formatter.field("created_at", &self.created_at);
579 formatter.field("created_by", &self.created_by);
580 formatter.field("first_revision_created_at", &self.first_revision_created_at);
581 formatter.field("first_revision_created_by", &self.first_revision_created_by);
582 formatter.field("glossary_terms", &self.glossary_terms);
583 formatter.field("owning_project_id", &self.owning_project_id);
584 formatter.field("domain_id", &self.domain_id);
585 formatter.field("listing", &self.listing);
586 formatter.field("forms_output", &self.forms_output);
587 formatter.field("read_only_forms_output", &self.read_only_forms_output);
588 formatter.field(
589 "latest_time_series_data_point_forms_output",
590 &self.latest_time_series_data_point_forms_output,
591 );
592 formatter.field("_request_id", &self._request_id);
593 formatter.finish()
594 }
595}