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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkDocs.Types.DocumentSourceType
import Amazonka.WorkDocs.Types.DocumentStatusType
import Amazonka.WorkDocs.Types.DocumentThumbnailType

-- | Describes a version of a document.
--
-- /See:/ 'newDocumentVersionMetadata' smart constructor.
data DocumentVersionMetadata = DocumentVersionMetadata'
  { -- | The thumbnail of the document.
    DocumentVersionMetadata
-> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail :: Prelude.Maybe (Prelude.HashMap DocumentThumbnailType (Core.Sensitive Prelude.Text)),
    -- | The status of the document.
    DocumentVersionMetadata -> Maybe DocumentStatusType
status :: Prelude.Maybe DocumentStatusType,
    -- | The signature of the document.
    DocumentVersionMetadata -> Maybe Text
signature :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the content of the document was originally created.
    DocumentVersionMetadata -> Maybe POSIX
contentCreatedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The size of the document, in bytes.
    DocumentVersionMetadata -> Maybe Integer
size :: Prelude.Maybe Prelude.Integer,
    -- | The name of the version.
    DocumentVersionMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the document was last uploaded.
    DocumentVersionMetadata -> Maybe POSIX
modifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The source of the document.
    DocumentVersionMetadata
-> Maybe (HashMap DocumentSourceType (Sensitive Text))
source :: Prelude.Maybe (Prelude.HashMap DocumentSourceType (Core.Sensitive Prelude.Text)),
    -- | The ID of the version.
    DocumentVersionMetadata -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the document was first uploaded.
    DocumentVersionMetadata -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The timestamp when the content of the document was modified.
    DocumentVersionMetadata -> Maybe POSIX
contentModifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the creator.
    DocumentVersionMetadata -> Maybe Text
creatorId :: Prelude.Maybe Prelude.Text,
    -- | The content type of the document.
    DocumentVersionMetadata -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text
  }
  deriving (DocumentVersionMetadata -> DocumentVersionMetadata -> Bool
(DocumentVersionMetadata -> DocumentVersionMetadata -> Bool)
-> (DocumentVersionMetadata -> DocumentVersionMetadata -> Bool)
-> Eq DocumentVersionMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentVersionMetadata -> DocumentVersionMetadata -> Bool
$c/= :: DocumentVersionMetadata -> DocumentVersionMetadata -> Bool
== :: DocumentVersionMetadata -> DocumentVersionMetadata -> Bool
$c== :: DocumentVersionMetadata -> DocumentVersionMetadata -> Bool
Prelude.Eq, Int -> DocumentVersionMetadata -> ShowS
[DocumentVersionMetadata] -> ShowS
DocumentVersionMetadata -> String
(Int -> DocumentVersionMetadata -> ShowS)
-> (DocumentVersionMetadata -> String)
-> ([DocumentVersionMetadata] -> ShowS)
-> Show DocumentVersionMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentVersionMetadata] -> ShowS
$cshowList :: [DocumentVersionMetadata] -> ShowS
show :: DocumentVersionMetadata -> String
$cshow :: DocumentVersionMetadata -> String
showsPrec :: Int -> DocumentVersionMetadata -> ShowS
$cshowsPrec :: Int -> DocumentVersionMetadata -> ShowS
Prelude.Show, (forall x.
 DocumentVersionMetadata -> Rep DocumentVersionMetadata x)
-> (forall x.
    Rep DocumentVersionMetadata x -> DocumentVersionMetadata)
-> Generic DocumentVersionMetadata
forall x. Rep DocumentVersionMetadata x -> DocumentVersionMetadata
forall x. DocumentVersionMetadata -> Rep DocumentVersionMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocumentVersionMetadata x -> DocumentVersionMetadata
$cfrom :: forall x. DocumentVersionMetadata -> Rep DocumentVersionMetadata x
Prelude.Generic)

