module Stratosphere.SQS.QueueInlinePolicy (
        QueueInlinePolicy(..), mkQueueInlinePolicy
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data QueueInlinePolicy
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queueinlinepolicy.html>
    QueueInlinePolicy {QueueInlinePolicy -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queueinlinepolicy.html#cfn-sqs-queueinlinepolicy-policydocument>
                       QueueInlinePolicy -> Object
policyDocument :: JSON.Object,
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queueinlinepolicy.html#cfn-sqs-queueinlinepolicy-queue>
                       QueueInlinePolicy -> Value Text
queue :: (Value Prelude.Text)}
  deriving stock (QueueInlinePolicy -> QueueInlinePolicy -> Bool
(QueueInlinePolicy -> QueueInlinePolicy -> Bool)
-> (QueueInlinePolicy -> QueueInlinePolicy -> Bool)
-> Eq QueueInlinePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueueInlinePolicy -> QueueInlinePolicy -> Bool
== :: QueueInlinePolicy -> QueueInlinePolicy -> Bool
$c/= :: QueueInlinePolicy -> QueueInlinePolicy -> Bool
/= :: QueueInlinePolicy -> QueueInlinePolicy -> Bool
Prelude.Eq, Int -> QueueInlinePolicy -> ShowS
[QueueInlinePolicy] -> ShowS
QueueInlinePolicy -> String
(Int -> QueueInlinePolicy -> ShowS)
-> (QueueInlinePolicy -> String)
-> ([QueueInlinePolicy] -> ShowS)
-> Show QueueInlinePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueueInlinePolicy -> ShowS
showsPrec :: Int -> QueueInlinePolicy -> ShowS
$cshow :: QueueInlinePolicy -> String
show :: QueueInlinePolicy -> String
$cshowList :: [QueueInlinePolicy] -> ShowS
showList :: [QueueInlinePolicy] -> ShowS
Prelude.Show)
mkQueueInlinePolicy ::
  JSON.Object -> Value Prelude.Text -> QueueInlinePolicy
mkQueueInlinePolicy :: Object -> Value Text -> QueueInlinePolicy
mkQueueInlinePolicy Object
policyDocument Value Text
queue
  = QueueInlinePolicy
      {haddock_workaround_ :: ()
haddock_workaround_ = (), policyDocument :: Object
policyDocument = Object
policyDocument,
       queue :: Value Text
queue = Value Text
queue}
instance ToResourceProperties QueueInlinePolicy where
  toResourceProperties :: QueueInlinePolicy -> ResourceProperties
toResourceProperties QueueInlinePolicy {()
Object
Value Text
haddock_workaround_ :: QueueInlinePolicy -> ()
policyDocument :: QueueInlinePolicy -> Object
queue :: QueueInlinePolicy -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
queue :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SQS::QueueInlinePolicy",
         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
"Queue" 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
queue]}
instance JSON.ToJSON QueueInlinePolicy where
  toJSON :: QueueInlinePolicy -> Value
toJSON QueueInlinePolicy {()
Object
Value Text
haddock_workaround_ :: QueueInlinePolicy -> ()
policyDocument :: QueueInlinePolicy -> Object
queue :: QueueInlinePolicy -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
queue :: Value 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
"Queue" 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
queue]
instance Property "PolicyDocument" QueueInlinePolicy where
  type PropertyType "PolicyDocument" QueueInlinePolicy = JSON.Object
  set :: PropertyType "PolicyDocument" QueueInlinePolicy
-> QueueInlinePolicy -> QueueInlinePolicy
set PropertyType "PolicyDocument" QueueInlinePolicy
newValue QueueInlinePolicy {()
Object
Value Text
haddock_workaround_ :: QueueInlinePolicy -> ()
policyDocument :: QueueInlinePolicy -> Object
queue :: QueueInlinePolicy -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
queue :: Value Text
..}
    = QueueInlinePolicy {policyDocument :: Object
policyDocument = Object
PropertyType "PolicyDocument" QueueInlinePolicy
newValue, ()
Value Text
haddock_workaround_ :: ()
queue :: Value Text
haddock_workaround_ :: ()
queue :: Value Text
..}
instance Property "Queue" QueueInlinePolicy where
  type PropertyType "Queue" QueueInlinePolicy = Value Prelude.Text
  set :: PropertyType "Queue" QueueInlinePolicy
-> QueueInlinePolicy -> QueueInlinePolicy
set PropertyType "Queue" QueueInlinePolicy
newValue QueueInlinePolicy {()
Object
Value Text
haddock_workaround_ :: QueueInlinePolicy -> ()
policyDocument :: QueueInlinePolicy -> Object
queue :: QueueInlinePolicy -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
queue :: Value Text
..}
    = QueueInlinePolicy {queue :: Value Text
queue = PropertyType "Queue" QueueInlinePolicy
Value Text
newValue, ()
Object
haddock_workaround_ :: ()
policyDocument :: Object
haddock_workaround_ :: ()
policyDocument :: Object
..}