#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAssetOutput {
pub id: ::std::string::String,
pub name: ::std::string::String,
pub type_identifier: ::std::string::String,
pub type_revision: ::std::string::String,
pub external_identifier: ::std::option::Option<::std::string::String>,
pub revision: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub created_by: ::std::option::Option<::std::string::String>,
pub first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub first_revision_created_by: ::std::option::Option<::std::string::String>,
pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub owning_project_id: ::std::string::String,
pub domain_id: ::std::string::String,
pub listing: ::std::option::Option<crate::types::AssetListingDetails>,
pub forms_output: ::std::vec::Vec<crate::types::FormOutput>,
pub read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
pub latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
pub prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
_request_id: Option<String>,
}
impl CreateAssetOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn type_identifier(&self) -> &str {
use std::ops::Deref;
self.type_identifier.deref()
}
pub fn type_revision(&self) -> &str {
use std::ops::Deref;
self.type_revision.deref()
}
pub fn external_identifier(&self) -> ::std::option::Option<&str> {
self.external_identifier.as_deref()
}
pub fn revision(&self) -> &str {
use std::ops::Deref;
self.revision.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn created_by(&self) -> ::std::option::Option<&str> {
self.created_by.as_deref()
}
pub fn first_revision_created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.first_revision_created_at.as_ref()
}
pub fn first_revision_created_by(&self) -> ::std::option::Option<&str> {
self.first_revision_created_by.as_deref()
}
pub fn glossary_terms(&self) -> &[::std::string::String] {
self.glossary_terms.as_deref().unwrap_or_default()
}
pub fn owning_project_id(&self) -> &str {
use std::ops::Deref;
self.owning_project_id.deref()
}
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn listing(&self) -> ::std::option::Option<&crate::types::AssetListingDetails> {
self.listing.as_ref()
}
pub fn forms_output(&self) -> &[crate::types::FormOutput] {
use std::ops::Deref;
self.forms_output.deref()
}
pub fn read_only_forms_output(&self) -> &[crate::types::FormOutput] {
self.read_only_forms_output.as_deref().unwrap_or_default()
}
pub fn latest_time_series_data_point_forms_output(&self) -> &[crate::types::TimeSeriesDataPointSummaryFormOutput] {
self.latest_time_series_data_point_forms_output.as_deref().unwrap_or_default()
}
pub fn prediction_configuration(&self) -> ::std::option::Option<&crate::types::PredictionConfiguration> {
self.prediction_configuration.as_ref()
}
}
impl ::std::fmt::Debug for CreateAssetOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssetOutput");
formatter.field("id", &self.id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("type_identifier", &self.type_identifier);
formatter.field("type_revision", &self.type_revision);
formatter.field("external_identifier", &self.external_identifier);
formatter.field("revision", &self.revision);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("created_by", &self.created_by);
formatter.field("first_revision_created_at", &self.first_revision_created_at);
formatter.field("first_revision_created_by", &self.first_revision_created_by);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("owning_project_id", &self.owning_project_id);
formatter.field("domain_id", &self.domain_id);
formatter.field("listing", &self.listing);
formatter.field("forms_output", &self.forms_output);
formatter.field("read_only_forms_output", &self.read_only_forms_output);
formatter.field(
"latest_time_series_data_point_forms_output",
&self.latest_time_series_data_point_forms_output,
);
formatter.field("prediction_configuration", &self.prediction_configuration);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateAssetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateAssetOutput {
pub fn builder() -> crate::operation::create_asset::builders::CreateAssetOutputBuilder {
crate::operation::create_asset::builders::CreateAssetOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAssetOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) type_identifier: ::std::option::Option<::std::string::String>,
pub(crate) type_revision: ::std::option::Option<::std::string::String>,
pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
pub(crate) revision: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) first_revision_created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) first_revision_created_by: ::std::option::Option<::std::string::String>,
pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) owning_project_id: ::std::option::Option<::std::string::String>,
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) listing: ::std::option::Option<crate::types::AssetListingDetails>,
pub(crate) forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
pub(crate) read_only_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
pub(crate) latest_time_series_data_point_forms_output: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
pub(crate) prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
_request_id: Option<String>,
}
impl CreateAssetOutputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn type_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_type_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_identifier = input;
self
}
pub fn get_type_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.type_identifier
}
pub fn type_revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_revision = ::std::option::Option::Some(input.into());
self
}
pub fn set_type_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_revision = input;
self
}
pub fn get_type_revision(&self) -> &::std::option::Option<::std::string::String> {
&self.type_revision
}
pub fn external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.external_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.external_identifier = input;
self
}
pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.external_identifier
}
pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision = ::std::option::Option::Some(input.into());
self
}
pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision = input;
self
}
pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
&self.revision
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn first_revision_created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.first_revision_created_at = ::std::option::Option::Some(input);
self
}
pub fn set_first_revision_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.first_revision_created_at = input;
self
}
pub fn get_first_revision_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.first_revision_created_at
}
pub fn first_revision_created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.first_revision_created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_first_revision_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.first_revision_created_by = input;
self
}
pub fn get_first_revision_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.first_revision_created_by
}
pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.glossary_terms.unwrap_or_default();
v.push(input.into());
self.glossary_terms = ::std::option::Option::Some(v);
self
}
pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.glossary_terms = input;
self
}
pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.glossary_terms
}
pub fn owning_project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owning_project_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owning_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owning_project_id = input;
self
}
pub fn get_owning_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owning_project_id
}
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn listing(mut self, input: crate::types::AssetListingDetails) -> Self {
self.listing = ::std::option::Option::Some(input);
self
}
pub fn set_listing(mut self, input: ::std::option::Option<crate::types::AssetListingDetails>) -> Self {
self.listing = input;
self
}
pub fn get_listing(&self) -> &::std::option::Option<crate::types::AssetListingDetails> {
&self.listing
}
pub fn forms_output(mut self, input: crate::types::FormOutput) -> Self {
let mut v = self.forms_output.unwrap_or_default();
v.push(input);
self.forms_output = ::std::option::Option::Some(v);
self
}
pub fn set_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
self.forms_output = input;
self
}
pub fn get_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
&self.forms_output
}
pub fn read_only_forms_output(mut self, input: crate::types::FormOutput) -> Self {
let mut v = self.read_only_forms_output.unwrap_or_default();
v.push(input);
self.read_only_forms_output = ::std::option::Option::Some(v);
self
}
pub fn set_read_only_forms_output(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
self.read_only_forms_output = input;
self
}
pub fn get_read_only_forms_output(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
&self.read_only_forms_output
}
pub fn latest_time_series_data_point_forms_output(mut self, input: crate::types::TimeSeriesDataPointSummaryFormOutput) -> Self {
let mut v = self.latest_time_series_data_point_forms_output.unwrap_or_default();
v.push(input);
self.latest_time_series_data_point_forms_output = ::std::option::Option::Some(v);
self
}
pub fn set_latest_time_series_data_point_forms_output(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>>,
) -> Self {
self.latest_time_series_data_point_forms_output = input;
self
}
pub fn get_latest_time_series_data_point_forms_output(
&self,
) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesDataPointSummaryFormOutput>> {
&self.latest_time_series_data_point_forms_output
}
pub fn prediction_configuration(mut self, input: crate::types::PredictionConfiguration) -> Self {
self.prediction_configuration = ::std::option::Option::Some(input);
self
}
pub fn set_prediction_configuration(mut self, input: ::std::option::Option<crate::types::PredictionConfiguration>) -> Self {
self.prediction_configuration = input;
self
}
pub fn get_prediction_configuration(&self) -> &::std::option::Option<crate::types::PredictionConfiguration> {
&self.prediction_configuration
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_asset::CreateAssetOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_asset::CreateAssetOutput {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building CreateAssetOutput",
)
})?,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building CreateAssetOutput",
)
})?,
type_identifier: self.type_identifier.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"type_identifier",
"type_identifier was not specified but it is required when building CreateAssetOutput",
)
})?,
type_revision: self.type_revision.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"type_revision",
"type_revision was not specified but it is required when building CreateAssetOutput",
)
})?,
external_identifier: self.external_identifier,
revision: self.revision.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"revision",
"revision was not specified but it is required when building CreateAssetOutput",
)
})?,
description: self.description,
created_at: self.created_at,
created_by: self.created_by,
first_revision_created_at: self.first_revision_created_at,
first_revision_created_by: self.first_revision_created_by,
glossary_terms: self.glossary_terms,
owning_project_id: self.owning_project_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"owning_project_id",
"owning_project_id was not specified but it is required when building CreateAssetOutput",
)
})?,
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building CreateAssetOutput",
)
})?,
listing: self.listing,
forms_output: self.forms_output.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"forms_output",
"forms_output was not specified but it is required when building CreateAssetOutput",
)
})?,
read_only_forms_output: self.read_only_forms_output,
latest_time_series_data_point_forms_output: self.latest_time_series_data_point_forms_output,
prediction_configuration: self.prediction_configuration,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateAssetOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssetOutputBuilder");
formatter.field("id", &self.id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("type_identifier", &self.type_identifier);
formatter.field("type_revision", &self.type_revision);
formatter.field("external_identifier", &self.external_identifier);
formatter.field("revision", &self.revision);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("created_by", &self.created_by);
formatter.field("first_revision_created_at", &self.first_revision_created_at);
formatter.field("first_revision_created_by", &self.first_revision_created_by);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("owning_project_id", &self.owning_project_id);
formatter.field("domain_id", &self.domain_id);
formatter.field("listing", &self.listing);
formatter.field("forms_output", &self.forms_output);
formatter.field("read_only_forms_output", &self.read_only_forms_output);
formatter.field(
"latest_time_series_data_point_forms_output",
&self.latest_time_series_data_point_forms_output,
);
formatter.field("prediction_configuration", &self.prediction_configuration);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}