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

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

-- | Describes a folder.
--
-- /See:/ 'newFolderMetadata' smart constructor.
data FolderMetadata = FolderMetadata'
  { -- | The unique identifier created from the subfolders and documents of the
    -- folder.
    FolderMetadata -> Maybe Text
signature :: Prelude.Maybe Prelude.Text,
    -- | The ID of the parent folder.
    FolderMetadata -> Maybe Text
parentFolderId :: Prelude.Maybe Prelude.Text,
    -- | The size of the folder metadata.
    FolderMetadata -> Maybe Integer
size :: Prelude.Maybe Prelude.Integer,
    -- | The size of the latest version of the folder metadata.
    FolderMetadata -> Maybe Integer
latestVersionSize :: Prelude.Maybe Prelude.Integer,
    -- | The name of the folder.
    FolderMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The time when the folder was updated.
    FolderMetadata -> Maybe POSIX
modifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the folder.
    FolderMetadata -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | List of labels on the folder.
    FolderMetadata -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
    -- | The resource state of the folder.
    FolderMetadata -> Maybe ResourceStateType
resourceState :: Prelude.Maybe ResourceStateType,
    -- | The time when the folder was created.
    FolderMetadata -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the creator.
    FolderMetadata -> Maybe Text
creatorId :: Prelude.Maybe Prelude.Text
  }
  deriving (FolderMetadata -> FolderMetadata -> Bool
(FolderMetadata -> FolderMetadata -> Bool)
-> (FolderMetadata -> FolderMetadata -> Bool) -> Eq FolderMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FolderMetadata -> FolderMetadata -> Bool
$c/= :: FolderMetadata -> FolderMetadata -> Bool
== :: FolderMetadata -> FolderMetadata -> Bool
$c== :: FolderMetadata -> FolderMetadata -> Bool
Prelude.Eq, ReadPrec [FolderMetadata]
ReadPrec FolderMetadata
Int -> ReadS FolderMetadata
ReadS [FolderMetadata]
(Int -> ReadS FolderMetadata)
-> ReadS [FolderMetadata]
-> ReadPrec FolderMetadata
-> ReadPrec [FolderMetadata]
-> Read FolderMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FolderMetadata]
$creadListPrec :: ReadPrec [FolderMetadata]
readPrec :: ReadPrec FolderMetadata
$creadPrec :: ReadPrec FolderMetadata
readList :: ReadS [FolderMetadata]
$creadList :: ReadS [FolderMetadata]
readsPrec :: Int -> ReadS FolderMetadata
$creadsPrec :: Int -> ReadS FolderMetadata
Prelude.Read, Int -> FolderMetadata -> ShowS
[FolderMetadata] -> ShowS
FolderMetadata -> String
(Int -> FolderMetadata -> ShowS)
-> (FolderMetadata -> String)
-> ([FolderMetadata] -> ShowS)
-> Show FolderMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FolderMetadata] -> ShowS
$cshowList :: [FolderMetadata] -> ShowS
show :: FolderMetadata -> String
$cshow :: FolderMetadata -> String
showsPrec :: Int -> FolderMetadata -> ShowS
$cshowsPrec :: Int -> FolderMetadata -> ShowS
Prelude.Show, (forall x. FolderMetadata -> Rep FolderMetadata x)
-> (forall x. Rep FolderMetadata x -> FolderMetadata)
-> Generic FolderMetadata
forall x. Rep FolderMetadata x -> FolderMetadata
forall x. FolderMetadata -> Rep FolderMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FolderMetadata x -> FolderMetadata
$cfrom :: forall x. FolderMetadata -> Rep FolderMetadata x
Prelude.Generic)

-- |
-- Create a value of 'FolderMetadata' 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:
--
-- 'signature', 'folderMetadata_signature' - The unique identifier created from the subfolders and documents of the
-- folder.
--
-- 'parentFolderId', 'folderMetadata_parentFolderId' - The ID of the parent folder.
--
-- 'size', 'folderMetadata_size' - The size of the folder metadata.
--
-- 'latestVersionSize', 'folderMetadata_latestVersionSize' - The size of the latest version of the folder metadata.
--
-- 'name', 'folderMetadata_name' - The name of the folder.
--
-- 'modifiedTimestamp', 'folderMetadata_modifiedTimestamp' - The time when the folder was updated.
--
-- 'id', 'folderMetadata_id' - The ID of the folder.
--
-- 'labels', 'folderMetadata_labels' - List of labels on the folder.
--
-- 'resourceState', 'folderMetadata_resourceState' - The resource state of the folder.
--
-- 'createdTimestamp', 'folderMetadata_createdTimestamp' - The time when the folder was created.
--
-- 'creatorId', 'folderMetadata_creatorId' - The ID of the creator.
newFolderMetadata ::
  FolderMetadata