-- |
-- Create a value of 'DocumentVersionMetadata' 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:
--
-- 'thumbnail', 'documentVersionMetadata_thumbnail' - The thumbnail of the document.
--
-- 'status', 'documentVersionMetadata_status' - The status of the document.
--
-- 'signature', 'documentVersionMetadata_signature' - The signature of the document.
--
-- 'contentCreatedTimestamp', 'documentVersionMetadata_contentCreatedTimestamp' - The timestamp when the content of the document was originally created.
--
-- 'size', 'documentVersionMetadata_size' - The size of the document, in bytes.
--
-- 'name', 'documentVersionMetadata_name' - The name of the version.
--
-- 'modifiedTimestamp', 'documentVersionMetadata_modifiedTimestamp' - The timestamp when the document was last uploaded.
--
-- 'source', 'documentVersionMetadata_source' - The source of the document.
--
-- 'id', 'documentVersionMetadata_id' - The ID of the version.
--
-- 'createdTimestamp', 'documentVersionMetadata_createdTimestamp' - The timestamp when the document was first uploaded.
--
-- 'contentModifiedTimestamp', 'documentVersionMetadata_contentModifiedTimestamp' - The timestamp when the content of the document was modified.
--
-- 'creatorId', 'documentVersionMetadata_creatorId' - The ID of the creator.
--
-- 'contentType', 'documentVersionMetadata_contentType' - The content type of the document.
newDocumentVersionMetadata ::
  DocumentVersionMetadata
newDocumentVersionMetadata :: DocumentVersionMetadata
newDocumentVersionMetadata =
  DocumentVersionMetadata' :: Maybe (HashMap DocumentThumbnailType (Sensitive Text))
