{-# 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.ContentSummary
-- 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.ContentSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Wisdom.Types.ContentStatus

-- | Summary information about the content.
--
-- /See:/ 'newContentSummary' smart constructor.
data ContentSummary = ContentSummary'
  { -- | The tags used to organize, track, or control access for this resource.
    ContentSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the content.
    ContentSummary -> Text
contentArn :: Prelude.Text,
    -- | The identifier of the content.
    ContentSummary -> Text
contentId :: Prelude.Text,
    -- | The media type of the content.
    ContentSummary -> Text
contentType :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the knowledge base.
    ContentSummary -> Text
knowledgeBaseArn :: Prelude.Text,
    -- | The the identifier of the knowledge base.
    ContentSummary -> Text
knowledgeBaseId :: Prelude.Text,
    -- | A key\/value map to store attributes without affecting tagging or
    -- recommendations. For example, when synchronizing data between an
    -- external system and Wisdom, you can store an external version identifier
    -- as metadata to utilize for determining drift.
    ContentSummary -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | The name of the content.
    ContentSummary -> Text
name :: Prelude.Text,
    -- | The identifier of the revision of the content.
    ContentSummary -> Text
revisionId :: Prelude.Text,
    -- | The status of the content.
    ContentSummary -> ContentStatus
status :: ContentStatus,
    -- | The title of the content.
    ContentSummary -> Text
title :: Prelude.Text
  }
  deriving (ContentSummary -> ContentSummary -> Bool
(ContentSummary -> ContentSummary -> Bool)
-> (ContentSummary -> ContentSummary -> Bool) -> Eq ContentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContentSummary -> ContentSummary -> Bool
$c/= :: ContentSummary -> ContentSummary -> Bool
== :: ContentSummary -> ContentSummary -> Bool
$c== :: ContentSummary -> ContentSummary -> Bool
Prelude.Eq, ReadPrec [ContentSummary]
ReadPrec ContentSummary
Int -> ReadS ContentSummary
ReadS [ContentSummary]
(Int -> ReadS ContentSummary)
-> ReadS [ContentSummary]
-> ReadPrec ContentSummary
-> ReadPrec [ContentSummary]
-> Read ContentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContentSummary]
$creadListPrec :: ReadPrec [ContentSummary]
readPrec :: ReadPrec ContentSummary
$creadPrec :: ReadPrec ContentSummary
readList :: ReadS [ContentSummary]
$creadList :: ReadS [ContentSummary]
readsPrec :: Int -> ReadS ContentSummary
$creadsPrec :: Int -> ReadS ContentSummary
Prelude.Read, Int -> ContentSummary -> ShowS
[ContentSummary] -> ShowS
ContentSummary -> String
(Int -> ContentSummary -> ShowS)
-> (ContentSummary -> String)
-> ([ContentSummary] -> ShowS)
-> Show ContentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContentSummary] -> ShowS
$cshowList :: [ContentSummary] -> ShowS
show :: ContentSummary -> String
$cshow :: ContentSummary -> String
showsPrec :: Int -> ContentSummary -> ShowS
$cshowsPrec :: Int -> ContentSummary -> ShowS
Prelude.Show, (forall x. ContentSummary -> Rep ContentSummary x)
-> (forall x. Rep ContentSummary x -> ContentSummary)
-> Generic ContentSummary
forall x. Rep ContentSummary x -> ContentSummary
forall x. ContentSummary -> Rep ContentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContentSummary x -> ContentSummary
$cfrom :: forall x. ContentSummary -> Rep ContentSummary x
Prelude.Generic)

-- |
-- Create a value of 'ContentSummary' 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:
--
-- 'tags', 'contentSummary_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'contentArn', 'contentSummary_contentArn' - The Amazon Resource Name (ARN) of the content.
--
-- 'contentId', 'contentSummary_contentId' - The identifier of the content.
--
-- 'contentType', 'contentSummary_contentType' - The media type of the content.
--
-- 'knowledgeBaseArn', 'contentSummary_knowledgeBaseArn' - The Amazon Resource Name (ARN) of the knowledge base.
--
-- 'knowledgeBaseId', 'contentSummary_knowledgeBaseId' - The the identifier of the knowledge base.
--
-- 'metadata', 'contentSummary_metadata' - A key\/value map to store attributes without affecting tagging or
-- recommendations. For example, when synchronizing data between an
-- external system and Wisdom, you can store an external version identifier
-- as metadata to utilize for determining drift.
--
-- 'name', 'contentSummary_name' - The name of the content.
--
-- 'revisionId', 'contentSummary_revisionId' - The identifier of the revision of the content.
--
-- 'status', 'contentSummary_status' - The status of the content.
--
-- 'title', 'contentSummary_title' - The title of the content.
newContentSummary ::
  -- | 'contentArn'
  Prelude.Text ->
  -- | 'contentId'
  Prelude.Text ->
  -- | 'contentType'
  Prelude.Text ->
  -- | 'knowledgeBaseArn'
  Prelude.Text ->
  -- | 'knowledgeBaseId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'revisionId'
  Prelude.Text ->
  -- | 'status'
  ContentStatus ->
  -- | 'title'
  Prelude.Text ->
  ContentSummary
newContentSummary :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
newContentSummary
  Text
pContentArn_
  Text
pContentId_
  Text
pContentType_
  Text
pKnowledgeBaseArn_
  Text
pKnowledgeBaseId_
  Text
pName_
  Text
pRevisionId_
  ContentStatus
pStatus_
  Text
pTitle_ =
    ContentSummary' :: Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
ContentSummary'
      { $sel:tags:ContentSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:contentArn:ContentSummary' :: Text
contentArn = Text
pContentArn_,
        $sel:contentId:ContentSummary' :: Text
contentId = Text
pContentId_,
        $sel:contentType:ContentSummary' :: Text
contentType = Text
pContentType_,
        $sel:knowledgeBaseArn:ContentSummary' :: Text
knowledgeBaseArn = Text
pKnowledgeBaseArn_,
        $sel:knowledgeBaseId:ContentSummary' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
        $sel:metadata:ContentSummary' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
        $sel:name:ContentSummary' :: Text
name = Text
pName_,
        $sel:revisionId:ContentSummary' :: Text
revisionId = Text
pRevisionId_,
        $sel:status:ContentSummary' :: ContentStatus
status = ContentStatus
pStatus_,
        $sel:title:ContentSummary' :: Text
title = Text
pTitle_
      }

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

-- | The identifier of the content.
contentSummary_contentId :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_contentId :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_contentId = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
contentId :: Text
$sel:contentId:ContentSummary' :: ContentSummary -> Text
contentId} -> Text
contentId) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:contentId:ContentSummary' :: Text
contentId = Text
a} :: ContentSummary)

-- | The media type of the content.
contentSummary_contentType :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_contentType :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_contentType = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
contentType :: Text
$sel:contentType:ContentSummary' :: ContentSummary -> Text
contentType} -> Text
contentType) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:contentType:ContentSummary' :: Text
contentType = Text
a} :: ContentSummary)

-- | The Amazon Resource Name (ARN) of the knowledge base.
contentSummary_knowledgeBaseArn :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_knowledgeBaseArn :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_knowledgeBaseArn = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
knowledgeBaseArn :: Text
$sel:knowledgeBaseArn:ContentSummary' :: ContentSummary -> Text
knowledgeBaseArn} -> Text
knowledgeBaseArn) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:knowledgeBaseArn:ContentSummary' :: Text
knowledgeBaseArn = Text
a} :: ContentSummary)

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

-- | A key\/value map to store attributes without affecting tagging or
-- recommendations. For example, when synchronizing data between an
-- external system and Wisdom, you can store an external version identifier
-- as metadata to utilize for determining drift.
contentSummary_metadata :: Lens.Lens' ContentSummary (Prelude.HashMap Prelude.Text Prelude.Text)
contentSummary_metadata :: (HashMap Text Text -> f (HashMap Text Text))
-> ContentSummary -> f ContentSummary
contentSummary_metadata = (ContentSummary -> HashMap Text Text)
-> (ContentSummary -> HashMap Text Text -> ContentSummary)
-> Lens
     ContentSummary
     ContentSummary
     (HashMap Text Text)
     (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:ContentSummary' :: ContentSummary -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: ContentSummary
s@ContentSummary' {} HashMap Text Text
a -> ContentSummary
s {$sel:metadata:ContentSummary' :: HashMap Text Text
metadata = HashMap Text Text
a} :: ContentSummary) ((HashMap Text Text -> f (HashMap Text Text))
 -> ContentSummary -> f ContentSummary)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> ContentSummary
-> f ContentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The identifier of the revision of the content.
contentSummary_revisionId :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_revisionId :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_revisionId = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
revisionId :: Text
$sel:revisionId:ContentSummary' :: ContentSummary -> Text
revisionId} -> Text
revisionId) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:revisionId:ContentSummary' :: Text
revisionId = Text
a} :: ContentSummary)

-- | The status of the content.
contentSummary_status :: Lens.Lens' ContentSummary ContentStatus
contentSummary_status :: (ContentStatus -> f ContentStatus)
-> ContentSummary -> f ContentSummary
contentSummary_status = (ContentSummary -> ContentStatus)
-> (ContentSummary -> ContentStatus -> ContentSummary)
-> Lens ContentSummary ContentSummary ContentStatus ContentStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {ContentStatus
status :: ContentStatus
$sel:status:ContentSummary' :: ContentSummary -> ContentStatus
status} -> ContentStatus
status) (\s :: ContentSummary
s@ContentSummary' {} ContentStatus
a -> ContentSummary
s {$sel:status:ContentSummary' :: ContentStatus
status = ContentStatus
a} :: ContentSummary)

-- | The title of the content.
contentSummary_title :: Lens.Lens' ContentSummary Prelude.Text
contentSummary_title :: (Text -> f Text) -> ContentSummary -> f ContentSummary
contentSummary_title = (ContentSummary -> Text)
-> (ContentSummary -> Text -> ContentSummary)
-> Lens ContentSummary ContentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentSummary' {Text
title :: Text
$sel:title:ContentSummary' :: ContentSummary -> Text
title} -> Text
title) (\s :: ContentSummary
s@ContentSummary' {} Text
a -> ContentSummary
s {$sel:title:ContentSummary' :: Text
title = Text
a} :: ContentSummary)

instance Core.FromJSON ContentSummary where
  parseJSON :: Value -> Parser ContentSummary
parseJSON =
    String
-> (Object -> Parser ContentSummary)
-> Value
-> Parser ContentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContentSummary"
      ( \Object
x ->
          Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> ContentSummary
ContentSummary'
            (Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> HashMap Text Text
 -> Text
 -> Text
 -> ContentStatus
 -> Text
 -> ContentSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> ContentSummary)
forall (f :: * -> *) a b. Functor 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
   -> Text
   -> Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> ContentSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> ContentSummary)
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
"contentArn")
            Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> ContentSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> ContentSummary)
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
"contentId")
            Parser
  (Text
   -> Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> ContentSummary)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> ContentSummary)
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
"contentType")
            Parser
  (Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> ContentSummary)
-> Parser Text
-> Parser
     (Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> ContentSummary)
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
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> ContentSummary)
-> Parser Text
-> Parser
     (HashMap Text Text
      -> Text -> Text -> ContentStatus -> Text -> ContentSummary)
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
  (HashMap Text Text
   -> Text -> Text -> ContentStatus -> Text -> ContentSummary)
-> Parser (HashMap Text Text)
-> Parser (Text -> Text -> ContentStatus -> Text -> ContentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"metadata" Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
            Parser (Text -> Text -> ContentStatus -> Text -> ContentSummary)
-> Parser Text
-> Parser (Text -> ContentStatus -> Text -> ContentSummary)
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 (Text -> ContentStatus -> Text -> ContentSummary)
-> Parser Text -> Parser (ContentStatus -> Text -> ContentSummary)
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
"revisionId")
            Parser (ContentStatus -> Text -> ContentSummary)
-> Parser ContentStatus -> Parser (Text -> ContentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ContentStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
            Parser (Text -> ContentSummary)
-> Parser Text -> Parser ContentSummary
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
"title")
      )

instance Prelude.Hashable ContentSummary

instance Prelude.NFData ContentSummary