{-# 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.LexModels.Types.BotChannelAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types.ChannelStatus
import Amazonka.LexModels.Types.ChannelType
import qualified Amazonka.Prelude as Prelude
data BotChannelAssociation = BotChannelAssociation'
{
BotChannelAssociation -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
BotChannelAssociation -> Maybe ChannelStatus
status :: Prelude.Maybe ChannelStatus,
BotChannelAssociation -> Maybe Text
botAlias :: Prelude.Maybe Prelude.Text,
BotChannelAssociation -> Maybe Text
botName :: Prelude.Maybe Prelude.Text,
BotChannelAssociation -> Maybe (Sensitive (HashMap Text Text))
botConfiguration :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
BotChannelAssociation -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
BotChannelAssociation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
BotChannelAssociation -> Maybe ChannelType
type' :: Prelude.Maybe ChannelType,
BotChannelAssociation -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (BotChannelAssociation -> BotChannelAssociation -> Bool
(BotChannelAssociation -> BotChannelAssociation -> Bool)
-> (BotChannelAssociation -> BotChannelAssociation -> Bool)
-> Eq BotChannelAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BotChannelAssociation -> BotChannelAssociation -> Bool
$c/= :: BotChannelAssociation -> BotChannelAssociation -> Bool
== :: BotChannelAssociation -> BotChannelAssociation -> Bool
$c== :: BotChannelAssociation -> BotChannelAssociation -> Bool
Prelude.Eq, Int -> BotChannelAssociation -> ShowS
[BotChannelAssociation] -> ShowS
BotChannelAssociation -> String
(Int -> BotChannelAssociation -> ShowS)
-> (BotChannelAssociation -> String)
-> ([BotChannelAssociation] -> ShowS)
-> Show BotChannelAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BotChannelAssociation] -> ShowS
$cshowList :: [BotChannelAssociation] -> ShowS
show :: BotChannelAssociation -> String
$cshow :: BotChannelAssociation -> String
showsPrec :: Int -> BotChannelAssociation -> ShowS
$cshowsPrec :: Int -> BotChannelAssociation -> ShowS
Prelude.Show, (forall x. BotChannelAssociation -> Rep BotChannelAssociation x)
-> (forall x. Rep BotChannelAssociation x -> BotChannelAssociation)
-> Generic BotChannelAssociation
forall x. Rep BotChannelAssociation x -> BotChannelAssociation
forall x. BotChannelAssociation -> Rep BotChannelAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BotChannelAssociation x -> BotChannelAssociation
$cfrom :: forall x. BotChannelAssociation -> Rep BotChannelAssociation x
Prelude.Generic)
newBotChannelAssociation ::
BotChannelAssociation
newBotChannelAssociation :: BotChannelAssociation
newBotChannelAssociation =
BotChannelAssociation' :: Maybe Text
-> Maybe ChannelStatus
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation
BotChannelAssociation'
{ $sel:failureReason:BotChannelAssociation' :: Maybe Text
failureReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:BotChannelAssociation' :: Maybe ChannelStatus
status = Maybe ChannelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:botAlias:BotChannelAssociation' :: Maybe Text
botAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:botName:BotChannelAssociation' :: Maybe Text
botName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:botConfiguration:BotChannelAssociation' :: Maybe (Sensitive (HashMap Text Text))
botConfiguration = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:BotChannelAssociation' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:BotChannelAssociation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':BotChannelAssociation' :: Maybe ChannelType
type' = Maybe ChannelType
forall a. Maybe a
Prelude.Nothing,
$sel:description:BotChannelAssociation' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
botChannelAssociation_failureReason :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.Text)
botChannelAssociation_failureReason :: (Maybe Text -> f (Maybe Text))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_failureReason = (BotChannelAssociation -> Maybe Text)
-> (BotChannelAssociation -> Maybe Text -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:BotChannelAssociation' :: BotChannelAssociation -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe Text
a -> BotChannelAssociation
s {$sel:failureReason:BotChannelAssociation' :: Maybe Text
failureReason = Maybe Text
a} :: BotChannelAssociation)
botChannelAssociation_status :: Lens.Lens' BotChannelAssociation (Prelude.Maybe ChannelStatus)
botChannelAssociation_status :: (Maybe ChannelStatus -> f (Maybe ChannelStatus))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_status = (BotChannelAssociation -> Maybe ChannelStatus)
-> (BotChannelAssociation
-> Maybe ChannelStatus -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe ChannelStatus)
(Maybe ChannelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe ChannelStatus
status :: Maybe ChannelStatus
$sel:status:BotChannelAssociation' :: BotChannelAssociation -> Maybe ChannelStatus
status} -> Maybe ChannelStatus
status) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe ChannelStatus
a -> BotChannelAssociation
s {$sel:status:BotChannelAssociation' :: Maybe ChannelStatus
status = Maybe ChannelStatus
a} :: BotChannelAssociation)
botChannelAssociation_botAlias :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.Text)
botChannelAssociation_botAlias :: (Maybe Text -> f (Maybe Text))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_botAlias = (BotChannelAssociation -> Maybe Text)
-> (BotChannelAssociation -> Maybe Text -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe Text
botAlias :: Maybe Text
$sel:botAlias:BotChannelAssociation' :: BotChannelAssociation -> Maybe Text
botAlias} -> Maybe Text
botAlias) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe Text
a -> BotChannelAssociation
s {$sel:botAlias:BotChannelAssociation' :: Maybe Text
botAlias = Maybe Text
a} :: BotChannelAssociation)
botChannelAssociation_botName :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.Text)
botChannelAssociation_botName :: (Maybe Text -> f (Maybe Text))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_botName = (BotChannelAssociation -> Maybe Text)
-> (BotChannelAssociation -> Maybe Text -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe Text
botName :: Maybe Text
$sel:botName:BotChannelAssociation' :: BotChannelAssociation -> Maybe Text
botName} -> Maybe Text
botName) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe Text
a -> BotChannelAssociation
s {$sel:botName:BotChannelAssociation' :: Maybe Text
botName = Maybe Text
a} :: BotChannelAssociation)
botChannelAssociation_botConfiguration :: Lens.Lens' BotChannelAssociation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
botChannelAssociation_botConfiguration :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_botConfiguration = (BotChannelAssociation -> Maybe (Sensitive (HashMap Text Text)))
-> (BotChannelAssociation
-> Maybe (Sensitive (HashMap Text Text)) -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe (Sensitive (HashMap Text Text))
botConfiguration :: Maybe (Sensitive (HashMap Text Text))
$sel:botConfiguration:BotChannelAssociation' :: BotChannelAssociation -> Maybe (Sensitive (HashMap Text Text))
botConfiguration} -> Maybe (Sensitive (HashMap Text Text))
botConfiguration) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe (Sensitive (HashMap Text Text))
a -> BotChannelAssociation
s {$sel:botConfiguration:BotChannelAssociation' :: Maybe (Sensitive (HashMap Text Text))
botConfiguration = Maybe (Sensitive (HashMap Text Text))
a} :: BotChannelAssociation) ((Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> BotChannelAssociation -> f BotChannelAssociation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BotChannelAssociation
-> f BotChannelAssociation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (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
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text)))
-> AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
botChannelAssociation_createdDate :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.UTCTime)
botChannelAssociation_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_createdDate = (BotChannelAssociation -> Maybe POSIX)
-> (BotChannelAssociation -> Maybe POSIX -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:BotChannelAssociation' :: BotChannelAssociation -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe POSIX
a -> BotChannelAssociation
s {$sel:createdDate:BotChannelAssociation' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: BotChannelAssociation) ((Maybe POSIX -> f (Maybe POSIX))
-> BotChannelAssociation -> f BotChannelAssociation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BotChannelAssociation
-> f BotChannelAssociation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
botChannelAssociation_name :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.Text)
botChannelAssociation_name :: (Maybe Text -> f (Maybe Text))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_name = (BotChannelAssociation -> Maybe Text)
-> (BotChannelAssociation -> Maybe Text -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe Text
name :: Maybe Text
$sel:name:BotChannelAssociation' :: BotChannelAssociation -> Maybe Text
name} -> Maybe Text
name) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe Text
a -> BotChannelAssociation
s {$sel:name:BotChannelAssociation' :: Maybe Text
name = Maybe Text
a} :: BotChannelAssociation)
botChannelAssociation_type :: Lens.Lens' BotChannelAssociation (Prelude.Maybe ChannelType)
botChannelAssociation_type :: (Maybe ChannelType -> f (Maybe ChannelType))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_type = (BotChannelAssociation -> Maybe ChannelType)
-> (BotChannelAssociation
-> Maybe ChannelType -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe ChannelType)
(Maybe ChannelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe ChannelType
type' :: Maybe ChannelType
$sel:type':BotChannelAssociation' :: BotChannelAssociation -> Maybe ChannelType
type'} -> Maybe ChannelType
type') (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe ChannelType
a -> BotChannelAssociation
s {$sel:type':BotChannelAssociation' :: Maybe ChannelType
type' = Maybe ChannelType
a} :: BotChannelAssociation)
botChannelAssociation_description :: Lens.Lens' BotChannelAssociation (Prelude.Maybe Prelude.Text)
botChannelAssociation_description :: (Maybe Text -> f (Maybe Text))
-> BotChannelAssociation -> f BotChannelAssociation
botChannelAssociation_description = (BotChannelAssociation -> Maybe Text)
-> (BotChannelAssociation -> Maybe Text -> BotChannelAssociation)
-> Lens
BotChannelAssociation
BotChannelAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotChannelAssociation' {Maybe Text
description :: Maybe Text
$sel:description:BotChannelAssociation' :: BotChannelAssociation -> Maybe Text
description} -> Maybe Text
description) (\s :: BotChannelAssociation
s@BotChannelAssociation' {} Maybe Text
a -> BotChannelAssociation
s {$sel:description:BotChannelAssociation' :: Maybe Text
description = Maybe Text
a} :: BotChannelAssociation)
instance Core.FromJSON BotChannelAssociation where
parseJSON :: Value -> Parser BotChannelAssociation
parseJSON =
String
-> (Object -> Parser BotChannelAssociation)
-> Value
-> Parser BotChannelAssociation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BotChannelAssociation"
( \Object
x ->
Maybe Text
-> Maybe ChannelStatus
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation
BotChannelAssociation'
(Maybe Text
-> Maybe ChannelStatus
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelStatus
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
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
"failureReason")
Parser
(Maybe ChannelStatus
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe ChannelStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
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
"botAlias")
Parser
(Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
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
"botName")
Parser
(Maybe (Sensitive (HashMap Text Text))
-> Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe (Sensitive (HashMap Text Text)))
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe (Sensitive (HashMap Text Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"botConfiguration"
Parser (Maybe (Maybe (Sensitive (HashMap Text Text))))
-> Maybe (Sensitive (HashMap Text Text))
-> Parser (Maybe (Sensitive (HashMap Text Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (Sensitive (HashMap Text Text))
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ChannelType
-> Maybe Text
-> BotChannelAssociation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ChannelType -> Maybe Text -> BotChannelAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdDate")
Parser
(Maybe Text
-> Maybe ChannelType -> Maybe Text -> BotChannelAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe ChannelType -> Maybe Text -> BotChannelAssociation)
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
"name")
Parser (Maybe ChannelType -> Maybe Text -> BotChannelAssociation)
-> Parser (Maybe ChannelType)
-> Parser (Maybe Text -> BotChannelAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe Text -> BotChannelAssociation)
-> Parser (Maybe Text) -> Parser BotChannelAssociation
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
"description")
)
instance Prelude.Hashable BotChannelAssociation
instance Prelude.NFData BotChannelAssociation