module Stratosphere.SQS.QueuePolicy (
QueuePolicy(..), mkQueuePolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data QueuePolicy
=
QueuePolicy {QueuePolicy -> ()
haddock_workaround_ :: (),
QueuePolicy -> Object
policyDocument :: JSON.Object,
QueuePolicy -> ValueList Text
queues :: (ValueList Prelude.Text)}
deriving stock (QueuePolicy -> QueuePolicy -> Bool
(QueuePolicy -> QueuePolicy -> Bool)
-> (QueuePolicy -> QueuePolicy -> Bool) -> Eq QueuePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueuePolicy -> QueuePolicy -> Bool
== :: QueuePolicy -> QueuePolicy -> Bool
$c/= :: QueuePolicy -> QueuePolicy -> Bool
/= :: QueuePolicy -> QueuePolicy -> Bool
Prelude.Eq, Int -> QueuePolicy -> ShowS
[QueuePolicy] -> ShowS
QueuePolicy -> String
(Int -> QueuePolicy -> ShowS)
-> (QueuePolicy -> String)
-> ([QueuePolicy] -> ShowS)
-> Show QueuePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueuePolicy -> ShowS
showsPrec :: Int -> QueuePolicy -> ShowS
$cshow :: QueuePolicy -> String
show :: QueuePolicy -> String
$cshowList :: [QueuePolicy] -> ShowS
showList :: [QueuePolicy] -> ShowS
Prelude.Show)
mkQueuePolicy ::
JSON.Object -> ValueList Prelude.Text -> QueuePolicy
mkQueuePolicy :: Object -> ValueList Text -> QueuePolicy
mkQueuePolicy Object
policyDocument ValueList Text
queues
= QueuePolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (), policyDocument :: Object
policyDocument = Object
policyDocument,
queues :: ValueList Text
queues = ValueList Text
queues}
instance ToResourceProperties QueuePolicy where
toResourceProperties :: QueuePolicy -> ResourceProperties
toResourceProperties QueuePolicy {()
Object
ValueList Text
haddock_workaround_ :: QueuePolicy -> ()
policyDocument :: QueuePolicy -> Object
queues :: QueuePolicy -> ValueList Text
haddock_workaround_ :: ()
policyDocument :: Object
queues :: ValueList Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SQS::QueuePolicy", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"PolicyDocument" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policyDocument,
Key
"Queues" 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..= ValueList Text
queues]}
instance JSON.ToJSON QueuePolicy where
toJSON :: QueuePolicy -> Value
toJSON QueuePolicy {()
Object
ValueList Text
haddock_workaround_ :: QueuePolicy -> ()
policyDocument :: QueuePolicy -> Object
queues :: QueuePolicy -> ValueList Text
haddock_workaround_ :: ()
policyDocument :: Object
queues :: ValueList Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"PolicyDocument" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policyDocument, Key
"Queues" 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..= ValueList Text
queues]
instance Property "PolicyDocument" QueuePolicy where
type PropertyType "PolicyDocument" QueuePolicy = JSON.Object
set :: PropertyType "PolicyDocument" QueuePolicy
-> QueuePolicy -> QueuePolicy
set PropertyType "PolicyDocument" QueuePolicy
newValue QueuePolicy {()
Object
ValueList Text
haddock_workaround_ :: QueuePolicy -> ()
policyDocument :: QueuePolicy -> Object
queues :: QueuePolicy -> ValueList Text
haddock_workaround_ :: ()
policyDocument :: Object
queues :: ValueList Text
..}
= QueuePolicy {policyDocument :: Object
policyDocument = Object
PropertyType "PolicyDocument" QueuePolicy
newValue, ()
ValueList Text
haddock_workaround_ :: ()
queues :: ValueList Text
haddock_workaround_ :: ()
queues :: ValueList Text
..}
instance Property "Queues" QueuePolicy where
type PropertyType "Queues" QueuePolicy = ValueList Prelude.Text
set :: PropertyType "Queues" QueuePolicy -> QueuePolicy -> QueuePolicy
set PropertyType "Queues" QueuePolicy
newValue QueuePolicy {()
Object
ValueList Text
haddock_workaround_ :: QueuePolicy -> ()
policyDocument :: QueuePolicy -> Object
queues :: QueuePolicy -> ValueList Text
haddock_workaround_ :: ()
policyDocument :: Object
queues :: ValueList Text
..} = QueuePolicy {queues :: ValueList Text
queues = PropertyType "Queues" QueuePolicy
ValueList Text
newValue, ()
Object
haddock_workaround_ :: ()
policyDocument :: Object
haddock_workaround_ :: ()
policyDocument :: Object
..}