{-# 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.WorkDocs.Types.DocumentMetadata
-- 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.WorkDocs.Types.DocumentMetadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkDocs.Types.DocumentVersionMetadata
import Amazonka.WorkDocs.Types.ResourceStateType

-- | Describes the document.
--
-- /See:/ 'newDocumentMetadata' smart constructor.
data DocumentMetadata = DocumentMetadata'
  { -- | The latest version of the document.
    DocumentMetadata -> Maybe DocumentVersionMetadata
latestVersionMetadata :: Prelude.Maybe DocumentVersionMetadata,
    -- | The ID of the parent folder.
    DocumentMetadata -> Maybe Text
parentFolderId :: Prelude.Maybe Prelude.Text,
    -- | The time when the document was updated.
    DocumentMetadata -> Maybe POSIX
modifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the document.
    DocumentMetadata -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | List of labels on the document.
    DocumentMetadata -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
    -- | The resource state.
    DocumentMetadata -> Maybe ResourceStateType
resourceState :: Prelude.Maybe ResourceStateType,
    -- | The time when the document was created.
    DocumentMetadata -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the creator.
    DocumentMetadata -> Maybe Text
creatorId :: Prelude.Maybe Prelude.Text
  }
  deriving (DocumentMetadata -> DocumentMetadata -> Bool
(DocumentMetadata -> DocumentMetadata -> Bool)
-> (DocumentMetadata -> DocumentMetadata -> Bool)
-> Eq DocumentMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentMetadata -> DocumentMetadata -> Bool
$c/= :: DocumentMetadata -> DocumentMetadata -> Bool
== :: DocumentMetadata -> DocumentMetadata -> Bool
$c== :: DocumentMetadata -> DocumentMetadata -> Bool
Prelude.Eq, Int -> DocumentMetadata -> ShowS
[DocumentMetadata] -> ShowS
DocumentMetadata -> String
(Int -> DocumentMetadata -> ShowS)
-> (DocumentMetadata -> String)
-> ([DocumentMetadata] -> ShowS)
-> Show DocumentMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentMetadata] -> ShowS
$cshowList :: [DocumentMetadata] -> ShowS
show :: DocumentMetadata -> String
$cshow :: DocumentMetadata -> String
showsPrec :: Int -> DocumentMetadata -> ShowS
$cshowsPrec :: Int -> DocumentMetadata -> ShowS
Prelude.Show, (forall x. DocumentMetadata -> Rep DocumentMetadata x)
-> (forall x. Rep DocumentMetadata x -> DocumentMetadata)
-> Generic DocumentMetadata
forall x. Rep DocumentMetadata x -> DocumentMetadata
forall x. DocumentMetadata -> Rep DocumentMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocumentMetadata x -> DocumentMetadata
$cfrom :: forall x. DocumentMetadata -> Rep DocumentMetadata x
Prelude.Generic)

-- |
-- Create a value of 'DocumentMetadata' 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:
--
-- 'latestVersionMetadata', 'documentMetadata_latestVersionMetadata' - The latest version of the document.
--
-- 'parentFolderId', 'documentMetadata_parentFolderId' - The ID of the parent folder.
--
-- 'modifiedTimestamp', 'documentMetadata_modifiedTimestamp' - The time when the document was updated.
--
-- 'id', 'documentMetadata_id' - The ID of the document.
--
-- 'labels', 'documentMetadata_labels' - List of labels on the document.
--
-- 'resourceState', 'documentMetadata_resourceState' - The resource state.
--
-- 'createdTimestamp', 'documentMetadata_createdTimestamp' - The time when the document was created.
--
-- 'creatorId', 'documentMetadata_creatorId' - The ID of the creator.
newDocumentMetadata ::
  DocumentMetadata
