{-# 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.Kendra.Types.IndexStatistics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Kendra.Types.FaqStatistics
import Amazonka.Kendra.Types.TextDocumentStatistics
import qualified Amazonka.Prelude as Prelude
data IndexStatistics = IndexStatistics'
{
IndexStatistics -> FaqStatistics
faqStatistics :: FaqStatistics,
IndexStatistics -> TextDocumentStatistics
textDocumentStatistics :: TextDocumentStatistics
}
deriving (IndexStatistics -> IndexStatistics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexStatistics -> IndexStatistics -> Bool
$c/= :: IndexStatistics -> IndexStatistics -> Bool
== :: IndexStatistics -> IndexStatistics -> Bool
$c== :: IndexStatistics -> IndexStatistics -> Bool
Prelude.Eq, ReadPrec [IndexStatistics]
ReadPrec IndexStatistics
Int -> ReadS IndexStatistics
ReadS [IndexStatistics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IndexStatistics]
$creadListPrec :: ReadPrec [IndexStatistics]
readPrec :: ReadPrec IndexStatistics
$creadPrec :: ReadPrec IndexStatistics
readList :: ReadS [IndexStatistics]
$creadList :: ReadS [IndexStatistics]
readsPrec :: Int -> ReadS IndexStatistics
$creadsPrec :: Int -> ReadS IndexStatistics
Prelude.Read, Int -> IndexStatistics -> ShowS
[IndexStatistics] -> ShowS
IndexStatistics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IndexStatistics] -> ShowS
$cshowList :: [IndexStatistics] -> ShowS
show :: IndexStatistics -> String
$cshow :: IndexStatistics -> String
showsPrec :: Int -> IndexStatistics -> ShowS
$cshowsPrec :: Int -> IndexStatistics -> ShowS
Prelude.Show, forall x. Rep IndexStatistics x -> IndexStatistics
forall x. IndexStatistics -> Rep IndexStatistics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IndexStatistics x -> IndexStatistics
$cfrom :: forall x. IndexStatistics -> Rep IndexStatistics x
Prelude.Generic)
newIndexStatistics ::
FaqStatistics ->
TextDocumentStatistics ->
IndexStatistics
newIndexStatistics :: FaqStatistics -> TextDocumentStatistics -> IndexStatistics
newIndexStatistics
FaqStatistics
pFaqStatistics_
TextDocumentStatistics
pTextDocumentStatistics_ =
IndexStatistics'
{ $sel:faqStatistics:IndexStatistics' :: FaqStatistics
faqStatistics = FaqStatistics
pFaqStatistics_,
$sel:textDocumentStatistics:IndexStatistics' :: TextDocumentStatistics
textDocumentStatistics = TextDocumentStatistics
pTextDocumentStatistics_
}
indexStatistics_faqStatistics :: Lens.Lens' IndexStatistics FaqStatistics
indexStatistics_faqStatistics :: Lens' IndexStatistics FaqStatistics
indexStatistics_faqStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexStatistics' {FaqStatistics
faqStatistics :: FaqStatistics
$sel:faqStatistics:IndexStatistics' :: IndexStatistics -> FaqStatistics
faqStatistics} -> FaqStatistics
faqStatistics) (\s :: IndexStatistics
s@IndexStatistics' {} FaqStatistics
a -> IndexStatistics
s {$sel:faqStatistics:IndexStatistics' :: FaqStatistics
faqStatistics = FaqStatistics
a} :: IndexStatistics)
indexStatistics_textDocumentStatistics :: Lens.Lens' IndexStatistics TextDocumentStatistics
indexStatistics_textDocumentStatistics :: Lens' IndexStatistics TextDocumentStatistics
indexStatistics_textDocumentStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexStatistics' {TextDocumentStatistics
textDocumentStatistics :: TextDocumentStatistics
$sel:textDocumentStatistics:IndexStatistics' :: IndexStatistics -> TextDocumentStatistics
textDocumentStatistics} -> TextDocumentStatistics
textDocumentStatistics) (\s :: IndexStatistics
s@IndexStatistics' {} TextDocumentStatistics
a -> IndexStatistics
s {$sel:textDocumentStatistics:IndexStatistics' :: TextDocumentStatistics
textDocumentStatistics = TextDocumentStatistics
a} :: IndexStatistics)
instance Data.FromJSON IndexStatistics where
parseJSON :: Value -> Parser IndexStatistics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IndexStatistics"
( \Object
x ->
FaqStatistics -> TextDocumentStatistics -> IndexStatistics
IndexStatistics'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"FaqStatistics")
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
"TextDocumentStatistics")
)
instance Prelude.Hashable IndexStatistics where
hashWithSalt :: Int -> IndexStatistics -> Int
hashWithSalt Int
_salt IndexStatistics' {FaqStatistics
TextDocumentStatistics
textDocumentStatistics :: TextDocumentStatistics
faqStatistics :: FaqStatistics
$sel:textDocumentStatistics:IndexStatistics' :: IndexStatistics -> TextDocumentStatistics
$sel:faqStatistics:IndexStatistics' :: IndexStatistics -> FaqStatistics
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FaqStatistics
faqStatistics
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TextDocumentStatistics
textDocumentStatistics
instance Prelude.NFData IndexStatistics where
rnf :: IndexStatistics -> ()
rnf IndexStatistics' {FaqStatistics
TextDocumentStatistics
textDocumentStatistics :: TextDocumentStatistics
faqStatistics :: FaqStatistics
$sel:textDocumentStatistics:IndexStatistics' :: IndexStatistics -> TextDocumentStatistics
$sel:faqStatistics:IndexStatistics' :: IndexStatistics -> FaqStatistics
..} =
forall a. NFData a => a -> ()
Prelude.rnf FaqStatistics
faqStatistics
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TextDocumentStatistics
textDocumentStatistics