{-# 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.IntentStatistics 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 IntentStatistics = IntentStatistics'
{
IntentStatistics -> Maybe Int
discoveredIntentCount :: Prelude.Maybe Prelude.Int
}
deriving (IntentStatistics -> IntentStatistics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IntentStatistics -> IntentStatistics -> Bool
$c/= :: IntentStatistics -> IntentStatistics -> Bool
== :: IntentStatistics -> IntentStatistics -> Bool
$c== :: IntentStatistics -> IntentStatistics -> Bool
Prelude.Eq, ReadPrec [IntentStatistics]
ReadPrec IntentStatistics
Int -> ReadS IntentStatistics
ReadS [IntentStatistics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IntentStatistics]
$creadListPrec :: ReadPrec [IntentStatistics]
readPrec :: ReadPrec IntentStatistics
$creadPrec :: ReadPrec IntentStatistics
readList :: ReadS [IntentStatistics]
$creadList :: ReadS [IntentStatistics]
readsPrec :: Int -> ReadS IntentStatistics
$creadsPrec :: Int -> ReadS IntentStatistics
Prelude.Read, Int -> IntentStatistics -> ShowS
[IntentStatistics] -> ShowS
IntentStatistics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IntentStatistics] -> ShowS
$cshowList :: [IntentStatistics] -> ShowS
show :: IntentStatistics -> String
$cshow :: IntentStatistics -> String
showsPrec :: Int -> IntentStatistics -> ShowS
$cshowsPrec :: Int -> IntentStatistics -> ShowS
Prelude.Show, forall x. Rep IntentStatistics x -> IntentStatistics
forall x. IntentStatistics -> Rep IntentStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IntentStatistics x -> IntentStatistics
$cfrom :: forall x. IntentStatistics -> Rep IntentStatistics x
Prelude.Generic)
newIntentStatistics ::
IntentStatistics
newIntentStatistics :: IntentStatistics
newIntentStatistics =
IntentStatistics'
{ $sel:discoveredIntentCount:IntentStatistics' :: Maybe Int
discoveredIntentCount =
forall a. Maybe a
Prelude.Nothing
}
intentStatistics_discoveredIntentCount :: Lens.Lens' IntentStatistics (Prelude.Maybe Prelude.Int)
intentStatistics_discoveredIntentCount :: Lens' IntentStatistics (Maybe Int)
intentStatistics_discoveredIntentCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IntentStatistics' {Maybe Int
discoveredIntentCount :: Maybe Int
$sel:discoveredIntentCount:IntentStatistics' :: IntentStatistics -> Maybe Int
discoveredIntentCount} -> Maybe Int
discoveredIntentCount) (\s :: IntentStatistics
s@IntentStatistics' {} Maybe Int
a -> IntentStatistics
s {$sel:discoveredIntentCount:IntentStatistics' :: Maybe Int
discoveredIntentCount = Maybe Int
a} :: IntentStatistics)
instance Data.FromJSON IntentStatistics where
parseJSON :: Value -> Parser IntentStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IntentStatistics"
( \Object
x ->
Maybe Int -> IntentStatistics
IntentStatistics'
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
"discoveredIntentCount")
)
instance Prelude.Hashable IntentStatistics where
hashWithSalt :: Int -> IntentStatistics -> Int
hashWithSalt Int
_salt IntentStatistics' {Maybe Int
discoveredIntentCount :: Maybe Int
$sel:discoveredIntentCount:IntentStatistics' :: IntentStatistics -> Maybe Int
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
discoveredIntentCount
instance Prelude.NFData IntentStatistics where
rnf :: IntentStatistics -> ()
rnf IntentStatistics' {Maybe Int
discoveredIntentCount :: Maybe Int
$sel:discoveredIntentCount:IntentStatistics' :: IntentStatistics -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
discoveredIntentCount