newDocumentMetadata :: DocumentMetadata
newDocumentMetadata =
  DocumentMetadata' :: Maybe DocumentVersionMetadata
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe ResourceStateType
-> Maybe POSIX
-> Maybe Text
-> DocumentMetadata
DocumentMetadata'
    { $sel:latestVersionMetadata:DocumentMetadata' :: Maybe DocumentVersionMetadata
latestVersionMetadata =
        Maybe DocumentVersionMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:parentFolderId:DocumentMetadata' :: Maybe Text
parentFolderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modifiedTimestamp:DocumentMetadata' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DocumentMetadata' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:DocumentMetadata' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceState:DocumentMetadata' :: Maybe ResourceStateType
resourceState = Maybe ResourceStateType
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:DocumentMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorId:DocumentMetadata' :: Maybe Text
creatorId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The latest version of the document.
documentMetadata_latestVersionMetadata :: Lens.Lens' DocumentMetadata (Prelude.Maybe DocumentVersionMetadata)
documentMetadata_latestVersionMetadata :: (Maybe DocumentVersionMetadata
 -> f (Maybe DocumentVersionMetadata))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_latestVersionMetadata = (DocumentMetadata -> Maybe DocumentVersionMetadata)
-> (DocumentMetadata
    -> Maybe DocumentVersionMetadata -> DocumentMetadata)
-> Lens
     DocumentMetadata
     DocumentMetadata
     (Maybe DocumentVersionMetadata)
     (Maybe DocumentVersionMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe DocumentVersionMetadata
latestVersionMetadata :: Maybe DocumentVersionMetadata
$sel:latestVersionMetadata:DocumentMetadata' :: DocumentMetadata -> Maybe DocumentVersionMetadata
latestVersionMetadata} -> Maybe DocumentVersionMetadata
latestVersionMetadata) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe DocumentVersionMetadata
a -> DocumentMetadata
s {$sel:latestVersionMetadata:DocumentMetadata' :: Maybe DocumentVersionMetadata
latestVersionMetadata = Maybe DocumentVersionMetadata
a} :: DocumentMetadata)

-- | The ID of the parent folder.
documentMetadata_parentFolderId :: Lens.Lens' DocumentMetadata (Prelude.Maybe Prelude.Text)
documentMetadata_parentFolderId :: (Maybe Text -> f (Maybe Text))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_parentFolderId = (DocumentMetadata -> Maybe Text)
-> (DocumentMetadata -> Maybe Text -> DocumentMetadata)
-> Lens DocumentMetadata DocumentMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe Text
parentFolderId :: Maybe Text
$sel:parentFolderId:DocumentMetadata' :: DocumentMetadata -> Maybe Text
parentFolderId} -> Maybe Text
parentFolderId) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe Text
a -> DocumentMetadata
s {$sel:parentFolderId:DocumentMetadata' :: Maybe Text
parentFolderId = Maybe Text
a} :: DocumentMetadata)

-- | The time when the document was updated.
documentMetadata_modifiedTimestamp :: Lens.Lens' DocumentMetadata (Prelude.Maybe Prelude.UTCTime)
documentMetadata_modifiedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_modifiedTimestamp = (DocumentMetadata -> Maybe POSIX)
-> (DocumentMetadata -> Maybe POSIX -> DocumentMetadata)
-> Lens
     DocumentMetadata DocumentMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe POSIX
modifiedTimestamp :: Maybe POSIX
$sel:modifiedTimestamp:DocumentMetadata' :: DocumentMetadata -> Maybe POSIX
modifiedTimestamp} -> Maybe POSIX
modifiedTimestamp) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe POSIX
a -> DocumentMetadata
s {$sel:modifiedTimestamp:DocumentMetadata' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
a} :: DocumentMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentMetadata -> f DocumentMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentMetadata
-> f DocumentMetadata
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 ID of the document.
documentMetadata_id :: Lens.Lens' DocumentMetadata (Prelude.Maybe Prelude.Text)
documentMetadata_id :: (Maybe Text -> f (Maybe Text))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_id = (DocumentMetadata -> Maybe Text)
-> (DocumentMetadata -> Maybe Text -> DocumentMetadata)
-> Lens DocumentMetadata DocumentMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe Text
id :: Maybe Text
$sel:id:DocumentMetadata' :: DocumentMetadata -> Maybe Text
id} -> Maybe Text
id) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe Text
a -> DocumentMetadata
s {$sel:id:DocumentMetadata' :: Maybe Text
id = Maybe Text
a} :: DocumentMetadata)

-- | List of labels on the document.
documentMetadata_labels :: Lens.Lens' DocumentMetadata (Prelude.Maybe [Prelude.Text])
documentMetadata_labels :: (Maybe [Text] -> f (Maybe [Text]))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_labels = (DocumentMetadata -> Maybe [Text])
-> (DocumentMetadata -> Maybe [Text] -> DocumentMetadata)
-> Lens
     DocumentMetadata DocumentMetadata (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:DocumentMetadata' :: DocumentMetadata -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe [Text]
a -> DocumentMetadata
s {$sel:labels:DocumentMetadata' :: Maybe [Text]
labels = Maybe [Text]
a} :: DocumentMetadata) ((Maybe [Text] -> f (Maybe [Text]))
 -> DocumentMetadata -> f DocumentMetadata)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DocumentMetadata
