{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Chime.Types.Bot
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Chime.Types.Bot where

import Amazonka.Chime.Types.BotType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A resource that allows Enterprise account administrators to configure an
-- interface to receive events from Amazon Chime.
--
-- /See:/ 'newBot' smart constructor.
data Bot = Bot'
  { -- | The security token used to authenticate Amazon Chime with the outgoing
    -- event endpoint.
    Bot -> Maybe (Sensitive Text)
securityToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | When true, the bot is stopped from running in your account.
    Bot -> Maybe Bool
disabled :: Prelude.Maybe Prelude.Bool,
    -- | The updated bot timestamp, in ISO 8601 format.
    Bot -> Maybe POSIX
updatedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The unique ID for the bot user.
    Bot -> Maybe Text
userId :: Prelude.Maybe Prelude.Text,
    -- | The bot ID.
    Bot -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
    -- | The bot display name.
    Bot -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The bot email address.
    Bot -> Maybe (Sensitive Text)
botEmail :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The bot creation timestamp, in ISO 8601 format.
    Bot -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The bot type.
    Bot -> Maybe BotType
botType :: Prelude.Maybe BotType
  }
  deriving (Bot -> Bot -> Bool
(Bot -> Bot -> Bool) -> (Bot -> Bot -> Bool) -> Eq Bot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Bot -> Bot -> Bool
$c/= :: Bot -> Bot -> Bool
== :: Bot -> Bot -> Bool
$c== :: Bot -> Bot -> Bool
Prelude.Eq, Int -> Bot -> ShowS
[Bot] -> ShowS
Bot -> String
(Int -> Bot -> ShowS)
-> (Bot -> String) -> ([Bot] -> ShowS) -> Show Bot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Bot] -> ShowS
$cshowList :: [Bot] -> ShowS
show :: Bot -> String
$cshow :: Bot -> String
showsPrec :: Int -> Bot -> ShowS
$cshowsPrec :: Int -> Bot -> ShowS
Prelude.Show, (forall x. Bot -> Rep Bot x)
-> (forall x. Rep Bot x -> Bot) -> Generic Bot
forall x. Rep Bot x -> Bot
forall x. Bot -> Rep Bot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Bot x -> Bot
$cfrom :: forall x. Bot -> Rep Bot x
Prelude.Generic)

-- |
-- Create a value of 'Bot' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'securityToken', 'bot_securityToken' - The security token used to authenticate Amazon Chime with the outgoing
-- event endpoint.
--
-- 'disabled', 'bot_disabled' - When true, the bot is stopped from running in your account.
--
-- 'updatedTimestamp', 'bot_updatedTimestamp' - The updated bot timestamp, in ISO 8601 format.
--
-- 'userId', 'bot_userId' - The unique ID for the bot user.
--
-- 'botId', 'bot_botId' - The bot ID.
--
-- 'displayName', 'bot_displayName' - The bot display name.
--
-- 'botEmail', 'bot_botEmail' - The bot email address.
--
-- 'createdTimestamp', 'bot_createdTimestamp' - The bot creation timestamp, in ISO 8601 format.
--
-- 'botType', 'bot_botType' - The bot type.
newBot ::
  Bot
newBot :: Bot
newBot =
  Bot' :: Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe BotType
-> Bot
Bot'
    { $sel:securityToken:Bot' :: Maybe (Sensitive Text)
securityToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:disabled:Bot' :: Maybe Bool
disabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedTimestamp:Bot' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:userId:Bot' :: Maybe Text
userId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:botId:Bot' :: Maybe Text
botId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Bot' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:botEmail:Bot' :: Maybe (Sensitive Text)
botEmail = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:Bot' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:botType:Bot' :: Maybe BotType
botType = Maybe BotType
forall a. Maybe a
Prelude.Nothing
    }

