#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePlacementInput {
pub placement_name: ::std::option::Option<::std::string::String>,
pub project_name: ::std::option::Option<::std::string::String>,
pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdatePlacementInput {
pub fn placement_name(&self) -> ::std::option::Option<&str> {
self.placement_name.as_deref()
}
pub fn project_name(&self) -> ::std::option::Option<&str> {
self.project_name.as_deref()
}
pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.attributes.as_ref()
}
}
impl UpdatePlacementInput {
pub fn builder() -> crate::operation::update_placement::builders::UpdatePlacementInputBuilder {
crate::operation::update_placement::builders::UpdatePlacementInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdatePlacementInputBuilder {
pub(crate) placement_name: ::std::option::Option<::std::string::String>,
pub(crate) project_name: ::std::option::Option<::std::string::String>,
pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdatePlacementInputBuilder {
pub fn placement_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.placement_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_placement_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.placement_name = input;
self
}
pub fn get_placement_name(&self) -> &::std::option::Option<::std::string::String> {
&self.placement_name
}
pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_name = input;
self
}
pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
&self.project_name
}
pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.attributes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.attributes = ::std::option::Option::Some(hash_map);
self
}
pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.attributes = input;
self
}
pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.attributes
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_placement::UpdatePlacementInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::update_placement::UpdatePlacementInput {
placement_name: self.placement_name,
project_name: self.project_name,
attributes: self.attributes,
})
}
}