module Stratosphere.SES.Template (
module Exports, Template(..), mkTemplate
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SES.Template.TemplateProperty as Exports
import Stratosphere.ResourceProperties
data Template
=
Template {Template -> ()
haddock_workaround_ :: (),
Template -> Maybe TemplateProperty
template :: (Prelude.Maybe TemplateProperty)}
deriving stock (Template -> Template -> Bool
(Template -> Template -> Bool)
-> (Template -> Template -> Bool) -> Eq Template
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Template -> Template -> Bool
== :: Template -> Template -> Bool
$c/= :: Template -> Template -> Bool
/= :: Template -> Template -> Bool
Prelude.Eq, Int -> Template -> ShowS
[Template] -> ShowS
Template -> String
(Int -> Template -> ShowS)
-> (Template -> String) -> ([Template] -> ShowS) -> Show Template
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Template -> ShowS
showsPrec :: Int -> Template -> ShowS
$cshow :: Template -> String
show :: Template -> String
$cshowList :: [Template] -> ShowS
showList :: [Template] -> ShowS
Prelude.Show)
mkTemplate :: Template
mkTemplate :: Template
mkTemplate
= Template {haddock_workaround_ :: ()
haddock_workaround_ = (), template :: Maybe TemplateProperty
template = Maybe TemplateProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Template where
toResourceProperties :: Template -> ResourceProperties
toResourceProperties Template {Maybe TemplateProperty
()
haddock_workaround_ :: Template -> ()
template :: Template -> Maybe TemplateProperty
haddock_workaround_ :: ()
template :: Maybe TemplateProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SES::Template", 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
"Template" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
template])}
instance JSON.ToJSON Template where
toJSON :: Template -> Value
toJSON Template {Maybe TemplateProperty
()
haddock_workaround_ :: Template -> ()
template :: Template -> Maybe TemplateProperty
haddock_workaround_ :: ()
template :: 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
"Template" (TemplateProperty -> (Key, Value))
-> Maybe TemplateProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TemplateProperty
template]))
instance Property "Template" Template where
type PropertyType "Template" Template = TemplateProperty
set :: PropertyType "Template" Template -> Template -> Template
set PropertyType "Template" Template
newValue Template {Maybe TemplateProperty
()
haddock_workaround_ :: Template -> ()
template :: Template -> Maybe TemplateProperty
haddock_workaround_ :: ()
template :: Maybe TemplateProperty
..}
= Template {template :: Maybe TemplateProperty
template = TemplateProperty -> Maybe TemplateProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Template" Template
TemplateProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}