-- | The security token used to authenticate Amazon Chime with the outgoing
-- event endpoint.
bot_securityToken :: Lens.Lens' Bot (Prelude.Maybe Prelude.Text)
bot_securityToken :: (Maybe Text -> f (Maybe Text)) -> Bot -> f Bot
bot_securityToken = (Bot -> Maybe (Sensitive Text))
-> (Bot -> Maybe (Sensitive Text) -> Bot)
-> Lens Bot Bot (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe (Sensitive Text)
securityToken :: Maybe (Sensitive Text)
$sel:securityToken:Bot' :: Bot -> Maybe (Sensitive Text)
securityToken} -> Maybe (Sensitive Text)
securityToken) (\s :: Bot
s@Bot' {} Maybe (Sensitive Text)
a -> Bot
s {$sel:securityToken:Bot' :: Maybe (Sensitive Text)
securityToken = Maybe (Sensitive Text)
a} :: Bot) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> Bot -> f Bot)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Bot
-> f Bot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | When true, the bot is stopped from running in your account.
bot_disabled :: Lens.Lens' Bot (Prelude.Maybe Prelude.Bool)
bot_disabled :: (Maybe Bool -> f (Maybe Bool)) -> Bot -> f Bot
bot_disabled = (Bot -> Maybe Bool)
-> (Bot -> Maybe Bool -> Bot)
-> Lens Bot Bot (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe Bool
disabled :: Maybe Bool
$sel:disabled:Bot' :: Bot -> Maybe Bool
disabled} -> Maybe Bool
disabled) (\s :: Bot
s@Bot' {} Maybe Bool
a -> Bot
s {$sel:disabled:Bot' :: Maybe Bool
disabled = Maybe Bool
a} :: Bot)

-- | The updated bot timestamp, in ISO 8601 format.
bot_updatedTimestamp :: Lens.Lens' Bot (Prelude.Maybe Prelude.UTCTime)
bot_updatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Bot -> f Bot
bot_updatedTimestamp = (Bot -> Maybe POSIX)
-> (Bot -> Maybe POSIX -> Bot)
-> Lens Bot Bot (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe POSIX
updatedTimestamp :: Maybe POSIX
$sel:updatedTimestamp:Bot' :: Bot -> Maybe POSIX
updatedTimestamp} -> Maybe POSIX
updatedTimestamp) (\s :: Bot
s@Bot' {} Maybe POSIX
a -> Bot
s {$sel:updatedTimestamp:Bot' :: Maybe POSIX
updatedTimestamp = Maybe POSIX
a} :: Bot) ((Maybe POSIX -> f (Maybe POSIX)) -> Bot -> f Bot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Bot
-> f Bot
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

-- | The unique ID for the bot user.
bot_userId :: Lens.Lens' Bot (Prelude.Maybe Prelude.Text)
bot_userId :: (Maybe Text -> f (Maybe Text)) -> Bot -> f Bot
bot_userId = (Bot -> Maybe Text)
-> (Bot -> Maybe Text -> Bot)
-> Lens Bot Bot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe Text
userId :: Maybe Text
$sel:userId:Bot' :: Bot -> Maybe Text
userId} -> Maybe Text
userId) (\s :: Bot
s@Bot' {} Maybe Text
a -> Bot
s {$sel:userId:Bot' :: Maybe Text
userId = Maybe Text
a} :: Bot)

-- | The bot ID.
bot_botId :: Lens.Lens' Bot (Prelude.Maybe Prelude.Text)
bot_botId :: (Maybe Text -> f (Maybe Text)) -> Bot -> f Bot
bot_botId = (Bot -> Maybe Text)
-> (Bot -> Maybe Text -> Bot)
-> Lens Bot Bot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe Text
botId :: Maybe Text
$sel:botId:Bot' :: Bot -> Maybe Text
botId} -> Maybe Text
botId) (\s :: Bot
s@Bot' {} Maybe Text
a -> Bot
s {$sel:botId:Bot' :: Maybe Text
botId = Maybe Text
a} :: Bot)

