module Stratosphere.Pinpoint.Campaign.InAppMessageBodyConfigProperty (
InAppMessageBodyConfigProperty(..),
mkInAppMessageBodyConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InAppMessageBodyConfigProperty
=
InAppMessageBodyConfigProperty {InAppMessageBodyConfigProperty -> ()
haddock_workaround_ :: (),
InAppMessageBodyConfigProperty -> Maybe (Value Text)
alignment :: (Prelude.Maybe (Value Prelude.Text)),
InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: (Prelude.Maybe (Value Prelude.Text)),
InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool
(InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool)
-> (InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool)
-> Eq InAppMessageBodyConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool
== :: InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool
$c/= :: InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool
/= :: InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> Bool
Prelude.Eq, Int -> InAppMessageBodyConfigProperty -> ShowS
[InAppMessageBodyConfigProperty] -> ShowS
InAppMessageBodyConfigProperty -> String
(Int -> InAppMessageBodyConfigProperty -> ShowS)
-> (InAppMessageBodyConfigProperty -> String)
-> ([InAppMessageBodyConfigProperty] -> ShowS)
-> Show InAppMessageBodyConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InAppMessageBodyConfigProperty -> ShowS
showsPrec :: Int -> InAppMessageBodyConfigProperty -> ShowS
$cshow :: InAppMessageBodyConfigProperty -> String
show :: InAppMessageBodyConfigProperty -> String
$cshowList :: [InAppMessageBodyConfigProperty] -> ShowS
showList :: [InAppMessageBodyConfigProperty] -> ShowS
Prelude.Show)
mkInAppMessageBodyConfigProperty :: InAppMessageBodyConfigProperty
mkInAppMessageBodyConfigProperty :: InAppMessageBodyConfigProperty
mkInAppMessageBodyConfigProperty
= InAppMessageBodyConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), alignment :: Maybe (Value Text)
alignment = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
body :: Maybe (Value Text)
body = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, textColor :: Maybe (Value Text)
textColor = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InAppMessageBodyConfigProperty where
toResourceProperties :: InAppMessageBodyConfigProperty -> ResourceProperties
toResourceProperties InAppMessageBodyConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: InAppMessageBodyConfigProperty -> ()
alignment :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::Campaign.InAppMessageBodyConfig",
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 -> Value 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
"Alignment" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
alignment,
Key -> Value 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
"Body" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
body,
Key -> Value 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
"TextColor" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
textColor])}
instance JSON.ToJSON InAppMessageBodyConfigProperty where
toJSON :: InAppMessageBodyConfigProperty -> Value
toJSON InAppMessageBodyConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: InAppMessageBodyConfigProperty -> ()
alignment :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
textColor :: Maybe (Value 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 -> Value 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
"Alignment" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
alignment,
Key -> Value 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
"Body" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
body,
Key -> Value 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
"TextColor" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
textColor]))
instance Property "Alignment" InAppMessageBodyConfigProperty where
type PropertyType "Alignment" InAppMessageBodyConfigProperty = Value Prelude.Text
set :: PropertyType "Alignment" InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> InAppMessageBodyConfigProperty
set PropertyType "Alignment" InAppMessageBodyConfigProperty
newValue InAppMessageBodyConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: InAppMessageBodyConfigProperty -> ()
alignment :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
= InAppMessageBodyConfigProperty
{alignment :: Maybe (Value Text)
alignment = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Alignment" InAppMessageBodyConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
haddock_workaround_ :: ()
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
instance Property "Body" InAppMessageBodyConfigProperty where
type PropertyType "Body" InAppMessageBodyConfigProperty = Value Prelude.Text
set :: PropertyType "Body" InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> InAppMessageBodyConfigProperty
set PropertyType "Body" InAppMessageBodyConfigProperty
newValue InAppMessageBodyConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: InAppMessageBodyConfigProperty -> ()
alignment :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
= InAppMessageBodyConfigProperty {body :: Maybe (Value Text)
body = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Body" InAppMessageBodyConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
textColor :: Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
instance Property "TextColor" InAppMessageBodyConfigProperty where
type PropertyType "TextColor" InAppMessageBodyConfigProperty = Value Prelude.Text
set :: PropertyType "TextColor" InAppMessageBodyConfigProperty
-> InAppMessageBodyConfigProperty -> InAppMessageBodyConfigProperty
set PropertyType "TextColor" InAppMessageBodyConfigProperty
newValue InAppMessageBodyConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: InAppMessageBodyConfigProperty -> ()
alignment :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
body :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
textColor :: InAppMessageBodyConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
textColor :: Maybe (Value Text)
..}
= InAppMessageBodyConfigProperty
{textColor :: Maybe (Value Text)
textColor = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TextColor" InAppMessageBodyConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
haddock_workaround_ :: ()
alignment :: Maybe (Value Text)
body :: Maybe (Value Text)
..}