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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkDocs.Types.LocaleType
import Amazonka.WorkDocs.Types.UserStatusType
import Amazonka.WorkDocs.Types.UserStorageMetadata
import Amazonka.WorkDocs.Types.UserType

-- | Describes a user.
--
-- /See:/ 'newUser' smart constructor.
data User = User'
  { -- | The given name of the user.
    User -> Maybe Text
givenName :: Prelude.Maybe Prelude.Text,
    -- | The status of the user.
    User -> Maybe UserStatusType
status :: Prelude.Maybe UserStatusType,
    -- | The locale of the user.
    User -> Maybe LocaleType
locale :: Prelude.Maybe LocaleType,
    -- | The login name of the user.
    User -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
    -- | The storage for the user.
    User -> Maybe UserStorageMetadata
storage :: Prelude.Maybe UserStorageMetadata,
    -- | The time when the user was modified.
    User -> Maybe POSIX
modifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The email address of the user.
    User -> Maybe Text
emailAddress :: Prelude.Maybe Prelude.Text,
    -- | The ID of the user.
    User -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ID of the root folder.
    User -> Maybe Text
rootFolderId :: Prelude.Maybe Prelude.Text,
    -- | The type of user.
    User -> Maybe UserType
type' :: Prelude.Maybe UserType,
    -- | The surname of the user.
    User -> Maybe Text
surname :: Prelude.Maybe Prelude.Text,
    -- | The time zone ID of the user.
    User -> Maybe Text
timeZoneId :: Prelude.Maybe Prelude.Text,
    -- | The time when the user was created.
    User -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The ID of the organization.
    User -> Maybe Text
organizationId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the recycle bin folder.
    User -> Maybe Text
recycleBinFolderId :: Prelude.Maybe Prelude.Text
  }
  deriving (User -> User -> Bool
(User -> User -> Bool) -> (User -> User -> Bool) -> Eq User
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: User -> User -> Bool
$c/= :: User -> User -> Bool
== :: User -> User -> Bool
$c== :: User -> User -> Bool
Prelude.Eq, ReadPrec [User]
ReadPrec User
Int -> ReadS User
ReadS [User]
(Int -> ReadS User)
-> ReadS [User] -> ReadPrec User -> ReadPrec [User] -> Read User
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [User]
$creadListPrec :: ReadPrec [User]
readPrec :: ReadPrec User
$creadPrec :: ReadPrec User
readList :: ReadS [User]
$creadList :: ReadS [User]
readsPrec :: Int -> ReadS User
$creadsPrec :: Int -> ReadS User
Prelude.Read, Int -> User -> ShowS
[User] -> ShowS
User -> String
(Int -> User -> ShowS)
-> (User -> String) -> ([User] -> ShowS) -> Show User
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [User] -> ShowS
$cshowList :: [User] -> ShowS
show :: User -> String
$cshow :: User -> String
showsPrec :: Int -> User -> ShowS
$cshowsPrec :: Int -> User -> ShowS
Prelude.Show, (forall x. User -> Rep User x)
-> (forall x. Rep User x -> User) -> Generic User
forall x. Rep User x -> User
forall x. User -> Rep User x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep User x -> User
$cfrom :: forall x. User -> Rep User x
Prelude.Generic)

-- |
-- Create a value of 'User' 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:
--
-- 'givenName', 'user_givenName' - The given name of the user.
--
-- 'status', 'user_status' - The status of the user.
--
-- 'locale', 'user_locale' - The locale of the user.
--
-- 'username', 'user_username' - The login name of the user.
--
-- 'storage', 'user_storage' - The storage for the user.
--
-- 'modifiedTimestamp', 'user_modifiedTimestamp' - The time when the user was modified.
--
-- 'emailAddress', 'user_emailAddress' - The email address of the user.
--
-- 'id', 'user_id' - The ID of the user.
--
-- 'rootFolderId', 'user_rootFolderId' - The ID of the root folder.
--
-- 'type'', 'user_type' - The type of user.
--
-- 'surname', 'user_surname' - The surname of the user.
--
-- 'timeZoneId', 'user_timeZoneId' - The time zone ID of the user.
--
-- 'createdTimestamp', 'user_createdTimestamp' - The time when the user was created.
--
-- 'organizationId', 'user_organizationId' - The ID of the organization.
--
-- 'recycleBinFolderId', 'user_recycleBinFolderId' - The ID of the recycle bin folder.
newUser ::
  User
newUser :: User
newUser =
  User' :: Maybe Text
