{-# 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.DirectoryService.Types.SharedDirectory
-- 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.DirectoryService.Types.SharedDirectory where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types.ShareMethod
import Amazonka.DirectoryService.Types.ShareStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details about the shared directory in the directory owner account for
-- which the share request in the directory consumer account has been
-- accepted.
--
-- /See:/ 'newSharedDirectory' smart constructor.
data SharedDirectory = SharedDirectory'
  { -- | Identifier of the directory consumer account that has access to the
    -- shared directory (@OwnerDirectoryId@) in the directory owner account.
    SharedDirectory -> Maybe Text
sharedAccountId :: Prelude.Maybe Prelude.Text,
    -- | Identifier of the directory owner account, which contains the directory
    -- that has been shared to the consumer account.
    SharedDirectory -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the shared directory was last updated.
    SharedDirectory -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | Current directory status of the shared Managed Microsoft AD directory.
    SharedDirectory -> Maybe ShareStatus
shareStatus :: Prelude.Maybe ShareStatus,
    -- | The method used when sharing a directory to determine whether the
    -- directory should be shared within your Amazon Web Services organization
    -- (@ORGANIZATIONS@) or with any Amazon Web Services account by sending a
    -- shared directory request (@HANDSHAKE@).
    SharedDirectory -> Maybe ShareMethod
shareMethod :: Prelude.Maybe ShareMethod,
    -- | Identifier of the directory in the directory owner account.
    SharedDirectory -> Maybe Text
ownerDirectoryId :: Prelude.Maybe Prelude.Text,
    -- | Identifier of the shared directory in the directory consumer account.
    -- This identifier is different for each directory owner account.
    SharedDirectory -> Maybe Text
sharedDirectoryId :: Prelude.Maybe Prelude.Text,
    -- | A directory share request that is sent by the directory owner to the
    -- directory consumer. The request includes a typed message to help the
    -- directory consumer administrator determine whether to approve or reject
    -- the share invitation.
    SharedDirectory -> Maybe (Sensitive Text)
shareNotes :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The date and time that the shared directory was created.
    SharedDirectory -> Maybe POSIX
createdDateTime :: Prelude.Maybe Core.POSIX
  }
  deriving (SharedDirectory -> SharedDirectory -> Bool
(SharedDirectory -> SharedDirectory -> Bool)
-> (SharedDirectory -> SharedDirectory -> Bool)
-> Eq SharedDirectory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SharedDirectory -> SharedDirectory -> Bool
$c/= :: SharedDirectory -> SharedDirectory -> Bool
== :: SharedDirectory -> SharedDirectory -> Bool
$c== :: SharedDirectory -> SharedDirectory -> Bool
Prelude.Eq, Int -> SharedDirectory -> ShowS
[SharedDirectory] -> ShowS
SharedDirectory -> String
(Int -> SharedDirectory -> ShowS)
-> (SharedDirectory -> String)
-> ([SharedDirectory] -> ShowS)
-> Show SharedDirectory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SharedDirectory] -> ShowS
$cshowList :: [SharedDirectory] -> ShowS
show :: SharedDirectory -> String
$cshow :: SharedDirectory -> String
showsPrec :: Int -> SharedDirectory -> ShowS
$cshowsPrec :: Int -> SharedDirectory -> ShowS
Prelude.Show, (forall x. SharedDirectory -> Rep SharedDirectory x)
-> (forall x. Rep SharedDirectory x -> SharedDirectory)
-> Generic SharedDirectory
forall x. Rep SharedDirectory x -> SharedDirectory
forall x. SharedDirectory -> Rep SharedDirectory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SharedDirectory x -> SharedDirectory
$cfrom :: forall x. SharedDirectory -> Rep SharedDirectory x
Prelude.Generic)

