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 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 pub prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
44 _request_id: Option<String>,
45}
46impl CreateAssetOutput {
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 owning_project_id(&self) -> &str {
104 use std::ops::Deref;
105 self.owning_project_id.deref()
106 }
107 pub fn domain_id(&self) -> &str {
109 use std::ops::Deref;
110 self.domain_id.deref()
111 }
112 pub fn listing(&self) -> ::std::option::Option<&crate::types::AssetListingDetails> {
114 self.listing.as_ref()
115 }
116 pub fn forms_output(&self) -> &[crate::types::FormOutput] {
118 use std::ops::Deref;
119 self.forms_output.deref()
120 }
121 pub fn read_only_forms_output(&self) -> &[crate::types::FormOutput] {
125 self.read_only_forms_output.as_deref().unwrap_or_default()
126 }
127 pub fn latest_time_series_data_point_forms_output(&self) -> &[crate::types::TimeSeriesDataPointSummaryFormOutput] {
131 self.latest_time_series_data_point_forms_output.as_deref().unwrap_or_default()
132 }
133 pub fn prediction_configuration(&self) -> ::std::option::Option<&crate::types::PredictionConfiguration> {
135 self.prediction_configuration.as_ref()
136 }
137}
138impl ::std::fmt::Debug for CreateAssetOutput {
139 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
140 let mut formatter = f.debug_struct("CreateAssetOutput");
141 formatter.field("id", &self.id);
142 formatter.field("name", &"*** Sensitive Data Redacted ***");
143 formatter.field("type_identifier", &self.type_identifier);
144 formatter.field("type_revision", &self.type_revision);
145 formatter.field("external_identifier", &self.external_identifier);
146 formatter.field("revision", &self.revision);
147 formatter.field("description", &"*** Sensitive Data Redacted ***");
148 formatter.field("created_at", &self.created_at);
149 formatter.field("created_by", &self.created_by);
150 formatter.field("first_revision_created_at", &self.first_revision_created_at);
151 formatter.field("first_revision_created_by", &self.first_revision_created_by);
152 formatter.field("glossary_terms", &self.glossary_terms);
153 formatter.field("owning_project_id", &self.owning_project_id);
154 formatter.field("domain_id", &self.domain_id);
155 formatter.field("listing", &self.listing);
156 formatter.field("forms_output", &self.forms_output);
157 formatter.field("read_only_forms_output", &self.read_only_forms_output);
158 formatter.field(
159 "latest_time_series_data_point_forms_output",
160 &self.latest_time_series_data_point_forms_output,
161 );
162 formatter.field("prediction_configuration", &self.prediction_configuration);
163 formatter.field("_request_id", &self._request_id);
164 formatter.finish()
165 }
166}
167impl ::aws_types::request_id::RequestId for CreateAssetOutput {
168 fn request_id(&self) -> Option<&str> {
169 self._request_id.as_deref()
170 }
171}
172impl CreateAssetOutput {
173 pub fn builder() -> crate::operation::create_asset::builders::CreateAssetOutputBuilder {
175 crate::operation::create_asset::builders::CreateAssetOutputBuilder::default()
176 }
177}
178
179#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
181#[non_exhaustive]
182pub struct CreateAssetOutputBuilder {
183 pub(crate) id: ::std::option::Option<::std::string::String>,
184 pub(crate) name: ::std::option::Option<::std::string::String>,
185 pub(crate) type_identifier: ::std::option::Option<::std::string::String>,
186 pub(crate) type_revision: ::std::option::Option<::std::string::String>,
187 pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
188 pub(crate) revision: ::std::option::Option<::std::string::String>,
189 pub(crate) description: ::std::option::Option<::std::string::String>,
190 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
191 pub(crate) created_by: ::std::option::Option<::std::string::String>,
192 pub(crate) first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
193 pub(crate) first_revision_created_by: ::std::option::Option<::std::string::String>,
194 pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
195 pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
196 pub(crate) domain_id: ::std::option::Option<::std::string::String>,
197 pub(crate) listing: ::std::option::Option<crate::types::AssetListingDetails>,
198 pub(crate) forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
199 pub(crate) read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
200 pub(crate) latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
201 pub(crate) prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
202 _request_id: Option<String>,
203}
204impl CreateAssetOutputBuilder {
205 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208 self.id = ::std::option::Option::Some(input.into());
209 self
210 }
211 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213 self.id = input;
214 self
215 }
216 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
218 &self.id
219 }
220 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.name = ::std::option::Option::Some(input.into());
224 self
225 }
226 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.name = input;
229 self
230 }
231 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
233 &self.name
234 }
235 pub fn type_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.type_identifier = ::std::option::Option::Some(input.into());
239 self
240 }
241 pub fn set_type_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.type_identifier = input;
244 self
245 }
246 pub fn get_type_identifier(&self) -> &::std::option::Option<::std::string::String> {
248 &self.type_identifier
249 }
250 pub fn type_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253 self.type_revision = ::std::option::Option::Some(input.into());
254 self
255 }
256 pub fn set_type_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.type_revision = input;
259 self
260 }
261 pub fn get_type_revision(&self) -> &::std::option::Option<::std::string::String> {
263 &self.type_revision
264 }
265 pub fn external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.external_identifier = ::std::option::Option::Some(input.into());
268 self
269 }
270 pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.external_identifier = input;
273 self
274 }
275 pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
277 &self.external_identifier
278 }
279 pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282 self.revision = ::std::option::Option::Some(input.into());
283 self
284 }
285 pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287 self.revision = input;
288 self
289 }
290 pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
292 &self.revision
293 }
294 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
296 self.description = ::std::option::Option::Some(input.into());
297 self
298 }
299 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
301 self.description = input;
302 self
303 }
304 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
306 &self.description
307 }
308 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
310 self.created_at = ::std::option::Option::Some(input);
311 self
312 }
313 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
315 self.created_at = input;
316 self
317 }
318 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
320 &self.created_at
321 }
322 pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
324 self.created_by = ::std::option::Option::Some(input.into());
325 self
326 }
327 pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
329 self.created_by = input;
330 self
331 }
332 pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
334 &self.created_by
335 }
336 pub fn first_revision_created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
338 self.first_revision_created_at = ::std::option::Option::Some(input);
339 self
340 }
341 pub fn set_first_revision_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
343 self.first_revision_created_at = input;
344 self
345 }
346 pub fn get_first_revision_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
348 &self.first_revision_created_at
349 }
350 pub fn first_revision_created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
352 self.first_revision_created_by = ::std::option::Option::Some(input.into());
353 self
354 }
355 pub fn set_first_revision_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
357 self.first_revision_created_by = input;
358 self
359 }
360 pub fn get_first_revision_created_by(&self) -> &::std::option::Option<::std::string::String> {
362 &self.first_revision_created_by
363 }
364 pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370 let mut v = self.glossary_terms.unwrap_or_default();
371 v.push(input.into());
372 self.glossary_terms = ::std::option::Option::Some(v);
373 self
374 }
375 pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
377 self.glossary_terms = input;
378 self
379 }
380 pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
382 &self.glossary_terms
383 }
384 pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
387 self.owning_project_id = ::std::option::Option::Some(input.into());
388 self
389 }
390 pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
392 self.owning_project_id = input;
393 self
394 }
395 pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
397 &self.owning_project_id
398 }
399 pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402 self.domain_id = ::std::option::Option::Some(input.into());
403 self
404 }
405 pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
407 self.domain_id = input;
408 self
409 }
410 pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
412 &self.domain_id
413 }
414 pub fn listing(mut self, input: crate::types::AssetListingDetails) -> Self {
416 self.listing = ::std::option::Option::Some(input);
417 self
418 }
419 pub fn set_listing(mut self, input: ::std::option::Option<crate::types::AssetListingDetails>) -> Self {
421 self.listing = input;
422 self
423 }
424 pub fn get_listing(&self) -> &::std::option::Option<crate::types::AssetListingDetails> {
426 &self.listing
427 }
428 pub fn forms_output(mut self, input: crate::types::FormOutput) -> Self {
434 let mut v = self.forms_output.unwrap_or_default();
435 v.push(input);
436 self.forms_output = ::std::option::Option::Some(v);
437 self
438 }
439 pub fn set_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
441 self.forms_output = input;
442 self
443 }
444 pub fn get_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
446 &self.forms_output
447 }
448 pub fn read_only_forms_output(mut self, input: crate::types::FormOutput) -> Self {
454 let mut v = self.read_only_forms_output.unwrap_or_default();
455 v.push(input);
456 self.read_only_forms_output = ::std::option::Option::Some(v);
457 self
458 }
459 pub fn set_read_only_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
461 self.read_only_forms_output = input;
462 self
463 }
464 pub fn get_read_only_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
466 &self.read_only_forms_output
467 }
468 pub fn latest_time_series_data_point_forms_output(mut self, input: crate::types::TimeSeriesDataPointSummaryFormOutput) -> Self {
474 let mut v = self.latest_time_series_data_point_forms_output.unwrap_or_default();
475 v.push(input);
476 self.latest_time_series_data_point_forms_output = ::std::option::Option::Some(v);
477 self
478 }
479 pub fn set_latest_time_series_data_point_forms_output(
481 mut self,
482 input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
483 ) -> Self {
484 self.latest_time_series_data_point_forms_output = input;
485 self
486 }
487 pub fn get_latest_time_series_data_point_forms_output(
489 &self,
490 ) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>> {
491 &self.latest_time_series_data_point_forms_output
492 }
493 pub fn prediction_configuration(mut self, input: crate::types::PredictionConfiguration) -> Self {
495 self.prediction_configuration = ::std::option::Option::Some(input);
496 self
497 }
498 pub fn set_prediction_configuration(mut self, input: ::std::option::Option<crate::types::PredictionConfiguration>) -> Self {
500 self.prediction_configuration = input;
501 self
502 }
503 pub fn get_prediction_configuration(&self) -> &::std::option::Option<crate::types::PredictionConfiguration> {
505 &self.prediction_configuration
506 }
507 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
508 self._request_id = Some(request_id.into());
509 self
510 }
511
512 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
513 self._request_id = request_id;
514 self
515 }
516 pub fn build(self) -> ::std::result::Result<crate::operation::create_asset::CreateAssetOutput, ::aws_smithy_types::error::operation::BuildError> {
527 ::std::result::Result::Ok(crate::operation::create_asset::CreateAssetOutput {
528 id: self.id.ok_or_else(|| {
529 ::aws_smithy_types::error::operation::BuildError::missing_field(
530 "id",
531 "id was not specified but it is required when building CreateAssetOutput",
532 )
533 })?,
534 name: self.name.ok_or_else(|| {
535 ::aws_smithy_types::error::operation::BuildError::missing_field(
536 "name",
537 "name was not specified but it is required when building CreateAssetOutput",
538 )
539 })?,
540 type_identifier: self.type_identifier.ok_or_else(|| {
541 ::aws_smithy_types::error::operation::BuildError::missing_field(
542 "type_identifier",
543 "type_identifier was not specified but it is required when building CreateAssetOutput",
544 )
545 })?,
546 type_revision: self.type_revision.ok_or_else(|| {
547 ::aws_smithy_types::error::operation::BuildError::missing_field(
548 "type_revision",
549 "type_revision was not specified but it is required when building CreateAssetOutput",
550 )
551 })?,
552 external_identifier: self.external_identifier,
553 revision: self.revision.ok_or_else(|| {
554 ::aws_smithy_types::error::operation::BuildError::missing_field(
555 "revision",
556 "revision was not specified but it is required when building CreateAssetOutput",
557 )
558 })?,
559 description: self.description,
560 created_at: self.created_at,
561 created_by: self.created_by,
562 first_revision_created_at: self.first_revision_created_at,
563 first_revision_created_by: self.first_revision_created_by,
564 glossary_terms: self.glossary_terms,
565 owning_project_id: self.owning_project_id.ok_or_else(|| {
566 ::aws_smithy_types::error::operation::BuildError::missing_field(
567 "owning_project_id",
568 "owning_project_id was not specified but it is required when building CreateAssetOutput",
569 )
570 })?,
571 domain_id: self.domain_id.ok_or_else(|| {
572 ::aws_smithy_types::error::operation::BuildError::missing_field(
573 "domain_id",
574 "domain_id was not specified but it is required when building CreateAssetOutput",
575 )
576 })?,
577 listing: self.listing,
578 forms_output: self.forms_output.ok_or_else(|| {
579 ::aws_smithy_types::error::operation::BuildError::missing_field(
580 "forms_output",
581 "forms_output was not specified but it is required when building CreateAssetOutput",
582 )
583 })?,
584 read_only_forms_output: self.read_only_forms_output,
585 latest_time_series_data_point_forms_output: self.latest_time_series_data_point_forms_output,
586 prediction_configuration: self.prediction_configuration,
587 _request_id: self._request_id,
588 })
589 }
590}
591impl ::std::fmt::Debug for CreateAssetOutputBuilder {
592 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
593 let mut formatter = f.debug_struct("CreateAssetOutputBuilder");
594 formatter.field("id", &self.id);
595 formatter.field("name", &"*** Sensitive Data Redacted ***");
596 formatter.field("type_identifier", &self.type_identifier);
597 formatter.field("type_revision", &self.type_revision);
598 formatter.field("external_identifier", &self.external_identifier);
599 formatter.field("revision", &self.revision);
600 formatter.field("description", &"*** Sensitive Data Redacted ***");
601 formatter.field("created_at", &self.created_at);
602 formatter.field("created_by", &self.created_by);
603 formatter.field("first_revision_created_at", &self.first_revision_created_at);
604 formatter.field("first_revision_created_by", &self.first_revision_created_by);
605 formatter.field("glossary_terms", &self.glossary_terms);
606 formatter.field("owning_project_id", &self.owning_project_id);
607 formatter.field("domain_id", &self.domain_id);
608 formatter.field("listing", &self.listing);
609 formatter.field("forms_output", &self.forms_output);
610 formatter.field("read_only_forms_output", &self.read_only_forms_output);
611 formatter.field(
612 "latest_time_series_data_point_forms_output",
613 &self.latest_time_series_data_point_forms_output,
614 );
615 formatter.field("prediction_configuration", &self.prediction_configuration);
616 formatter.field("_request_id", &self._request_id);
617 formatter.finish()
618 }
619}