newFolderMetadata :: FolderMetadata
newFolderMetadata =
  FolderMetadata' :: Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe ResourceStateType
-> Maybe POSIX
-> Maybe Text
-> FolderMetadata
FolderMetadata'
    { $sel:signature:FolderMetadata' :: Maybe Text
signature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parentFolderId:FolderMetadata' :: Maybe Text
parentFolderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:size:FolderMetadata' :: Maybe Integer
size = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersionSize:FolderMetadata' :: Maybe Integer
latestVersionSize = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:name:FolderMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modifiedTimestamp:FolderMetadata' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:id:FolderMetadata' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:FolderMetadata' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceState:FolderMetadata' :: Maybe ResourceStateType
resourceState = Maybe ResourceStateType
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:FolderMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorId:FolderMetadata' :: Maybe Text
creatorId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The unique identifier created from the subfolders and documents of the
-- folder.
folderMetadata_signature :: Lens.Lens' FolderMetadata (Prelude.Maybe Prelude.Text)
folderMetadata_signature :: (Maybe Text -> f (Maybe Text))
-> FolderMetadata -> f FolderMetadata
folderMetadata_signature = (FolderMetadata -> Maybe Text)
-> (FolderMetadata -> Maybe Text -> FolderMetadata)
-> Lens FolderMetadata FolderMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe Text
signature :: Maybe Text
$sel:signature:FolderMetadata' :: FolderMetadata -> Maybe Text
signature} -> Maybe Text
signature) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe Text
a -> FolderMetadata
s {$sel:signature:FolderMetadata' :: Maybe Text
signature = Maybe Text
a} :: FolderMetadata)

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

-- | The size of the folder metadata.
folderMetadata_size :: Lens.Lens' FolderMetadata (Prelude.Maybe Prelude.Integer)
folderMetadata_size :: (Maybe Integer -> f (Maybe Integer))
-> FolderMetadata -> f FolderMetadata
folderMetadata_size = (FolderMetadata -> Maybe Integer)
-> (FolderMetadata -> Maybe Integer -> FolderMetadata)
-> Lens
     FolderMetadata FolderMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe Integer
size :: Maybe Integer
$sel:size:FolderMetadata' :: FolderMetadata -> Maybe Integer
size} -> Maybe Integer
size) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe Integer
a -> FolderMetadata
s {$sel:size:FolderMetadata' :: Maybe Integer
size = Maybe Integer
a} :: FolderMetadata)

-- | The size of the latest version of the folder metadata.
folderMetadata_latestVersionSize :: Lens.Lens' FolderMetadata (Prelude.Maybe Prelude.Integer)
folderMetadata_latestVersionSize :: (Maybe Integer -> f (Maybe Integer))
-> FolderMetadata -> f FolderMetadata
folderMetadata_latestVersionSize = (FolderMetadata -> Maybe Integer)
-> (FolderMetadata -> Maybe Integer -> FolderMetadata)
-> Lens
     FolderMetadata FolderMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe Integer
latestVersionSize :: Maybe Integer
$sel:latestVersionSize:FolderMetadata' :: FolderMetadata -> Maybe Integer
latestVersionSize} -> Maybe Integer
latestVersionSize) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe Integer
a -> FolderMetadata
s {$sel:latestVersionSize:FolderMetadata' :: Maybe Integer
latestVersionSize = Maybe Integer
a} :: FolderMetadata)

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

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

-- | List of labels on the folder.
folderMetadata_labels :: Lens.Lens' FolderMetadata (Prelude.Maybe [Prelude.Text])
folderMetadata_labels :: (Maybe [Text] -> f (Maybe [Text]))
-> FolderMetadata -> f FolderMetadata
folderMetadata_labels = (FolderMetadata -> Maybe [Text])
-> (FolderMetadata -> Maybe [Text] -> FolderMetadata)
-> Lens FolderMetadata FolderMetadata (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:FolderMetadata' :: FolderMetadata -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe [Text]
a -> FolderMetadata
s {$sel:labels:FolderMetadata' :: Maybe [Text]
labels = Maybe [Text]
a} :: FolderMetadata) ((Maybe [Text] -> f (Maybe [Text]))
 -> FolderMetadata -> f FolderMetadata)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> FolderMetadata
