{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Wisdom.Types.KnowledgeBaseData
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Information about the knowledge base.
--
-- /See:/ 'newKnowledgeBaseData' smart constructor.
data KnowledgeBaseData = KnowledgeBaseData'
  { -- | Information about how to render the content.
    KnowledgeBaseData -> Maybe RenderingConfiguration
renderingConfiguration :: Prelude.Maybe RenderingConfiguration,
    -- | Source configuration information about the knowledge base.
    KnowledgeBaseData -> Maybe SourceConfiguration
sourceConfiguration :: Prelude.Maybe SourceConfiguration,
    -- | An epoch timestamp indicating the most recent content modification
    -- inside the knowledge base. If no content exists in a knowledge base,
    -- this value is unset.
    KnowledgeBaseData -> Maybe POSIX
lastContentModificationTime :: Prelude.Maybe Core.POSIX,
    -- | The description.
    KnowledgeBaseData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The KMS key used for encryption.
    KnowledgeBaseData -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Prelude.Maybe ServerSideEncryptionConfiguration,
    -- | The tags used to organize, track, or control access for this resource.
    KnowledgeBaseData -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the knowledge base.
    KnowledgeBaseData -> Text
knowledgeBaseArn :: Prelude.Text,
    -- | The the identifier of the knowledge base.
    KnowledgeBaseData -> Text
knowledgeBaseId :: Prelude.Text,
    -- | The type of knowledge base.
    KnowledgeBaseData -> KnowledgeBaseType
knowledgeBaseType :: KnowledgeBaseType,
    -- | The name of the knowledge base.
    KnowledgeBaseData -> Text
name :: Prelude.Text,
    -- | The status of the knowledge base.
    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)

-- |
-- Create a value of 'KnowledgeBaseData' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'renderingConfiguration', 'knowledgeBaseData_renderingConfiguration' - Information about how to render the content.
--
-- 'sourceConfiguration', 'knowledgeBaseData_sourceConfiguration' - Source configuration information about the knowledge base.
--
-- 'lastContentModificationTime', 'knowledgeBaseData_lastContentModificationTime' - An epoch timestamp indicating the most recent content modification
-- inside the knowledge base. If no content exists in a knowledge base,
-- this value is unset.
--
-- 'description', 'knowledgeBaseData_description' - The description.
--
-- 'serverSideEncryptionConfiguration', 'knowledgeBaseData_serverSideEncryptionConfiguration' - The KMS key used for encryption.
--
-- 'tags', 'knowledgeBaseData_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'knowledgeBaseArn', 'knowledgeBaseData_knowledgeBaseArn' - The Amazon Resource Name (ARN) of the knowledge base.
--
-- 'knowledgeBaseId', 'knowledgeBaseData_knowledgeBaseId' - The the identifier of the knowledge base.
--
-- 'knowledgeBaseType', 'knowledgeBaseData_knowledgeBaseType' - The type of knowledge base.
--
-- 'name', 'knowledgeBaseData_name' - The name of the knowledge base.
--
-- 'status', 'knowledgeBaseData_status' - The status of the knowledge base.
newKnowledgeBaseData ::
  -- | 'knowledgeBaseArn'
  Prelude.Text ->
  -- | 'knowledgeBaseId'
  Prelude.Text ->
  -- | 'knowledgeBaseType'
  KnowledgeBaseType ->
  -- | 'name'
  Prelude.Text ->
  -- | 'status'
  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_
      }

-- | Information about how to render the content.
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)

-- | Source configuration information about the knowledge base.
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)

-- | An epoch timestamp indicating the most recent content modification
-- inside the knowledge base. If no content exists in a knowledge base,
-- this value is unset.
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

-- | The description.
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)

-- | The KMS key used for encryption.
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)

-- | The tags used to organize, track, or control access for this resource.
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

-- | The Amazon Resource Name (ARN) of the knowledge base.
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)

-- | The the identifier of the knowledge base.
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)

-- | The type of knowledge base.
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)

-- | The name of the knowledge base.
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)

-- | The status of the knowledge base.
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