{-# 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.KnowledgeBaseSummary
-- 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.KnowledgeBaseSummary 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

-- | Summary information about the knowledge base.
--
-- /See:/ 'newKnowledgeBaseSummary' smart constructor.
data KnowledgeBaseSummary = KnowledgeBaseSummary'
  { -- | Information about how to render the content.
    KnowledgeBaseSummary -> Maybe RenderingConfiguration
renderingConfiguration :: Prelude.Maybe RenderingConfiguration,
    -- | [KEVIN]
    KnowledgeBaseSummary -> Maybe SourceConfiguration
sourceConfiguration :: Prelude.Maybe SourceConfiguration,
    -- | The description of the knowledge base.
    KnowledgeBaseSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The KMS key used for encryption.
    KnowledgeBaseSummary -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Prelude.Maybe ServerSideEncryptionConfiguration,
    -- | The tags used to organize, track, or control access for this resource.
    KnowledgeBaseSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the knowledge base.
    KnowledgeBaseSummary -> Text
knowledgeBaseArn :: Prelude.Text,
    -- | The the identifier of the knowledge base.
    KnowledgeBaseSummary -> Text
knowledgeBaseId :: Prelude.Text,
    -- | The type of knowledge base.
    KnowledgeBaseSummary -> KnowledgeBaseType
knowledgeBaseType :: KnowledgeBaseType,
    -- | The name of the knowledge base.
    KnowledgeBaseSummary -> Text
name :: Prelude.Text,
    -- | The status of the knowledge base summary.
    KnowledgeBaseSummary -> KnowledgeBaseStatus
status :: KnowledgeBaseStatus
  }
  deriving (KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool
(KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool)
-> (KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool)
-> Eq KnowledgeBaseSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool
$c/= :: KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool
== :: KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool
$c== :: KnowledgeBaseSummary -> KnowledgeBaseSummary -> Bool
Prelude.Eq, ReadPrec [KnowledgeBaseSummary]
ReadPrec KnowledgeBaseSummary
Int -> ReadS KnowledgeBaseSummary
ReadS [KnowledgeBaseSummary]
(Int -> ReadS KnowledgeBaseSummary)
-> ReadS [KnowledgeBaseSummary]
-> ReadPrec KnowledgeBaseSummary
-> ReadPrec [KnowledgeBaseSummary]
-> Read KnowledgeBaseSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KnowledgeBaseSummary]
$creadListPrec :: ReadPrec [KnowledgeBaseSummary]
readPrec :: ReadPrec KnowledgeBaseSummary
$creadPrec :: ReadPrec KnowledgeBaseSummary
readList :: ReadS [KnowledgeBaseSummary]
$creadList :: ReadS [KnowledgeBaseSummary]
readsPrec :: Int -> ReadS KnowledgeBaseSummary
$creadsPrec :: Int -> ReadS KnowledgeBaseSummary
Prelude.Read, Int -> KnowledgeBaseSummary -> ShowS
[KnowledgeBaseSummary] -> ShowS
KnowledgeBaseSummary -> String
(Int -> KnowledgeBaseSummary -> ShowS)
-> (KnowledgeBaseSummary -> String)
-> ([KnowledgeBaseSummary] -> ShowS)
-> Show KnowledgeBaseSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KnowledgeBaseSummary] -> ShowS
$cshowList :: [KnowledgeBaseSummary] -> ShowS
show :: KnowledgeBaseSummary -> String
$cshow :: KnowledgeBaseSummary -> String
showsPrec :: Int -> KnowledgeBaseSummary -> ShowS
$cshowsPrec :: Int -> KnowledgeBaseSummary -> ShowS
Prelude.Show, (forall x. KnowledgeBaseSummary -> Rep KnowledgeBaseSummary x)
-> (forall x. Rep KnowledgeBaseSummary x -> KnowledgeBaseSummary)
-> Generic KnowledgeBaseSummary
forall x. Rep KnowledgeBaseSummary x -> KnowledgeBaseSummary
forall x. KnowledgeBaseSummary -> Rep KnowledgeBaseSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KnowledgeBaseSummary x -> KnowledgeBaseSummary
$cfrom :: forall x. KnowledgeBaseSummary -> Rep KnowledgeBaseSummary x
Prelude.Generic)

