{-# 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.QuerySuggestionsBlockListSummary 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.QuerySuggestionsBlockListStatus
import qualified Amazonka.Prelude as Prelude
data QuerySuggestionsBlockListSummary = QuerySuggestionsBlockListSummary'
{
QuerySuggestionsBlockListSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
QuerySuggestionsBlockListSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
QuerySuggestionsBlockListSummary -> Maybe Int
itemCount :: Prelude.Maybe Prelude.Int,
QuerySuggestionsBlockListSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
QuerySuggestionsBlockListSummary
-> Maybe QuerySuggestionsBlockListStatus
status :: Prelude.Maybe QuerySuggestionsBlockListStatus,
QuerySuggestionsBlockListSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
}
deriving (QuerySuggestionsBlockListSummary
-> QuerySuggestionsBlockListSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QuerySuggestionsBlockListSummary
-> QuerySuggestionsBlockListSummary -> Bool
$c/= :: QuerySuggestionsBlockListSummary
-> QuerySuggestionsBlockListSummary -> Bool
== :: QuerySuggestionsBlockListSummary
-> QuerySuggestionsBlockListSummary -> Bool
$c== :: QuerySuggestionsBlockListSummary
-> QuerySuggestionsBlockListSummary -> Bool
Prelude.Eq, ReadPrec [QuerySuggestionsBlockListSummary]
ReadPrec QuerySuggestionsBlockListSummary
Int -> ReadS QuerySuggestionsBlockListSummary
ReadS [QuerySuggestionsBlockListSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QuerySuggestionsBlockListSummary]
$creadListPrec :: ReadPrec [QuerySuggestionsBlockListSummary]
readPrec :: ReadPrec QuerySuggestionsBlockListSummary
$creadPrec :: ReadPrec QuerySuggestionsBlockListSummary
readList :: ReadS [QuerySuggestionsBlockListSummary]
$creadList :: ReadS [QuerySuggestionsBlockListSummary]
readsPrec :: Int -> ReadS QuerySuggestionsBlockListSummary
$creadsPrec :: Int -> ReadS QuerySuggestionsBlockListSummary
Prelude.Read, Int -> QuerySuggestionsBlockListSummary -> ShowS
[QuerySuggestionsBlockListSummary] -> ShowS
QuerySuggestionsBlockListSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QuerySuggestionsBlockListSummary] -> ShowS
$cshowList :: [QuerySuggestionsBlockListSummary] -> ShowS
show :: QuerySuggestionsBlockListSummary -> String
$cshow :: QuerySuggestionsBlockListSummary -> String
showsPrec :: Int -> QuerySuggestionsBlockListSummary -> ShowS
$cshowsPrec :: Int -> QuerySuggestionsBlockListSummary -> ShowS
Prelude.Show, forall x.
Rep QuerySuggestionsBlockListSummary x
-> QuerySuggestionsBlockListSummary
forall x.
QuerySuggestionsBlockListSummary
-> Rep QuerySuggestionsBlockListSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep QuerySuggestionsBlockListSummary x
-> QuerySuggestionsBlockListSummary
$cfrom :: forall x.
QuerySuggestionsBlockListSummary
-> Rep QuerySuggestionsBlockListSummary x
Prelude.Generic)
newQuerySuggestionsBlockListSummary ::
QuerySuggestionsBlockListSummary
newQuerySuggestionsBlockListSummary :: QuerySuggestionsBlockListSummary
newQuerySuggestionsBlockListSummary =
QuerySuggestionsBlockListSummary'
{ $sel:createdAt:QuerySuggestionsBlockListSummary' :: Maybe POSIX
createdAt =
forall a. Maybe a
Prelude.Nothing,
$sel:id:QuerySuggestionsBlockListSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:itemCount:QuerySuggestionsBlockListSummary' :: Maybe Int
itemCount = forall a. Maybe a
Prelude.Nothing,
$sel:name:QuerySuggestionsBlockListSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:QuerySuggestionsBlockListSummary' :: Maybe QuerySuggestionsBlockListStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:QuerySuggestionsBlockListSummary' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
}
querySuggestionsBlockListSummary_createdAt :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe Prelude.UTCTime)
querySuggestionsBlockListSummary_createdAt :: Lens' QuerySuggestionsBlockListSummary (Maybe UTCTime)
querySuggestionsBlockListSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe POSIX
a -> QuerySuggestionsBlockListSummary
s {$sel:createdAt:QuerySuggestionsBlockListSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: QuerySuggestionsBlockListSummary) 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
querySuggestionsBlockListSummary_id :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe Prelude.Text)
querySuggestionsBlockListSummary_id :: Lens' QuerySuggestionsBlockListSummary (Maybe Text)
querySuggestionsBlockListSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe Text
id :: Maybe Text
$sel:id:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe Text
a -> QuerySuggestionsBlockListSummary
s {$sel:id:QuerySuggestionsBlockListSummary' :: Maybe Text
id = Maybe Text
a} :: QuerySuggestionsBlockListSummary)
querySuggestionsBlockListSummary_itemCount :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe Prelude.Int)
querySuggestionsBlockListSummary_itemCount :: Lens' QuerySuggestionsBlockListSummary (Maybe Int)
querySuggestionsBlockListSummary_itemCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe Int
itemCount :: Maybe Int
$sel:itemCount:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Int
itemCount} -> Maybe Int
itemCount) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe Int
a -> QuerySuggestionsBlockListSummary
s {$sel:itemCount:QuerySuggestionsBlockListSummary' :: Maybe Int
itemCount = Maybe Int
a} :: QuerySuggestionsBlockListSummary)
querySuggestionsBlockListSummary_name :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe Prelude.Text)
querySuggestionsBlockListSummary_name :: Lens' QuerySuggestionsBlockListSummary (Maybe Text)
querySuggestionsBlockListSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe Text
name :: Maybe Text
$sel:name:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe Text
a -> QuerySuggestionsBlockListSummary
s {$sel:name:QuerySuggestionsBlockListSummary' :: Maybe Text
name = Maybe Text
a} :: QuerySuggestionsBlockListSummary)
querySuggestionsBlockListSummary_status :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe QuerySuggestionsBlockListStatus)
querySuggestionsBlockListSummary_status :: Lens'
QuerySuggestionsBlockListSummary
(Maybe QuerySuggestionsBlockListStatus)
querySuggestionsBlockListSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe QuerySuggestionsBlockListStatus
status :: Maybe QuerySuggestionsBlockListStatus
$sel:status:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary
-> Maybe QuerySuggestionsBlockListStatus
status} -> Maybe QuerySuggestionsBlockListStatus
status) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe QuerySuggestionsBlockListStatus
a -> QuerySuggestionsBlockListSummary
s {$sel:status:QuerySuggestionsBlockListSummary' :: Maybe QuerySuggestionsBlockListStatus
status = Maybe QuerySuggestionsBlockListStatus
a} :: QuerySuggestionsBlockListSummary)
querySuggestionsBlockListSummary_updatedAt :: Lens.Lens' QuerySuggestionsBlockListSummary (Prelude.Maybe Prelude.UTCTime)
querySuggestionsBlockListSummary_updatedAt :: Lens' QuerySuggestionsBlockListSummary (Maybe UTCTime)
querySuggestionsBlockListSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuerySuggestionsBlockListSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: QuerySuggestionsBlockListSummary
s@QuerySuggestionsBlockListSummary' {} Maybe POSIX
a -> QuerySuggestionsBlockListSummary
s {$sel:updatedAt:QuerySuggestionsBlockListSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: QuerySuggestionsBlockListSummary) 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
instance
Data.FromJSON
QuerySuggestionsBlockListSummary
where
parseJSON :: Value -> Parser QuerySuggestionsBlockListSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"QuerySuggestionsBlockListSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe QuerySuggestionsBlockListStatus
-> Maybe POSIX
-> QuerySuggestionsBlockListSummary
QuerySuggestionsBlockListSummary'
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
"CreatedAt")
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
"Id")
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
"ItemCount")
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
"Name")
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
"Status")
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
"UpdatedAt")
)
instance
Prelude.Hashable
QuerySuggestionsBlockListSummary
where
hashWithSalt :: Int -> QuerySuggestionsBlockListSummary -> Int
hashWithSalt
Int
_salt
QuerySuggestionsBlockListSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe QuerySuggestionsBlockListStatus
updatedAt :: Maybe POSIX
status :: Maybe QuerySuggestionsBlockListStatus
name :: Maybe Text
itemCount :: Maybe Int
id :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
$sel:status:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary
-> Maybe QuerySuggestionsBlockListStatus
$sel:name:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
$sel:itemCount:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Int
$sel:id:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
$sel:createdAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
itemCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe QuerySuggestionsBlockListStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt
instance
Prelude.NFData
QuerySuggestionsBlockListSummary
where
rnf :: QuerySuggestionsBlockListSummary -> ()
rnf QuerySuggestionsBlockListSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe QuerySuggestionsBlockListStatus
updatedAt :: Maybe POSIX
status :: Maybe QuerySuggestionsBlockListStatus
name :: Maybe Text
itemCount :: Maybe Int
id :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
$sel:status:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary
-> Maybe QuerySuggestionsBlockListStatus
$sel:name:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
$sel:itemCount:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Int
$sel:id:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe Text
$sel:createdAt:QuerySuggestionsBlockListSummary' :: QuerySuggestionsBlockListSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
itemCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe QuerySuggestionsBlockListStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updatedAt