-> Maybe DocumentStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap DocumentSourceType (Sensitive Text))
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> DocumentVersionMetadata
DocumentVersionMetadata'
    { $sel:thumbnail:DocumentVersionMetadata' :: Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail =
        Maybe (HashMap DocumentThumbnailType (Sensitive Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DocumentVersionMetadata' :: Maybe DocumentStatusType
status = Maybe DocumentStatusType
forall a. Maybe a
Prelude.Nothing,
      $sel:signature:DocumentVersionMetadata' :: Maybe Text
signature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentCreatedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
contentCreatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:size:DocumentVersionMetadata' :: Maybe Integer
size = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DocumentVersionMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modifiedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DocumentVersionMetadata' :: Maybe (HashMap DocumentSourceType (Sensitive Text))
source = Maybe (HashMap DocumentSourceType (Sensitive Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DocumentVersionMetadata' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:DocumentVersionMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:contentModifiedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
contentModifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorId:DocumentVersionMetadata' :: Maybe Text
creatorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:DocumentVersionMetadata' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The thumbnail of the document.
documentVersionMetadata_thumbnail :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe (Prelude.HashMap DocumentThumbnailType Prelude.Text))
documentVersionMetadata_thumbnail :: (Maybe (HashMap DocumentThumbnailType Text)
 -> f (Maybe (HashMap DocumentThumbnailType Text)))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_thumbnail = (DocumentVersionMetadata
 -> Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
-> (DocumentVersionMetadata
    -> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
    -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
     (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail :: Maybe (HashMap DocumentThumbnailType (Sensitive Text))
$sel:thumbnail:DocumentVersionMetadata' :: DocumentVersionMetadata
-> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail} -> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe (HashMap DocumentThumbnailType (Sensitive Text))
a -> DocumentVersionMetadata
s {$sel:thumbnail:DocumentVersionMetadata' :: Maybe (HashMap DocumentThumbnailType (Sensitive Text))
thumbnail = Maybe (HashMap DocumentThumbnailType (Sensitive Text))
a} :: DocumentVersionMetadata) ((Maybe (HashMap DocumentThumbnailType (Sensitive Text))
  -> f (Maybe (HashMap DocumentThumbnailType (Sensitive Text))))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe (HashMap DocumentThumbnailType Text)
     -> f (Maybe (HashMap DocumentThumbnailType Text)))
    -> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
    -> f (Maybe (HashMap DocumentThumbnailType (Sensitive Text))))
-> (Maybe (HashMap DocumentThumbnailType Text)
    -> f (Maybe (HashMap DocumentThumbnailType Text)))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap DocumentThumbnailType (Sensitive Text))
  (HashMap DocumentThumbnailType (Sensitive Text))
  (HashMap DocumentThumbnailType Text)
  (HashMap DocumentThumbnailType Text)
-> Iso
     (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
     (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
     (Maybe (HashMap DocumentThumbnailType Text))
     (Maybe (HashMap DocumentThumbnailType 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 DocumentThumbnailType (Sensitive Text))
  (HashMap DocumentThumbnailType (Sensitive Text))
  (HashMap DocumentThumbnailType Text)
  (HashMap DocumentThumbnailType Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status of the document.
documentVersionMetadata_status :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe DocumentStatusType)
documentVersionMetadata_status :: (Maybe DocumentStatusType -> f (Maybe DocumentStatusType))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_status = (DocumentVersionMetadata -> Maybe DocumentStatusType)
-> (DocumentVersionMetadata
    -> Maybe DocumentStatusType -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe DocumentStatusType)
     (Maybe DocumentStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe DocumentStatusType
status :: Maybe DocumentStatusType
$sel:status:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe DocumentStatusType
status} -> Maybe DocumentStatusType
status) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe DocumentStatusType
a -> DocumentVersionMetadata
s {$sel:status:DocumentVersionMetadata' :: Maybe DocumentStatusType
status = Maybe DocumentStatusType
a} :: DocumentVersionMetadata)

-- | The signature of the document.
documentVersionMetadata_signature :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.Text)
documentVersionMetadata_signature :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_signature = (DocumentVersionMetadata -> Maybe Text)
-> (DocumentVersionMetadata
    -> Maybe Text -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe Text
signature :: Maybe Text
$sel:signature:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe Text
signature} -> Maybe Text
signature) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe Text
a -> DocumentVersionMetadata
s {$sel:signature:DocumentVersionMetadata' :: Maybe Text
signature = Maybe Text
a} :: DocumentVersionMetadata)

-- | The timestamp when the content of the document was originally created.
documentVersionMetadata_contentCreatedTimestamp :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.UTCTime)
documentVersionMetadata_contentCreatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_contentCreatedTimestamp = (DocumentVersionMetadata -> Maybe POSIX)
-> (DocumentVersionMetadata
    -> Maybe POSIX -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe POSIX
contentCreatedTimestamp :: Maybe POSIX
$sel:contentCreatedTimestamp:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe POSIX
contentCreatedTimestamp} -> Maybe POSIX
contentCreatedTimestamp) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe POSIX
a -> DocumentVersionMetadata
s {$sel:contentCreatedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
contentCreatedTimestamp = Maybe POSIX
a} :: DocumentVersionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
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 size of the document, in bytes.
documentVersionMetadata_size :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.Integer)
documentVersionMetadata_size :: (Maybe Integer -> f (Maybe Integer))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_size = (DocumentVersionMetadata -> Maybe Integer)
-> (DocumentVersionMetadata
    -> Maybe Integer -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe Integer
size :: Maybe Integer
$sel:size:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe Integer
size} -> Maybe Integer
size) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe Integer
a -> DocumentVersionMetadata
s {$sel:size:DocumentVersionMetadata' :: Maybe Integer
size = Maybe Integer
a} :: DocumentVersionMetadata)

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

-- | The timestamp when the document was last uploaded.
documentVersionMetadata_modifiedTimestamp :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.UTCTime)
documentVersionMetadata_modifiedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_modifiedTimestamp = (DocumentVersionMetadata -> Maybe POSIX)
-> (DocumentVersionMetadata
    -> Maybe POSIX -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe POSIX
modifiedTimestamp :: Maybe POSIX
$sel:modifiedTimestamp:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe POSIX
modifiedTimestamp} -> Maybe POSIX
modifiedTimestamp) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe POSIX
a -> DocumentVersionMetadata
s {$sel:modifiedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
a} :: DocumentVersionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
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 source of the document.
documentVersionMetadata_source :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe (Prelude.HashMap DocumentSourceType Prelude.Text))
documentVersionMetadata_source :: (Maybe (HashMap DocumentSourceType Text)
 -> f (Maybe (HashMap DocumentSourceType Text)))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_source = (DocumentVersionMetadata
 -> Maybe (HashMap DocumentSourceType (Sensitive Text)))