-- |
-- Create a value of 'KnowledgeBaseSummary' 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', 'knowledgeBaseSummary_renderingConfiguration' - Information about how to render the content.
--
-- 'sourceConfiguration', 'knowledgeBaseSummary_sourceConfiguration' - [KEVIN]
--
-- 'description', 'knowledgeBaseSummary_description' - The description of the knowledge base.
--
-- 'serverSideEncryptionConfiguration', 'knowledgeBaseSummary_serverSideEncryptionConfiguration' - The KMS key used for encryption.
--
-- 'tags', 'knowledgeBaseSummary_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'knowledgeBaseArn', 'knowledgeBaseSummary_knowledgeBaseArn' - The Amazon Resource Name (ARN) of the knowledge base.
--
-- 'knowledgeBaseId', 'knowledgeBaseSummary_knowledgeBaseId' - The the identifier of the knowledge base.
--
-- 'knowledgeBaseType', 'knowledgeBaseSummary_knowledgeBaseType' - The type of knowledge base.
--
-- 'name', 'knowledgeBaseSummary_name' - The name of the knowledge base.
--
-- 'status', 'knowledgeBaseSummary_status' - The status of the knowledge base summary.
newKnowledgeBaseSummary ::
  -- | 'knowledgeBaseArn'
  Prelude.Text ->
  -- | 'knowledgeBaseId'
  Prelude.Text ->
  -- | 'knowledgeBaseType'
  KnowledgeBaseType ->
  -- | 'name'
  Prelude.Text ->
  -- | 'status'
  KnowledgeBaseStatus ->
  KnowledgeBaseSummary
newKnowledgeBaseSummary :: Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseSummary
newKnowledgeBaseSummary
  Text
pKnowledgeBaseArn_
  Text
pKnowledgeBaseId_
  KnowledgeBaseType
pKnowledgeBaseType_
  Text
pName_
  KnowledgeBaseStatus
pStatus_ =
    KnowledgeBaseSummary' :: Maybe RenderingConfiguration
-> Maybe SourceConfiguration
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseSummary
KnowledgeBaseSummary'
      { $sel:renderingConfiguration:KnowledgeBaseSummary' :: Maybe RenderingConfiguration
renderingConfiguration =
          Maybe RenderingConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceConfiguration:KnowledgeBaseSummary' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:description:KnowledgeBaseSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:serverSideEncryptionConfiguration:KnowledgeBaseSummary' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:KnowledgeBaseSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:knowledgeBaseArn:KnowledgeBaseSummary' :: Text
knowledgeBaseArn = Text
pKnowledgeBaseArn_,
        $sel:knowledgeBaseId:KnowledgeBaseSummary' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
        $sel:knowledgeBaseType:KnowledgeBaseSummary' :: KnowledgeBaseType
knowledgeBaseType = KnowledgeBaseType
pKnowledgeBaseType_,
        $sel:name:KnowledgeBaseSummary' :: Text
name = Text
pName_,
        $sel:status:KnowledgeBaseSummary' :: KnowledgeBaseStatus
status = KnowledgeBaseStatus
pStatus_
      }

