{-# 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.Wisdom.Types.KnowledgeBaseData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.KnowledgeBaseStatus
import Amazonka.Wisdom.Types.KnowledgeBaseType
import Amazonka.Wisdom.Types.RenderingConfiguration
import Amazonka.Wisdom.Types.ServerSideEncryptionConfiguration
import Amazonka.Wisdom.Types.SourceConfiguration
data KnowledgeBaseData = KnowledgeBaseData'
{
KnowledgeBaseData -> Maybe RenderingConfiguration
renderingConfiguration :: Prelude.Maybe RenderingConfiguration,
KnowledgeBaseData -> Maybe SourceConfiguration
sourceConfiguration :: Prelude.Maybe SourceConfiguration,
KnowledgeBaseData -> Maybe POSIX
lastContentModificationTime :: Prelude.Maybe Core.POSIX,
KnowledgeBaseData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
KnowledgeBaseData -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Prelude.Maybe ServerSideEncryptionConfiguration,
KnowledgeBaseData -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
KnowledgeBaseData -> Text
knowledgeBaseArn :: Prelude.Text,
KnowledgeBaseData -> Text
knowledgeBaseId :: Prelude.Text,
KnowledgeBaseData -> KnowledgeBaseType
knowledgeBaseType :: KnowledgeBaseType,
KnowledgeBaseData -> Text
name :: Prelude.Text,
KnowledgeBaseData -> KnowledgeBaseStatus
status :: KnowledgeBaseStatus
}
deriving (KnowledgeBaseData -> KnowledgeBaseData -> Bool
(KnowledgeBaseData -> KnowledgeBaseData -> Bool)
-> (KnowledgeBaseData -> KnowledgeBaseData -> Bool)
-> Eq KnowledgeBaseData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KnowledgeBaseData -> KnowledgeBaseData -> Bool
$c/= :: KnowledgeBaseData -> KnowledgeBaseData -> Bool
== :: KnowledgeBaseData -> KnowledgeBaseData -> Bool
$c== :: KnowledgeBaseData -> KnowledgeBaseData -> Bool
Prelude.Eq, ReadPrec [KnowledgeBaseData]
ReadPrec KnowledgeBaseData
Int -> ReadS KnowledgeBaseData
ReadS [KnowledgeBaseData]
(Int -> ReadS KnowledgeBaseData)
-> ReadS [KnowledgeBaseData]
-> ReadPrec KnowledgeBaseData
-> ReadPrec [KnowledgeBaseData]
-> Read KnowledgeBaseData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KnowledgeBaseData]
$creadListPrec :: ReadPrec [KnowledgeBaseData]
readPrec :: ReadPrec KnowledgeBaseData
$creadPrec :: ReadPrec KnowledgeBaseData
readList :: ReadS [KnowledgeBaseData]
$creadList :: ReadS [KnowledgeBaseData]
readsPrec :: Int -> ReadS KnowledgeBaseData
$creadsPrec :: Int -> ReadS KnowledgeBaseData
Prelude.Read, Int -> KnowledgeBaseData -> ShowS
[KnowledgeBaseData] -> ShowS
KnowledgeBaseData -> String
(Int -> KnowledgeBaseData -> ShowS)
-> (KnowledgeBaseData -> String)
-> ([KnowledgeBaseData] -> ShowS)
-> Show KnowledgeBaseData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KnowledgeBaseData] -> ShowS
$cshowList :: [KnowledgeBaseData] -> ShowS
show :: KnowledgeBaseData -> String
$cshow :: KnowledgeBaseData -> String
showsPrec :: Int -> KnowledgeBaseData -> ShowS
$cshowsPrec :: Int -> KnowledgeBaseData -> ShowS
Prelude.Show, (forall x. KnowledgeBaseData -> Rep KnowledgeBaseData x)
-> (forall x. Rep KnowledgeBaseData x -> KnowledgeBaseData)
-> Generic KnowledgeBaseData
forall x. Rep KnowledgeBaseData x -> KnowledgeBaseData
forall x. KnowledgeBaseData -> Rep KnowledgeBaseData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KnowledgeBaseData x -> KnowledgeBaseData
$cfrom :: forall x. KnowledgeBaseData -> Rep KnowledgeBaseData x
Prelude.Generic)
newKnowledgeBaseData ::
Prelude.Text ->
Prelude.Text ->
KnowledgeBaseType ->
Prelude.Text ->
KnowledgeBaseStatus ->
KnowledgeBaseData
newKnowledgeBaseData :: Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData
newKnowledgeBaseData
Text
pKnowledgeBaseArn_
Text
pKnowledgeBaseId_
KnowledgeBaseType
pKnowledgeBaseType_
Text
pName_
KnowledgeBaseStatus
pStatus_ =
KnowledgeBaseData' :: Maybe RenderingConfiguration
-> Maybe SourceConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData
KnowledgeBaseData'
{ $sel:renderingConfiguration:KnowledgeBaseData' :: Maybe RenderingConfiguration
renderingConfiguration =
Maybe RenderingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:sourceConfiguration:KnowledgeBaseData' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:lastContentModificationTime:KnowledgeBaseData' :: Maybe POSIX
lastContentModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:KnowledgeBaseData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverSideEncryptionConfiguration:KnowledgeBaseData' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:tags:KnowledgeBaseData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:knowledgeBaseArn:KnowledgeBaseData' :: Text
knowledgeBaseArn = Text
pKnowledgeBaseArn_,
$sel:knowledgeBaseId:KnowledgeBaseData' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
$sel:knowledgeBaseType:KnowledgeBaseData' :: KnowledgeBaseType
knowledgeBaseType = KnowledgeBaseType
pKnowledgeBaseType_,
$sel:name:KnowledgeBaseData' :: Text
name = Text
pName_,
$sel:status:KnowledgeBaseData' :: KnowledgeBaseStatus
status = KnowledgeBaseStatus
pStatus_
}
knowledgeBaseData_renderingConfiguration :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe RenderingConfiguration)
knowledgeBaseData_renderingConfiguration :: (Maybe RenderingConfiguration -> f (Maybe RenderingConfiguration))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_renderingConfiguration = (KnowledgeBaseData -> Maybe RenderingConfiguration)
-> (KnowledgeBaseData
-> Maybe RenderingConfiguration -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
(Maybe RenderingConfiguration)
(Maybe RenderingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe RenderingConfiguration
renderingConfiguration :: Maybe RenderingConfiguration
$sel:renderingConfiguration:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe RenderingConfiguration
renderingConfiguration} -> Maybe RenderingConfiguration
renderingConfiguration) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe RenderingConfiguration
a -> KnowledgeBaseData
s {$sel:renderingConfiguration:KnowledgeBaseData' :: Maybe RenderingConfiguration
renderingConfiguration = Maybe RenderingConfiguration
a} :: KnowledgeBaseData)
knowledgeBaseData_sourceConfiguration :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe SourceConfiguration)
knowledgeBaseData_sourceConfiguration :: (Maybe SourceConfiguration -> f (Maybe SourceConfiguration))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_sourceConfiguration = (KnowledgeBaseData -> Maybe SourceConfiguration)
-> (KnowledgeBaseData
-> Maybe SourceConfiguration -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
(Maybe SourceConfiguration)
(Maybe SourceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe SourceConfiguration
sourceConfiguration :: Maybe SourceConfiguration
$sel:sourceConfiguration:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe SourceConfiguration
sourceConfiguration} -> Maybe SourceConfiguration
sourceConfiguration) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe SourceConfiguration
a -> KnowledgeBaseData
s {$sel:sourceConfiguration:KnowledgeBaseData' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
a} :: KnowledgeBaseData)
knowledgeBaseData_lastContentModificationTime :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe Prelude.UTCTime)
knowledgeBaseData_lastContentModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_lastContentModificationTime = (KnowledgeBaseData -> Maybe POSIX)
-> (KnowledgeBaseData -> Maybe POSIX -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData KnowledgeBaseData (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe POSIX
lastContentModificationTime :: Maybe POSIX
$sel:lastContentModificationTime:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe POSIX
lastContentModificationTime} -> Maybe POSIX
lastContentModificationTime) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe POSIX
a -> KnowledgeBaseData
s {$sel:lastContentModificationTime:KnowledgeBaseData' :: Maybe POSIX
lastContentModificationTime = Maybe POSIX
a} :: KnowledgeBaseData) ((Maybe POSIX -> f (Maybe POSIX))
-> KnowledgeBaseData -> f KnowledgeBaseData)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> KnowledgeBaseData
-> f KnowledgeBaseData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
knowledgeBaseData_description :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe Prelude.Text)
knowledgeBaseData_description :: (Maybe Text -> f (Maybe Text))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_description = (KnowledgeBaseData -> Maybe Text)
-> (KnowledgeBaseData -> Maybe Text -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData KnowledgeBaseData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe Text
description :: Maybe Text
$sel:description:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe Text
description} -> Maybe Text
description) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe Text
a -> KnowledgeBaseData
s {$sel:description:KnowledgeBaseData' :: Maybe Text
description = Maybe Text
a} :: KnowledgeBaseData)
knowledgeBaseData_serverSideEncryptionConfiguration :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe ServerSideEncryptionConfiguration)
knowledgeBaseData_serverSideEncryptionConfiguration :: (Maybe ServerSideEncryptionConfiguration
-> f (Maybe ServerSideEncryptionConfiguration))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_serverSideEncryptionConfiguration = (KnowledgeBaseData -> Maybe ServerSideEncryptionConfiguration)
-> (KnowledgeBaseData
-> Maybe ServerSideEncryptionConfiguration -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
(Maybe ServerSideEncryptionConfiguration)
(Maybe ServerSideEncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Maybe ServerSideEncryptionConfiguration
$sel:serverSideEncryptionConfiguration:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration} -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe ServerSideEncryptionConfiguration
a -> KnowledgeBaseData
s {$sel:serverSideEncryptionConfiguration:KnowledgeBaseData' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
a} :: KnowledgeBaseData)
knowledgeBaseData_tags :: Lens.Lens' KnowledgeBaseData (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
knowledgeBaseData_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_tags = (KnowledgeBaseData -> Maybe (HashMap Text Text))
-> (KnowledgeBaseData
-> Maybe (HashMap Text Text) -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:KnowledgeBaseData' :: KnowledgeBaseData -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Maybe (HashMap Text Text)
a -> KnowledgeBaseData
s {$sel:tags:KnowledgeBaseData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: KnowledgeBaseData) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> KnowledgeBaseData -> f KnowledgeBaseData)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> KnowledgeBaseData
-> f KnowledgeBaseData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
knowledgeBaseData_knowledgeBaseArn :: Lens.Lens' KnowledgeBaseData Prelude.Text
knowledgeBaseData_knowledgeBaseArn :: (Text -> f Text) -> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_knowledgeBaseArn = (KnowledgeBaseData -> Text)
-> (KnowledgeBaseData -> Text -> KnowledgeBaseData)
-> Lens KnowledgeBaseData KnowledgeBaseData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Text
knowledgeBaseArn :: Text
$sel:knowledgeBaseArn:KnowledgeBaseData' :: KnowledgeBaseData -> Text
knowledgeBaseArn} -> Text
knowledgeBaseArn) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Text
a -> KnowledgeBaseData
s {$sel:knowledgeBaseArn:KnowledgeBaseData' :: Text
knowledgeBaseArn = Text
a} :: KnowledgeBaseData)
knowledgeBaseData_knowledgeBaseId :: Lens.Lens' KnowledgeBaseData Prelude.Text
knowledgeBaseData_knowledgeBaseId :: (Text -> f Text) -> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_knowledgeBaseId = (KnowledgeBaseData -> Text)
-> (KnowledgeBaseData -> Text -> KnowledgeBaseData)
-> Lens KnowledgeBaseData KnowledgeBaseData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:KnowledgeBaseData' :: KnowledgeBaseData -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Text
a -> KnowledgeBaseData
s {$sel:knowledgeBaseId:KnowledgeBaseData' :: Text
knowledgeBaseId = Text
a} :: KnowledgeBaseData)
knowledgeBaseData_knowledgeBaseType :: Lens.Lens' KnowledgeBaseData KnowledgeBaseType
knowledgeBaseData_knowledgeBaseType :: (KnowledgeBaseType -> f KnowledgeBaseType)
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_knowledgeBaseType = (KnowledgeBaseData -> KnowledgeBaseType)
-> (KnowledgeBaseData -> KnowledgeBaseType -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
KnowledgeBaseType
KnowledgeBaseType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {KnowledgeBaseType
knowledgeBaseType :: KnowledgeBaseType
$sel:knowledgeBaseType:KnowledgeBaseData' :: KnowledgeBaseData -> KnowledgeBaseType
knowledgeBaseType} -> KnowledgeBaseType
knowledgeBaseType) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} KnowledgeBaseType
a -> KnowledgeBaseData
s {$sel:knowledgeBaseType:KnowledgeBaseData' :: KnowledgeBaseType
knowledgeBaseType = KnowledgeBaseType
a} :: KnowledgeBaseData)
knowledgeBaseData_name :: Lens.Lens' KnowledgeBaseData Prelude.Text
knowledgeBaseData_name :: (Text -> f Text) -> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_name = (KnowledgeBaseData -> Text)
-> (KnowledgeBaseData -> Text -> KnowledgeBaseData)
-> Lens KnowledgeBaseData KnowledgeBaseData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {Text
name :: Text
$sel:name:KnowledgeBaseData' :: KnowledgeBaseData -> Text
name} -> Text
name) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} Text
a -> KnowledgeBaseData
s {$sel:name:KnowledgeBaseData' :: Text
name = Text
a} :: KnowledgeBaseData)
knowledgeBaseData_status :: Lens.Lens' KnowledgeBaseData KnowledgeBaseStatus
knowledgeBaseData_status :: (KnowledgeBaseStatus -> f KnowledgeBaseStatus)
-> KnowledgeBaseData -> f KnowledgeBaseData
knowledgeBaseData_status = (KnowledgeBaseData -> KnowledgeBaseStatus)
-> (KnowledgeBaseData -> KnowledgeBaseStatus -> KnowledgeBaseData)
-> Lens
KnowledgeBaseData
KnowledgeBaseData
KnowledgeBaseStatus
KnowledgeBaseStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseData' {KnowledgeBaseStatus
status :: KnowledgeBaseStatus
$sel:status:KnowledgeBaseData' :: KnowledgeBaseData -> KnowledgeBaseStatus
status} -> KnowledgeBaseStatus
status) (\s :: KnowledgeBaseData
s@KnowledgeBaseData' {} KnowledgeBaseStatus
a -> KnowledgeBaseData
s {$sel:status:KnowledgeBaseData' :: KnowledgeBaseStatus
status = KnowledgeBaseStatus
a} :: KnowledgeBaseData)
instance Core.FromJSON KnowledgeBaseData where
parseJSON :: Value -> Parser KnowledgeBaseData
parseJSON =
String
-> (Object -> Parser KnowledgeBaseData)
-> Value
-> Parser KnowledgeBaseData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KnowledgeBaseData"
( \Object
x ->
Maybe RenderingConfiguration
-> Maybe SourceConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData
KnowledgeBaseData'
(Maybe RenderingConfiguration
-> Maybe SourceConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe RenderingConfiguration)
-> Parser
(Maybe SourceConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RenderingConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"renderingConfiguration")
Parser
(Maybe SourceConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe SourceConfiguration)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceConfiguration")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastContentModificationTime")
Parser
(Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe Text)
-> Parser
(Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser
(Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe ServerSideEncryptionConfiguration)
-> Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServerSideEncryptionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serverSideEncryptionConfiguration")
Parser
(Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser Text
-> Parser
(Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"knowledgeBaseArn")
Parser
(Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseData)
-> Parser Text
-> Parser
(KnowledgeBaseType
-> Text -> KnowledgeBaseStatus -> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"knowledgeBaseId")
Parser
(KnowledgeBaseType
-> Text -> KnowledgeBaseStatus -> KnowledgeBaseData)
-> Parser KnowledgeBaseType
-> Parser (Text -> KnowledgeBaseStatus -> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser KnowledgeBaseType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"knowledgeBaseType")
Parser (Text -> KnowledgeBaseStatus -> KnowledgeBaseData)
-> Parser Text -> Parser (KnowledgeBaseStatus -> KnowledgeBaseData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (KnowledgeBaseStatus -> KnowledgeBaseData)
-> Parser KnowledgeBaseStatus -> Parser KnowledgeBaseData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser KnowledgeBaseStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
)
instance Prelude.Hashable KnowledgeBaseData
instance Prelude.NFData KnowledgeBaseData