-- |
-- Create a value of 'SharedDirectory' 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:
--
-- 'sharedAccountId', 'sharedDirectory_sharedAccountId' - Identifier of the directory consumer account that has access to the
-- shared directory (@OwnerDirectoryId@) in the directory owner account.
--
-- 'ownerAccountId', 'sharedDirectory_ownerAccountId' - Identifier of the directory owner account, which contains the directory
-- that has been shared to the consumer account.
--
-- 'lastUpdatedDateTime', 'sharedDirectory_lastUpdatedDateTime' - The date and time that the shared directory was last updated.
--
-- 'shareStatus', 'sharedDirectory_shareStatus' - Current directory status of the shared Managed Microsoft AD directory.
--
-- 'shareMethod', 'sharedDirectory_shareMethod' - The method used when sharing a directory to determine whether the
-- directory should be shared within your Amazon Web Services organization
-- (@ORGANIZATIONS@) or with any Amazon Web Services account by sending a
-- shared directory request (@HANDSHAKE@).
--
-- 'ownerDirectoryId', 'sharedDirectory_ownerDirectoryId' - Identifier of the directory in the directory owner account.
--
-- 'sharedDirectoryId', 'sharedDirectory_sharedDirectoryId' - Identifier of the shared directory in the directory consumer account.
-- This identifier is different for each directory owner account.
--
-- 'shareNotes', 'sharedDirectory_shareNotes' - A directory share request that is sent by the directory owner to the
-- directory consumer. The request includes a typed message to help the
-- directory consumer administrator determine whether to approve or reject
-- the share invitation.
--
-- 'createdDateTime', 'sharedDirectory_createdDateTime' - The date and time that the shared directory was created.
newSharedDirectory ::
  SharedDirectory
newSharedDirectory :: SharedDirectory
newSharedDirectory =
  SharedDirectory' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ShareStatus
-> Maybe ShareMethod
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> SharedDirectory
SharedDirectory'
    { $sel:sharedAccountId:SharedDirectory' :: Maybe Text
sharedAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccountId:SharedDirectory' :: Maybe Text
ownerAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:SharedDirectory' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:shareStatus:SharedDirectory' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:shareMethod:SharedDirectory' :: Maybe ShareMethod
shareMethod = Maybe ShareMethod
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerDirectoryId:SharedDirectory' :: Maybe Text
ownerDirectoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sharedDirectoryId:SharedDirectory' :: Maybe Text
sharedDirectoryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:shareNotes:SharedDirectory' :: Maybe (Sensitive Text)
shareNotes = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDateTime:SharedDirectory' :: Maybe POSIX
createdDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | Identifier of the directory consumer account that has access to the
-- shared directory (@OwnerDirectoryId@) in the directory owner account.
sharedDirectory_sharedAccountId :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.Text)
sharedDirectory_sharedAccountId :: (Maybe Text -> f (Maybe Text))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_sharedAccountId = (SharedDirectory -> Maybe Text)
-> (SharedDirectory -> Maybe Text -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe Text
sharedAccountId :: Maybe Text
$sel:sharedAccountId:SharedDirectory' :: SharedDirectory -> Maybe Text
sharedAccountId} -> Maybe Text
sharedAccountId) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe Text
a -> SharedDirectory
s {$sel:sharedAccountId:SharedDirectory' :: Maybe Text
sharedAccountId = Maybe Text
a} :: SharedDirectory)

-- | Identifier of the directory owner account, which contains the directory
-- that has been shared to the consumer account.
sharedDirectory_ownerAccountId :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.Text)
sharedDirectory_ownerAccountId :: (Maybe Text -> f (Maybe Text))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_ownerAccountId = (SharedDirectory -> Maybe Text)
-> (SharedDirectory -> Maybe Text -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:SharedDirectory' :: SharedDirectory -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe Text
a -> SharedDirectory
s {$sel:ownerAccountId:SharedDirectory' :: Maybe Text
ownerAccountId = Maybe Text
a} :: SharedDirectory)

