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