module Stratosphere.SES.ContactList (
        module Exports, ContactList(..), mkContactList
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SES.ContactList.TopicProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ContactList
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-contactlist.html>
    ContactList {ContactList -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-contactlist.html#cfn-ses-contactlist-contactlistname>
                 ContactList -> Maybe (Value Text)
contactListName :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-contactlist.html#cfn-ses-contactlist-description>
                 ContactList -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-contactlist.html#cfn-ses-contactlist-tags>
                 ContactList -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-contactlist.html#cfn-ses-contactlist-topics>
                 ContactList -> Maybe [TopicProperty]
topics :: (Prelude.Maybe [TopicProperty])}
  deriving stock (ContactList -> ContactList -> Bool
(ContactList -> ContactList -> Bool)
-> (ContactList -> ContactList -> Bool) -> Eq ContactList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ContactList -> ContactList -> Bool
== :: ContactList -> ContactList -> Bool
$c/= :: ContactList -> ContactList -> Bool
/= :: ContactList -> ContactList -> Bool
Prelude.Eq, Int -> ContactList -> ShowS
[ContactList] -> ShowS
ContactList -> String
(Int -> ContactList -> ShowS)
-> (ContactList -> String)
-> ([ContactList] -> ShowS)
-> Show ContactList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ContactList -> ShowS
showsPrec :: Int -> ContactList -> ShowS
$cshow :: ContactList -> String
show :: ContactList -> String
$cshowList :: [ContactList] -> ShowS
showList :: [ContactList] -> ShowS
Prelude.Show)
mkContactList :: ContactList
mkContactList :: ContactList
mkContactList
  = ContactList
      {haddock_workaround_ :: ()
haddock_workaround_ = (), contactListName :: Maybe (Value Text)
contactListName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
       topics :: Maybe [TopicProperty]
topics = Maybe [TopicProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ContactList where
  toResourceProperties :: ContactList -> ResourceProperties
toResourceProperties ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ContactList", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"ContactListName" (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)
contactListName,
                            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
"Description" (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)
description,
                            Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                            Key -> [TopicProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Topics" ([TopicProperty] -> (Key, Value))
-> Maybe [TopicProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TopicProperty]
topics])}
instance JSON.ToJSON ContactList where
  toJSON :: ContactList -> Value
toJSON ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = [(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
"ContactListName" (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)
contactListName,
               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
"Description" (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)
description,
               Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
               Key -> [TopicProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Topics" ([TopicProperty] -> (Key, Value))
-> Maybe [TopicProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TopicProperty]
topics]))
instance Property "ContactListName" ContactList where
  type PropertyType "ContactListName" ContactList = Value Prelude.Text
  set :: PropertyType "ContactListName" ContactList
-> ContactList -> ContactList
set PropertyType "ContactListName" ContactList
newValue ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = ContactList {contactListName :: Maybe (Value Text)
contactListName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContactListName" ContactList
Value Text
newValue, Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
instance Property "Description" ContactList where
  type PropertyType "Description" ContactList = Value Prelude.Text
  set :: PropertyType "Description" ContactList
-> ContactList -> ContactList
set PropertyType "Description" ContactList
newValue ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = ContactList {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ContactList
Value Text
newValue, Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
instance Property "Tags" ContactList where
  type PropertyType "Tags" ContactList = [Tag]
  set :: PropertyType "Tags" ContactList -> ContactList -> ContactList
set PropertyType "Tags" ContactList
newValue ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = ContactList {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ContactList
newValue, Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
topics :: Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
topics :: Maybe [TopicProperty]
..}
instance Property "Topics" ContactList where
  type PropertyType "Topics" ContactList = [TopicProperty]
  set :: PropertyType "Topics" ContactList -> ContactList -> ContactList
set PropertyType "Topics" ContactList
newValue ContactList {Maybe [Tag]
Maybe [TopicProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ContactList -> ()
contactListName :: ContactList -> Maybe (Value Text)
description :: ContactList -> Maybe (Value Text)
tags :: ContactList -> Maybe [Tag]
topics :: ContactList -> Maybe [TopicProperty]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
topics :: Maybe [TopicProperty]
..}
    = ContactList {topics :: Maybe [TopicProperty]
topics = [TopicProperty] -> Maybe [TopicProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TopicProperty]
PropertyType "Topics" ContactList
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
contactListName :: Maybe (Value Text)
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}