#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateActionInput {
pub action_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub status: ::std::option::Option<crate::types::ActionStatus>,
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 UpdateActionInput {
pub fn action_name(&self) -> ::std::option::Option<&str> {
self.action_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn status(&self) -> ::std::option::Option<&crate::types::ActionStatus> {
self.status.as_ref()
}
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::option::Option<&[::std::string::String]> {
self.properties_to_remove.as_deref()
}
}
impl UpdateActionInput {
pub fn builder() -> crate::operation::update_action::builders::UpdateActionInputBuilder {
crate::operation::update_action::builders::UpdateActionInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateActionInputBuilder {
pub(crate) action_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::ActionStatus>,
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 UpdateActionInputBuilder {
pub fn action_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.action_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.action_name = input;
self
}
pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
&self.action_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 status(mut self, input: crate::types::ActionStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ActionStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::ActionStatus> {
&self.status
}
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_action::UpdateActionInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::update_action::UpdateActionInput {
action_name: self.action_name,
description: self.description,
status: self.status,
properties: self.properties,
properties_to_remove: self.properties_to_remove,
})
}
}