-- | Information about how to render the content.
knowledgeBaseSummary_renderingConfiguration :: Lens.Lens' KnowledgeBaseSummary (Prelude.Maybe RenderingConfiguration)
knowledgeBaseSummary_renderingConfiguration :: (Maybe RenderingConfiguration -> f (Maybe RenderingConfiguration))
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_renderingConfiguration = (KnowledgeBaseSummary -> Maybe RenderingConfiguration)
-> (KnowledgeBaseSummary
    -> Maybe RenderingConfiguration -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     (Maybe RenderingConfiguration)
     (Maybe RenderingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Maybe RenderingConfiguration
renderingConfiguration :: Maybe RenderingConfiguration
$sel:renderingConfiguration:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Maybe RenderingConfiguration
renderingConfiguration} -> Maybe RenderingConfiguration
renderingConfiguration) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Maybe RenderingConfiguration
a -> KnowledgeBaseSummary
s {$sel:renderingConfiguration:KnowledgeBaseSummary' :: Maybe RenderingConfiguration
renderingConfiguration = Maybe RenderingConfiguration
a} :: KnowledgeBaseSummary)

-- | [KEVIN]
knowledgeBaseSummary_sourceConfiguration :: Lens.Lens' KnowledgeBaseSummary (Prelude.Maybe SourceConfiguration)
knowledgeBaseSummary_sourceConfiguration :: (Maybe SourceConfiguration -> f (Maybe SourceConfiguration))
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_sourceConfiguration = (KnowledgeBaseSummary -> Maybe SourceConfiguration)
-> (KnowledgeBaseSummary
    -> Maybe SourceConfiguration -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     (Maybe SourceConfiguration)
     (Maybe SourceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Maybe SourceConfiguration
sourceConfiguration :: Maybe SourceConfiguration
$sel:sourceConfiguration:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Maybe SourceConfiguration
sourceConfiguration} -> Maybe SourceConfiguration
sourceConfiguration) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Maybe SourceConfiguration
a -> KnowledgeBaseSummary
s {$sel:sourceConfiguration:KnowledgeBaseSummary' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
a} :: KnowledgeBaseSummary)

-- | The description of the knowledge base.
knowledgeBaseSummary_description :: Lens.Lens' KnowledgeBaseSummary (Prelude.Maybe Prelude.Text)
knowledgeBaseSummary_description :: (Maybe Text -> f (Maybe Text))
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_description = (KnowledgeBaseSummary -> Maybe Text)
-> (KnowledgeBaseSummary -> Maybe Text -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary KnowledgeBaseSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Maybe Text
description :: Maybe Text
$sel:description:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Maybe Text
a -> KnowledgeBaseSummary
s {$sel:description:KnowledgeBaseSummary' :: Maybe Text
description = Maybe Text
a} :: KnowledgeBaseSummary)

-- | The KMS key used for encryption.
knowledgeBaseSummary_serverSideEncryptionConfiguration :: Lens.Lens' KnowledgeBaseSummary (Prelude.Maybe ServerSideEncryptionConfiguration)
knowledgeBaseSummary_serverSideEncryptionConfiguration :: (Maybe ServerSideEncryptionConfiguration
 -> f (Maybe ServerSideEncryptionConfiguration))
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_serverSideEncryptionConfiguration = (KnowledgeBaseSummary -> Maybe ServerSideEncryptionConfiguration)
-> (KnowledgeBaseSummary
    -> Maybe ServerSideEncryptionConfiguration -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     (Maybe ServerSideEncryptionConfiguration)
     (Maybe ServerSideEncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration :: Maybe ServerSideEncryptionConfiguration
$sel:serverSideEncryptionConfiguration:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration} -> Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Maybe ServerSideEncryptionConfiguration
a -> KnowledgeBaseSummary
s {$sel:serverSideEncryptionConfiguration:KnowledgeBaseSummary' :: Maybe ServerSideEncryptionConfiguration
serverSideEncryptionConfiguration = Maybe ServerSideEncryptionConfiguration
a} :: KnowledgeBaseSummary)

