#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateContextInput {
pub context_name: ::std::option::Option<::std::string::String>,
pub description: ::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 UpdateContextInput {
pub fn context_name(&self) -> ::std::option::Option<&str> {
self.context_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.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 UpdateContextInput {
pub fn builder() -> crate::operation::update_context::builders::UpdateContextInputBuilder {
crate::operation::update_context::builders::UpdateContextInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateContextInputBuilder {
pub(crate) context_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::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 UpdateContextInputBuilder {
pub fn context_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.context_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_context_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.context_name = input;
self
}
pub fn get_context_name(&self) -> &::std::option::Option<::std::string::String> {
&self.context_name
}
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 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_context::UpdateContextInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_context::UpdateContextInput {
context_name: self.context_name,
description: self.description,
properties: self.properties,
properties_to_remove: self.properties_to_remove,
})
}
}