module Stratosphere.Pinpoint.Campaign.TemplateConfigurationProperty (
        module Exports, TemplateConfigurationProperty(..),
        mkTemplateConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Pinpoint.Campaign.TemplateProperty as Exports
import Stratosphere.ResourceProperties
data TemplateConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html>
    TemplateConfigurationProperty {TemplateConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-emailtemplate>
                                   TemplateConfigurationProperty -> Maybe TemplateProperty
emailTemplate :: (Prelude.Maybe TemplateProperty),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-pushtemplate>
                                   TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: (Prelude.Maybe TemplateProperty),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-smstemplate>
                                   TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: (Prelude.Maybe TemplateProperty),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-voicetemplate>
                                   TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: (Prelude.Maybe TemplateProperty)}
  deriving stock (TemplateConfigurationProperty
-> TemplateConfigurationProperty -> Bool
(TemplateConfigurationProperty
 -> TemplateConfigurationProperty -> Bool)
-> (TemplateConfigurationProperty
    -> TemplateConfigurationProperty -> Bool)
-> Eq TemplateConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TemplateConfigurationProperty
-> TemplateConfigurationProperty -> Bool
== :: TemplateConfigurationProperty
-> TemplateConfigurationProperty -> Bool
$c/= :: TemplateConfigurationProperty
-> TemplateConfigurationProperty -> Bool
/= :: TemplateConfigurationProperty
-> TemplateConfigurationProperty -> Bool
Prelude.Eq, Int -> TemplateConfigurationProperty -> ShowS
[TemplateConfigurationProperty] -> ShowS
TemplateConfigurationProperty -> String
(Int -> TemplateConfigurationProperty -> ShowS)
-> (TemplateConfigurationProperty -> String)
-> ([TemplateConfigurationProperty] -> ShowS)
-> Show TemplateConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TemplateConfigurationProperty -> ShowS
showsPrec :: Int -> TemplateConfigurationProperty -> ShowS
$cshow :: TemplateConfigurationProperty -> String
show :: TemplateConfigurationProperty -> String
$cshowList :: [TemplateConfigurationProperty] -> ShowS
showList :: [TemplateConfigurationProperty] -> ShowS
Prelude.Show)
mkTemplateConfigurationProperty :: TemplateConfigurationProperty
mkTemplateConfigurationProperty :: TemplateConfigurationProperty
mkTemplateConfigurationProperty
  = TemplateConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), emailTemplate :: Maybe TemplateProperty
emailTemplate = Maybe TemplateProperty
forall a. Maybe a
Prelude.Nothing,
       pushTemplate :: Maybe TemplateProperty
pushTemplate = Maybe TemplateProperty
forall a. Maybe a
Prelude.Nothing, sMSTemplate :: Maybe TemplateProperty
sMSTemplate = Maybe TemplateProperty
forall a. Maybe a
Prelude.Nothing,
       voiceTemplate :: Maybe TemplateProperty
voiceTemplate = Maybe TemplateProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TemplateConfigurationProperty where
  toResourceProperties :: TemplateConfigurationProperty -> ResourceProperties
toResourceProperties TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::Campaign.TemplateConfiguration",
         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 -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EmailTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
emailTemplate,
                            Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PushTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
pushTemplate,
                            Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SMSTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
sMSTemplate,
                            Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VoiceTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
voiceTemplate])}
instance JSON.ToJSON TemplateConfigurationProperty where
  toJSON :: TemplateConfigurationProperty -> Value
toJSON TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = [(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 -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EmailTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
emailTemplate,
               Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PushTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
pushTemplate,
               Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SMSTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
sMSTemplate,
               Key -> TemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VoiceTemplate" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
voiceTemplate]))
instance Property "EmailTemplate" TemplateConfigurationProperty where
  type PropertyType "EmailTemplate" TemplateConfigurationProperty = TemplateProperty
  set :: PropertyType "EmailTemplate" TemplateConfigurationProperty
-> TemplateConfigurationProperty -> TemplateConfigurationProperty
set PropertyType "EmailTemplate" TemplateConfigurationProperty
newValue TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = TemplateConfigurationProperty
        {emailTemplate :: Maybe TemplateProperty
emailTemplate = TemplateProperty -> Maybe TemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EmailTemplate" TemplateConfigurationProperty
TemplateProperty
newValue, Maybe TemplateProperty
()
haddock_workaround_ :: ()
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
haddock_workaround_ :: ()
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
instance Property "PushTemplate" TemplateConfigurationProperty where
  type PropertyType "PushTemplate" TemplateConfigurationProperty = TemplateProperty
  set :: PropertyType "PushTemplate" TemplateConfigurationProperty
-> TemplateConfigurationProperty -> TemplateConfigurationProperty
set PropertyType "PushTemplate" TemplateConfigurationProperty
newValue TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = TemplateConfigurationProperty
        {pushTemplate :: Maybe TemplateProperty
pushTemplate = TemplateProperty -> Maybe TemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PushTemplate" TemplateConfigurationProperty
TemplateProperty
newValue, Maybe TemplateProperty
()
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
instance Property "SMSTemplate" TemplateConfigurationProperty where
  type PropertyType "SMSTemplate" TemplateConfigurationProperty = TemplateProperty
  set :: PropertyType "SMSTemplate" TemplateConfigurationProperty
-> TemplateConfigurationProperty -> TemplateConfigurationProperty
set PropertyType "SMSTemplate" TemplateConfigurationProperty
newValue TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = TemplateConfigurationProperty
        {sMSTemplate :: Maybe TemplateProperty
sMSTemplate = TemplateProperty -> Maybe TemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SMSTemplate" TemplateConfigurationProperty
TemplateProperty
newValue, Maybe TemplateProperty
()
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
instance Property "VoiceTemplate" TemplateConfigurationProperty where
  type PropertyType "VoiceTemplate" TemplateConfigurationProperty = TemplateProperty
  set :: PropertyType "VoiceTemplate" TemplateConfigurationProperty
-> TemplateConfigurationProperty -> TemplateConfigurationProperty
set PropertyType "VoiceTemplate" TemplateConfigurationProperty
newValue TemplateConfigurationProperty {Maybe TemplateProperty
()
haddock_workaround_ :: TemplateConfigurationProperty -> ()
emailTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
pushTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
sMSTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
voiceTemplate :: TemplateConfigurationProperty -> Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
voiceTemplate :: Maybe TemplateProperty
..}
    = TemplateConfigurationProperty
        {voiceTemplate :: Maybe TemplateProperty
voiceTemplate = TemplateProperty -> Maybe TemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VoiceTemplate" TemplateConfigurationProperty
TemplateProperty
newValue, Maybe TemplateProperty
()
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
haddock_workaround_ :: ()
emailTemplate :: Maybe TemplateProperty
pushTemplate :: Maybe TemplateProperty
sMSTemplate :: Maybe TemplateProperty
..}