-- | The bot display name.
bot_displayName :: Lens.Lens' Bot (Prelude.Maybe Prelude.Text)
bot_displayName :: (Maybe Text -> f (Maybe Text)) -> Bot -> f Bot
bot_displayName = (Bot -> Maybe (Sensitive Text))
-> (Bot -> Maybe (Sensitive Text) -> Bot)
-> Lens Bot Bot (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:Bot' :: Bot -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: Bot
s@Bot' {} Maybe (Sensitive Text)
a -> Bot
s {$sel:displayName:Bot' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: Bot) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> Bot -> f Bot)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Bot
-> f Bot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The bot email address.
bot_botEmail :: Lens.Lens' Bot (Prelude.Maybe Prelude.Text)
bot_botEmail :: (Maybe Text -> f (Maybe Text)) -> Bot -> f Bot
bot_botEmail = (Bot -> Maybe (Sensitive Text))
-> (Bot -> Maybe (Sensitive Text) -> Bot)
-> Lens Bot Bot (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe (Sensitive Text)
botEmail :: Maybe (Sensitive Text)
$sel:botEmail:Bot' :: Bot -> Maybe (Sensitive Text)
botEmail} -> Maybe (Sensitive Text)
botEmail) (\s :: Bot
s@Bot' {} Maybe (Sensitive Text)
a -> Bot
s {$sel:botEmail:Bot' :: Maybe (Sensitive Text)
botEmail = Maybe (Sensitive Text)
a} :: Bot) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> Bot -> f Bot)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Bot
-> f Bot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The bot creation timestamp, in ISO 8601 format.
bot_createdTimestamp :: Lens.Lens' Bot (Prelude.Maybe Prelude.UTCTime)
bot_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Bot -> f Bot
bot_createdTimestamp = (Bot -> Maybe POSIX)
-> (Bot -> Maybe POSIX -> Bot)
-> Lens Bot Bot (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:Bot' :: Bot -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: Bot
s@Bot' {} Maybe POSIX
a -> Bot
s {$sel:createdTimestamp:Bot' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: Bot) ((Maybe POSIX -> f (Maybe POSIX)) -> Bot -> f Bot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Bot
-> f Bot
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

-- | The bot type.
bot_botType :: Lens.Lens' Bot (Prelude.Maybe BotType)
bot_botType :: (Maybe BotType -> f (Maybe BotType)) -> Bot -> f Bot
bot_botType = (Bot -> Maybe BotType)
-> (Bot -> Maybe BotType -> Bot)
-> Lens Bot Bot (Maybe BotType) (Maybe BotType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bot' {Maybe BotType
botType :: Maybe BotType
$sel:botType:Bot' :: Bot -> Maybe BotType
botType} -> Maybe BotType
botType) (\s :: Bot
s@Bot' {} Maybe BotType
a -> Bot
s {$sel:botType:Bot' :: Maybe BotType
botType = Maybe BotType
a} :: Bot)

instance Core.FromJSON Bot where
  parseJSON :: Value -> Parser Bot
parseJSON =
    String -> (Object -> Parser Bot) -> Value -> Parser Bot
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Bot"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe BotType
-> Bot
Bot'
            (Maybe (Sensitive Text)
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe POSIX
 -> Maybe BotType
 -> Bot)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe BotType
      -> Bot)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityToken")
            Parser
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe BotType
   -> Bot)
-> Parser (Maybe Bool)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe BotType
      -> Bot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Disabled")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe BotType
   -> Bot)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe BotType
      -> Bot)
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
"UpdatedTimestamp")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe BotType
   -> Bot)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> Maybe BotType
      -> Bot)
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
"UserId")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> Maybe BotType
   -> Bot)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe (Sensitive Text) -> Maybe POSIX -> Maybe BotType -> Bot)
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
"BotId")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe (Sensitive Text) -> Maybe POSIX -> Maybe BotType -> Bot)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe (Sensitive Text) -> Maybe POSIX -> Maybe BotType -> Bot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisplayName")
            Parser
  (Maybe (Sensitive Text) -> Maybe POSIX -> Maybe BotType -> Bot)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe POSIX -> Maybe BotType -> Bot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BotEmail")
            Parser (Maybe POSIX -> Maybe BotType -> Bot)
-> Parser (Maybe POSIX) -> Parser (Maybe BotType -> Bot)
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
"CreatedTimestamp")
            Parser (Maybe BotType -> Bot)
-> Parser (Maybe BotType) -> Parser Bot
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BotType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BotType")
      )

instance Prelude.Hashable Bot

instance Prelude.NFData Bot