module Stratosphere.Pinpoint.PushTemplate.DefaultPushNotificationTemplateProperty (
        DefaultPushNotificationTemplateProperty(..),
        mkDefaultPushNotificationTemplateProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DefaultPushNotificationTemplateProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html>
    DefaultPushNotificationTemplateProperty {DefaultPushNotificationTemplateProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-action>
                                             DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
action :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-body>
                                             DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-sound>
                                             DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-title>
                                             DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-url>
                                             DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty -> Bool
(DefaultPushNotificationTemplateProperty
 -> DefaultPushNotificationTemplateProperty -> Bool)
-> (DefaultPushNotificationTemplateProperty
    -> DefaultPushNotificationTemplateProperty -> Bool)
-> Eq DefaultPushNotificationTemplateProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty -> Bool
== :: DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty -> Bool
$c/= :: DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty -> Bool
/= :: DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty -> Bool
Prelude.Eq, Int -> DefaultPushNotificationTemplateProperty -> ShowS
[DefaultPushNotificationTemplateProperty] -> ShowS
DefaultPushNotificationTemplateProperty -> String
(Int -> DefaultPushNotificationTemplateProperty -> ShowS)
-> (DefaultPushNotificationTemplateProperty -> String)
-> ([DefaultPushNotificationTemplateProperty] -> ShowS)
-> Show DefaultPushNotificationTemplateProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DefaultPushNotificationTemplateProperty -> ShowS
showsPrec :: Int -> DefaultPushNotificationTemplateProperty -> ShowS
$cshow :: DefaultPushNotificationTemplateProperty -> String
show :: DefaultPushNotificationTemplateProperty -> String
$cshowList :: [DefaultPushNotificationTemplateProperty] -> ShowS
showList :: [DefaultPushNotificationTemplateProperty] -> ShowS
Prelude.Show)
mkDefaultPushNotificationTemplateProperty ::
  DefaultPushNotificationTemplateProperty
mkDefaultPushNotificationTemplateProperty :: DefaultPushNotificationTemplateProperty
mkDefaultPushNotificationTemplateProperty
  = DefaultPushNotificationTemplateProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), action :: Maybe (Value Text)
action = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       body :: Maybe (Value Text)
body = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sound :: Maybe (Value Text)
sound = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       title :: Maybe (Value Text)
title = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, url :: Maybe (Value Text)
url = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DefaultPushNotificationTemplateProperty where
  toResourceProperties :: DefaultPushNotificationTemplateProperty -> ResourceProperties
toResourceProperties DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::PushTemplate.DefaultPushNotificationTemplate",
         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
"Action" (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)
action,
                            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
"Sound" (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)
sound,
                            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
"Title" (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)
title,
                            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
"Url" (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)
url])}
instance JSON.ToJSON DefaultPushNotificationTemplateProperty where
  toJSON :: DefaultPushNotificationTemplateProperty -> Value
toJSON DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: 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
"Action" (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)
action,
               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
"Sound" (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)
sound,
               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
"Title" (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)
title,
               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
"Url" (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)
url]))
instance Property "Action" DefaultPushNotificationTemplateProperty where
  type PropertyType "Action" DefaultPushNotificationTemplateProperty = Value Prelude.Text
  set :: PropertyType "Action" DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
set PropertyType "Action" DefaultPushNotificationTemplateProperty
newValue DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = DefaultPushNotificationTemplateProperty
        {action :: Maybe (Value Text)
action = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Action" DefaultPushNotificationTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
haddock_workaround_ :: ()
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
instance Property "Body" DefaultPushNotificationTemplateProperty where
  type PropertyType "Body" DefaultPushNotificationTemplateProperty = Value Prelude.Text
  set :: PropertyType "Body" DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
set PropertyType "Body" DefaultPushNotificationTemplateProperty
newValue DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = DefaultPushNotificationTemplateProperty
        {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" DefaultPushNotificationTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
instance Property "Sound" DefaultPushNotificationTemplateProperty where
  type PropertyType "Sound" DefaultPushNotificationTemplateProperty = Value Prelude.Text
  set :: PropertyType "Sound" DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
set PropertyType "Sound" DefaultPushNotificationTemplateProperty
newValue DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = DefaultPushNotificationTemplateProperty
        {sound :: Maybe (Value Text)
sound = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Sound" DefaultPushNotificationTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
instance Property "Title" DefaultPushNotificationTemplateProperty where
  type PropertyType "Title" DefaultPushNotificationTemplateProperty = Value Prelude.Text
  set :: PropertyType "Title" DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
set PropertyType "Title" DefaultPushNotificationTemplateProperty
newValue DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = DefaultPushNotificationTemplateProperty
        {title :: Maybe (Value Text)
title = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Title" DefaultPushNotificationTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
url :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
instance Property "Url" DefaultPushNotificationTemplateProperty where
  type PropertyType "Url" DefaultPushNotificationTemplateProperty = Value Prelude.Text
  set :: PropertyType "Url" DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
-> DefaultPushNotificationTemplateProperty
set PropertyType "Url" DefaultPushNotificationTemplateProperty
newValue DefaultPushNotificationTemplateProperty {Maybe (Value Text)
()
haddock_workaround_ :: DefaultPushNotificationTemplateProperty -> ()
action :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
body :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
sound :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
title :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
url :: DefaultPushNotificationTemplateProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
url :: Maybe (Value Text)
..}
    = DefaultPushNotificationTemplateProperty
        {url :: Maybe (Value Text)
url = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Url" DefaultPushNotificationTemplateProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Maybe (Value Text)
body :: Maybe (Value Text)
sound :: Maybe (Value Text)
title :: Maybe (Value Text)
..}