{-# 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.EventIntegrationAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventIntegrationAssociation = EventIntegrationAssociation'
{
EventIntegrationAssociation -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
EventIntegrationAssociation -> Maybe Text
eventIntegrationName :: Prelude.Maybe Prelude.Text,
EventIntegrationAssociation -> Maybe (HashMap Text Text)
clientAssociationMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
EventIntegrationAssociation -> Maybe Text
eventIntegrationAssociationId :: Prelude.Maybe Prelude.Text,
EventIntegrationAssociation -> Maybe Text
eventIntegrationAssociationArn :: Prelude.Maybe Prelude.Text,
EventIntegrationAssociation -> Maybe Text
eventBridgeRuleName :: Prelude.Maybe Prelude.Text
}
deriving (EventIntegrationAssociation -> EventIntegrationAssociation -> Bool
(EventIntegrationAssociation
-> EventIntegrationAssociation -> Bool)
-> (EventIntegrationAssociation
-> EventIntegrationAssociation -> Bool)
-> Eq EventIntegrationAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventIntegrationAssociation -> EventIntegrationAssociation -> Bool
$c/= :: EventIntegrationAssociation -> EventIntegrationAssociation -> Bool
== :: EventIntegrationAssociation -> EventIntegrationAssociation -> Bool
$c== :: EventIntegrationAssociation -> EventIntegrationAssociation -> Bool
Prelude.Eq, ReadPrec [EventIntegrationAssociation]
ReadPrec EventIntegrationAssociation
Int -> ReadS EventIntegrationAssociation
ReadS [EventIntegrationAssociation]
(Int -> ReadS EventIntegrationAssociation)
-> ReadS [EventIntegrationAssociation]
-> ReadPrec EventIntegrationAssociation
-> ReadPrec [EventIntegrationAssociation]
-> Read EventIntegrationAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventIntegrationAssociation]
$creadListPrec :: ReadPrec [EventIntegrationAssociation]
readPrec :: ReadPrec EventIntegrationAssociation
$creadPrec :: ReadPrec EventIntegrationAssociation
readList :: ReadS [EventIntegrationAssociation]
$creadList :: ReadS [EventIntegrationAssociation]
readsPrec :: Int -> ReadS EventIntegrationAssociation
$creadsPrec :: Int -> ReadS EventIntegrationAssociation
Prelude.Read, Int -> EventIntegrationAssociation -> ShowS
[EventIntegrationAssociation] -> ShowS
EventIntegrationAssociation -> String
(Int -> EventIntegrationAssociation -> ShowS)
-> (EventIntegrationAssociation -> String)
-> ([EventIntegrationAssociation] -> ShowS)
-> Show EventIntegrationAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventIntegrationAssociation] -> ShowS
$cshowList :: [EventIntegrationAssociation] -> ShowS
show :: EventIntegrationAssociation -> String
$cshow :: EventIntegrationAssociation -> String
showsPrec :: Int -> EventIntegrationAssociation -> ShowS
$cshowsPrec :: Int -> EventIntegrationAssociation -> ShowS
Prelude.Show, (forall x.
EventIntegrationAssociation -> Rep EventIntegrationAssociation x)
-> (forall x.
Rep EventIntegrationAssociation x -> EventIntegrationAssociation)
-> Generic EventIntegrationAssociation
forall x.
Rep EventIntegrationAssociation x -> EventIntegrationAssociation
forall x.
EventIntegrationAssociation -> Rep EventIntegrationAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EventIntegrationAssociation x -> EventIntegrationAssociation
$cfrom :: forall x.
EventIntegrationAssociation -> Rep EventIntegrationAssociation x
Prelude.Generic)
newEventIntegrationAssociation ::
EventIntegrationAssociation
newEventIntegrationAssociation :: EventIntegrationAssociation
newEventIntegrationAssociation =
EventIntegrationAssociation' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation
EventIntegrationAssociation'
{ $sel:clientId:EventIntegrationAssociation' :: Maybe Text
clientId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventIntegrationName:EventIntegrationAssociation' :: Maybe Text
eventIntegrationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientAssociationMetadata:EventIntegrationAssociation' :: Maybe (HashMap Text Text)
clientAssociationMetadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:eventIntegrationAssociationId:EventIntegrationAssociation' :: Maybe Text
eventIntegrationAssociationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventIntegrationAssociationArn:EventIntegrationAssociation' :: Maybe Text
eventIntegrationAssociationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventBridgeRuleName:EventIntegrationAssociation' :: Maybe Text
eventBridgeRuleName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventIntegrationAssociation_clientId :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe Prelude.Text)
eventIntegrationAssociation_clientId :: (Maybe Text -> f (Maybe Text))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_clientId = (EventIntegrationAssociation -> Maybe Text)
-> (EventIntegrationAssociation
-> Maybe Text -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe Text
clientId :: Maybe Text
$sel:clientId:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe Text
clientId} -> Maybe Text
clientId) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe Text
a -> EventIntegrationAssociation
s {$sel:clientId:EventIntegrationAssociation' :: Maybe Text
clientId = Maybe Text
a} :: EventIntegrationAssociation)
eventIntegrationAssociation_eventIntegrationName :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe Prelude.Text)
eventIntegrationAssociation_eventIntegrationName :: (Maybe Text -> f (Maybe Text))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_eventIntegrationName = (EventIntegrationAssociation -> Maybe Text)
-> (EventIntegrationAssociation
-> Maybe Text -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe Text
eventIntegrationName :: Maybe Text
$sel:eventIntegrationName:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe Text
eventIntegrationName} -> Maybe Text
eventIntegrationName) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe Text
a -> EventIntegrationAssociation
s {$sel:eventIntegrationName:EventIntegrationAssociation' :: Maybe Text
eventIntegrationName = Maybe Text
a} :: EventIntegrationAssociation)
eventIntegrationAssociation_clientAssociationMetadata :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
eventIntegrationAssociation_clientAssociationMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_clientAssociationMetadata = (EventIntegrationAssociation -> Maybe (HashMap Text Text))
-> (EventIntegrationAssociation
-> Maybe (HashMap Text Text) -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe (HashMap Text Text)
clientAssociationMetadata :: Maybe (HashMap Text Text)
$sel:clientAssociationMetadata:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe (HashMap Text Text)
clientAssociationMetadata} -> Maybe (HashMap Text Text)
clientAssociationMetadata) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe (HashMap Text Text)
a -> EventIntegrationAssociation
s {$sel:clientAssociationMetadata:EventIntegrationAssociation' :: Maybe (HashMap Text Text)
clientAssociationMetadata = Maybe (HashMap Text Text)
a} :: EventIntegrationAssociation) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> EventIntegrationAssociation -> f EventIntegrationAssociation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> EventIntegrationAssociation
-> f EventIntegrationAssociation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
eventIntegrationAssociation_eventIntegrationAssociationId :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe Prelude.Text)
eventIntegrationAssociation_eventIntegrationAssociationId :: (Maybe Text -> f (Maybe Text))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_eventIntegrationAssociationId = (EventIntegrationAssociation -> Maybe Text)
-> (EventIntegrationAssociation
-> Maybe Text -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe Text
eventIntegrationAssociationId :: Maybe Text
$sel:eventIntegrationAssociationId:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe Text
eventIntegrationAssociationId} -> Maybe Text
eventIntegrationAssociationId) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe Text
a -> EventIntegrationAssociation
s {$sel:eventIntegrationAssociationId:EventIntegrationAssociation' :: Maybe Text
eventIntegrationAssociationId = Maybe Text
a} :: EventIntegrationAssociation)
eventIntegrationAssociation_eventIntegrationAssociationArn :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe Prelude.Text)
eventIntegrationAssociation_eventIntegrationAssociationArn :: (Maybe Text -> f (Maybe Text))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_eventIntegrationAssociationArn = (EventIntegrationAssociation -> Maybe Text)
-> (EventIntegrationAssociation
-> Maybe Text -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe Text
eventIntegrationAssociationArn :: Maybe Text
$sel:eventIntegrationAssociationArn:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe Text
eventIntegrationAssociationArn} -> Maybe Text
eventIntegrationAssociationArn) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe Text
a -> EventIntegrationAssociation
s {$sel:eventIntegrationAssociationArn:EventIntegrationAssociation' :: Maybe Text
eventIntegrationAssociationArn = Maybe Text
a} :: EventIntegrationAssociation)
eventIntegrationAssociation_eventBridgeRuleName :: Lens.Lens' EventIntegrationAssociation (Prelude.Maybe Prelude.Text)
eventIntegrationAssociation_eventBridgeRuleName :: (Maybe Text -> f (Maybe Text))
-> EventIntegrationAssociation -> f EventIntegrationAssociation
eventIntegrationAssociation_eventBridgeRuleName = (EventIntegrationAssociation -> Maybe Text)
-> (EventIntegrationAssociation
-> Maybe Text -> EventIntegrationAssociation)
-> Lens
EventIntegrationAssociation
EventIntegrationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventIntegrationAssociation' {Maybe Text
eventBridgeRuleName :: Maybe Text
$sel:eventBridgeRuleName:EventIntegrationAssociation' :: EventIntegrationAssociation -> Maybe Text
eventBridgeRuleName} -> Maybe Text
eventBridgeRuleName) (\s :: EventIntegrationAssociation
s@EventIntegrationAssociation' {} Maybe Text
a -> EventIntegrationAssociation
s {$sel:eventBridgeRuleName:EventIntegrationAssociation' :: Maybe Text
eventBridgeRuleName = Maybe Text
a} :: EventIntegrationAssociation)
instance Core.FromJSON EventIntegrationAssociation where
parseJSON :: Value -> Parser EventIntegrationAssociation
parseJSON =
String
-> (Object -> Parser EventIntegrationAssociation)
-> Value
-> Parser EventIntegrationAssociation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventIntegrationAssociation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation
EventIntegrationAssociation'
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientId")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventIntegrationName")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EventIntegrationAssociation)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> EventIntegrationAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientAssociationMetadata"
Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> EventIntegrationAssociation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EventIntegrationAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventIntegrationAssociationId")
Parser (Maybe Text -> Maybe Text -> EventIntegrationAssociation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> EventIntegrationAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventIntegrationAssociationArn")
Parser (Maybe Text -> EventIntegrationAssociation)
-> Parser (Maybe Text) -> Parser EventIntegrationAssociation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventBridgeRuleName")
)
instance Prelude.Hashable EventIntegrationAssociation
instance Prelude.NFData EventIntegrationAssociation