{-# 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.DataSourceSummary 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.DataSourceStatus
import Amazonka.Kendra.Types.DataSourceType
import qualified Amazonka.Prelude as Prelude
data DataSourceSummary = DataSourceSummary'
{
DataSourceSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
DataSourceSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
DataSourceSummary -> Maybe Text
languageCode :: Prelude.Maybe Prelude.Text,
DataSourceSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DataSourceSummary -> Maybe DataSourceStatus
status :: Prelude.Maybe DataSourceStatus,
DataSourceSummary -> Maybe DataSourceType
type' :: Prelude.Maybe DataSourceType,
DataSourceSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
}
deriving (DataSourceSummary -> DataSourceSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSourceSummary -> DataSourceSummary -> Bool
$c/= :: DataSourceSummary -> DataSourceSummary -> Bool
== :: DataSourceSummary -> DataSourceSummary -> Bool
$c== :: DataSourceSummary -> DataSourceSummary -> Bool
Prelude.Eq, ReadPrec [DataSourceSummary]
ReadPrec DataSourceSummary
Int -> ReadS DataSourceSummary
ReadS [DataSourceSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSourceSummary]
$creadListPrec :: ReadPrec [DataSourceSummary]
readPrec :: ReadPrec DataSourceSummary
$creadPrec :: ReadPrec DataSourceSummary
readList :: ReadS [DataSourceSummary]
$creadList :: ReadS [DataSourceSummary]
readsPrec :: Int -> ReadS DataSourceSummary
$creadsPrec :: Int -> ReadS DataSourceSummary
Prelude.Read, Int -> DataSourceSummary -> ShowS
[DataSourceSummary] -> ShowS
DataSourceSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSourceSummary] -> ShowS
$cshowList :: [DataSourceSummary] -> ShowS
show :: DataSourceSummary -> String
$cshow :: DataSourceSummary -> String
showsPrec :: Int -> DataSourceSummary -> ShowS
$cshowsPrec :: Int -> DataSourceSummary -> ShowS
Prelude.Show, forall x. Rep DataSourceSummary x -> DataSourceSummary
forall x. DataSourceSummary -> Rep DataSourceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSourceSummary x -> DataSourceSummary
$cfrom :: forall x. DataSourceSummary -> Rep DataSourceSummary x
Prelude.Generic)
newDataSourceSummary ::
DataSourceSummary
newDataSourceSummary :: DataSourceSummary
newDataSourceSummary =
DataSourceSummary'
{ $sel:createdAt:DataSourceSummary' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:id:DataSourceSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:DataSourceSummary' :: Maybe Text
languageCode = forall a. Maybe a
Prelude.Nothing,
$sel:name:DataSourceSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:DataSourceSummary' :: Maybe DataSourceStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:type':DataSourceSummary' :: Maybe DataSourceType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:DataSourceSummary' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
}
dataSourceSummary_createdAt :: Lens.Lens' DataSourceSummary (Prelude.Maybe Prelude.UTCTime)
dataSourceSummary_createdAt :: Lens' DataSourceSummary (Maybe UTCTime)
dataSourceSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DataSourceSummary' :: DataSourceSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe POSIX
a -> DataSourceSummary
s {$sel:createdAt:DataSourceSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DataSourceSummary) 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
dataSourceSummary_id :: Lens.Lens' DataSourceSummary (Prelude.Maybe Prelude.Text)
dataSourceSummary_id :: Lens' DataSourceSummary (Maybe Text)
dataSourceSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe Text
id :: Maybe Text
$sel:id:DataSourceSummary' :: DataSourceSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe Text
a -> DataSourceSummary
s {$sel:id:DataSourceSummary' :: Maybe Text
id = Maybe Text
a} :: DataSourceSummary)
dataSourceSummary_languageCode :: Lens.Lens' DataSourceSummary (Prelude.Maybe Prelude.Text)
dataSourceSummary_languageCode :: Lens' DataSourceSummary (Maybe Text)
dataSourceSummary_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe Text
languageCode :: Maybe Text
$sel:languageCode:DataSourceSummary' :: DataSourceSummary -> Maybe Text
languageCode} -> Maybe Text
languageCode) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe Text
a -> DataSourceSummary
s {$sel:languageCode:DataSourceSummary' :: Maybe Text
languageCode = Maybe Text
a} :: DataSourceSummary)
dataSourceSummary_name :: Lens.Lens' DataSourceSummary (Prelude.Maybe Prelude.Text)
dataSourceSummary_name :: Lens' DataSourceSummary (Maybe Text)
dataSourceSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe Text
name :: Maybe Text
$sel:name:DataSourceSummary' :: DataSourceSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe Text
a -> DataSourceSummary
s {$sel:name:DataSourceSummary' :: Maybe Text
name = Maybe Text
a} :: DataSourceSummary)
dataSourceSummary_status :: Lens.Lens' DataSourceSummary (Prelude.Maybe DataSourceStatus)
dataSourceSummary_status :: Lens' DataSourceSummary (Maybe DataSourceStatus)
dataSourceSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe DataSourceStatus
status :: Maybe DataSourceStatus
$sel:status:DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceStatus
status} -> Maybe DataSourceStatus
status) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe DataSourceStatus
a -> DataSourceSummary
s {$sel:status:DataSourceSummary' :: Maybe DataSourceStatus
status = Maybe DataSourceStatus
a} :: DataSourceSummary)
dataSourceSummary_type :: Lens.Lens' DataSourceSummary (Prelude.Maybe DataSourceType)
dataSourceSummary_type :: Lens' DataSourceSummary (Maybe DataSourceType)
dataSourceSummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe DataSourceType
type' :: Maybe DataSourceType
$sel:type':DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceType
type'} -> Maybe DataSourceType
type') (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe DataSourceType
a -> DataSourceSummary
s {$sel:type':DataSourceSummary' :: Maybe DataSourceType
type' = Maybe DataSourceType
a} :: DataSourceSummary)
dataSourceSummary_updatedAt :: Lens.Lens' DataSourceSummary (Prelude.Maybe Prelude.UTCTime)
dataSourceSummary_updatedAt :: Lens' DataSourceSummary (Maybe UTCTime)
dataSourceSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSourceSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:DataSourceSummary' :: DataSourceSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: DataSourceSummary
s@DataSourceSummary' {} Maybe POSIX
a -> DataSourceSummary
s {$sel:updatedAt:DataSourceSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: DataSourceSummary) 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 DataSourceSummary where
parseJSON :: Value -> Parser DataSourceSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DataSourceSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DataSourceStatus
-> Maybe DataSourceType
-> Maybe POSIX
-> DataSourceSummary
DataSourceSummary'
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
"LanguageCode")
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
"Type")
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 DataSourceSummary where
hashWithSalt :: Int -> DataSourceSummary -> Int
hashWithSalt Int
_salt DataSourceSummary' {Maybe Text
Maybe POSIX
Maybe DataSourceStatus
Maybe DataSourceType
updatedAt :: Maybe POSIX
type' :: Maybe DataSourceType
status :: Maybe DataSourceStatus
name :: Maybe Text
languageCode :: Maybe Text
id :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:DataSourceSummary' :: DataSourceSummary -> Maybe POSIX
$sel:type':DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceType
$sel:status:DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceStatus
$sel:name:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:languageCode:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:id:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:createdAt:DataSourceSummary' :: DataSourceSummary -> 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 Text
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataSourceType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt
instance Prelude.NFData DataSourceSummary where
rnf :: DataSourceSummary -> ()
rnf DataSourceSummary' {Maybe Text
Maybe POSIX
Maybe DataSourceStatus
Maybe DataSourceType
updatedAt :: Maybe POSIX
type' :: Maybe DataSourceType
status :: Maybe DataSourceStatus
name :: Maybe Text
languageCode :: Maybe Text
id :: Maybe Text
createdAt :: Maybe POSIX
$sel:updatedAt:DataSourceSummary' :: DataSourceSummary -> Maybe POSIX
$sel:type':DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceType
$sel:status:DataSourceSummary' :: DataSourceSummary -> Maybe DataSourceStatus
$sel:name:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:languageCode:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:id:DataSourceSummary' :: DataSourceSummary -> Maybe Text
$sel:createdAt:DataSourceSummary' :: DataSourceSummary -> 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 Text
languageCode
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 DataSourceStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataSourceType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updatedAt