#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateActionInput {
#[doc(hidden)]
pub action_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::types::ActionStatus>,
#[doc(hidden)]
pub properties:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
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 Into<std::string::String>) -> Self {
self.action_name = 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 description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn status(mut self, input: crate::types::ActionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(mut self, input: std::option::Option<crate::types::ActionStatus>) -> Self {
self.status = input;
self
}
pub fn properties(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.properties.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.properties = 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 properties_to_remove(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.properties_to_remove.unwrap_or_default();
v.push(input.into());
self.properties_to_remove = 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 build(
self,
) -> Result<
crate::operation::update_action::UpdateActionInput,
aws_smithy_http::operation::error::BuildError,
> {
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,
})
}
}