{-# 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.LexV2Models.Types.BotSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.BotStatus
import qualified Amazonka.Prelude as Prelude
data BotSummary = BotSummary'
{
BotSummary -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
BotSummary -> Maybe Text
botName :: Prelude.Maybe Prelude.Text,
BotSummary -> Maybe BotStatus
botStatus :: Prelude.Maybe BotStatus,
BotSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
BotSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
BotSummary -> Maybe Text
latestBotVersion :: Prelude.Maybe Prelude.Text
}
deriving (BotSummary -> BotSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BotSummary -> BotSummary -> Bool
$c/= :: BotSummary -> BotSummary -> Bool
== :: BotSummary -> BotSummary -> Bool
$c== :: BotSummary -> BotSummary -> Bool
Prelude.Eq, ReadPrec [BotSummary]
ReadPrec BotSummary
Int -> ReadS BotSummary
ReadS [BotSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BotSummary]
$creadListPrec :: ReadPrec [BotSummary]
readPrec :: ReadPrec BotSummary
$creadPrec :: ReadPrec BotSummary
readList :: ReadS [BotSummary]
$creadList :: ReadS [BotSummary]
readsPrec :: Int -> ReadS BotSummary
$creadsPrec :: Int -> ReadS BotSummary
Prelude.Read, Int -> BotSummary -> ShowS
[BotSummary] -> ShowS
BotSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BotSummary] -> ShowS
$cshowList :: [BotSummary] -> ShowS
show :: BotSummary -> String
$cshow :: BotSummary -> String
showsPrec :: Int -> BotSummary -> ShowS
$cshowsPrec :: Int -> BotSummary -> ShowS
Prelude.Show, forall x. Rep BotSummary x -> BotSummary
forall x. BotSummary -> Rep BotSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BotSummary x -> BotSummary
$cfrom :: forall x. BotSummary -> Rep BotSummary x
Prelude.Generic)
newBotSummary ::
BotSummary
newBotSummary :: BotSummary
newBotSummary =
BotSummary'
{ $sel:botId:BotSummary' :: Maybe Text
botId = forall a. Maybe a
Prelude.Nothing,
$sel:botName:BotSummary' :: Maybe Text
botName = forall a. Maybe a
Prelude.Nothing,
$sel:botStatus:BotSummary' :: Maybe BotStatus
botStatus = forall a. Maybe a
Prelude.Nothing,
$sel:description:BotSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:BotSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:latestBotVersion:BotSummary' :: Maybe Text
latestBotVersion = forall a. Maybe a
Prelude.Nothing
}
botSummary_botId :: Lens.Lens' BotSummary (Prelude.Maybe Prelude.Text)
botSummary_botId :: Lens' BotSummary (Maybe Text)
botSummary_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe Text
botId :: Maybe Text
$sel:botId:BotSummary' :: BotSummary -> Maybe Text
botId} -> Maybe Text
botId) (\s :: BotSummary
s@BotSummary' {} Maybe Text
a -> BotSummary
s {$sel:botId:BotSummary' :: Maybe Text
botId = Maybe Text
a} :: BotSummary)
botSummary_botName :: Lens.Lens' BotSummary (Prelude.Maybe Prelude.Text)
botSummary_botName :: Lens' BotSummary (Maybe Text)
botSummary_botName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe Text
botName :: Maybe Text
$sel:botName:BotSummary' :: BotSummary -> Maybe Text
botName} -> Maybe Text
botName) (\s :: BotSummary
s@BotSummary' {} Maybe Text
a -> BotSummary
s {$sel:botName:BotSummary' :: Maybe Text
botName = Maybe Text
a} :: BotSummary)
botSummary_botStatus :: Lens.Lens' BotSummary (Prelude.Maybe BotStatus)
botSummary_botStatus :: Lens' BotSummary (Maybe BotStatus)
botSummary_botStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe BotStatus
botStatus :: Maybe BotStatus
$sel:botStatus:BotSummary' :: BotSummary -> Maybe BotStatus
botStatus} -> Maybe BotStatus
botStatus) (\s :: BotSummary
s@BotSummary' {} Maybe BotStatus
a -> BotSummary
s {$sel:botStatus:BotSummary' :: Maybe BotStatus
botStatus = Maybe BotStatus
a} :: BotSummary)
botSummary_description :: Lens.Lens' BotSummary (Prelude.Maybe Prelude.Text)
botSummary_description :: Lens' BotSummary (Maybe Text)
botSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe Text
description :: Maybe Text
$sel:description:BotSummary' :: BotSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: BotSummary
s@BotSummary' {} Maybe Text
a -> BotSummary
s {$sel:description:BotSummary' :: Maybe Text
description = Maybe Text
a} :: BotSummary)
botSummary_lastUpdatedDateTime :: Lens.Lens' BotSummary (Prelude.Maybe Prelude.UTCTime)
botSummary_lastUpdatedDateTime :: Lens' BotSummary (Maybe UTCTime)
botSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:BotSummary' :: BotSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: BotSummary
s@BotSummary' {} Maybe POSIX
a -> BotSummary
s {$sel:lastUpdatedDateTime:BotSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: BotSummary) 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 :: Format). Iso' (Time a) UTCTime
Data._Time
botSummary_latestBotVersion :: Lens.Lens' BotSummary (Prelude.Maybe Prelude.Text)
botSummary_latestBotVersion :: Lens' BotSummary (Maybe Text)
botSummary_latestBotVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotSummary' {Maybe Text
latestBotVersion :: Maybe Text
$sel:latestBotVersion:BotSummary' :: BotSummary -> Maybe Text
latestBotVersion} -> Maybe Text
latestBotVersion) (\s :: BotSummary
s@BotSummary' {} Maybe Text
a -> BotSummary
s {$sel:latestBotVersion:BotSummary' :: Maybe Text
latestBotVersion = Maybe Text
a} :: BotSummary)
instance Data.FromJSON BotSummary where
parseJSON :: Value -> Parser BotSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BotSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe BotStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> BotSummary
BotSummary'
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
"botName")
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
"botStatus")
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
"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
"lastUpdatedDateTime")
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
"latestBotVersion")
)
instance Prelude.Hashable BotSummary where
hashWithSalt :: Int -> BotSummary -> Int
hashWithSalt Int
_salt BotSummary' {Maybe Text
Maybe POSIX
Maybe BotStatus
latestBotVersion :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
botStatus :: Maybe BotStatus
botName :: Maybe Text
botId :: Maybe Text
$sel:latestBotVersion:BotSummary' :: BotSummary -> Maybe Text
$sel:lastUpdatedDateTime:BotSummary' :: BotSummary -> Maybe POSIX
$sel:description:BotSummary' :: BotSummary -> Maybe Text
$sel:botStatus:BotSummary' :: BotSummary -> Maybe BotStatus
$sel:botName:BotSummary' :: BotSummary -> Maybe Text
$sel:botId:BotSummary' :: BotSummary -> 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 Text
botName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BotStatus
botStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
latestBotVersion
instance Prelude.NFData BotSummary where
rnf :: BotSummary -> ()
rnf BotSummary' {Maybe Text
Maybe POSIX
Maybe BotStatus
latestBotVersion :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
description :: Maybe Text
botStatus :: Maybe BotStatus
botName :: Maybe Text
botId :: Maybe Text
$sel:latestBotVersion:BotSummary' :: BotSummary -> Maybe Text
$sel:lastUpdatedDateTime:BotSummary' :: BotSummary -> Maybe POSIX
$sel:description:BotSummary' :: BotSummary -> Maybe Text
$sel:botStatus:BotSummary' :: BotSummary -> Maybe BotStatus
$sel:botName:BotSummary' :: BotSummary -> Maybe Text
$sel:botId:BotSummary' :: BotSummary -> 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 Text
botName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BotStatus
botStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 POSIX
lastUpdatedDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestBotVersion