module Stratosphere.S3.Bucket.NotificationConfigurationProperty (
        module Exports, NotificationConfigurationProperty(..),
        mkNotificationConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.EventBridgeConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.Bucket.LambdaConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.Bucket.QueueConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.Bucket.TopicConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data NotificationConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html>
    NotificationConfigurationProperty {NotificationConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-eventbridgeconfiguration>
                                       NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
eventBridgeConfiguration :: (Prelude.Maybe EventBridgeConfigurationProperty),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-lambdaconfigurations>
                                       NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
lambdaConfigurations :: (Prelude.Maybe [LambdaConfigurationProperty]),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-queueconfigurations>
                                       NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
queueConfigurations :: (Prelude.Maybe [QueueConfigurationProperty]),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration.html#cfn-s3-bucket-notificationconfiguration-topicconfigurations>
                                       NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
topicConfigurations :: (Prelude.Maybe [TopicConfigurationProperty])}
  deriving stock (NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
(NotificationConfigurationProperty
 -> NotificationConfigurationProperty -> Bool)
-> (NotificationConfigurationProperty
    -> NotificationConfigurationProperty -> Bool)
-> Eq NotificationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
== :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
$c/= :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
/= :: NotificationConfigurationProperty
-> NotificationConfigurationProperty -> Bool
Prelude.Eq, Int -> NotificationConfigurationProperty -> ShowS
[NotificationConfigurationProperty] -> ShowS
NotificationConfigurationProperty -> String
(Int -> NotificationConfigurationProperty -> ShowS)
-> (NotificationConfigurationProperty -> String)
-> ([NotificationConfigurationProperty] -> ShowS)
-> Show NotificationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotificationConfigurationProperty -> ShowS
showsPrec :: Int -> NotificationConfigurationProperty -> ShowS
$cshow :: NotificationConfigurationProperty -> String
show :: NotificationConfigurationProperty -> String
$cshowList :: [NotificationConfigurationProperty] -> ShowS
showList :: [NotificationConfigurationProperty] -> ShowS
Prelude.Show)
mkNotificationConfigurationProperty ::
  NotificationConfigurationProperty
mkNotificationConfigurationProperty :: NotificationConfigurationProperty
mkNotificationConfigurationProperty
  = NotificationConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
eventBridgeConfiguration = Maybe EventBridgeConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
lambdaConfigurations = Maybe [LambdaConfigurationProperty]
forall a. Maybe a
Prelude.Nothing,
       queueConfigurations :: Maybe [QueueConfigurationProperty]
queueConfigurations = Maybe [QueueConfigurationProperty]
forall a. Maybe a
Prelude.Nothing,
       topicConfigurations :: Maybe [TopicConfigurationProperty]
topicConfigurations = Maybe [TopicConfigurationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NotificationConfigurationProperty where
  toResourceProperties :: NotificationConfigurationProperty -> ResourceProperties
toResourceProperties NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.NotificationConfiguration",
         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 -> EventBridgeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventBridgeConfiguration"
                              (EventBridgeConfigurationProperty -> (Key, Value))
-> Maybe EventBridgeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventBridgeConfigurationProperty
eventBridgeConfiguration,
                            Key -> [LambdaConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConfigurations" ([LambdaConfigurationProperty] -> (Key, Value))
-> Maybe [LambdaConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LambdaConfigurationProperty]
lambdaConfigurations,
                            Key -> [QueueConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"QueueConfigurations" ([QueueConfigurationProperty] -> (Key, Value))
-> Maybe [QueueConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QueueConfigurationProperty]
queueConfigurations,
                            Key -> [TopicConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TopicConfigurations" ([TopicConfigurationProperty] -> (Key, Value))
-> Maybe [TopicConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TopicConfigurationProperty]
topicConfigurations])}
instance JSON.ToJSON NotificationConfigurationProperty where
  toJSON :: NotificationConfigurationProperty -> Value
toJSON NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = [(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 -> EventBridgeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EventBridgeConfiguration"
                 (EventBridgeConfigurationProperty -> (Key, Value))
-> Maybe EventBridgeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EventBridgeConfigurationProperty
eventBridgeConfiguration,
               Key -> [LambdaConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConfigurations" ([LambdaConfigurationProperty] -> (Key, Value))
-> Maybe [LambdaConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LambdaConfigurationProperty]
lambdaConfigurations,
               Key -> [QueueConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"QueueConfigurations" ([QueueConfigurationProperty] -> (Key, Value))
-> Maybe [QueueConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [QueueConfigurationProperty]
queueConfigurations,
               Key -> [TopicConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TopicConfigurations" ([TopicConfigurationProperty] -> (Key, Value))
-> Maybe [TopicConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TopicConfigurationProperty]
topicConfigurations]))
instance Property "EventBridgeConfiguration" NotificationConfigurationProperty where
  type PropertyType "EventBridgeConfiguration" NotificationConfigurationProperty = EventBridgeConfigurationProperty
  set :: PropertyType
  "EventBridgeConfiguration" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType
  "EventBridgeConfiguration" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = NotificationConfigurationProperty
        {eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
eventBridgeConfiguration = EventBridgeConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "EventBridgeConfiguration" NotificationConfigurationProperty
EventBridgeConfigurationProperty
newValue, Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
()
haddock_workaround_ :: ()
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
instance Property "LambdaConfigurations" NotificationConfigurationProperty where
  type PropertyType "LambdaConfigurations" NotificationConfigurationProperty = [LambdaConfigurationProperty]
  set :: PropertyType
  "LambdaConfigurations" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType
  "LambdaConfigurations" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = NotificationConfigurationProperty
        {lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
lambdaConfigurations = [LambdaConfigurationProperty]
-> Maybe [LambdaConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [LambdaConfigurationProperty]
PropertyType
  "LambdaConfigurations" NotificationConfigurationProperty
newValue, Maybe [QueueConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
instance Property "QueueConfigurations" NotificationConfigurationProperty where
  type PropertyType "QueueConfigurations" NotificationConfigurationProperty = [QueueConfigurationProperty]
  set :: PropertyType
  "QueueConfigurations" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType
  "QueueConfigurations" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = NotificationConfigurationProperty
        {queueConfigurations :: Maybe [QueueConfigurationProperty]
queueConfigurations = [QueueConfigurationProperty] -> Maybe [QueueConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [QueueConfigurationProperty]
PropertyType
  "QueueConfigurations" NotificationConfigurationProperty
newValue, Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
instance Property "TopicConfigurations" NotificationConfigurationProperty where
  type PropertyType "TopicConfigurations" NotificationConfigurationProperty = [TopicConfigurationProperty]
  set :: PropertyType
  "TopicConfigurations" NotificationConfigurationProperty
-> NotificationConfigurationProperty
-> NotificationConfigurationProperty
set PropertyType
  "TopicConfigurations" NotificationConfigurationProperty
newValue NotificationConfigurationProperty {Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe [TopicConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: NotificationConfigurationProperty -> ()
eventBridgeConfiguration :: NotificationConfigurationProperty
-> Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: NotificationConfigurationProperty
-> Maybe [LambdaConfigurationProperty]
queueConfigurations :: NotificationConfigurationProperty
-> Maybe [QueueConfigurationProperty]
topicConfigurations :: NotificationConfigurationProperty
-> Maybe [TopicConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
topicConfigurations :: Maybe [TopicConfigurationProperty]
..}
    = NotificationConfigurationProperty
        {topicConfigurations :: Maybe [TopicConfigurationProperty]
topicConfigurations = [TopicConfigurationProperty] -> Maybe [TopicConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TopicConfigurationProperty]
PropertyType
  "TopicConfigurations" NotificationConfigurationProperty
newValue, Maybe [QueueConfigurationProperty]
Maybe [LambdaConfigurationProperty]
Maybe EventBridgeConfigurationProperty
()
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
haddock_workaround_ :: ()
eventBridgeConfiguration :: Maybe EventBridgeConfigurationProperty
lambdaConfigurations :: Maybe [LambdaConfigurationProperty]
queueConfigurations :: Maybe [QueueConfigurationProperty]
..}