{-# 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.IndexConfigurationSummary 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.IndexEdition
import Amazonka.Kendra.Types.IndexStatus
import qualified Amazonka.Prelude as Prelude
data IndexConfigurationSummary = IndexConfigurationSummary'
{
IndexConfigurationSummary -> Maybe IndexEdition
edition :: Prelude.Maybe IndexEdition,
IndexConfigurationSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
IndexConfigurationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
IndexConfigurationSummary -> POSIX
createdAt :: Data.POSIX,
IndexConfigurationSummary -> POSIX
updatedAt :: Data.POSIX,
IndexConfigurationSummary -> IndexStatus
status :: IndexStatus
}
deriving (IndexConfigurationSummary -> IndexConfigurationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexConfigurationSummary -> IndexConfigurationSummary -> Bool
$c/= :: IndexConfigurationSummary -> IndexConfigurationSummary -> Bool
== :: IndexConfigurationSummary -> IndexConfigurationSummary -> Bool
$c== :: IndexConfigurationSummary -> IndexConfigurationSummary -> Bool
Prelude.Eq, ReadPrec [IndexConfigurationSummary]
ReadPrec IndexConfigurationSummary
Int -> ReadS IndexConfigurationSummary
ReadS [IndexConfigurationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IndexConfigurationSummary]
$creadListPrec :: ReadPrec [IndexConfigurationSummary]
readPrec :: ReadPrec IndexConfigurationSummary
$creadPrec :: ReadPrec IndexConfigurationSummary
readList :: ReadS [IndexConfigurationSummary]
$creadList :: ReadS [IndexConfigurationSummary]
readsPrec :: Int -> ReadS IndexConfigurationSummary
$creadsPrec :: Int -> ReadS IndexConfigurationSummary
Prelude.Read, Int -> IndexConfigurationSummary -> ShowS
[IndexConfigurationSummary] -> ShowS
IndexConfigurationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IndexConfigurationSummary] -> ShowS
$cshowList :: [IndexConfigurationSummary] -> ShowS
show :: IndexConfigurationSummary -> String
$cshow :: IndexConfigurationSummary -> String
showsPrec :: Int -> IndexConfigurationSummary -> ShowS
$cshowsPrec :: Int -> IndexConfigurationSummary -> ShowS
Prelude.Show, forall x.
Rep IndexConfigurationSummary x -> IndexConfigurationSummary
forall x.
IndexConfigurationSummary -> Rep IndexConfigurationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IndexConfigurationSummary x -> IndexConfigurationSummary
$cfrom :: forall x.
IndexConfigurationSummary -> Rep IndexConfigurationSummary x
Prelude.Generic)
newIndexConfigurationSummary ::
Prelude.UTCTime ->
Prelude.UTCTime ->
IndexStatus ->
IndexConfigurationSummary
newIndexConfigurationSummary :: UTCTime -> UTCTime -> IndexStatus -> IndexConfigurationSummary
newIndexConfigurationSummary
UTCTime
pCreatedAt_
UTCTime
pUpdatedAt_
IndexStatus
pStatus_ =
IndexConfigurationSummary'
{ $sel:edition:IndexConfigurationSummary' :: Maybe IndexEdition
edition =
forall a. Maybe a
Prelude.Nothing,
$sel:id:IndexConfigurationSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:IndexConfigurationSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:IndexConfigurationSummary' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:updatedAt:IndexConfigurationSummary' :: POSIX
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_,
$sel:status:IndexConfigurationSummary' :: IndexStatus
status = IndexStatus
pStatus_
}
indexConfigurationSummary_edition :: Lens.Lens' IndexConfigurationSummary (Prelude.Maybe IndexEdition)
indexConfigurationSummary_edition :: Lens' IndexConfigurationSummary (Maybe IndexEdition)
indexConfigurationSummary_edition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {Maybe IndexEdition
edition :: Maybe IndexEdition
$sel:edition:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe IndexEdition
edition} -> Maybe IndexEdition
edition) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} Maybe IndexEdition
a -> IndexConfigurationSummary
s {$sel:edition:IndexConfigurationSummary' :: Maybe IndexEdition
edition = Maybe IndexEdition
a} :: IndexConfigurationSummary)
indexConfigurationSummary_id :: Lens.Lens' IndexConfigurationSummary (Prelude.Maybe Prelude.Text)
indexConfigurationSummary_id :: Lens' IndexConfigurationSummary (Maybe Text)
indexConfigurationSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {Maybe Text
id :: Maybe Text
$sel:id:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} Maybe Text
a -> IndexConfigurationSummary
s {$sel:id:IndexConfigurationSummary' :: Maybe Text
id = Maybe Text
a} :: IndexConfigurationSummary)
indexConfigurationSummary_name :: Lens.Lens' IndexConfigurationSummary (Prelude.Maybe Prelude.Text)
indexConfigurationSummary_name :: Lens' IndexConfigurationSummary (Maybe Text)
indexConfigurationSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {Maybe Text
name :: Maybe Text
$sel:name:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} Maybe Text
a -> IndexConfigurationSummary
s {$sel:name:IndexConfigurationSummary' :: Maybe Text
name = Maybe Text
a} :: IndexConfigurationSummary)
indexConfigurationSummary_createdAt :: Lens.Lens' IndexConfigurationSummary Prelude.UTCTime
indexConfigurationSummary_createdAt :: Lens' IndexConfigurationSummary UTCTime
indexConfigurationSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} POSIX
a -> IndexConfigurationSummary
s {$sel:createdAt:IndexConfigurationSummary' :: POSIX
createdAt = POSIX
a} :: IndexConfigurationSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
indexConfigurationSummary_updatedAt :: Lens.Lens' IndexConfigurationSummary Prelude.UTCTime
indexConfigurationSummary_updatedAt :: Lens' IndexConfigurationSummary UTCTime
indexConfigurationSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {POSIX
updatedAt :: POSIX
$sel:updatedAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} POSIX
a -> IndexConfigurationSummary
s {$sel:updatedAt:IndexConfigurationSummary' :: POSIX
updatedAt = POSIX
a} :: IndexConfigurationSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
indexConfigurationSummary_status :: Lens.Lens' IndexConfigurationSummary IndexStatus
indexConfigurationSummary_status :: Lens' IndexConfigurationSummary IndexStatus
indexConfigurationSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexConfigurationSummary' {IndexStatus
status :: IndexStatus
$sel:status:IndexConfigurationSummary' :: IndexConfigurationSummary -> IndexStatus
status} -> IndexStatus
status) (\s :: IndexConfigurationSummary
s@IndexConfigurationSummary' {} IndexStatus
a -> IndexConfigurationSummary
s {$sel:status:IndexConfigurationSummary' :: IndexStatus
status = IndexStatus
a} :: IndexConfigurationSummary)
instance Data.FromJSON IndexConfigurationSummary where
parseJSON :: Value -> Parser IndexConfigurationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IndexConfigurationSummary"
( \Object
x ->
Maybe IndexEdition
-> Maybe Text
-> Maybe Text
-> POSIX
-> POSIX
-> IndexStatus
-> IndexConfigurationSummary
IndexConfigurationSummary'
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
"Edition")
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
"Name")
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
"CreatedAt")
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
"UpdatedAt")
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
"Status")
)
instance Prelude.Hashable IndexConfigurationSummary where
hashWithSalt :: Int -> IndexConfigurationSummary -> Int
hashWithSalt Int
_salt IndexConfigurationSummary' {Maybe Text
Maybe IndexEdition
POSIX
IndexStatus
status :: IndexStatus
updatedAt :: POSIX
createdAt :: POSIX
name :: Maybe Text
id :: Maybe Text
edition :: Maybe IndexEdition
$sel:status:IndexConfigurationSummary' :: IndexConfigurationSummary -> IndexStatus
$sel:updatedAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
$sel:createdAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
$sel:name:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
$sel:id:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
$sel:edition:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe IndexEdition
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IndexEdition
edition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` IndexStatus
status
instance Prelude.NFData IndexConfigurationSummary where
rnf :: IndexConfigurationSummary -> ()
rnf IndexConfigurationSummary' {Maybe Text
Maybe IndexEdition
POSIX
IndexStatus
status :: IndexStatus
updatedAt :: POSIX
createdAt :: POSIX
name :: Maybe Text
id :: Maybe Text
edition :: Maybe IndexEdition
$sel:status:IndexConfigurationSummary' :: IndexConfigurationSummary -> IndexStatus
$sel:updatedAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
$sel:createdAt:IndexConfigurationSummary' :: IndexConfigurationSummary -> POSIX
$sel:name:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
$sel:id:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe Text
$sel:edition:IndexConfigurationSummary' :: IndexConfigurationSummary -> Maybe IndexEdition
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe IndexEdition
edition
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 Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf IndexStatus
status