-> Maybe UserStatusType
-> Maybe LocaleType
-> Maybe Text
-> Maybe UserStorageMetadata
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> User
User'
    { $sel:givenName:User' :: Maybe Text
givenName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:User' :: Maybe UserStatusType
status = Maybe UserStatusType
forall a. Maybe a
Prelude.Nothing,
      $sel:locale:User' :: Maybe LocaleType
locale = Maybe LocaleType
forall a. Maybe a
Prelude.Nothing,
      $sel:username:User' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storage:User' :: Maybe UserStorageMetadata
storage = Maybe UserStorageMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:modifiedTimestamp:User' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:emailAddress:User' :: Maybe Text
emailAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:User' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rootFolderId:User' :: Maybe Text
rootFolderId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':User' :: Maybe UserType
type' = Maybe UserType
forall a. Maybe a
Prelude.Nothing,
      $sel:surname:User' :: Maybe Text
surname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeZoneId:User' :: Maybe Text
timeZoneId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:User' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationId:User' :: Maybe Text
organizationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recycleBinFolderId:User' :: Maybe Text
recycleBinFolderId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The given name of the user.
user_givenName :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_givenName :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_givenName = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
givenName :: Maybe Text
$sel:givenName:User' :: User -> Maybe Text
givenName} -> Maybe Text
givenName) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:givenName:User' :: Maybe Text
givenName = Maybe Text
a} :: User)

-- | The status of the user.
user_status :: Lens.Lens' User (Prelude.Maybe UserStatusType)
user_status :: (Maybe UserStatusType -> f (Maybe UserStatusType))
-> User -> f User
user_status = (User -> Maybe UserStatusType)
-> (User -> Maybe UserStatusType -> User)
-> Lens User User (Maybe UserStatusType) (Maybe UserStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe UserStatusType
status :: Maybe UserStatusType
$sel:status:User' :: User -> Maybe UserStatusType
status} -> Maybe UserStatusType
status) (\s :: User
s@User' {} Maybe UserStatusType
a -> User
s {$sel:status:User' :: Maybe UserStatusType
status = Maybe UserStatusType
a} :: User)

-- | The locale of the user.
user_locale :: Lens.Lens' User (Prelude.Maybe LocaleType)
user_locale :: (Maybe LocaleType -> f (Maybe LocaleType)) -> User -> f User
user_locale = (User -> Maybe LocaleType)
-> (User -> Maybe LocaleType -> User)
-> Lens User User (Maybe LocaleType) (Maybe LocaleType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe LocaleType
locale :: Maybe LocaleType
$sel:locale:User' :: User -> Maybe LocaleType
locale} -> Maybe LocaleType
locale) (\s :: User
s@User' {} Maybe LocaleType
a -> User
s {$sel:locale:User' :: Maybe LocaleType
locale = Maybe LocaleType
a} :: User)

-- | The login name of the user.
user_username :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_username :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_username = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
username :: Maybe Text
$sel:username:User' :: User -> Maybe Text
username} -> Maybe Text
username) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:username:User' :: Maybe Text
username = Maybe Text
a} :: User)

-- | The storage for the user.
user_storage :: Lens.Lens' User (Prelude.Maybe UserStorageMetadata)
user_storage :: (Maybe UserStorageMetadata -> f (Maybe UserStorageMetadata))
-> User -> f User
user_storage = (User -> Maybe UserStorageMetadata)
-> (User -> Maybe UserStorageMetadata -> User)
-> Lens
     User User (Maybe UserStorageMetadata) (Maybe UserStorageMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe UserStorageMetadata
storage :: Maybe UserStorageMetadata
$sel:storage:User' :: User -> Maybe UserStorageMetadata
storage} -> Maybe UserStorageMetadata
storage) (\s :: User
s@User' {} Maybe UserStorageMetadata
a -> User
s {$sel:storage:User' :: Maybe UserStorageMetadata
storage = Maybe UserStorageMetadata
a} :: User)

-- | The time when the user was modified.
user_modifiedTimestamp :: Lens.Lens' User (Prelude.Maybe Prelude.UTCTime)
user_modifiedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> User -> f User
user_modifiedTimestamp = (User -> Maybe POSIX)
-> (User -> Maybe POSIX -> User)
-> Lens User User (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe POSIX
modifiedTimestamp :: Maybe POSIX
$sel:modifiedTimestamp:User' :: User -> Maybe POSIX
modifiedTimestamp} -> Maybe POSIX
modifiedTimestamp) (\s :: User
s@User' {} Maybe POSIX
a -> User
s {$sel:modifiedTimestamp:User' :: Maybe POSIX
modifiedTimestamp = Maybe POSIX
a} :: User) ((Maybe POSIX -> f (Maybe POSIX)) -> User -> f User)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> User
-> f User
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 email address of the user.
user_emailAddress :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_emailAddress :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_emailAddress = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
emailAddress :: Maybe Text
$sel:emailAddress:User' :: User -> Maybe Text
emailAddress} -> Maybe Text
emailAddress) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:emailAddress:User' :: Maybe Text
emailAddress = Maybe Text
a} :: User)

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

-- | The ID of the root folder.
user_rootFolderId :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_rootFolderId :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_rootFolderId = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
rootFolderId :: Maybe Text
$sel:rootFolderId:User' :: User -> Maybe Text
rootFolderId} -> Maybe Text
rootFolderId) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:rootFolderId:User' :: Maybe Text
rootFolderId = Maybe Text
a} :: User)

