module Stratosphere.SES.ReceiptRule.RuleProperty (
module Exports, RuleProperty(..), mkRuleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SES.ReceiptRule.ActionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RuleProperty
=
RuleProperty {RuleProperty -> ()
haddock_workaround_ :: (),
RuleProperty -> Maybe [ActionProperty]
actions :: (Prelude.Maybe [ActionProperty]),
RuleProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
RuleProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
RuleProperty -> Maybe (ValueList Text)
recipients :: (Prelude.Maybe (ValueList Prelude.Text)),
RuleProperty -> Maybe (Value Bool)
scanEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
RuleProperty -> Maybe (Value Text)
tlsPolicy :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (RuleProperty -> RuleProperty -> Bool
(RuleProperty -> RuleProperty -> Bool)
-> (RuleProperty -> RuleProperty -> Bool) -> Eq RuleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RuleProperty -> RuleProperty -> Bool
== :: RuleProperty -> RuleProperty -> Bool
$c/= :: RuleProperty -> RuleProperty -> Bool
/= :: RuleProperty -> RuleProperty -> Bool
Prelude.Eq, Int -> RuleProperty -> ShowS
[RuleProperty] -> ShowS
RuleProperty -> String
(Int -> RuleProperty -> ShowS)
-> (RuleProperty -> String)
-> ([RuleProperty] -> ShowS)
-> Show RuleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RuleProperty -> ShowS
showsPrec :: Int -> RuleProperty -> ShowS
$cshow :: RuleProperty -> String
show :: RuleProperty -> String
$cshowList :: [RuleProperty] -> ShowS
showList :: [RuleProperty] -> ShowS
Prelude.Show)
mkRuleProperty :: RuleProperty
mkRuleProperty :: RuleProperty
mkRuleProperty
= RuleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), actions :: Maybe [ActionProperty]
actions = Maybe [ActionProperty]
forall a. Maybe a
Prelude.Nothing,
enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
recipients :: Maybe (ValueList Text)
recipients = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, scanEnabled :: Maybe (Value Bool)
scanEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
tlsPolicy :: Maybe (Value Text)
tlsPolicy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RuleProperty where
toResourceProperties :: RuleProperty -> ResourceProperties
toResourceProperties RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SES::ReceiptRule.Rule",
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 -> [ActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Actions" ([ActionProperty] -> (Key, Value))
-> Maybe [ActionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ActionProperty]
actions,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"Name" (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)
name,
Key -> ValueList 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
"Recipients" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
recipients,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ScanEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
scanEnabled,
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
"TlsPolicy" (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)
tlsPolicy])}
instance JSON.ToJSON RuleProperty where
toJSON :: RuleProperty -> Value
toJSON RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: 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 -> [ActionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Actions" ([ActionProperty] -> (Key, Value))
-> Maybe [ActionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ActionProperty]
actions,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
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
"Name" (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)
name,
Key -> ValueList 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
"Recipients" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
recipients,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ScanEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
scanEnabled,
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
"TlsPolicy" (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)
tlsPolicy]))
instance Property "Actions" RuleProperty where
type PropertyType "Actions" RuleProperty = [ActionProperty]
set :: PropertyType "Actions" RuleProperty -> RuleProperty -> RuleProperty
set PropertyType "Actions" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {actions :: Maybe [ActionProperty]
actions = [ActionProperty] -> Maybe [ActionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ActionProperty]
PropertyType "Actions" RuleProperty
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
instance Property "Enabled" RuleProperty where
type PropertyType "Enabled" RuleProperty = Value Prelude.Bool
set :: PropertyType "Enabled" RuleProperty -> RuleProperty -> RuleProperty
set PropertyType "Enabled" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" RuleProperty
Value Bool
newValue, Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
instance Property "Name" RuleProperty where
type PropertyType "Name" RuleProperty = Value Prelude.Text
set :: PropertyType "Name" RuleProperty -> RuleProperty -> RuleProperty
set PropertyType "Name" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" RuleProperty
Value Text
newValue, Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
instance Property "Recipients" RuleProperty where
type PropertyType "Recipients" RuleProperty = ValueList Prelude.Text
set :: PropertyType "Recipients" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "Recipients" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {recipients :: Maybe (ValueList Text)
recipients = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Recipients" RuleProperty
ValueList Text
newValue, Maybe [ActionProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
instance Property "ScanEnabled" RuleProperty where
type PropertyType "ScanEnabled" RuleProperty = Value Prelude.Bool
set :: PropertyType "ScanEnabled" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "ScanEnabled" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {scanEnabled :: Maybe (Value Bool)
scanEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ScanEnabled" RuleProperty
Value Bool
newValue, Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
tlsPolicy :: Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
tlsPolicy :: Maybe (Value Text)
..}
instance Property "TlsPolicy" RuleProperty where
type PropertyType "TlsPolicy" RuleProperty = Value Prelude.Text
set :: PropertyType "TlsPolicy" RuleProperty
-> RuleProperty -> RuleProperty
set PropertyType "TlsPolicy" RuleProperty
newValue RuleProperty {Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: RuleProperty -> ()
actions :: RuleProperty -> Maybe [ActionProperty]
enabled :: RuleProperty -> Maybe (Value Bool)
name :: RuleProperty -> Maybe (Value Text)
recipients :: RuleProperty -> Maybe (ValueList Text)
scanEnabled :: RuleProperty -> Maybe (Value Bool)
tlsPolicy :: RuleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
tlsPolicy :: Maybe (Value Text)
..}
= RuleProperty {tlsPolicy :: Maybe (Value Text)
tlsPolicy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TlsPolicy" RuleProperty
Value Text
newValue, Maybe [ActionProperty]
Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
actions :: Maybe [ActionProperty]
enabled :: Maybe (Value Bool)
name :: Maybe (Value Text)
recipients :: Maybe (ValueList Text)
scanEnabled :: Maybe (Value Bool)
..}