aws_sdk_datazone/operation/create_asset/
_create_asset_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAssetInput {
pub name: ::std::option::Option<::std::string::String>,
pub domain_identifier: ::std::option::Option<::std::string::String>,
pub external_identifier: ::std::option::Option<::std::string::String>,
pub type_identifier: ::std::option::Option<::std::string::String>,
pub type_revision: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
pub owning_project_identifier: ::std::option::Option<::std::string::String>,
pub prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateAssetInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
self.domain_identifier.as_deref()
}
pub fn external_identifier(&self) -> ::std::option::Option<&str> {
self.external_identifier.as_deref()
}
pub fn type_identifier(&self) -> ::std::option::Option<&str> {
self.type_identifier.as_deref()
}
pub fn type_revision(&self) -> ::std::option::Option<&str> {
self.type_revision.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn glossary_terms(&self) -> &[::std::string::String] {
self.glossary_terms.as_deref().unwrap_or_default()
}
pub fn forms_input(&self) -> &[crate::types::FormInput] {
self.forms_input.as_deref().unwrap_or_default()
}
pub fn owning_project_identifier(&self) -> ::std::option::Option<&str> {
self.owning_project_identifier.as_deref()
}
pub fn prediction_configuration(&self) -> ::std::option::Option<&crate::types::PredictionConfiguration> {
self.prediction_configuration.as_ref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl ::std::fmt::Debug for CreateAssetInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssetInput");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("domain_identifier", &self.domain_identifier);
formatter.field("external_identifier", &self.external_identifier);
formatter.field("type_identifier", &self.type_identifier);
formatter.field("type_revision", &self.type_revision);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("forms_input", &"*** Sensitive Data Redacted ***");
formatter.field("owning_project_identifier", &self.owning_project_identifier);
formatter.field("prediction_configuration", &self.prediction_configuration);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
impl CreateAssetInput {
pub fn builder() -> crate::operation::create_asset::builders::CreateAssetInputBuilder {
crate::operation::create_asset::builders::CreateAssetInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAssetInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
pub(crate) external_identifier: ::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) description: ::std::option::Option<::std::string::String>,
pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) forms_input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>,
pub(crate) owning_project_identifier: ::std::option::Option<::std::string::String>,
pub(crate) prediction_configuration: ::std::option::Option<crate::types::PredictionConfiguration>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateAssetInputBuilder {
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 domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_identifier = input;
self
}
pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_identifier
}
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 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 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 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 forms_input(mut self, input: crate::types::FormInput) -> Self {
let mut v = self.forms_input.unwrap_or_default();
v.push(input);
self.forms_input = ::std::option::Option::Some(v);
self
}
pub fn set_forms_input(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormInput>>) -> Self {
self.forms_input = input;
self
}
pub fn get_forms_input(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormInput>> {
&self.forms_input
}
pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owning_project_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owning_project_identifier = input;
self
}
pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.owning_project_identifier
}
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 fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_asset::CreateAssetInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_asset::CreateAssetInput {
name: self.name,
domain_identifier: self.domain_identifier,
external_identifier: self.external_identifier,
type_identifier: self.type_identifier,
type_revision: self.type_revision,
description: self.description,
glossary_terms: self.glossary_terms,
forms_input: self.forms_input,
owning_project_identifier: self.owning_project_identifier,
prediction_configuration: self.prediction_configuration,
client_token: self.client_token,
})
}
}
impl ::std::fmt::Debug for CreateAssetInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssetInputBuilder");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("domain_identifier", &self.domain_identifier);
formatter.field("external_identifier", &self.external_identifier);
formatter.field("type_identifier", &self.type_identifier);
formatter.field("type_revision", &self.type_revision);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("forms_input", &"*** Sensitive Data Redacted ***");
formatter.field("owning_project_identifier", &self.owning_project_identifier);
formatter.field("prediction_configuration", &self.prediction_configuration);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}