module Stratosphere.SES.MailManagerTrafficPolicy.PolicyStatementProperty (
module Exports, PolicyStatementProperty(..),
mkPolicyStatementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SES.MailManagerTrafficPolicy.PolicyConditionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyStatementProperty
=
PolicyStatementProperty {PolicyStatementProperty -> ()
haddock_workaround_ :: (),
PolicyStatementProperty -> Value Text
action :: (Value Prelude.Text),
PolicyStatementProperty -> [PolicyConditionProperty]
conditions :: [PolicyConditionProperty]}
deriving stock (PolicyStatementProperty -> PolicyStatementProperty -> Bool
(PolicyStatementProperty -> PolicyStatementProperty -> Bool)
-> (PolicyStatementProperty -> PolicyStatementProperty -> Bool)
-> Eq PolicyStatementProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyStatementProperty -> PolicyStatementProperty -> Bool
== :: PolicyStatementProperty -> PolicyStatementProperty -> Bool
$c/= :: PolicyStatementProperty -> PolicyStatementProperty -> Bool
/= :: PolicyStatementProperty -> PolicyStatementProperty -> Bool
Prelude.Eq, Int -> PolicyStatementProperty -> ShowS
[PolicyStatementProperty] -> ShowS
PolicyStatementProperty -> String
(Int -> PolicyStatementProperty -> ShowS)
-> (PolicyStatementProperty -> String)
-> ([PolicyStatementProperty] -> ShowS)
-> Show PolicyStatementProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyStatementProperty -> ShowS
showsPrec :: Int -> PolicyStatementProperty -> ShowS
$cshow :: PolicyStatementProperty -> String
show :: PolicyStatementProperty -> String
$cshowList :: [PolicyStatementProperty] -> ShowS
showList :: [PolicyStatementProperty] -> ShowS
Prelude.Show)
mkPolicyStatementProperty ::
Value Prelude.Text
-> [PolicyConditionProperty] -> PolicyStatementProperty
mkPolicyStatementProperty :: Value Text -> [PolicyConditionProperty] -> PolicyStatementProperty
mkPolicyStatementProperty Value Text
action [PolicyConditionProperty]
conditions
= PolicyStatementProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), action :: Value Text
action = Value Text
action,
conditions :: [PolicyConditionProperty]
conditions = [PolicyConditionProperty]
conditions}
instance ToResourceProperties PolicyStatementProperty where
toResourceProperties :: PolicyStatementProperty -> ResourceProperties
toResourceProperties PolicyStatementProperty {[PolicyConditionProperty]
()
Value Text
haddock_workaround_ :: PolicyStatementProperty -> ()
action :: PolicyStatementProperty -> Value Text
conditions :: PolicyStatementProperty -> [PolicyConditionProperty]
haddock_workaround_ :: ()
action :: Value Text
conditions :: [PolicyConditionProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SES::MailManagerTrafficPolicy.PolicyStatement",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"Action" 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
action,
Key
"Conditions" Key -> [PolicyConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [PolicyConditionProperty]
conditions]}
instance JSON.ToJSON PolicyStatementProperty where
toJSON :: PolicyStatementProperty -> Value
toJSON PolicyStatementProperty {[PolicyConditionProperty]
()
Value Text
haddock_workaround_ :: PolicyStatementProperty -> ()
action :: PolicyStatementProperty -> Value Text
conditions :: PolicyStatementProperty -> [PolicyConditionProperty]
haddock_workaround_ :: ()
action :: Value Text
conditions :: [PolicyConditionProperty]
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"Action" 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
action, Key
"Conditions" Key -> [PolicyConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [PolicyConditionProperty]
conditions]
instance Property "Action" PolicyStatementProperty where
type PropertyType "Action" PolicyStatementProperty = Value Prelude.Text
set :: PropertyType "Action" PolicyStatementProperty
-> PolicyStatementProperty -> PolicyStatementProperty
set PropertyType "Action" PolicyStatementProperty
newValue PolicyStatementProperty {[PolicyConditionProperty]
()
Value Text
haddock_workaround_ :: PolicyStatementProperty -> ()
action :: PolicyStatementProperty -> Value Text
conditions :: PolicyStatementProperty -> [PolicyConditionProperty]
haddock_workaround_ :: ()
action :: Value Text
conditions :: [PolicyConditionProperty]
..}
= PolicyStatementProperty {action :: Value Text
action = PropertyType "Action" PolicyStatementProperty
Value Text
newValue, [PolicyConditionProperty]
()
haddock_workaround_ :: ()
conditions :: [PolicyConditionProperty]
haddock_workaround_ :: ()
conditions :: [PolicyConditionProperty]
..}
instance Property "Conditions" PolicyStatementProperty where
type PropertyType "Conditions" PolicyStatementProperty = [PolicyConditionProperty]
set :: PropertyType "Conditions" PolicyStatementProperty
-> PolicyStatementProperty -> PolicyStatementProperty
set PropertyType "Conditions" PolicyStatementProperty
newValue PolicyStatementProperty {[PolicyConditionProperty]
()
Value Text
haddock_workaround_ :: PolicyStatementProperty -> ()
action :: PolicyStatementProperty -> Value Text
conditions :: PolicyStatementProperty -> [PolicyConditionProperty]
haddock_workaround_ :: ()
action :: Value Text
conditions :: [PolicyConditionProperty]
..}
= PolicyStatementProperty {conditions :: [PolicyConditionProperty]
conditions = [PolicyConditionProperty]
PropertyType "Conditions" PolicyStatementProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
action :: Value Text
haddock_workaround_ :: ()
action :: Value Text
..}