{-# 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.Chime.Types.EventsConfiguration where
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 EventsConfiguration = EventsConfiguration'
{
EventsConfiguration -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
EventsConfiguration -> Maybe (Sensitive Text)
lambdaFunctionArn :: Prelude.Maybe (Data.Sensitive Prelude.Text),
EventsConfiguration -> Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint :: Prelude.Maybe (Data.Sensitive Prelude.Text)
}
deriving (EventsConfiguration -> EventsConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventsConfiguration -> EventsConfiguration -> Bool
$c/= :: EventsConfiguration -> EventsConfiguration -> Bool
== :: EventsConfiguration -> EventsConfiguration -> Bool
$c== :: EventsConfiguration -> EventsConfiguration -> Bool
Prelude.Eq, Int -> EventsConfiguration -> ShowS
[EventsConfiguration] -> ShowS
EventsConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventsConfiguration] -> ShowS
$cshowList :: [EventsConfiguration] -> ShowS
show :: EventsConfiguration -> String
$cshow :: EventsConfiguration -> String
showsPrec :: Int -> EventsConfiguration -> ShowS
$cshowsPrec :: Int -> EventsConfiguration -> ShowS
Prelude.Show, forall x. Rep EventsConfiguration x -> EventsConfiguration
forall x. EventsConfiguration -> Rep EventsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventsConfiguration x -> EventsConfiguration
$cfrom :: forall x. EventsConfiguration -> Rep EventsConfiguration x
Prelude.Generic)
newEventsConfiguration ::
EventsConfiguration
newEventsConfiguration :: EventsConfiguration
newEventsConfiguration =
EventsConfiguration'
{ $sel:botId:EventsConfiguration' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
$sel:lambdaFunctionArn:EventsConfiguration' :: Maybe (Sensitive Text)
lambdaFunctionArn = forall a. Maybe a
Prelude.Nothing,
$sel:outboundEventsHTTPSEndpoint:EventsConfiguration' :: Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint = forall a. Maybe a
Prelude.Nothing
}
eventsConfiguration_botId :: Lens.Lens' EventsConfiguration (Prelude.Maybe Prelude.Text)
eventsConfiguration_botId :: Lens' EventsConfiguration (Maybe Text)
eventsConfiguration_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsConfiguration' {Maybe Text
botId :: Maybe Text
$sel:botId:EventsConfiguration' :: EventsConfiguration -> Maybe Text
botId} -> Maybe Text
botId) (\s :: EventsConfiguration
s@EventsConfiguration' {} Maybe Text
a -> EventsConfiguration
s {$sel:botId:EventsConfiguration' :: Maybe Text
botId = Maybe Text
a} :: EventsConfiguration)
eventsConfiguration_lambdaFunctionArn :: Lens.Lens' EventsConfiguration (Prelude.Maybe Prelude.Text)
eventsConfiguration_lambdaFunctionArn :: Lens' EventsConfiguration (Maybe Text)
eventsConfiguration_lambdaFunctionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsConfiguration' {Maybe (Sensitive Text)
lambdaFunctionArn :: Maybe (Sensitive Text)
$sel:lambdaFunctionArn:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
lambdaFunctionArn} -> Maybe (Sensitive Text)
lambdaFunctionArn) (\s :: EventsConfiguration
s@EventsConfiguration' {} Maybe (Sensitive Text)
a -> EventsConfiguration
s {$sel:lambdaFunctionArn:EventsConfiguration' :: Maybe (Sensitive Text)
lambdaFunctionArn = Maybe (Sensitive Text)
a} :: EventsConfiguration) 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 a. Iso' (Sensitive a) a
Data._Sensitive
eventsConfiguration_outboundEventsHTTPSEndpoint :: Lens.Lens' EventsConfiguration (Prelude.Maybe Prelude.Text)
eventsConfiguration_outboundEventsHTTPSEndpoint :: Lens' EventsConfiguration (Maybe Text)
eventsConfiguration_outboundEventsHTTPSEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsConfiguration' {Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint :: Maybe (Sensitive Text)
$sel:outboundEventsHTTPSEndpoint:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint} -> Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint) (\s :: EventsConfiguration
s@EventsConfiguration' {} Maybe (Sensitive Text)
a -> EventsConfiguration
s {$sel:outboundEventsHTTPSEndpoint:EventsConfiguration' :: Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint = Maybe (Sensitive Text)
a} :: EventsConfiguration) 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 a. Iso' (Sensitive a) a
Data._Sensitive
instance Data.FromJSON EventsConfiguration where
parseJSON :: Value -> Parser EventsConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EventsConfiguration"
( \Object
x ->
Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> EventsConfiguration
EventsConfiguration'
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
"BotId")
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
"LambdaFunctionArn")
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
"OutboundEventsHTTPSEndpoint")
)
instance Prelude.Hashable EventsConfiguration where
hashWithSalt :: Int -> EventsConfiguration -> Int
hashWithSalt Int
_salt EventsConfiguration' {Maybe Text
Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint :: Maybe (Sensitive Text)
lambdaFunctionArn :: Maybe (Sensitive Text)
botId :: Maybe Text
$sel:outboundEventsHTTPSEndpoint:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
$sel:lambdaFunctionArn:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
$sel:botId:EventsConfiguration' :: EventsConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
botId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
lambdaFunctionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint
instance Prelude.NFData EventsConfiguration where
rnf :: EventsConfiguration -> ()
rnf EventsConfiguration' {Maybe Text
Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint :: Maybe (Sensitive Text)
lambdaFunctionArn :: Maybe (Sensitive Text)
botId :: Maybe Text
$sel:outboundEventsHTTPSEndpoint:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
$sel:lambdaFunctionArn:EventsConfiguration' :: EventsConfiguration -> Maybe (Sensitive Text)
$sel:botId:EventsConfiguration' :: EventsConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
lambdaFunctionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
outboundEventsHTTPSEndpoint