-- | The tags used to organize, track, or control access for this resource.
knowledgeBaseSummary_tags :: Lens.Lens' KnowledgeBaseSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
knowledgeBaseSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_tags = (KnowledgeBaseSummary -> Maybe (HashMap Text Text))
-> (KnowledgeBaseSummary
    -> Maybe (HashMap Text Text) -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     (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 (\KnowledgeBaseSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Maybe (HashMap Text Text)
a -> KnowledgeBaseSummary
s {$sel:tags:KnowledgeBaseSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: KnowledgeBaseSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> KnowledgeBaseSummary -> f KnowledgeBaseSummary)
-> ((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)))
-> KnowledgeBaseSummary
-> f KnowledgeBaseSummary
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.
knowledgeBaseSummary_knowledgeBaseArn :: Lens.Lens' KnowledgeBaseSummary Prelude.Text
knowledgeBaseSummary_knowledgeBaseArn :: (Text -> f Text) -> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_knowledgeBaseArn = (KnowledgeBaseSummary -> Text)
-> (KnowledgeBaseSummary -> Text -> KnowledgeBaseSummary)
-> Lens KnowledgeBaseSummary KnowledgeBaseSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Text
knowledgeBaseArn :: Text
$sel:knowledgeBaseArn:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Text
knowledgeBaseArn} -> Text
knowledgeBaseArn) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Text
a -> KnowledgeBaseSummary
s {$sel:knowledgeBaseArn:KnowledgeBaseSummary' :: Text
knowledgeBaseArn = Text
a} :: KnowledgeBaseSummary)

-- | The the identifier of the knowledge base.
knowledgeBaseSummary_knowledgeBaseId :: Lens.Lens' KnowledgeBaseSummary Prelude.Text
knowledgeBaseSummary_knowledgeBaseId :: (Text -> f Text) -> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_knowledgeBaseId = (KnowledgeBaseSummary -> Text)
-> (KnowledgeBaseSummary -> Text -> KnowledgeBaseSummary)
-> Lens KnowledgeBaseSummary KnowledgeBaseSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Text
knowledgeBaseId :: Text
$sel:knowledgeBaseId:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Text
knowledgeBaseId} -> Text
knowledgeBaseId) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Text
a -> KnowledgeBaseSummary
s {$sel:knowledgeBaseId:KnowledgeBaseSummary' :: Text
knowledgeBaseId = Text
a} :: KnowledgeBaseSummary)

-- | The type of knowledge base.
knowledgeBaseSummary_knowledgeBaseType :: Lens.Lens' KnowledgeBaseSummary KnowledgeBaseType
knowledgeBaseSummary_knowledgeBaseType :: (KnowledgeBaseType -> f KnowledgeBaseType)
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_knowledgeBaseType = (KnowledgeBaseSummary -> KnowledgeBaseType)
-> (KnowledgeBaseSummary
    -> KnowledgeBaseType -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     KnowledgeBaseType
     KnowledgeBaseType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {KnowledgeBaseType
knowledgeBaseType :: KnowledgeBaseType
$sel:knowledgeBaseType:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> KnowledgeBaseType
knowledgeBaseType} -> KnowledgeBaseType
knowledgeBaseType) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} KnowledgeBaseType
a -> KnowledgeBaseSummary
s {$sel:knowledgeBaseType:KnowledgeBaseSummary' :: KnowledgeBaseType
knowledgeBaseType = KnowledgeBaseType
a} :: KnowledgeBaseSummary)

-- | The name of the knowledge base.
knowledgeBaseSummary_name :: Lens.Lens' KnowledgeBaseSummary Prelude.Text
knowledgeBaseSummary_name :: (Text -> f Text) -> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_name = (KnowledgeBaseSummary -> Text)
-> (KnowledgeBaseSummary -> Text -> KnowledgeBaseSummary)
-> Lens KnowledgeBaseSummary KnowledgeBaseSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {Text
name :: Text
$sel:name:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> Text
name} -> Text
name) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} Text
a -> KnowledgeBaseSummary
s {$sel:name:KnowledgeBaseSummary' :: Text
name = Text
a} :: KnowledgeBaseSummary)