-> f DocumentMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The resource state.
documentMetadata_resourceState :: Lens.Lens' DocumentMetadata (Prelude.Maybe ResourceStateType)
documentMetadata_resourceState :: (Maybe ResourceStateType -> f (Maybe ResourceStateType))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_resourceState = (DocumentMetadata -> Maybe ResourceStateType)
-> (DocumentMetadata
    -> Maybe ResourceStateType -> DocumentMetadata)
-> Lens
     DocumentMetadata
     DocumentMetadata
     (Maybe ResourceStateType)
     (Maybe ResourceStateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe ResourceStateType
resourceState :: Maybe ResourceStateType
$sel:resourceState:DocumentMetadata' :: DocumentMetadata -> Maybe ResourceStateType
resourceState} -> Maybe ResourceStateType
resourceState) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe ResourceStateType
a -> DocumentMetadata
s {$sel:resourceState:DocumentMetadata' :: Maybe ResourceStateType
resourceState = Maybe ResourceStateType
a} :: DocumentMetadata)

-- | The time when the document was created.
documentMetadata_createdTimestamp :: Lens.Lens' DocumentMetadata (Prelude.Maybe Prelude.UTCTime)
documentMetadata_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_createdTimestamp = (DocumentMetadata -> Maybe POSIX)
-> (DocumentMetadata -> Maybe POSIX -> DocumentMetadata)
-> Lens
     DocumentMetadata DocumentMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:DocumentMetadata' :: DocumentMetadata -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe POSIX
a -> DocumentMetadata
s {$sel:createdTimestamp:DocumentMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: DocumentMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentMetadata -> f DocumentMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentMetadata
-> f DocumentMetadata
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 ID of the creator.
documentMetadata_creatorId :: Lens.Lens' DocumentMetadata (Prelude.Maybe Prelude.Text)
documentMetadata_creatorId :: (Maybe Text -> f (Maybe Text))
-> DocumentMetadata -> f DocumentMetadata
documentMetadata_creatorId = (DocumentMetadata -> Maybe Text)
-> (DocumentMetadata -> Maybe Text -> DocumentMetadata)
-> Lens DocumentMetadata DocumentMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentMetadata' {Maybe Text
creatorId :: Maybe Text
$sel:creatorId:DocumentMetadata' :: DocumentMetadata -> Maybe Text
creatorId} -> Maybe Text
creatorId) (\s :: DocumentMetadata
s@DocumentMetadata' {} Maybe Text
a -> DocumentMetadata
s {$sel:creatorId:DocumentMetadata' :: Maybe Text
creatorId = Maybe Text
a} :: DocumentMetadata)

instance Core.FromJSON DocumentMetadata where
  parseJSON :: Value -> Parser DocumentMetadata
parseJSON =
    String
-> (Object -> Parser DocumentMetadata)
-> Value
-> Parser DocumentMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DocumentMetadata"
      ( \Object
x ->
          Maybe DocumentVersionMetadata
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe ResourceStateType
-> Maybe POSIX
-> Maybe Text
-> DocumentMetadata
DocumentMetadata'
            (Maybe DocumentVersionMetadata
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe ResourceStateType
 -> Maybe POSIX
 -> Maybe Text
 -> DocumentMetadata)
-> Parser (Maybe DocumentVersionMetadata)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> DocumentMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DocumentVersionMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LatestVersionMetadata")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> DocumentMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> DocumentMetadata)
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
"ParentFolderId")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> DocumentMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> DocumentMetadata)
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
"ModifiedTimestamp")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> DocumentMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> DocumentMetadata)
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
"Id")
            Parser
  (Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> DocumentMetadata)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ResourceStateType
      -> Maybe POSIX -> Maybe Text -> DocumentMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Labels" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe ResourceStateType
   -> Maybe POSIX -> Maybe Text -> DocumentMetadata)
-> Parser (Maybe ResourceStateType)
-> Parser (Maybe POSIX -> Maybe Text -> DocumentMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceStateType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceState")
            Parser (Maybe POSIX -> Maybe Text -> DocumentMetadata)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> DocumentMetadata)
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
"CreatedTimestamp")
            Parser (Maybe Text -> DocumentMetadata)
-> Parser (Maybe Text) -> Parser DocumentMetadata
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
"CreatorId")
      )

instance Prelude.Hashable DocumentMetadata

instance Prelude.NFData DocumentMetadata