module Stratosphere.Pinpoint.SmsTemplate (
        SmsTemplate(..), mkSmsTemplate
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SmsTemplate
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html>
    SmsTemplate {SmsTemplate -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-body>
                 SmsTemplate -> Value Text
body :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-defaultsubstitutions>
                 SmsTemplate -> Maybe (Value Text)
defaultSubstitutions :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-tags>
                 SmsTemplate -> Maybe Object
tags :: (Prelude.Maybe JSON.Object),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-templatedescription>
                 SmsTemplate -> Maybe (Value Text)
templateDescription :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-templatename>
                 SmsTemplate -> Value Text
templateName :: (Value Prelude.Text)}
  deriving stock (SmsTemplate -> SmsTemplate -> Bool
(SmsTemplate -> SmsTemplate -> Bool)
-> (SmsTemplate -> SmsTemplate -> Bool) -> Eq SmsTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SmsTemplate -> SmsTemplate -> Bool
== :: SmsTemplate -> SmsTemplate -> Bool
$c/= :: SmsTemplate -> SmsTemplate -> Bool
/= :: SmsTemplate -> SmsTemplate -> Bool
Prelude.Eq, Int -> SmsTemplate -> ShowS
[SmsTemplate] -> ShowS
SmsTemplate -> String
(Int -> SmsTemplate -> ShowS)
-> (SmsTemplate -> String)
-> ([SmsTemplate] -> ShowS)
-> Show SmsTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SmsTemplate -> ShowS
showsPrec :: Int -> SmsTemplate -> ShowS
$cshow :: SmsTemplate -> String
show :: SmsTemplate -> String
$cshowList :: [SmsTemplate] -> ShowS
showList :: [SmsTemplate] -> ShowS
Prelude.Show)
mkSmsTemplate ::
  Value Prelude.Text -> Value Prelude.Text -> SmsTemplate
mkSmsTemplate :: Value Text -> Value Text -> SmsTemplate
mkSmsTemplate Value Text
body Value Text
templateName
  = SmsTemplate
      {haddock_workaround_ :: ()
haddock_workaround_ = (), body :: Value Text
body = Value Text
body,
       templateName :: Value Text
templateName = Value Text
templateName,
       defaultSubstitutions :: Maybe (Value Text)
defaultSubstitutions = 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 SmsTemplate where
  toResourceProperties :: SmsTemplate -> ResourceProperties
toResourceProperties SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Pinpoint::SmsTemplate",
         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
"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..= Value Text
body, 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 -> 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
"DefaultSubstitutions" (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)
defaultSubstitutions,
                               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 SmsTemplate where
  toJSON :: SmsTemplate -> Value
toJSON SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: 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
"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..= Value Text
body, 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 -> 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
"DefaultSubstitutions" (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)
defaultSubstitutions,
                  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 "Body" SmsTemplate where
  type PropertyType "Body" SmsTemplate = Value Prelude.Text
  set :: PropertyType "Body" SmsTemplate -> SmsTemplate -> SmsTemplate
set PropertyType "Body" SmsTemplate
newValue SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..} = SmsTemplate {body :: Value Text
body = PropertyType "Body" SmsTemplate
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "DefaultSubstitutions" SmsTemplate where
  type PropertyType "DefaultSubstitutions" SmsTemplate = Value Prelude.Text
  set :: PropertyType "DefaultSubstitutions" SmsTemplate
-> SmsTemplate -> SmsTemplate
set PropertyType "DefaultSubstitutions" SmsTemplate
newValue SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
    = SmsTemplate {defaultSubstitutions :: Maybe (Value Text)
defaultSubstitutions = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultSubstitutions" SmsTemplate
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
body :: Value Text
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
body :: Value Text
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "Tags" SmsTemplate where
  type PropertyType "Tags" SmsTemplate = JSON.Object
  set :: PropertyType "Tags" SmsTemplate -> SmsTemplate -> SmsTemplate
set PropertyType "Tags" SmsTemplate
newValue SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
    = SmsTemplate {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" SmsTemplate
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
templateDescription :: Maybe (Value Text)
templateName :: Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
instance Property "TemplateDescription" SmsTemplate where
  type PropertyType "TemplateDescription" SmsTemplate = Value Prelude.Text
  set :: PropertyType "TemplateDescription" SmsTemplate
-> SmsTemplate -> SmsTemplate
set PropertyType "TemplateDescription" SmsTemplate
newValue SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
    = SmsTemplate {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" SmsTemplate
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateName :: Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateName :: Value Text
..}
instance Property "TemplateName" SmsTemplate where
  type PropertyType "TemplateName" SmsTemplate = Value Prelude.Text
  set :: PropertyType "TemplateName" SmsTemplate
-> SmsTemplate -> SmsTemplate
set PropertyType "TemplateName" SmsTemplate
newValue SmsTemplate {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SmsTemplate -> ()
body :: SmsTemplate -> Value Text
defaultSubstitutions :: SmsTemplate -> Maybe (Value Text)
tags :: SmsTemplate -> Maybe Object
templateDescription :: SmsTemplate -> Maybe (Value Text)
templateName :: SmsTemplate -> Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
templateName :: Value Text
..}
    = SmsTemplate {templateName :: Value Text
templateName = PropertyType "TemplateName" SmsTemplate
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
haddock_workaround_ :: ()
body :: Value Text
defaultSubstitutions :: Maybe (Value Text)
tags :: Maybe Object
templateDescription :: Maybe (Value Text)
..}