-- | The date and time that the shared directory was last updated.
sharedDirectory_lastUpdatedDateTime :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.UTCTime)
sharedDirectory_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_lastUpdatedDateTime = (SharedDirectory -> Maybe POSIX)
-> (SharedDirectory -> Maybe POSIX -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:SharedDirectory' :: SharedDirectory -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe POSIX
a -> SharedDirectory
s {$sel:lastUpdatedDateTime:SharedDirectory' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: SharedDirectory) ((Maybe POSIX -> f (Maybe POSIX))
 -> SharedDirectory -> f SharedDirectory)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SharedDirectory
-> f SharedDirectory
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

-- | Current directory status of the shared Managed Microsoft AD directory.
sharedDirectory_shareStatus :: Lens.Lens' SharedDirectory (Prelude.Maybe ShareStatus)
sharedDirectory_shareStatus :: (Maybe ShareStatus -> f (Maybe ShareStatus))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_shareStatus = (SharedDirectory -> Maybe ShareStatus)
-> (SharedDirectory -> Maybe ShareStatus -> SharedDirectory)
-> Lens
     SharedDirectory
     SharedDirectory
     (Maybe ShareStatus)
     (Maybe ShareStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe ShareStatus
shareStatus :: Maybe ShareStatus
$sel:shareStatus:SharedDirectory' :: SharedDirectory -> Maybe ShareStatus
shareStatus} -> Maybe ShareStatus
shareStatus) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe ShareStatus
a -> SharedDirectory
s {$sel:shareStatus:SharedDirectory' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
a} :: SharedDirectory)

-- | The method used when sharing a directory to determine whether the
-- directory should be shared within your Amazon Web Services organization
-- (@ORGANIZATIONS@) or with any Amazon Web Services account by sending a
-- shared directory request (@HANDSHAKE@).
sharedDirectory_shareMethod :: Lens.Lens' SharedDirectory (Prelude.Maybe ShareMethod)
sharedDirectory_shareMethod :: (Maybe ShareMethod -> f (Maybe ShareMethod))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_shareMethod = (SharedDirectory -> Maybe ShareMethod)
-> (SharedDirectory -> Maybe ShareMethod -> SharedDirectory)
-> Lens
     SharedDirectory
     SharedDirectory
     (Maybe ShareMethod)
     (Maybe ShareMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe ShareMethod
shareMethod :: Maybe ShareMethod
$sel:shareMethod:SharedDirectory' :: SharedDirectory -> Maybe ShareMethod
shareMethod} -> Maybe ShareMethod
shareMethod) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe ShareMethod
a -> SharedDirectory
s {$sel:shareMethod:SharedDirectory' :: Maybe ShareMethod
shareMethod = Maybe ShareMethod
a} :: SharedDirectory)

-- | Identifier of the directory in the directory owner account.
sharedDirectory_ownerDirectoryId :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.Text)
sharedDirectory_ownerDirectoryId :: (Maybe Text -> f (Maybe Text))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_ownerDirectoryId = (SharedDirectory -> Maybe Text)
-> (SharedDirectory -> Maybe Text -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe Text
ownerDirectoryId :: Maybe Text
$sel:ownerDirectoryId:SharedDirectory' :: SharedDirectory -> Maybe Text
ownerDirectoryId} -> Maybe Text
ownerDirectoryId) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe Text
a -> SharedDirectory
s {$sel:ownerDirectoryId:SharedDirectory' :: Maybe Text
ownerDirectoryId = Maybe Text
a} :: SharedDirectory)

-- | Identifier of the shared directory in the directory consumer account.
-- This identifier is different for each directory owner account.
sharedDirectory_sharedDirectoryId :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.Text)
sharedDirectory_sharedDirectoryId :: (Maybe Text -> f (Maybe Text))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_sharedDirectoryId = (SharedDirectory -> Maybe Text)
-> (SharedDirectory -> Maybe Text -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe Text
sharedDirectoryId :: Maybe Text
$sel:sharedDirectoryId:SharedDirectory' :: SharedDirectory -> Maybe Text
sharedDirectoryId} -> Maybe Text
sharedDirectoryId) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe Text
a -> SharedDirectory
s {$sel:sharedDirectoryId:SharedDirectory' :: Maybe Text
sharedDirectoryId = Maybe Text
a} :: SharedDirectory)

