{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppIntegrationS.Types.EventIntegration where
import Amazonka.AppIntegrationS.Types.EventFilter
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data EventIntegration = EventIntegration'
{
EventIntegration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
EventIntegration -> Maybe Text
eventBridgeBus :: Prelude.Maybe Prelude.Text,
EventIntegration -> Maybe EventFilter
eventFilter :: Prelude.Maybe EventFilter,
EventIntegration -> Maybe Text
eventIntegrationArn :: Prelude.Maybe Prelude.Text,
EventIntegration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
EventIntegration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (EventIntegration -> EventIntegration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventIntegration -> EventIntegration -> Bool
$c/= :: EventIntegration -> EventIntegration -> Bool
== :: EventIntegration -> EventIntegration -> Bool
$c== :: EventIntegration -> EventIntegration -> Bool
Prelude.Eq, ReadPrec [EventIntegration]
ReadPrec EventIntegration
Int -> ReadS EventIntegration
ReadS [EventIntegration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventIntegration]
$creadListPrec :: ReadPrec [EventIntegration]
readPrec :: ReadPrec EventIntegration
$creadPrec :: ReadPrec EventIntegration
readList :: ReadS [EventIntegration]
$creadList :: ReadS [EventIntegration]
readsPrec :: Int -> ReadS EventIntegration
$creadsPrec :: Int -> ReadS EventIntegration
Prelude.Read, Int -> EventIntegration -> ShowS
[EventIntegration] -> ShowS
EventIntegration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventIntegration] -> ShowS
$cshowList :: [EventIntegration] -> ShowS
show :: EventIntegration -> String
$cshow :: EventIntegration -> String
showsPrec :: Int -> EventIntegration -> ShowS
$cshowsPrec :: Int -> EventIntegration -> ShowS
Prelude.Show, forall x. Rep EventIntegration x -> EventIntegration
forall x. EventIntegration -> Rep EventIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventIntegration x -> EventIntegration
$cfrom :: forall x. EventIntegration -> Rep EventIntegration x
Prelude.Generic)
newEventIntegration ::
EventIntegration
newEventIntegration :: EventIntegration
newEventIntegration =
EventIntegration'
{ $sel:description:EventIntegration' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:eventBridgeBus:EventIntegration' :: Maybe Text
eventBridgeBus = forall a. Maybe a
Prelude.Nothing,
$sel:eventFilter:EventIntegration' :: Maybe EventFilter
eventFilter = forall a. Maybe a
Prelude.Nothing,
$sel:eventIntegrationArn:EventIntegration' :: Maybe Text
eventIntegrationArn = forall a. Maybe a
Prelude.Nothing,
$sel:name:EventIntegration' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:tags:EventIntegration' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
eventIntegration_description :: Lens.Lens' EventIntegration (Prelude.Maybe Prelude.Text)
eventIntegration_description :: Lens' EventIntegration (Maybe Text)
eventIntegration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe Text
description :: Maybe Text
$sel:description:EventIntegration' :: EventIntegration -> Maybe Text
description} -> Maybe Text
description) (\s :: EventIntegration
s@EventIntegration' {} Maybe Text
a -> EventIntegration
s {$sel:description:EventIntegration' :: Maybe Text
description = Maybe Text
a} :: EventIntegration)
eventIntegration_eventBridgeBus :: Lens.Lens' EventIntegration (Prelude.Maybe Prelude.Text)
eventIntegration_eventBridgeBus :: Lens' EventIntegration (Maybe Text)
eventIntegration_eventBridgeBus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe Text
eventBridgeBus :: Maybe Text
$sel:eventBridgeBus:EventIntegration' :: EventIntegration -> Maybe Text
eventBridgeBus} -> Maybe Text
eventBridgeBus) (\s :: EventIntegration
s@EventIntegration' {} Maybe Text
a -> EventIntegration
s {$sel:eventBridgeBus:EventIntegration' :: Maybe Text
eventBridgeBus = Maybe Text
a} :: EventIntegration)
eventIntegration_eventFilter :: Lens.Lens' EventIntegration (Prelude.Maybe EventFilter)
eventIntegration_eventFilter :: Lens' EventIntegration (Maybe EventFilter)
eventIntegration_eventFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe EventFilter
eventFilter :: Maybe EventFilter
$sel:eventFilter:EventIntegration' :: EventIntegration -> Maybe EventFilter
eventFilter} -> Maybe EventFilter
eventFilter) (\s :: EventIntegration
s@EventIntegration' {} Maybe EventFilter
a -> EventIntegration
s {$sel:eventFilter:EventIntegration' :: Maybe EventFilter
eventFilter = Maybe EventFilter
a} :: EventIntegration)
eventIntegration_eventIntegrationArn :: Lens.Lens' EventIntegration (Prelude.Maybe Prelude.Text)
eventIntegration_eventIntegrationArn :: Lens' EventIntegration (Maybe Text)
eventIntegration_eventIntegrationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe Text
eventIntegrationArn :: Maybe Text
$sel:eventIntegrationArn:EventIntegration' :: EventIntegration -> Maybe Text
eventIntegrationArn} -> Maybe Text
eventIntegrationArn) (\s :: EventIntegration
s@EventIntegration' {} Maybe Text
a -> EventIntegration
s {$sel:eventIntegrationArn:EventIntegration' :: Maybe Text
eventIntegrationArn = Maybe Text
a} :: EventIntegration)
eventIntegration_name :: Lens.Lens' EventIntegration (Prelude.Maybe Prelude.Text)
eventIntegration_name :: Lens' EventIntegration (Maybe Text)
eventIntegration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe Text
name :: Maybe Text
$sel:name:EventIntegration' :: EventIntegration -> Maybe Text
name} -> Maybe Text
name) (\s :: EventIntegration
s@EventIntegration' {} Maybe Text
a -> EventIntegration
s {$sel:name:EventIntegration' :: Maybe Text
name = Maybe Text
a} :: EventIntegration)
eventIntegration_tags :: Lens.Lens' EventIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
eventIntegration_tags :: Lens' EventIntegration (Maybe (HashMap Text Text))
eventIntegration_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:EventIntegration' :: EventIntegration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: EventIntegration
s@EventIntegration' {} Maybe (HashMap Text Text)
a -> EventIntegration
s {$sel:tags:EventIntegration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: EventIntegration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON EventIntegration where
parseJSON :: Value -> Parser EventIntegration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EventIntegration"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe EventFilter
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> EventIntegration
EventIntegration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EventBridgeBus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EventFilter")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EventIntegrationArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable EventIntegration where
hashWithSalt :: Int -> EventIntegration -> Int
hashWithSalt Int
_salt EventIntegration' {Maybe Text
Maybe (HashMap Text Text)
Maybe EventFilter
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
eventIntegrationArn :: Maybe Text
eventFilter :: Maybe EventFilter
eventBridgeBus :: Maybe Text
description :: Maybe Text
$sel:tags:EventIntegration' :: EventIntegration -> Maybe (HashMap Text Text)
$sel:name:EventIntegration' :: EventIntegration -> Maybe Text
$sel:eventIntegrationArn:EventIntegration' :: EventIntegration -> Maybe Text
$sel:eventFilter:EventIntegration' :: EventIntegration -> Maybe EventFilter
$sel:eventBridgeBus:EventIntegration' :: EventIntegration -> Maybe Text
$sel:description:EventIntegration' :: EventIntegration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eventBridgeBus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EventFilter
eventFilter
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
eventIntegrationArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData EventIntegration where
rnf :: EventIntegration -> ()
rnf EventIntegration' {Maybe Text
Maybe (HashMap Text Text)
Maybe EventFilter
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
eventIntegrationArn :: Maybe Text
eventFilter :: Maybe EventFilter
eventBridgeBus :: Maybe Text
description :: Maybe Text
$sel:tags:EventIntegration' :: EventIntegration -> Maybe (HashMap Text Text)
$sel:name:EventIntegration' :: EventIntegration -> Maybe Text
$sel:eventIntegrationArn:EventIntegration' :: EventIntegration -> Maybe Text
$sel:eventFilter:EventIntegration' :: EventIntegration -> Maybe EventFilter
$sel:eventBridgeBus:EventIntegration' :: EventIntegration -> Maybe Text
$sel:description:EventIntegration' :: EventIntegration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventBridgeBus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EventFilter
eventFilter
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
eventIntegrationArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags