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

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

-- | Information about the content.
--
-- /See:/ 'newContentData' smart constructor.
data ContentData = ContentData'
  { -- | The URI of the content.
    ContentData -> Maybe Text
linkOutUri :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for this resource.
    ContentData -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the content.
    ContentData -> Text
contentArn :: Prelude.Text,
    -- | The identifier of the content.
    ContentData -> Text
contentId :: Prelude.Text,
    -- | The media type of the content.
    ContentData -> Text
contentType :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the knowledge base.
    ContentData -> Text
knowledgeBaseArn :: Prelude.Text,
    -- | The the identifier of the knowledge base.
    ContentData -> 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.
    ContentData -> HashMap Text Text
metadata :: Prelude.HashMap Prelude.Text Prelude.Text,
    -- | The name of the content.
    ContentData -> Text
name :: Prelude.Text,
    -- | The identifier of the content revision.
    ContentData -> Text
revisionId :: Prelude.Text,
    -- | The status of the content.
    ContentData -> ContentStatus
status :: ContentStatus,
    -- | The title of the content.
    ContentData -> Text
title :: Prelude.Text,
    -- | The URL of the content.
    ContentData -> Sensitive Text
url :: Core.Sensitive Prelude.Text,
    -- | The expiration time of the URL as an epoch timestamp.
    ContentData -> POSIX
urlExpiry :: Core.POSIX
  }
  deriving (ContentData -> ContentData -> Bool
(ContentData -> ContentData -> Bool)
-> (ContentData -> ContentData -> Bool) -> Eq ContentData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContentData -> ContentData -> Bool
$c/= :: ContentData -> ContentData -> Bool
== :: ContentData -> ContentData -> Bool
$c== :: ContentData -> ContentData -> Bool
Prelude.Eq, Int -> ContentData -> ShowS
[ContentData] -> ShowS
ContentData -> String
(Int -> ContentData -> ShowS)
-> (ContentData -> String)
-> ([ContentData] -> ShowS)
-> Show ContentData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContentData] -> ShowS
$cshowList :: [ContentData] -> ShowS
show :: ContentData -> String
$cshow :: ContentData -> String
showsPrec :: Int -> ContentData -> ShowS
$cshowsPrec :: Int -> ContentData -> ShowS
Prelude.Show, (forall x. ContentData -> Rep ContentData x)
-> (forall x. Rep ContentData x -> ContentData)
-> Generic ContentData
forall x. Rep ContentData x -> ContentData
forall x. ContentData -> Rep ContentData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContentData x -> ContentData
$cfrom :: forall x. ContentData -> Rep ContentData x
Prelude.Generic)

-- |
-- Create a value of 'ContentData' 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:
--
-- 'linkOutUri', 'contentData_linkOutUri' - The URI of the content.
--
-- 'tags', 'contentData_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'contentArn', 'contentData_contentArn' - The Amazon Resource Name (ARN) of the content.
--
-- 'contentId', 'contentData_contentId' - The identifier of the content.
--
-- 'contentType', 'contentData_contentType' - The media type of the content.
--
-- 'knowledgeBaseArn', 'contentData_knowledgeBaseArn' - The Amazon Resource Name (ARN) of the knowledge base.
--
-- 'knowledgeBaseId', 'contentData_knowledgeBaseId' - The the identifier of the knowledge base.
--
-- 'metadata', 'contentData_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', 'contentData_name' - The name of the content.
--
-- 'revisionId', 'contentData_revisionId' - The identifier of the content revision.
--
-- 'status', 'contentData_status' - The status of the content.
--
-- 'title', 'contentData_title' - The title of the content.
--
-- 'url', 'contentData_url' - The URL of the content.
--
-- 'urlExpiry', 'contentData_urlExpiry' - The expiration time of the URL as an epoch timestamp.
newContentData ::
  -- | '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 ->
  -- | 'url'
  Prelude.Text ->
  -- | 'urlExpiry'
  Prelude.UTCTime ->
  ContentData
newContentData :: Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> ContentStatus
-> Text
-> Text
-> UTCTime
-> ContentData
newContentData
  Text
pContentArn_
  Text
pContentId_
  Text
pContentType_
  Text
pKnowledgeBaseArn_
  Text
pKnowledgeBaseId_
  Text
pName_
  Text
pRevisionId_
  ContentStatus
pStatus_
  Text
pTitle_
  Text
pUrl_
  UTCTime
pUrlExpiry_ =
    ContentData' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> Sensitive Text
-> POSIX
-> ContentData
ContentData'
      { $sel:linkOutUri:ContentData' :: Maybe Text
linkOutUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:ContentData' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:contentArn:ContentData' :: Text
contentArn = Text
pContentArn_,
        $sel:contentId:ContentData' :: Text
contentId = Text
pContentId_,
        $sel:contentType:ContentData' :: Text
contentType = Text
pContentType_,
        $sel:knowledgeBaseArn:ContentData' :: Text
knowledgeBaseArn = Text
pKnowledgeBaseArn_,
        $sel:knowledgeBaseId:ContentData' :: Text
knowledgeBaseId = Text
pKnowledgeBaseId_,
        $sel:metadata:ContentData' :: HashMap Text Text
metadata = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
        $sel:name:ContentData' :: Text
name = Text
pName_,
        $sel:revisionId:ContentData' :: Text
revisionId = Text
pRevisionId_,
        $sel:status:ContentData' :: ContentStatus
status = ContentStatus
pStatus_,
        $sel:title:ContentData' :: Text
title = Text
pTitle_,
        $sel:url:ContentData' :: Sensitive Text
url = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pUrl_,
        $sel:urlExpiry:ContentData' :: POSIX
urlExpiry = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUrlExpiry_
      }

-- | The URI of the content.
contentData_linkOutUri :: Lens.Lens' ContentData (Prelude.Maybe Prelude.Text)
contentData_linkOutUri :: (Maybe Text -> f (Maybe Text)) -> ContentData -> f ContentData
contentData_linkOutUri = (ContentData -> Maybe Text)
-> (ContentData -> Maybe Text -> ContentData)
-> Lens ContentData ContentData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentData' {Maybe Text
linkOutUri :: Maybe Text
$sel:linkOutUri:ContentData' :: ContentData -> Maybe Text
linkOutUri} -> Maybe Text
linkOutUri) (\s :: ContentData
s@ContentData' {} Maybe Text
a -> ContentData
s {$sel:linkOutUri:ContentData' :: Maybe Text
linkOutUri = Maybe Text
a} :: ContentData)

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

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

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

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

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

-- | 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.
contentData_metadata :: Lens.Lens' ContentData (Prelude.HashMap Prelude.Text Prelude.Text)
contentData_metadata :: (HashMap Text Text -> f (HashMap Text Text))
-> ContentData -> f ContentData
contentData_metadata = (ContentData -> HashMap Text Text)
-> (ContentData -> HashMap Text Text -> ContentData)
-> Lens
     ContentData ContentData (HashMap Text Text) (HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentData' {HashMap Text Text
metadata :: HashMap Text Text
$sel:metadata:ContentData' :: ContentData -> HashMap Text Text
metadata} -> HashMap Text Text
metadata) (\s :: ContentData
s@ContentData' {} HashMap Text Text
a -> ContentData
s {$sel:metadata:ContentData' :: HashMap Text Text
metadata = HashMap Text Text
a} :: ContentData) ((HashMap Text Text -> f (HashMap Text Text))
 -> ContentData -> f ContentData)
-> ((HashMap Text Text -> f (HashMap Text Text))
    -> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> ContentData
-> f ContentData
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.
contentData_name :: Lens.Lens' ContentData Prelude.Text
contentData_name :: (Text -> f Text) -> ContentData -> f ContentData
contentData_name = (ContentData -> Text)
-> (ContentData -> Text -> ContentData)
-> Lens ContentData ContentData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentData' {Text
name :: Text
$sel:name:ContentData' :: ContentData -> Text
name} -> Text
name) (\s :: ContentData
s@ContentData' {} Text
a -> ContentData
s {$sel:name:ContentData' :: Text
name = Text
a} :: ContentData)

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

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

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