-> (DocumentVersionMetadata
    -> Maybe (HashMap DocumentSourceType (Sensitive Text))
    -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe (HashMap DocumentSourceType (Sensitive Text)))
     (Maybe (HashMap DocumentSourceType (Sensitive Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe (HashMap DocumentSourceType (Sensitive Text))
source :: Maybe (HashMap DocumentSourceType (Sensitive Text))
$sel:source:DocumentVersionMetadata' :: DocumentVersionMetadata
-> Maybe (HashMap DocumentSourceType (Sensitive Text))
source} -> Maybe (HashMap DocumentSourceType (Sensitive Text))
source) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe (HashMap DocumentSourceType (Sensitive Text))
a -> DocumentVersionMetadata
s {$sel:source:DocumentVersionMetadata' :: Maybe (HashMap DocumentSourceType (Sensitive Text))
source = Maybe (HashMap DocumentSourceType (Sensitive Text))
a} :: DocumentVersionMetadata) ((Maybe (HashMap DocumentSourceType (Sensitive Text))
  -> f (Maybe (HashMap DocumentSourceType (Sensitive Text))))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe (HashMap DocumentSourceType Text)
     -> f (Maybe (HashMap DocumentSourceType Text)))
    -> Maybe (HashMap DocumentSourceType (Sensitive Text))
    -> f (Maybe (HashMap DocumentSourceType (Sensitive Text))))
-> (Maybe (HashMap DocumentSourceType Text)
    -> f (Maybe (HashMap DocumentSourceType Text)))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap DocumentSourceType (Sensitive Text))
  (HashMap DocumentSourceType (Sensitive Text))
  (HashMap DocumentSourceType Text)
  (HashMap DocumentSourceType Text)
-> Iso
     (Maybe (HashMap DocumentSourceType (Sensitive Text)))
     (Maybe (HashMap DocumentSourceType (Sensitive Text)))
     (Maybe (HashMap DocumentSourceType Text))
     (Maybe (HashMap DocumentSourceType 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 DocumentSourceType (Sensitive Text))
  (HashMap DocumentSourceType (Sensitive Text))
  (HashMap DocumentSourceType Text)
  (HashMap DocumentSourceType Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the version.
documentVersionMetadata_id :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.Text)
documentVersionMetadata_id :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_id = (DocumentVersionMetadata -> Maybe Text)
-> (DocumentVersionMetadata
    -> Maybe Text -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe Text
id :: Maybe Text
$sel:id:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe Text
id} -> Maybe Text
id) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe Text
a -> DocumentVersionMetadata
s {$sel:id:DocumentVersionMetadata' :: Maybe Text
id = Maybe Text
a} :: DocumentVersionMetadata)

-- | The timestamp when the document was first uploaded.
documentVersionMetadata_createdTimestamp :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.UTCTime)
documentVersionMetadata_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_createdTimestamp = (DocumentVersionMetadata -> Maybe POSIX)
-> (DocumentVersionMetadata
    -> Maybe POSIX -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe POSIX
a -> DocumentVersionMetadata
s {$sel:createdTimestamp:DocumentVersionMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: DocumentVersionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
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 timestamp when the content of the document was modified.
documentVersionMetadata_contentModifiedTimestamp :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.UTCTime)
documentVersionMetadata_contentModifiedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_contentModifiedTimestamp = (DocumentVersionMetadata -> Maybe POSIX)
-> (DocumentVersionMetadata
    -> Maybe POSIX -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe POSIX
contentModifiedTimestamp :: Maybe POSIX
$sel:contentModifiedTimestamp:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe POSIX
contentModifiedTimestamp} -> Maybe POSIX
contentModifiedTimestamp) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe POSIX
a -> DocumentVersionMetadata
s {$sel:contentModifiedTimestamp:DocumentVersionMetadata' :: Maybe POSIX
contentModifiedTimestamp = Maybe POSIX
a} :: DocumentVersionMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> DocumentVersionMetadata -> f DocumentVersionMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentVersionMetadata
-> f DocumentVersionMetadata
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.
documentVersionMetadata_creatorId :: Lens.Lens' DocumentVersionMetadata (Prelude.Maybe Prelude.Text)
documentVersionMetadata_creatorId :: (Maybe Text -> f (Maybe Text))
-> DocumentVersionMetadata -> f DocumentVersionMetadata
documentVersionMetadata_creatorId = (DocumentVersionMetadata -> Maybe Text)
-> (DocumentVersionMetadata
    -> Maybe Text -> DocumentVersionMetadata)
