module Stratosphere.S3.Bucket.QueueConfigurationProperty (
        module Exports, QueueConfigurationProperty(..),
        mkQueueConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.NotificationFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data QueueConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html>
    QueueConfigurationProperty {QueueConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-event>
                                QueueConfigurationProperty -> Value Text
event :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-filter>
                                QueueConfigurationProperty -> Maybe NotificationFilterProperty
filter :: (Prelude.Maybe NotificationFilterProperty),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-queueconfiguration.html#cfn-s3-bucket-queueconfiguration-queue>
                                QueueConfigurationProperty -> Value Text
queue :: (Value Prelude.Text)}
  deriving stock (QueueConfigurationProperty -> QueueConfigurationProperty -> Bool
(QueueConfigurationProperty -> QueueConfigurationProperty -> Bool)
-> (QueueConfigurationProperty
    -> QueueConfigurationProperty -> Bool)
-> Eq QueueConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueueConfigurationProperty -> QueueConfigurationProperty -> Bool
== :: QueueConfigurationProperty -> QueueConfigurationProperty -> Bool
$c/= :: QueueConfigurationProperty -> QueueConfigurationProperty -> Bool
/= :: QueueConfigurationProperty -> QueueConfigurationProperty -> Bool
Prelude.Eq, Int -> QueueConfigurationProperty -> ShowS
[QueueConfigurationProperty] -> ShowS
QueueConfigurationProperty -> String
(Int -> QueueConfigurationProperty -> ShowS)
-> (QueueConfigurationProperty -> String)
-> ([QueueConfigurationProperty] -> ShowS)
-> Show QueueConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueueConfigurationProperty -> ShowS
showsPrec :: Int -> QueueConfigurationProperty -> ShowS
$cshow :: QueueConfigurationProperty -> String
show :: QueueConfigurationProperty -> String
$cshowList :: [QueueConfigurationProperty] -> ShowS
showList :: [QueueConfigurationProperty] -> ShowS
Prelude.Show)
mkQueueConfigurationProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> QueueConfigurationProperty
mkQueueConfigurationProperty :: Value Text -> Value Text -> QueueConfigurationProperty
mkQueueConfigurationProperty Value Text
event Value Text
queue
  = QueueConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), event :: Value Text
event = Value Text
event, queue :: Value Text
queue = Value Text
queue,
       filter :: Maybe NotificationFilterProperty
filter = Maybe NotificationFilterProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties QueueConfigurationProperty where
  toResourceProperties :: QueueConfigurationProperty -> ResourceProperties
toResourceProperties QueueConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: QueueConfigurationProperty -> ()
event :: QueueConfigurationProperty -> Value Text
filter :: QueueConfigurationProperty -> Maybe NotificationFilterProperty
queue :: QueueConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.QueueConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Event" 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
event, 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]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> NotificationFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Filter" (NotificationFilterProperty -> (Key, Value))
-> Maybe NotificationFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationFilterProperty
filter]))}
instance JSON.ToJSON QueueConfigurationProperty where
  toJSON :: QueueConfigurationProperty -> Value
toJSON QueueConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: QueueConfigurationProperty -> ()
event :: QueueConfigurationProperty -> Value Text
filter :: QueueConfigurationProperty -> Maybe NotificationFilterProperty
queue :: QueueConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Event" 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
event, 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]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> NotificationFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Filter" (NotificationFilterProperty -> (Key, Value))
-> Maybe NotificationFilterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationFilterProperty
filter])))
instance Property "Event" QueueConfigurationProperty where
  type PropertyType "Event" QueueConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Event" QueueConfigurationProperty
-> QueueConfigurationProperty -> QueueConfigurationProperty
set PropertyType "Event" QueueConfigurationProperty
newValue QueueConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: QueueConfigurationProperty -> ()
event :: QueueConfigurationProperty -> Value Text
filter :: QueueConfigurationProperty -> Maybe NotificationFilterProperty
queue :: QueueConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
    = QueueConfigurationProperty {event :: Value Text
event = PropertyType "Event" QueueConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
queue :: Value Text
haddock_workaround_ :: ()
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
instance Property "Filter" QueueConfigurationProperty where
  type PropertyType "Filter" QueueConfigurationProperty = NotificationFilterProperty
  set :: PropertyType "Filter" QueueConfigurationProperty
-> QueueConfigurationProperty -> QueueConfigurationProperty
set PropertyType "Filter" QueueConfigurationProperty
newValue QueueConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: QueueConfigurationProperty -> ()
event :: QueueConfigurationProperty -> Value Text
filter :: QueueConfigurationProperty -> Maybe NotificationFilterProperty
queue :: QueueConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
    = QueueConfigurationProperty {filter :: Maybe NotificationFilterProperty
filter = NotificationFilterProperty -> Maybe NotificationFilterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Filter" QueueConfigurationProperty
NotificationFilterProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
event :: Value Text
queue :: Value Text
haddock_workaround_ :: ()
event :: Value Text
queue :: Value Text
..}
instance Property "Queue" QueueConfigurationProperty where
  type PropertyType "Queue" QueueConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Queue" QueueConfigurationProperty
-> QueueConfigurationProperty -> QueueConfigurationProperty
set PropertyType "Queue" QueueConfigurationProperty
newValue QueueConfigurationProperty {Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: QueueConfigurationProperty -> ()
event :: QueueConfigurationProperty -> Value Text
filter :: QueueConfigurationProperty -> Maybe NotificationFilterProperty
queue :: QueueConfigurationProperty -> Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
queue :: Value Text
..}
    = QueueConfigurationProperty {queue :: Value Text
queue = PropertyType "Queue" QueueConfigurationProperty
Value Text
newValue, Maybe NotificationFilterProperty
()
Value Text
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
haddock_workaround_ :: ()
event :: Value Text
filter :: Maybe NotificationFilterProperty
..}