-- | The URL of the content.
contentData_url :: Lens.Lens' ContentData Prelude.Text
contentData_url :: (Text -> f Text) -> ContentData -> f ContentData
contentData_url = (ContentData -> Sensitive Text)
-> (ContentData -> Sensitive Text -> ContentData)
-> Lens ContentData ContentData (Sensitive Text) (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentData' {Sensitive Text
url :: Sensitive Text
$sel:url:ContentData' :: ContentData -> Sensitive Text
url} -> Sensitive Text
url) (\s :: ContentData
s@ContentData' {} Sensitive Text
a -> ContentData
s {$sel:url:ContentData' :: Sensitive Text
url = Sensitive Text
a} :: ContentData) ((Sensitive Text -> f (Sensitive Text))
 -> ContentData -> f ContentData)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ContentData
-> f ContentData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The expiration time of the URL as an epoch timestamp.
contentData_urlExpiry :: Lens.Lens' ContentData Prelude.UTCTime
contentData_urlExpiry :: (UTCTime -> f UTCTime) -> ContentData -> f ContentData
contentData_urlExpiry = (ContentData -> POSIX)
-> (ContentData -> POSIX -> ContentData)
-> Lens ContentData ContentData POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContentData' {POSIX
urlExpiry :: POSIX
$sel:urlExpiry:ContentData' :: ContentData -> POSIX
urlExpiry} -> POSIX
urlExpiry) (\s :: ContentData
s@ContentData' {} POSIX
a -> ContentData
s {$sel:urlExpiry:ContentData' :: POSIX
urlExpiry = POSIX
a} :: ContentData) ((POSIX -> f POSIX) -> ContentData -> f ContentData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ContentData
-> f ContentData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON ContentData where
  parseJSON :: Value -> Parser ContentData
parseJSON =
    String
-> (Object -> Parser ContentData) -> Value -> Parser ContentData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContentData"
      ( \Object
x ->
          Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> Text
-> HashMap Text Text
-> Text
-> Text
-> ContentStatus
-> Text
-> Sensitive Text
-> POSIX
-> ContentData
ContentData'
            (Maybe Text
 -> Maybe (HashMap Text Text)
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> HashMap Text Text
 -> Text
 -> Text
 -> ContentStatus
 -> Text
 -> Sensitive Text
 -> POSIX
 -> ContentData)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
forall (f :: * -> *) a b. Functor 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
"linkOutUri")
            Parser
  (Maybe (HashMap Text Text)
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Text
   -> Text
   -> Text
   -> HashMap Text Text
   -> Text
   -> Text
   -> ContentStatus
   -> Text
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (Text
      -> HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (HashMap Text Text
      -> Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser (HashMap Text Text)
-> Parser
     (Text
      -> Text
      -> ContentStatus
      -> Text
      -> Sensitive Text
      -> POSIX
      -> ContentData)
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
   -> Sensitive Text
   -> POSIX
   -> ContentData)
-> Parser Text
-> Parser
     (Text
      -> ContentStatus -> Text -> Sensitive Text -> POSIX -> ContentData)
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 -> Sensitive Text -> POSIX -> ContentData)
-> Parser Text
-> Parser
     (ContentStatus -> Text -> Sensitive Text -> POSIX -> ContentData)
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 -> Sensitive Text -> POSIX -> ContentData)
-> Parser ContentStatus
-> Parser (Text -> Sensitive Text -> POSIX -> ContentData)
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 -> Sensitive Text -> POSIX -> ContentData)
-> Parser Text -> Parser (Sensitive Text -> POSIX -> ContentData)
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")
            Parser (Sensitive Text -> POSIX -> ContentData)
-> Parser (Sensitive Text) -> Parser (POSIX -> ContentData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Sensitive Text)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"url")
            Parser (POSIX -> ContentData) -> Parser POSIX -> Parser ContentData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"urlExpiry")
      )

instance Prelude.Hashable ContentData

instance Prelude.NFData ContentData