aws_sdk_sagemaker/operation/create_artifact/
_create_artifact_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateArtifactInput {
    pub artifact_name: ::std::option::Option<::std::string::String>,
    pub source: ::std::option::Option<crate::types::ArtifactSource>,
    pub artifact_type: ::std::option::Option<::std::string::String>,
    pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateArtifactInput {
    pub fn artifact_name(&self) -> ::std::option::Option<&str> {
        self.artifact_name.as_deref()
    }
    pub fn source(&self) -> ::std::option::Option<&crate::types::ArtifactSource> {
        self.source.as_ref()
    }
    pub fn artifact_type(&self) -> ::std::option::Option<&str> {
        self.artifact_type.as_deref()
    }
    pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.properties.as_ref()
    }
    pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
        self.metadata_properties.as_ref()
    }
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateArtifactInput {
    pub fn builder() -> crate::operation::create_artifact::builders::CreateArtifactInputBuilder {
        crate::operation::create_artifact::builders::CreateArtifactInputBuilder::default()
    }
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateArtifactInputBuilder {
    pub(crate) artifact_name: ::std::option::Option<::std::string::String>,
    pub(crate) source: ::std::option::Option<crate::types::ArtifactSource>,
    pub(crate) artifact_type: ::std::option::Option<::std::string::String>,
    pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateArtifactInputBuilder {
    pub fn artifact_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.artifact_name = ::std::option::Option::Some(input.into());
        self
    }
    pub fn set_artifact_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.artifact_name = input;
        self
    }
    pub fn get_artifact_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.artifact_name
    }
    pub fn source(mut self, input: crate::types::ArtifactSource) -> Self {
        self.source = ::std::option::Option::Some(input);
        self
    }
    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ArtifactSource>) -> Self {
        self.source = input;
        self
    }
    pub fn get_source(&self) -> &::std::option::Option<crate::types::ArtifactSource> {
        &self.source
    }
    pub fn artifact_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.artifact_type = ::std::option::Option::Some(input.into());
        self
    }
    pub fn set_artifact_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.artifact_type = input;
        self
    }
    pub fn get_artifact_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.artifact_type
    }
    pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.properties.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.properties = ::std::option::Option::Some(hash_map);
        self
    }
    pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.properties = input;
        self
    }
    pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.properties
    }
    pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
        self.metadata_properties = ::std::option::Option::Some(input);
        self
    }
    pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
        self.metadata_properties = input;
        self
    }
    pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
        &self.metadata_properties
    }
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_artifact::CreateArtifactInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_artifact::CreateArtifactInput {
            artifact_name: self.artifact_name,
            source: self.source,
            artifact_type: self.artifact_type,
            properties: self.properties,
            metadata_properties: self.metadata_properties,
            tags: self.tags,
        })
    }
}