module Stratosphere.AppIntegrations.EventIntegration (
        module Exports, EventIntegration(..), mkEventIntegration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppIntegrations.EventIntegration.EventFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data EventIntegration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html>
    EventIntegration {EventIntegration -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-description>
                      EventIntegration -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-eventbridgebus>
                      EventIntegration -> Value Text
eventBridgeBus :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-eventfilter>
                      EventIntegration -> EventFilterProperty
eventFilter :: EventFilterProperty,
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-name>
                      EventIntegration -> Value Text
name :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appintegrations-eventintegration.html#cfn-appintegrations-eventintegration-tags>
                      EventIntegration -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (EventIntegration -> EventIntegration -> Bool
(EventIntegration -> EventIntegration -> Bool)
-> (EventIntegration -> EventIntegration -> Bool)
-> Eq EventIntegration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventIntegration -> EventIntegration -> Bool
== :: EventIntegration -> EventIntegration -> Bool
$c/= :: EventIntegration -> EventIntegration -> Bool
/= :: EventIntegration -> EventIntegration -> Bool
Prelude.Eq, Int -> EventIntegration -> ShowS
[EventIntegration] -> ShowS
EventIntegration -> String
(Int -> EventIntegration -> ShowS)
-> (EventIntegration -> String)
-> ([EventIntegration] -> ShowS)
-> Show EventIntegration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EventIntegration -> ShowS
showsPrec :: Int -> EventIntegration -> ShowS
$cshow :: EventIntegration -> String
show :: EventIntegration -> String
$cshowList :: [EventIntegration] -> ShowS
showList :: [EventIntegration] -> ShowS
Prelude.Show)
mkEventIntegration ::
  Value Prelude.Text
  -> EventFilterProperty -> Value Prelude.Text -> EventIntegration
mkEventIntegration :: Value Text -> EventFilterProperty -> Value Text -> EventIntegration
mkEventIntegration Value Text
eventBridgeBus EventFilterProperty
eventFilter Value Text
name
  = EventIntegration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), eventBridgeBus :: Value Text
eventBridgeBus = Value Text
eventBridgeBus,
       eventFilter :: EventFilterProperty
eventFilter = EventFilterProperty
eventFilter, name :: Value Text
name = Value Text
name,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EventIntegration where
  toResourceProperties :: EventIntegration -> ResourceProperties
toResourceProperties EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppIntegrations::EventIntegration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"EventBridgeBus" 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
eventBridgeBus,
                            Key
"EventFilter" Key -> EventFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= EventFilterProperty
eventFilter, Key
"Name" 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
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON EventIntegration where
  toJSON :: EventIntegration -> Value
toJSON EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"EventBridgeBus" 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
eventBridgeBus,
               Key
"EventFilter" Key -> EventFilterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= EventFilterProperty
eventFilter, Key
"Name" 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
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" EventIntegration where
  type PropertyType "Description" EventIntegration = Value Prelude.Text
  set :: PropertyType "Description" EventIntegration
-> EventIntegration -> EventIntegration
set PropertyType "Description" EventIntegration
newValue EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = EventIntegration {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" EventIntegration
Value Text
newValue, Maybe [Tag]
()
Value Text
EventFilterProperty
haddock_workaround_ :: ()
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "EventBridgeBus" EventIntegration where
  type PropertyType "EventBridgeBus" EventIntegration = Value Prelude.Text
  set :: PropertyType "EventBridgeBus" EventIntegration
-> EventIntegration -> EventIntegration
set PropertyType "EventBridgeBus" EventIntegration
newValue EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = EventIntegration {eventBridgeBus :: Value Text
eventBridgeBus = PropertyType "EventBridgeBus" EventIntegration
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "EventFilter" EventIntegration where
  type PropertyType "EventFilter" EventIntegration = EventFilterProperty
  set :: PropertyType "EventFilter" EventIntegration
-> EventIntegration -> EventIntegration
set PropertyType "EventFilter" EventIntegration
newValue EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = EventIntegration {eventFilter :: EventFilterProperty
eventFilter = PropertyType "EventFilter" EventIntegration
EventFilterProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" EventIntegration where
  type PropertyType "Name" EventIntegration = Value Prelude.Text
  set :: PropertyType "Name" EventIntegration
-> EventIntegration -> EventIntegration
set PropertyType "Name" EventIntegration
newValue EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = EventIntegration {name :: Value Text
name = PropertyType "Name" EventIntegration
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" EventIntegration where
  type PropertyType "Tags" EventIntegration = [Tag]
  set :: PropertyType "Tags" EventIntegration
-> EventIntegration -> EventIntegration
set PropertyType "Tags" EventIntegration
newValue EventIntegration {Maybe [Tag]
Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: EventIntegration -> ()
description :: EventIntegration -> Maybe (Value Text)
eventBridgeBus :: EventIntegration -> Value Text
eventFilter :: EventIntegration -> EventFilterProperty
name :: EventIntegration -> Value Text
tags :: EventIntegration -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
tags :: Maybe [Tag]
..}
    = EventIntegration {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" EventIntegration
newValue, Maybe (Value Text)
()
Value Text
EventFilterProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
eventBridgeBus :: Value Text
eventFilter :: EventFilterProperty
name :: Value Text
..}