module Stratosphere.Pinpoint.InAppTemplate (
module Exports, InAppTemplate(..), mkInAppTemplate
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Pinpoint.InAppTemplate.InAppMessageContentProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InAppTemplate
=
InAppTemplate {InAppTemplate -> ()
haddock_workaround_ :: (),
InAppTemplate -> Maybe [InAppMessageContentProperty]
content :: (Prelude.Maybe [InAppMessageContentProperty]),
InAppTemplate -> Maybe Object
customConfig :: (Prelude.Maybe JSON.Object),
InAppTemplate -> Maybe (Value Text)
layout :: (Prelude.Maybe (Value Prelude.Text)),
InAppTemplate -> Maybe Object
tags :: (Prelude.Maybe JSON.Object),
InAppTemplate -> Maybe (Value Text)
templateDescription :: (Prelude.Maybe (Value Prelude.Text)),
InAppTemplate -> Value Text
templateName :: (Value Prelude.Text)}
deriving stock (InAppTemplate -> InAppTemplate -> Bool
(InAppTemplate -> InAppTemplate -> Bool)
-> (InAppTemplate -> InAppTemplate -> Bool) -> Eq InAppTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InAppTemplate -> InAppTemplate -> Bool
== :: InAppTemplate -> InAppTemplate -> Bool
$c/= :: InAppTemplate -> InAppTemplate -> Bool
/= :: InAppTemplate -> InAppTemplate -> Bool
Prelude.Eq, Int -> InAppTemplate -> ShowS
[InAppTemplate] -> ShowS
InAppTemplate -> String
(Int -> InAppTemplate -> ShowS)
-> (InAppTemplate -> String)
-> ([InAppTemplate] -> ShowS)
-> Show InAppTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InAppTemplate -> ShowS
showsPrec :: Int -> InAppTemplate -> ShowS
$cshow :: InAppTemplate -> String
show :: InAppTemplate -> String
$cshowList :: [InAppTemplate] -> ShowS
showList :: [InAppTemplate] -> ShowS
Prelude.Show)
mkInAppTemplate :: Value Prelude.Text -> InAppTemplate
mkInAppTemplate :: Value Text -> InAppTemplate
mkInAppTemplate Value Text
templateName
= InAppTemplate
{haddock_workaround_ :: ()
haddock_workaround_ = (), templateName :: Value Text
templateName = Value Text
templateName,
content :: Maybe [InAppMessageContentProperty]
content = Maybe [InAppMessageContentProperty]
forall a. Maybe a
Prelude.Nothing, customConfig :: Maybe Object
customConfig = Maybe Object
forall a. Maybe a
Prelude.Nothing,
layout :: Maybe (Value Text)
layout = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe Object
tags = Maybe Object
forall a. Maybe a
Prelude.Nothing,
templateDescription :: Maybe (Value Text)
templateDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InAppTemplate where
toResourceProperties :: InAppTemplate -> ResourceProperties
toResourceProperties InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Pinpoint::InAppTemplate",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"TemplateName" 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..= Value Text
templateName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [InAppMessageContentProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Content" ([InAppMessageContentProperty] -> (Key, Value))
-> Maybe [InAppMessageContentProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InAppMessageContentProperty]
content,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomConfig" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
customConfig,
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
"Layout" (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)
layout,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tags,
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
"TemplateDescription" (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)
templateDescription]))}
instance JSON.ToJSON InAppTemplate where
toJSON :: InAppTemplate -> Value
toJSON InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"TemplateName" 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..= Value Text
templateName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [InAppMessageContentProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Content" ([InAppMessageContentProperty] -> (Key, Value))
-> Maybe [InAppMessageContentProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InAppMessageContentProperty]
content,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomConfig" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
customConfig,
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
"Layout" (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)
layout,
Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tags,
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
"TemplateDescription" (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)
templateDescription])))
instance Property "Content" InAppTemplate where
type PropertyType "Content" InAppTemplate = [InAppMessageContentProperty]
set :: PropertyType "Content" InAppTemplate
-> InAppTemplate -> InAppTemplate
set PropertyType "Content" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {content :: Maybe [InAppMessageContentProperty]
content = [InAppMessageContentProperty]
-> Maybe [InAppMessageContentProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [InAppMessageContentProperty]
PropertyType "Content" InAppTemplate
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "CustomConfig" InAppTemplate where
type PropertyType "CustomConfig" InAppTemplate = JSON.Object
set :: PropertyType "CustomConfig" InAppTemplate
-> InAppTemplate -> InAppTemplate
set PropertyType "CustomConfig" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {customConfig :: Maybe Object
customConfig = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "CustomConfig" InAppTemplate
newValue, Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "Layout" InAppTemplate where
type PropertyType "Layout" InAppTemplate = Value Prelude.Text
set :: PropertyType "Layout" InAppTemplate
-> InAppTemplate -> InAppTemplate
set PropertyType "Layout" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {layout :: Maybe (Value Text)
layout = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Layout" InAppTemplate
Value Text
newValue, Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "Tags" InAppTemplate where
type PropertyType "Tags" InAppTemplate = JSON.Object
set :: PropertyType "Tags" InAppTemplate -> InAppTemplate -> InAppTemplate
set PropertyType "Tags" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {tags :: Maybe Object
tags = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "Tags" InAppTemplate
newValue, Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "TemplateDescription" InAppTemplate where
type PropertyType "TemplateDescription" InAppTemplate = Value Prelude.Text
set :: PropertyType "TemplateDescription" InAppTemplate
-> InAppTemplate -> InAppTemplate
set PropertyType "TemplateDescription" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {templateDescription :: Maybe (Value Text)
templateDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TemplateDescription" InAppTemplate
Value Text
newValue, Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateName :: Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateName :: Value Text
..}
instance Property "TemplateName" InAppTemplate where
type PropertyType "TemplateName" InAppTemplate = Value Prelude.Text
set :: PropertyType "TemplateName" InAppTemplate
-> InAppTemplate -> InAppTemplate
set PropertyType "TemplateName" InAppTemplate
newValue InAppTemplate {Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InAppTemplate -> ()
content :: InAppTemplate -> Maybe [InAppMessageContentProperty]
customConfig :: InAppTemplate -> Maybe Object
layout :: InAppTemplate -> Maybe (Value Text)
tags :: InAppTemplate -> Maybe Object
templateDescription :: InAppTemplate -> Maybe (Value Text)
templateName :: InAppTemplate -> Value Text
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
= InAppTemplate {templateName :: Value Text
templateName = PropertyType "TemplateName" InAppTemplate
Value Text
newValue, Maybe [InAppMessageContentProperty]
Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
haddock_workaround_ :: ()
content :: Maybe [InAppMessageContentProperty]
customConfig :: Maybe Object
layout :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
..}