1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateAssetOutput {
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 pub prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
46 _request_id: Option<String>,
47}
48impl CreateAssetOutput {
49 pub fn id(&self) -> &str {
51 use std::ops::Deref;
52 self.id.deref()
53 }
54 pub fn name(&self) -> &str {
56 use std::ops::Deref;
57 self.name.deref()
58 }
59 pub fn type_identifier(&self) -> &str {
61 use std::ops::Deref;
62 self.type_identifier.deref()
63 }
64 pub fn type_revision(&self) -> &str {
66 use std::ops::Deref;
67 self.type_revision.deref()
68 }
69 pub fn external_identifier(&self) -> ::std::option::Option<&str> {
71 self.external_identifier.as_deref()
72 }
73 pub fn revision(&self) -> &str {
75 use std::ops::Deref;
76 self.revision.deref()
77 }
78 pub fn description(&self) -> ::std::option::Option<&str> {
80 self.description.as_deref()
81 }
82 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
84 self.created_at.as_ref()
85 }
86 pub fn created_by(&self) -> ::std::option::Option<&str> {
88 self.created_by.as_deref()
89 }
90 pub fn first_revision_created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
92 self.first_revision_created_at.as_ref()
93 }
94 pub fn first_revision_created_by(&self) -> ::std::option::Option<&str> {
96 self.first_revision_created_by.as_deref()
97 }
98 pub fn glossary_terms(&self) -> &[::std::string::String] {
102 self.glossary_terms.as_deref().unwrap_or_default()
103 }
104 pub fn governed_glossary_terms(&self) -> &[::std::string::String] {
108 self.governed_glossary_terms.as_deref().unwrap_or_default()
109 }
110 pub fn owning_project_id(&self) -> &str {
112 use std::ops::Deref;
113 self.owning_project_id.deref()
114 }
115 pub fn domain_id(&self) -> &str {
117 use std::ops::Deref;
118 self.domain_id.deref()
119 }
120 pub fn listing(&self) -> ::std::option::Option<&crate::types::AssetListingDetails> {
122 self.listing.as_ref()
123 }
124 pub fn forms_output(&self) -> &[crate::types::FormOutput] {
126 use std::ops::Deref;
127 self.forms_output.deref()
128 }
129 pub fn read_only_forms_output(&self) -> &[crate::types::FormOutput] {
133 self.read_only_forms_output.as_deref().unwrap_or_default()
134 }
135 pub fn latest_time_series_data_point_forms_output(&self) -> &[crate::types::TimeSeriesDataPointSummaryFormOutput] {
139 self.latest_time_series_data_point_forms_output.as_deref().unwrap_or_default()
140 }
141 pub fn prediction_configuration(&self) -> ::std::option::Option<&crate::types::PredictionConfiguration> {
143 self.prediction_configuration.as_ref()
144 }
145}
146impl ::std::fmt::Debug for CreateAssetOutput {
147 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
148 let mut formatter = f.debug_struct("CreateAssetOutput");
149 formatter.field("id", &self.id);
150 formatter.field("name", &"*** Sensitive Data Redacted ***");
151 formatter.field("type_identifier", &self.type_identifier);
152 formatter.field("type_revision", &self.type_revision);
153 formatter.field("external_identifier", &self.external_identifier);
154 formatter.field("revision", &self.revision);
155 formatter.field("description", &"*** Sensitive Data Redacted ***");
156 formatter.field("created_at", &self.created_at);
157 formatter.field("created_by", &self.created_by);
158 formatter.field("first_revision_created_at", &self.first_revision_created_at);
159 formatter.field("first_revision_created_by", &self.first_revision_created_by);
160 formatter.field("glossary_terms", &self.glossary_terms);
161 formatter.field("governed_glossary_terms", &self.governed_glossary_terms);
162 formatter.field("owning_project_id", &self.owning_project_id);
163 formatter.field("domain_id", &self.domain_id);
164 formatter.field("listing", &self.listing);
165 formatter.field("forms_output", &self.forms_output);
166 formatter.field("read_only_forms_output", &self.read_only_forms_output);
167 formatter.field(
168 "latest_time_series_data_point_forms_output",
169 &self.latest_time_series_data_point_forms_output,
170 );
171 formatter.field("prediction_configuration", &self.prediction_configuration);
172 formatter.field("_request_id", &self._request_id);
173 formatter.finish()
174 }
175}
176impl ::aws_types::request_id::RequestId for CreateAssetOutput {
177 fn request_id(&self) -> Option<&str> {
178 self._request_id.as_deref()
179 }
180}
181impl CreateAssetOutput {
182 pub fn builder() -> crate::operation::create_asset::builders::CreateAssetOutputBuilder {
184 crate::operation::create_asset::builders::CreateAssetOutputBuilder::default()
185 }
186}
187
188#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
190#[non_exhaustive]
191pub struct CreateAssetOutputBuilder {
192 pub(crate) id: ::std::option::Option<::std::string::String>,
193 pub(crate) name: ::std::option::Option<::std::string::String>,
194 pub(crate) type_identifier: ::std::option::Option<::std::string::String>,
195 pub(crate) type_revision: ::std::option::Option<::std::string::String>,
196 pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
197 pub(crate) revision: ::std::option::Option<::std::string::String>,
198 pub(crate) description: ::std::option::Option<::std::string::String>,
199 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
200 pub(crate) created_by: ::std::option::Option<::std::string::String>,
201 pub(crate) first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
202 pub(crate) first_revision_created_by: ::std::option::Option<::std::string::String>,
203 pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
204 pub(crate) governed_glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
205 pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
206 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
207 pub(crate) listing: ::std::option::Option<crate::types::AssetListingDetails>,
208 pub(crate) forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
209 pub(crate) read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
210 pub(crate) latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
211 pub(crate) prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
212 _request_id: Option<String>,
213}
214impl CreateAssetOutputBuilder {
215 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.id = ::std::option::Option::Some(input.into());
219 self
220 }
221 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.id = input;
224 self
225 }
226 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
228 &self.id
229 }
230 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233 self.name = ::std::option::Option::Some(input.into());
234 self
235 }
236 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238 self.name = input;
239 self
240 }
241 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
243 &self.name
244 }
245 pub fn type_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.type_identifier = ::std::option::Option::Some(input.into());
249 self
250 }
251 pub fn set_type_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.type_identifier = input;
254 self
255 }
256 pub fn get_type_identifier(&self) -> &::std::option::Option<::std::string::String> {
258 &self.type_identifier
259 }
260 pub fn type_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263 self.type_revision = ::std::option::Option::Some(input.into());
264 self
265 }
266 pub fn set_type_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.type_revision = input;
269 self
270 }
271 pub fn get_type_revision(&self) -> &::std::option::Option<::std::string::String> {
273 &self.type_revision
274 }
275 pub fn external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277 self.external_identifier = ::std::option::Option::Some(input.into());
278 self
279 }
280 pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
282 self.external_identifier = input;
283 self
284 }
285 pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
287 &self.external_identifier
288 }
289 pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292 self.revision = ::std::option::Option::Some(input.into());
293 self
294 }
295 pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297 self.revision = input;
298 self
299 }
300 pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
302 &self.revision
303 }
304 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306 self.description = ::std::option::Option::Some(input.into());
307 self
308 }
309 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311 self.description = input;
312 self
313 }
314 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
316 &self.description
317 }
318 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
320 self.created_at = ::std::option::Option::Some(input);
321 self
322 }
323 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
325 self.created_at = input;
326 self
327 }
328 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
330 &self.created_at
331 }
332 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334 self.created_by = ::std::option::Option::Some(input.into());
335 self
336 }
337 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339 self.created_by = input;
340 self
341 }
342 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
344 &self.created_by
345 }
346 pub fn first_revision_created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
348 self.first_revision_created_at = ::std::option::Option::Some(input);
349 self
350 }
351 pub fn set_first_revision_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
353 self.first_revision_created_at = input;
354 self
355 }
356 pub fn get_first_revision_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
358 &self.first_revision_created_at
359 }
360 pub fn first_revision_created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362 self.first_revision_created_by = ::std::option::Option::Some(input.into());
363 self
364 }
365 pub fn set_first_revision_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367 self.first_revision_created_by = input;
368 self
369 }
370 pub fn get_first_revision_created_by(&self) -> &::std::option::Option<::std::string::String> {
372 &self.first_revision_created_by
373 }
374 pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
380 let mut v = self.glossary_terms.unwrap_or_default();
381 v.push(input.into());
382 self.glossary_terms = ::std::option::Option::Some(v);
383 self
384 }
385 pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
387 self.glossary_terms = input;
388 self
389 }
390 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
392 &self.glossary_terms
393 }
394 pub fn governed_glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
400 let mut v = self.governed_glossary_terms.unwrap_or_default();
401 v.push(input.into());
402 self.governed_glossary_terms = ::std::option::Option::Some(v);
403 self
404 }
405 pub fn set_governed_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
407 self.governed_glossary_terms = input;
408 self
409 }
410 pub fn get_governed_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
412 &self.governed_glossary_terms
413 }
414 pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
417 self.owning_project_id = ::std::option::Option::Some(input.into());
418 self
419 }
420 pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
422 self.owning_project_id = input;
423 self
424 }
425 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
427 &self.owning_project_id
428 }
429 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
432 self.domain_id = ::std::option::Option::Some(input.into());
433 self
434 }
435 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
437 self.domain_id = input;
438 self
439 }
440 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
442 &self.domain_id
443 }
444 pub fn listing(mut self, input: crate::types::AssetListingDetails) -> Self {
446 self.listing = ::std::option::Option::Some(input);
447 self
448 }
449 pub fn set_listing(mut self, input: ::std::option::Option<crate::types::AssetListingDetails>) -> Self {
451 self.listing = input;
452 self
453 }
454 pub fn get_listing(&self) -> &::std::option::Option<crate::types::AssetListingDetails> {
456 &self.listing
457 }
458 pub fn forms_output(mut self, input: crate::types::FormOutput) -> Self {
464 let mut v = self.forms_output.unwrap_or_default();
465 v.push(input);
466 self.forms_output = ::std::option::Option::Some(v);
467 self
468 }
469 pub fn set_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
471 self.forms_output = input;
472 self
473 }
474 pub fn get_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
476 &self.forms_output
477 }
478 pub fn read_only_forms_output(mut self, input: crate::types::FormOutput) -> Self {
484 let mut v = self.read_only_forms_output.unwrap_or_default();
485 v.push(input);
486 self.read_only_forms_output = ::std::option::Option::Some(v);
487 self
488 }
489 pub fn set_read_only_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
491 self.read_only_forms_output = input;
492 self
493 }
494 pub fn get_read_only_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
496 &self.read_only_forms_output
497 }
498 pub fn latest_time_series_data_point_forms_output(mut self, input: crate::types::TimeSeriesDataPointSummaryFormOutput) -> Self {
504 let mut v = self.latest_time_series_data_point_forms_output.unwrap_or_default();
505 v.push(input);
506 self.latest_time_series_data_point_forms_output = ::std::option::Option::Some(v);
507 self
508 }
509 pub fn set_latest_time_series_data_point_forms_output(
511 mut self,
512 input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
513 ) -> Self {
514 self.latest_time_series_data_point_forms_output = input;
515 self
516 }
517 pub fn get_latest_time_series_data_point_forms_output(
519 &self,
520 ) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>> {
521 &self.latest_time_series_data_point_forms_output
522 }
523 pub fn prediction_configuration(mut self, input: crate::types::PredictionConfiguration) -> Self {
525 self.prediction_configuration = ::std::option::Option::Some(input);
526 self
527 }
528 pub fn set_prediction_configuration(mut self, input: ::std::option::Option<crate::types::PredictionConfiguration>) -> Self {
530 self.prediction_configuration = input;
531 self
532 }
533 pub fn get_prediction_configuration(&self) -> &::std::option::Option<crate::types::PredictionConfiguration> {
535 &self.prediction_configuration
536 }
537 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
538 self._request_id = Some(request_id.into());
539 self
540 }
541
542 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
543 self._request_id = request_id;
544 self
545 }
546 pub fn build(self) -> ::std::result::Result<crate::operation::create_asset::CreateAssetOutput, ::aws_smithy_types::error::operation::BuildError> {
557 ::std::result::Result::Ok(crate::operation::create_asset::CreateAssetOutput {
558 id: self.id.ok_or_else(|| {
559 ::aws_smithy_types::error::operation::BuildError::missing_field(
560 "id",
561 "id was not specified but it is required when building CreateAssetOutput",
562 )
563 })?,
564 name: self.name.ok_or_else(|| {
565 ::aws_smithy_types::error::operation::BuildError::missing_field(
566 "name",
567 "name was not specified but it is required when building CreateAssetOutput",
568 )
569 })?,
570 type_identifier: self.type_identifier.ok_or_else(|| {
571 ::aws_smithy_types::error::operation::BuildError::missing_field(
572 "type_identifier",
573 "type_identifier was not specified but it is required when building CreateAssetOutput",
574 )
575 })?,
576 type_revision: self.type_revision.ok_or_else(|| {
577 ::aws_smithy_types::error::operation::BuildError::missing_field(
578 "type_revision",
579 "type_revision was not specified but it is required when building CreateAssetOutput",
580 )
581 })?,
582 external_identifier: self.external_identifier,
583 revision: self.revision.ok_or_else(|| {
584 ::aws_smithy_types::error::operation::BuildError::missing_field(
585 "revision",
586 "revision was not specified but it is required when building CreateAssetOutput",
587 )
588 })?,
589 description: self.description,
590 created_at: self.created_at,
591 created_by: self.created_by,
592 first_revision_created_at: self.first_revision_created_at,
593 first_revision_created_by: self.first_revision_created_by,
594 glossary_terms: self.glossary_terms,
595 governed_glossary_terms: self.governed_glossary_terms,
596 owning_project_id: self.owning_project_id.ok_or_else(|| {
597 ::aws_smithy_types::error::operation::BuildError::missing_field(
598 "owning_project_id",
599 "owning_project_id was not specified but it is required when building CreateAssetOutput",
600 )
601 })?,
602 domain_id: self.domain_id.ok_or_else(|| {
603 ::aws_smithy_types::error::operation::BuildError::missing_field(
604 "domain_id",
605 "domain_id was not specified but it is required when building CreateAssetOutput",
606 )
607 })?,
608 listing: self.listing,
609 forms_output: self.forms_output.ok_or_else(|| {
610 ::aws_smithy_types::error::operation::BuildError::missing_field(
611 "forms_output",
612 "forms_output was not specified but it is required when building CreateAssetOutput",
613 )
614 })?,
615 read_only_forms_output: self.read_only_forms_output,
616 latest_time_series_data_point_forms_output: self.latest_time_series_data_point_forms_output,
617 prediction_configuration: self.prediction_configuration,
618 _request_id: self._request_id,
619 })
620 }
621}
622impl ::std::fmt::Debug for CreateAssetOutputBuilder {
623 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
624 let mut formatter = f.debug_struct("CreateAssetOutputBuilder");
625 formatter.field("id", &self.id);
626 formatter.field("name", &"*** Sensitive Data Redacted ***");
627 formatter.field("type_identifier", &self.type_identifier);
628 formatter.field("type_revision", &self.type_revision);
629 formatter.field("external_identifier", &self.external_identifier);
630 formatter.field("revision", &self.revision);
631 formatter.field("description", &"*** Sensitive Data Redacted ***");
632 formatter.field("created_at", &self.created_at);
633 formatter.field("created_by", &self.created_by);
634 formatter.field("first_revision_created_at", &self.first_revision_created_at);
635 formatter.field("first_revision_created_by", &self.first_revision_created_by);
636 formatter.field("glossary_terms", &self.glossary_terms);
637 formatter.field("governed_glossary_terms", &self.governed_glossary_terms);
638 formatter.field("owning_project_id", &self.owning_project_id);
639 formatter.field("domain_id", &self.domain_id);
640 formatter.field("listing", &self.listing);
641 formatter.field("forms_output", &self.forms_output);
642 formatter.field("read_only_forms_output", &self.read_only_forms_output);
643 formatter.field(
644 "latest_time_series_data_point_forms_output",
645 &self.latest_time_series_data_point_forms_output,
646 );
647 formatter.field("prediction_configuration", &self.prediction_configuration);
648 formatter.field("_request_id", &self._request_id);
649 formatter.finish()
650 }
651}