-- | The status of the knowledge base summary.
knowledgeBaseSummary_status :: Lens.Lens' KnowledgeBaseSummary KnowledgeBaseStatus
knowledgeBaseSummary_status :: (KnowledgeBaseStatus -> f KnowledgeBaseStatus)
-> KnowledgeBaseSummary -> f KnowledgeBaseSummary
knowledgeBaseSummary_status = (KnowledgeBaseSummary -> KnowledgeBaseStatus)
-> (KnowledgeBaseSummary
    -> KnowledgeBaseStatus -> KnowledgeBaseSummary)
-> Lens
     KnowledgeBaseSummary
     KnowledgeBaseSummary
     KnowledgeBaseStatus
     KnowledgeBaseStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseSummary' {KnowledgeBaseStatus
status :: KnowledgeBaseStatus
$sel:status:KnowledgeBaseSummary' :: KnowledgeBaseSummary -> KnowledgeBaseStatus
status} -> KnowledgeBaseStatus
status) (\s :: KnowledgeBaseSummary
s@KnowledgeBaseSummary' {} KnowledgeBaseStatus
a -> KnowledgeBaseSummary
s {$sel:status:KnowledgeBaseSummary' :: KnowledgeBaseStatus
status = KnowledgeBaseStatus
a} :: KnowledgeBaseSummary)

instance Core.FromJSON KnowledgeBaseSummary where
  parseJSON :: Value -> Parser KnowledgeBaseSummary
parseJSON =
    String
-> (Object -> Parser KnowledgeBaseSummary)
-> Value
-> Parser KnowledgeBaseSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"KnowledgeBaseSummary"
      ( \Object
x ->
          Maybe RenderingConfiguration
-> Maybe SourceConfiguration
-> Maybe Text
-> Maybe ServerSideEncryptionConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> KnowledgeBaseType
-> Text
-> KnowledgeBaseStatus
-> KnowledgeBaseSummary
KnowledgeBaseSummary'
            (Maybe RenderingConfiguration
 -> Maybe SourceConfiguration
 -> Maybe Text
 -> Maybe ServerSideEncryptionConfiguration
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> KnowledgeBaseType
 -> Text
 -> KnowledgeBaseStatus
 -> KnowledgeBaseSummary)
-> Parser (Maybe RenderingConfiguration)
-> Parser
     (Maybe SourceConfiguration
      -> Maybe Text
      -> Maybe ServerSideEncryptionConfiguration
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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 Text
   -> Maybe ServerSideEncryptionConfiguration
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> KnowledgeBaseType
   -> Text
   -> KnowledgeBaseStatus
   -> KnowledgeBaseSummary)
-> Parser (Maybe SourceConfiguration)
-> Parser
     (Maybe Text
      -> Maybe ServerSideEncryptionConfiguration
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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 Text
   -> Maybe ServerSideEncryptionConfiguration
   -> Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> KnowledgeBaseType
   -> Text
   -> KnowledgeBaseStatus
   -> KnowledgeBaseSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe ServerSideEncryptionConfiguration
      -> Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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
   -> KnowledgeBaseSummary)
-> Parser (Maybe ServerSideEncryptionConfiguration)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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
   -> KnowledgeBaseSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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
   -> KnowledgeBaseSummary)
-> Parser Text
-> Parser
     (Text
      -> KnowledgeBaseType
      -> Text
      -> KnowledgeBaseStatus
      -> KnowledgeBaseSummary)
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
   -> KnowledgeBaseSummary)
-> Parser Text
-> Parser
     (KnowledgeBaseType
      -> Text -> KnowledgeBaseStatus -> KnowledgeBaseSummary)
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 -> KnowledgeBaseSummary)
-> Parser KnowledgeBaseType
-> Parser (Text -> KnowledgeBaseStatus -> KnowledgeBaseSummary)
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 -> KnowledgeBaseSummary)
-> Parser Text
-> Parser (KnowledgeBaseStatus -> KnowledgeBaseSummary)
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 -> KnowledgeBaseSummary)
-> Parser KnowledgeBaseStatus -> Parser KnowledgeBaseSummary
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 KnowledgeBaseSummary

instance Prelude.NFData KnowledgeBaseSummary