-> f FolderMetadata
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 of the folder.
folderMetadata_resourceState :: Lens.Lens' FolderMetadata (Prelude.Maybe ResourceStateType)
folderMetadata_resourceState :: (Maybe ResourceStateType -> f (Maybe ResourceStateType))
-> FolderMetadata -> f FolderMetadata
folderMetadata_resourceState = (FolderMetadata -> Maybe ResourceStateType)
-> (FolderMetadata -> Maybe ResourceStateType -> FolderMetadata)
-> Lens
     FolderMetadata
     FolderMetadata
     (Maybe ResourceStateType)
     (Maybe ResourceStateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe ResourceStateType
resourceState :: Maybe ResourceStateType
$sel:resourceState:FolderMetadata' :: FolderMetadata -> Maybe ResourceStateType
resourceState} -> Maybe ResourceStateType
resourceState) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe ResourceStateType
a -> FolderMetadata
s {$sel:resourceState:FolderMetadata' :: Maybe ResourceStateType
resourceState = Maybe ResourceStateType
a} :: FolderMetadata)

-- | The time when the folder was created.
folderMetadata_createdTimestamp :: Lens.Lens' FolderMetadata (Prelude.Maybe Prelude.UTCTime)
folderMetadata_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FolderMetadata -> f FolderMetadata
folderMetadata_createdTimestamp = (FolderMetadata -> Maybe POSIX)
-> (FolderMetadata -> Maybe POSIX -> FolderMetadata)
-> Lens FolderMetadata FolderMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:FolderMetadata' :: FolderMetadata -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe POSIX
a -> FolderMetadata
s {$sel:createdTimestamp:FolderMetadata' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: FolderMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> FolderMetadata -> f FolderMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FolderMetadata
-> f FolderMetadata
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.
folderMetadata_creatorId :: Lens.Lens' FolderMetadata (Prelude.Maybe Prelude.Text)
folderMetadata_creatorId :: (Maybe Text -> f (Maybe Text))
-> FolderMetadata -> f FolderMetadata
folderMetadata_creatorId = (FolderMetadata -> Maybe Text)
-> (FolderMetadata -> Maybe Text -> FolderMetadata)
-> Lens FolderMetadata FolderMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FolderMetadata' {Maybe Text
creatorId :: Maybe Text
$sel:creatorId:FolderMetadata' :: FolderMetadata -> Maybe Text
creatorId} -> Maybe Text
creatorId) (\s :: FolderMetadata
s@FolderMetadata' {} Maybe Text
a -> FolderMetadata
s {$sel:creatorId:FolderMetadata' :: Maybe Text
creatorId = Maybe Text
a} :: FolderMetadata)

instance Core.FromJSON FolderMetadata where
  parseJSON :: Value -> Parser FolderMetadata
parseJSON =
    String
-> (Object -> Parser FolderMetadata)
-> Value
-> Parser FolderMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FolderMetadata"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe ResourceStateType
-> Maybe POSIX
-> Maybe Text
-> FolderMetadata
FolderMetadata'
            (Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe Integer
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe ResourceStateType
 -> Maybe POSIX
 -> Maybe Text
 -> FolderMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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
"Signature")
            Parser
  (Maybe Text
   -> Maybe Integer
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> FolderMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Integer
      -> Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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 Integer
   -> Maybe Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> FolderMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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 Integer
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> FolderMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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
"LatestVersionSize")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> FolderMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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 Text
   -> Maybe [Text]
   -> Maybe ResourceStateType
   -> Maybe POSIX
   -> Maybe Text
   -> FolderMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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
   -> FolderMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe ResourceStateType
      -> Maybe POSIX
      -> Maybe Text
      -> FolderMetadata)
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
   -> FolderMetadata)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ResourceStateType
      -> Maybe POSIX -> Maybe Text -> FolderMetadata)
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 -> FolderMetadata)
-> Parser (Maybe ResourceStateType)
-> Parser (Maybe POSIX -> Maybe Text -> FolderMetadata)
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 -> FolderMetadata)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> FolderMetadata)
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 -> FolderMetadata)
-> Parser (Maybe Text) -> Parser FolderMetadata
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 FolderMetadata

instance Prelude.NFData FolderMetadata