-- | A directory share request that is sent by the directory owner to the
-- directory consumer. The request includes a typed message to help the
-- directory consumer administrator determine whether to approve or reject
-- the share invitation.
sharedDirectory_shareNotes :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.Text)
sharedDirectory_shareNotes :: (Maybe Text -> f (Maybe Text))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_shareNotes = (SharedDirectory -> Maybe (Sensitive Text))
-> (SharedDirectory -> Maybe (Sensitive Text) -> SharedDirectory)
-> Lens
     SharedDirectory
     SharedDirectory
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe (Sensitive Text)
shareNotes :: Maybe (Sensitive Text)
$sel:shareNotes:SharedDirectory' :: SharedDirectory -> Maybe (Sensitive Text)
shareNotes} -> Maybe (Sensitive Text)
shareNotes) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe (Sensitive Text)
a -> SharedDirectory
s {$sel:shareNotes:SharedDirectory' :: Maybe (Sensitive Text)
shareNotes = Maybe (Sensitive Text)
a} :: SharedDirectory) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> SharedDirectory -> f SharedDirectory)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SharedDirectory
-> f SharedDirectory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The date and time that the shared directory was created.
sharedDirectory_createdDateTime :: Lens.Lens' SharedDirectory (Prelude.Maybe Prelude.UTCTime)
sharedDirectory_createdDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SharedDirectory -> f SharedDirectory
sharedDirectory_createdDateTime = (SharedDirectory -> Maybe POSIX)
-> (SharedDirectory -> Maybe POSIX -> SharedDirectory)
-> Lens SharedDirectory SharedDirectory (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedDirectory' {Maybe POSIX
createdDateTime :: Maybe POSIX
$sel:createdDateTime:SharedDirectory' :: SharedDirectory -> Maybe POSIX
createdDateTime} -> Maybe POSIX
createdDateTime) (\s :: SharedDirectory
s@SharedDirectory' {} Maybe POSIX
a -> SharedDirectory
s {$sel:createdDateTime:SharedDirectory' :: Maybe POSIX
createdDateTime = Maybe POSIX
a} :: SharedDirectory) ((Maybe POSIX -> f (Maybe POSIX))
 -> SharedDirectory -> f SharedDirectory)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SharedDirectory
-> f SharedDirectory
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

instance Core.FromJSON SharedDirectory where
  parseJSON :: Value -> Parser SharedDirectory
parseJSON =
    String
-> (Object -> Parser SharedDirectory)
-> Value
-> Parser SharedDirectory
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SharedDirectory"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ShareStatus
-> Maybe ShareMethod
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> SharedDirectory
SharedDirectory'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ShareStatus
 -> Maybe ShareMethod
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe POSIX
 -> SharedDirectory)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ShareStatus
      -> Maybe ShareMethod
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> SharedDirectory)
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
"SharedAccountId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ShareStatus
   -> Maybe ShareMethod
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> SharedDirectory)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ShareStatus
      -> Maybe ShareMethod
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> SharedDirectory)
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
"OwnerAccountId")
            Parser
  (Maybe POSIX
   -> Maybe ShareStatus
   -> Maybe ShareMethod
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> SharedDirectory)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ShareStatus
      -> Maybe ShareMethod
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> SharedDirectory)
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
"LastUpdatedDateTime")
            Parser
  (Maybe ShareStatus
   -> Maybe ShareMethod
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> SharedDirectory)
-> Parser (Maybe ShareStatus)
-> Parser
     (Maybe ShareMethod
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> SharedDirectory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ShareStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShareStatus")
            Parser
  (Maybe ShareMethod
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> SharedDirectory)
-> Parser (Maybe ShareMethod)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Maybe POSIX
      -> SharedDirectory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ShareMethod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShareMethod")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Maybe POSIX
   -> SharedDirectory)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text) -> Maybe POSIX -> SharedDirectory)
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
"OwnerDirectoryId")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text) -> Maybe POSIX -> SharedDirectory)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text) -> Maybe POSIX -> SharedDirectory)
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
"SharedDirectoryId")
            Parser (Maybe (Sensitive Text) -> Maybe POSIX -> SharedDirectory)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe POSIX -> SharedDirectory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShareNotes")
            Parser (Maybe POSIX -> SharedDirectory)
-> Parser (Maybe POSIX) -> Parser SharedDirectory
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
"CreatedDateTime")
      )

instance Prelude.Hashable SharedDirectory

instance Prelude.NFData SharedDirectory