module Stratosphere.SES.ReceiptRuleSet (
        ReceiptRuleSet(..), mkReceiptRuleSet
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReceiptRuleSet
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-receiptruleset.html>
    ReceiptRuleSet {ReceiptRuleSet -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-receiptruleset.html#cfn-ses-receiptruleset-rulesetname>
                    ReceiptRuleSet -> Maybe (Value Text)
ruleSetName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ReceiptRuleSet -> ReceiptRuleSet -> Bool
(ReceiptRuleSet -> ReceiptRuleSet -> Bool)
-> (ReceiptRuleSet -> ReceiptRuleSet -> Bool) -> Eq ReceiptRuleSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReceiptRuleSet -> ReceiptRuleSet -> Bool
== :: ReceiptRuleSet -> ReceiptRuleSet -> Bool
$c/= :: ReceiptRuleSet -> ReceiptRuleSet -> Bool
/= :: ReceiptRuleSet -> ReceiptRuleSet -> Bool
Prelude.Eq, Int -> ReceiptRuleSet -> ShowS
[ReceiptRuleSet] -> ShowS
ReceiptRuleSet -> String
(Int -> ReceiptRuleSet -> ShowS)
-> (ReceiptRuleSet -> String)
-> ([ReceiptRuleSet] -> ShowS)
-> Show ReceiptRuleSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReceiptRuleSet -> ShowS
showsPrec :: Int -> ReceiptRuleSet -> ShowS
$cshow :: ReceiptRuleSet -> String
show :: ReceiptRuleSet -> String
$cshowList :: [ReceiptRuleSet] -> ShowS
showList :: [ReceiptRuleSet] -> ShowS
Prelude.Show)
mkReceiptRuleSet :: ReceiptRuleSet
mkReceiptRuleSet :: ReceiptRuleSet
mkReceiptRuleSet
  = ReceiptRuleSet
      {haddock_workaround_ :: ()
haddock_workaround_ = (), ruleSetName :: Maybe (Value Text)
ruleSetName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReceiptRuleSet where
  toResourceProperties :: ReceiptRuleSet -> ResourceProperties
toResourceProperties ReceiptRuleSet {Maybe (Value Text)
()
haddock_workaround_ :: ReceiptRuleSet -> ()
ruleSetName :: ReceiptRuleSet -> Maybe (Value Text)
haddock_workaround_ :: ()
ruleSetName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SES::ReceiptRuleSet",
         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
"RuleSetName" (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)
ruleSetName])}
instance JSON.ToJSON ReceiptRuleSet where
  toJSON :: ReceiptRuleSet -> Value
toJSON ReceiptRuleSet {Maybe (Value Text)
()
haddock_workaround_ :: ReceiptRuleSet -> ()
ruleSetName :: ReceiptRuleSet -> Maybe (Value Text)
haddock_workaround_ :: ()
ruleSetName :: 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
"RuleSetName" (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)
ruleSetName]))
instance Property "RuleSetName" ReceiptRuleSet where
  type PropertyType "RuleSetName" ReceiptRuleSet = Value Prelude.Text
  set :: PropertyType "RuleSetName" ReceiptRuleSet
-> ReceiptRuleSet -> ReceiptRuleSet
set PropertyType "RuleSetName" ReceiptRuleSet
newValue ReceiptRuleSet {Maybe (Value Text)
()
haddock_workaround_ :: ReceiptRuleSet -> ()
ruleSetName :: ReceiptRuleSet -> Maybe (Value Text)
haddock_workaround_ :: ()
ruleSetName :: Maybe (Value Text)
..}
    = ReceiptRuleSet {ruleSetName :: Maybe (Value Text)
ruleSetName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RuleSetName" ReceiptRuleSet
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}