{-# 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.BotRecommendationSummary 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.BotRecommendationStatus
import qualified Amazonka.Prelude as Prelude
data BotRecommendationSummary = BotRecommendationSummary'
{
BotRecommendationSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
BotRecommendationSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
BotRecommendationSummary -> BotRecommendationStatus
botRecommendationStatus :: BotRecommendationStatus,
BotRecommendationSummary -> Text
botRecommendationId :: Prelude.Text
}
deriving (BotRecommendationSummary -> BotRecommendationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BotRecommendationSummary -> BotRecommendationSummary -> Bool
$c/= :: BotRecommendationSummary -> BotRecommendationSummary -> Bool
== :: BotRecommendationSummary -> BotRecommendationSummary -> Bool
$c== :: BotRecommendationSummary -> BotRecommendationSummary -> Bool
Prelude.Eq, ReadPrec [BotRecommendationSummary]
ReadPrec BotRecommendationSummary
Int -> ReadS BotRecommendationSummary
ReadS [BotRecommendationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BotRecommendationSummary]
$creadListPrec :: ReadPrec [BotRecommendationSummary]
readPrec :: ReadPrec BotRecommendationSummary
$creadPrec :: ReadPrec BotRecommendationSummary
readList :: ReadS [BotRecommendationSummary]
$creadList :: ReadS [BotRecommendationSummary]
readsPrec :: Int -> ReadS BotRecommendationSummary
$creadsPrec :: Int -> ReadS BotRecommendationSummary
Prelude.Read, Int -> BotRecommendationSummary -> ShowS
[BotRecommendationSummary] -> ShowS
BotRecommendationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BotRecommendationSummary] -> ShowS
$cshowList :: [BotRecommendationSummary] -> ShowS
show :: BotRecommendationSummary -> String
$cshow :: BotRecommendationSummary -> String
showsPrec :: Int -> BotRecommendationSummary -> ShowS
$cshowsPrec :: Int -> BotRecommendationSummary -> ShowS
Prelude.Show, forall x.
Rep BotRecommendationSummary x -> BotRecommendationSummary
forall x.
BotRecommendationSummary -> Rep BotRecommendationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BotRecommendationSummary x -> BotRecommendationSummary
$cfrom :: forall x.
BotRecommendationSummary -> Rep BotRecommendationSummary x
Prelude.Generic)
newBotRecommendationSummary ::
BotRecommendationStatus ->
Prelude.Text ->
BotRecommendationSummary
newBotRecommendationSummary :: BotRecommendationStatus -> Text -> BotRecommendationSummary
newBotRecommendationSummary
BotRecommendationStatus
pBotRecommendationStatus_
Text
pBotRecommendationId_ =
BotRecommendationSummary'
{ $sel:creationDateTime:BotRecommendationSummary' :: Maybe POSIX
creationDateTime =
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:BotRecommendationSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:botRecommendationStatus:BotRecommendationSummary' :: BotRecommendationStatus
botRecommendationStatus =
BotRecommendationStatus
pBotRecommendationStatus_,
$sel:botRecommendationId:BotRecommendationSummary' :: Text
botRecommendationId = Text
pBotRecommendationId_
}
botRecommendationSummary_creationDateTime :: Lens.Lens' BotRecommendationSummary (Prelude.Maybe Prelude.UTCTime)
botRecommendationSummary_creationDateTime :: Lens' BotRecommendationSummary (Maybe UTCTime)
botRecommendationSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotRecommendationSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: BotRecommendationSummary
s@BotRecommendationSummary' {} Maybe POSIX
a -> BotRecommendationSummary
s {$sel:creationDateTime:BotRecommendationSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: BotRecommendationSummary) 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
botRecommendationSummary_lastUpdatedDateTime :: Lens.Lens' BotRecommendationSummary (Prelude.Maybe Prelude.UTCTime)
botRecommendationSummary_lastUpdatedDateTime :: Lens' BotRecommendationSummary (Maybe UTCTime)
botRecommendationSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotRecommendationSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: BotRecommendationSummary
s@BotRecommendationSummary' {} Maybe POSIX
a -> BotRecommendationSummary
s {$sel:lastUpdatedDateTime:BotRecommendationSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: BotRecommendationSummary) 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
botRecommendationSummary_botRecommendationStatus :: Lens.Lens' BotRecommendationSummary BotRecommendationStatus
botRecommendationSummary_botRecommendationStatus :: Lens' BotRecommendationSummary BotRecommendationStatus
botRecommendationSummary_botRecommendationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotRecommendationSummary' {BotRecommendationStatus
botRecommendationStatus :: BotRecommendationStatus
$sel:botRecommendationStatus:BotRecommendationSummary' :: BotRecommendationSummary -> BotRecommendationStatus
botRecommendationStatus} -> BotRecommendationStatus
botRecommendationStatus) (\s :: BotRecommendationSummary
s@BotRecommendationSummary' {} BotRecommendationStatus
a -> BotRecommendationSummary
s {$sel:botRecommendationStatus:BotRecommendationSummary' :: BotRecommendationStatus
botRecommendationStatus = BotRecommendationStatus
a} :: BotRecommendationSummary)
botRecommendationSummary_botRecommendationId :: Lens.Lens' BotRecommendationSummary Prelude.Text
botRecommendationSummary_botRecommendationId :: Lens' BotRecommendationSummary Text
botRecommendationSummary_botRecommendationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotRecommendationSummary' {Text
botRecommendationId :: Text
$sel:botRecommendationId:BotRecommendationSummary' :: BotRecommendationSummary -> Text
botRecommendationId} -> Text
botRecommendationId) (\s :: BotRecommendationSummary
s@BotRecommendationSummary' {} Text
a -> BotRecommendationSummary
s {$sel:botRecommendationId:BotRecommendationSummary' :: Text
botRecommendationId = Text
a} :: BotRecommendationSummary)
instance Data.FromJSON BotRecommendationSummary where
parseJSON :: Value -> Parser BotRecommendationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BotRecommendationSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> BotRecommendationStatus
-> Text
-> BotRecommendationSummary
BotRecommendationSummary'
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
"creationDateTime")
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 a
Data..: Key
"botRecommendationStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"botRecommendationId")
)
instance Prelude.Hashable BotRecommendationSummary where
hashWithSalt :: Int -> BotRecommendationSummary -> Int
hashWithSalt Int
_salt BotRecommendationSummary' {Maybe POSIX
Text
BotRecommendationStatus
botRecommendationId :: Text
botRecommendationStatus :: BotRecommendationStatus
lastUpdatedDateTime :: Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:botRecommendationId:BotRecommendationSummary' :: BotRecommendationSummary -> Text
$sel:botRecommendationStatus:BotRecommendationSummary' :: BotRecommendationSummary -> BotRecommendationStatus
$sel:lastUpdatedDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
$sel:creationDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BotRecommendationStatus
botRecommendationStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botRecommendationId
instance Prelude.NFData BotRecommendationSummary where
rnf :: BotRecommendationSummary -> ()
rnf BotRecommendationSummary' {Maybe POSIX
Text
BotRecommendationStatus
botRecommendationId :: Text
botRecommendationStatus :: BotRecommendationStatus
lastUpdatedDateTime :: Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:botRecommendationId:BotRecommendationSummary' :: BotRecommendationSummary -> Text
$sel:botRecommendationStatus:BotRecommendationSummary' :: BotRecommendationSummary -> BotRecommendationStatus
$sel:lastUpdatedDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
$sel:creationDateTime:BotRecommendationSummary' :: BotRecommendationSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
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 BotRecommendationStatus
botRecommendationStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botRecommendationId