-- | The type of user.
user_type :: Lens.Lens' User (Prelude.Maybe UserType)
user_type :: (Maybe UserType -> f (Maybe UserType)) -> User -> f User
user_type = (User -> Maybe UserType)
-> (User -> Maybe UserType -> User)
-> Lens User User (Maybe UserType) (Maybe UserType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe UserType
type' :: Maybe UserType
$sel:type':User' :: User -> Maybe UserType
type'} -> Maybe UserType
type') (\s :: User
s@User' {} Maybe UserType
a -> User
s {$sel:type':User' :: Maybe UserType
type' = Maybe UserType
a} :: User)

-- | The surname of the user.
user_surname :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_surname :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_surname = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
surname :: Maybe Text
$sel:surname:User' :: User -> Maybe Text
surname} -> Maybe Text
surname) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:surname:User' :: Maybe Text
surname = Maybe Text
a} :: User)

-- | The time zone ID of the user.
user_timeZoneId :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_timeZoneId :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_timeZoneId = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
timeZoneId :: Maybe Text
$sel:timeZoneId:User' :: User -> Maybe Text
timeZoneId} -> Maybe Text
timeZoneId) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:timeZoneId:User' :: Maybe Text
timeZoneId = Maybe Text
a} :: User)

-- | The time when the user was created.
user_createdTimestamp :: Lens.Lens' User (Prelude.Maybe Prelude.UTCTime)
user_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime)) -> User -> f User
user_createdTimestamp = (User -> Maybe POSIX)
-> (User -> Maybe POSIX -> User)
-> Lens User User (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:User' :: User -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: User
s@User' {} Maybe POSIX
a -> User
s {$sel:createdTimestamp:User' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: User) ((Maybe POSIX -> f (Maybe POSIX)) -> User -> f User)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> User
-> f User
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 organization.
user_organizationId :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_organizationId :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_organizationId = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
organizationId :: Maybe Text
$sel:organizationId:User' :: User -> Maybe Text
organizationId} -> Maybe Text
organizationId) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:organizationId:User' :: Maybe Text
organizationId = Maybe Text
a} :: User)

-- | The ID of the recycle bin folder.
user_recycleBinFolderId :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_recycleBinFolderId :: (Maybe Text -> f (Maybe Text)) -> User -> f User
user_recycleBinFolderId = (User -> Maybe Text)
-> (User -> Maybe Text -> User)
-> Lens User User (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
recycleBinFolderId :: Maybe Text
$sel:recycleBinFolderId:User' :: User -> Maybe Text
recycleBinFolderId} -> Maybe Text
recycleBinFolderId) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:recycleBinFolderId:User' :: Maybe Text
recycleBinFolderId = Maybe Text
a} :: User)

instance Core.FromJSON User where
  parseJSON :: Value -> Parser User
parseJSON =
    String -> (Object -> Parser User) -> Value -> Parser User
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"User"
      ( \Object
x ->
          Maybe Text
-> Maybe UserStatusType
-> Maybe LocaleType
-> Maybe Text
-> Maybe UserStorageMetadata
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe UserType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> User
User'
            (Maybe Text
 -> Maybe UserStatusType
 -> Maybe LocaleType
 -> Maybe Text
 -> Maybe UserStorageMetadata
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserType
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserStatusType
      -> Maybe LocaleType
      -> Maybe Text
      -> Maybe UserStorageMetadata
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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
"GivenName")
            Parser
  (Maybe UserStatusType
   -> Maybe LocaleType
   -> Maybe Text
   -> Maybe UserStorageMetadata
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe UserStatusType)
-> Parser
     (Maybe LocaleType
      -> Maybe Text
      -> Maybe UserStorageMetadata
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserStatusType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe LocaleType
   -> Maybe Text
   -> Maybe UserStorageMetadata
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe LocaleType)
-> Parser
     (Maybe Text
      -> Maybe UserStorageMetadata
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LocaleType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Locale")
            Parser
  (Maybe Text
   -> Maybe UserStorageMetadata
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserStorageMetadata
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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
"Username")
            Parser
  (Maybe UserStorageMetadata
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe UserStorageMetadata)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserStorageMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Storage")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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 Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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
"EmailAddress")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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 UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserType
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> User)
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
"RootFolderId")
            Parser
  (Maybe UserType
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> User)
-> Parser (Maybe UserType)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> User)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> User)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> User)
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
"Surname")
            Parser
  (Maybe Text -> Maybe POSIX -> Maybe Text -> Maybe Text -> User)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> User)
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
"TimeZoneId")
            Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> User)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> User)
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 -> Maybe Text -> User)
-> Parser (Maybe Text) -> Parser (Maybe Text -> User)
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
"OrganizationId")
            Parser (Maybe Text -> User) -> Parser (Maybe Text) -> Parser User
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
"RecycleBinFolderId")
      )

instance Prelude.Hashable User

instance Prelude.NFData User