#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateArtifactInput {
pub artifact_arn: ::std::option::Option<::std::string::String>,
pub artifact_name: ::std::option::Option<::std::string::String>,
pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub properties_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateArtifactInput {
pub fn artifact_arn(&self) -> ::std::option::Option<&str> {
self.artifact_arn.as_deref()
}
pub fn artifact_name(&self) -> ::std::option::Option<&str> {
self.artifact_name.as_deref()
}
pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.properties.as_ref()
}
pub fn properties_to_remove(&self) -> &[::std::string::String] {
self.properties_to_remove.as_deref().unwrap_or_default()
}
}
impl UpdateArtifactInput {
pub fn builder() -> crate::operation::update_artifact::builders::UpdateArtifactInputBuilder {
crate::operation::update_artifact::builders::UpdateArtifactInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateArtifactInputBuilder {
pub(crate) artifact_arn: ::std::option::Option<::std::string::String>,
pub(crate) artifact_name: ::std::option::Option<::std::string::String>,
pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) properties_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateArtifactInputBuilder {
pub fn artifact_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.artifact_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_artifact_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.artifact_arn = input;
self
}
pub fn get_artifact_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.artifact_arn
}
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 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 properties_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.properties_to_remove.unwrap_or_default();
v.push(input.into());
self.properties_to_remove = ::std::option::Option::Some(v);
self
}
pub fn set_properties_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.properties_to_remove = input;
self
}
pub fn get_properties_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.properties_to_remove
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_artifact::UpdateArtifactInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_artifact::UpdateArtifactInput {
artifact_arn: self.artifact_arn,
artifact_name: self.artifact_name,
properties: self.properties,
properties_to_remove: self.properties_to_remove,
})
}
}