module Stratosphere.SES.MailManagerRuleSet.ReplaceRecipientActionProperty (
ReplaceRecipientActionProperty(..),
mkReplaceRecipientActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReplaceRecipientActionProperty
=
ReplaceRecipientActionProperty {ReplaceRecipientActionProperty -> ()
haddock_workaround_ :: (),
ReplaceRecipientActionProperty -> Maybe (ValueList Text)
replaceWith :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool
(ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool)
-> (ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool)
-> Eq ReplaceRecipientActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool
== :: ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool
$c/= :: ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool
/= :: ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> Bool
Prelude.Eq, Int -> ReplaceRecipientActionProperty -> ShowS
[ReplaceRecipientActionProperty] -> ShowS
ReplaceRecipientActionProperty -> String
(Int -> ReplaceRecipientActionProperty -> ShowS)
-> (ReplaceRecipientActionProperty -> String)
-> ([ReplaceRecipientActionProperty] -> ShowS)
-> Show ReplaceRecipientActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplaceRecipientActionProperty -> ShowS
showsPrec :: Int -> ReplaceRecipientActionProperty -> ShowS
$cshow :: ReplaceRecipientActionProperty -> String
show :: ReplaceRecipientActionProperty -> String
$cshowList :: [ReplaceRecipientActionProperty] -> ShowS
showList :: [ReplaceRecipientActionProperty] -> ShowS
Prelude.Show)
mkReplaceRecipientActionProperty :: ReplaceRecipientActionProperty
mkReplaceRecipientActionProperty :: ReplaceRecipientActionProperty
mkReplaceRecipientActionProperty
= ReplaceRecipientActionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), replaceWith :: Maybe (ValueList Text)
replaceWith = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReplaceRecipientActionProperty where
toResourceProperties :: ReplaceRecipientActionProperty -> ResourceProperties
toResourceProperties ReplaceRecipientActionProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ReplaceRecipientActionProperty -> ()
replaceWith :: ReplaceRecipientActionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
replaceWith :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SES::MailManagerRuleSet.ReplaceRecipientAction",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplaceWith" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
replaceWith])}
instance JSON.ToJSON ReplaceRecipientActionProperty where
toJSON :: ReplaceRecipientActionProperty -> Value
toJSON ReplaceRecipientActionProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ReplaceRecipientActionProperty -> ()
replaceWith :: ReplaceRecipientActionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
replaceWith :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplaceWith" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
replaceWith]))
instance Property "ReplaceWith" ReplaceRecipientActionProperty where
type PropertyType "ReplaceWith" ReplaceRecipientActionProperty = ValueList Prelude.Text
set :: PropertyType "ReplaceWith" ReplaceRecipientActionProperty
-> ReplaceRecipientActionProperty -> ReplaceRecipientActionProperty
set PropertyType "ReplaceWith" ReplaceRecipientActionProperty
newValue ReplaceRecipientActionProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ReplaceRecipientActionProperty -> ()
replaceWith :: ReplaceRecipientActionProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
replaceWith :: Maybe (ValueList Text)
..}
= ReplaceRecipientActionProperty
{replaceWith :: Maybe (ValueList Text)
replaceWith = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplaceWith" ReplaceRecipientActionProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}