-> Lens
     DocumentVersionMetadata
     DocumentVersionMetadata
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentVersionMetadata' {Maybe Text
creatorId :: Maybe Text
$sel:creatorId:DocumentVersionMetadata' :: DocumentVersionMetadata -> Maybe Text
creatorId} -> Maybe Text
creatorId) (\s :: DocumentVersionMetadata
s@DocumentVersionMetadata' {} Maybe Text
a -> DocumentVersionMetadata
s {$sel:creatorId:DocumentVersionMetadata' :: Maybe Text
creatorId = Maybe Text
a} :: DocumentVersionMetadata)

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

instance Core.FromJSON DocumentVersionMetadata where
  parseJSON :: Value -> Parser DocumentVersionMetadata
parseJSON =
    String
-> (Object -> Parser DocumentVersionMetadata)
-> Value
-> Parser DocumentVersionMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DocumentVersionMetadata"
      ( \Object
x ->
          Maybe (HashMap DocumentThumbnailType (Sensitive Text))
-> Maybe DocumentStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap DocumentSourceType (Sensitive Text))
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> DocumentVersionMetadata
DocumentVersionMetadata'
            (Maybe (HashMap DocumentThumbnailType (Sensitive Text))
 -> Maybe DocumentStatusType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (HashMap DocumentSourceType (Sensitive Text))
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> DocumentVersionMetadata)
-> Parser (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
-> Parser
     (Maybe DocumentStatusType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Parser
     (Maybe (Maybe (HashMap DocumentThumbnailType (Sensitive Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Thumbnail" Parser
  (Maybe (Maybe (HashMap DocumentThumbnailType (Sensitive Text))))
-> Maybe (HashMap DocumentThumbnailType (Sensitive Text))
-> Parser (Maybe (HashMap DocumentThumbnailType (Sensitive Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap DocumentThumbnailType (Sensitive Text))
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe DocumentStatusType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe DocumentStatusType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DocumentStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
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
"Signature")
            Parser
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
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
"ContentCreatedTimestamp")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Size")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
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
"Name")
            Parser
  (Maybe POSIX
   -> Maybe (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (HashMap DocumentSourceType (Sensitive Text))
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
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 (HashMap DocumentSourceType (Sensitive Text))
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe (HashMap DocumentSourceType (Sensitive Text)))
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe (Maybe (HashMap DocumentSourceType (Sensitive Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source" Parser
  (Maybe (Maybe (HashMap DocumentSourceType (Sensitive Text))))
-> Maybe (HashMap DocumentSourceType (Sensitive Text))
-> Parser (Maybe (HashMap DocumentSourceType (Sensitive Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap DocumentSourceType (Sensitive Text))
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> DocumentVersionMetadata)
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 POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> DocumentVersionMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text -> Maybe Text -> DocumentVersionMetadata)
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 POSIX
   -> Maybe Text -> Maybe Text -> DocumentVersionMetadata)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> DocumentVersionMetadata)
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
"ContentModifiedTimestamp")
            Parser (Maybe Text -> Maybe Text -> DocumentVersionMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DocumentVersionMetadata)
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")
            Parser (Maybe Text -> DocumentVersionMetadata)
-> Parser (Maybe Text) -> Parser DocumentVersionMetadata
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
"ContentType")
      )

instance Prelude.Hashable DocumentVersionMetadata

instance Prelude.NFData DocumentVersionMetadata