#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateServiceAttributesInput {
pub service_id: ::std::option::Option<::std::string::String>,
pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateServiceAttributesInput {
pub fn service_id(&self) -> ::std::option::Option<&str> {
self.service_id.as_deref()
}
pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.attributes.as_ref()
}
}
impl UpdateServiceAttributesInput {
pub fn builder() -> crate::operation::update_service_attributes::builders::UpdateServiceAttributesInputBuilder {
crate::operation::update_service_attributes::builders::UpdateServiceAttributesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateServiceAttributesInputBuilder {
pub(crate) service_id: ::std::option::Option<::std::string::String>,
pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateServiceAttributesInputBuilder {
pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_id = input;
self
}
pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
&self.service_id
}
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_service_attributes::UpdateServiceAttributesInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_service_attributes::UpdateServiceAttributesInput {
service_id: self.service_id,
attributes: self.attributes,
})
}
}