{-# 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.RAM.Types.ResourceSharePermissionDetail
-- 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.RAM.Types.ResourceSharePermissionDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about an RAM permission.
--
-- /See:/ 'newResourceSharePermissionDetail' smart constructor.
data ResourceSharePermissionDetail = ResourceSharePermissionDetail'
  { -- | The date and time when the permission was created.
    ResourceSharePermissionDetail -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The resource type to which the permission applies.
    ResourceSharePermissionDetail -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the permission was last updated.
    ResourceSharePermissionDetail -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the permission.
    ResourceSharePermissionDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the version of the permission is set to the default
    -- version for this permission.
    ResourceSharePermissionDetail -> Maybe Bool
defaultVersion :: Prelude.Maybe Prelude.Bool,
    -- | The name of the permission.
    ResourceSharePermissionDetail -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the version of the permission.
    ResourceSharePermissionDetail -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the version of the permission is set to the default
    -- version for this resource type.
    ResourceSharePermissionDetail -> Maybe Bool
isResourceTypeDefault :: Prelude.Maybe Prelude.Bool,
    -- | The permission\'s effect and actions in JSON format. The @effect@
    -- indicates whether the actions are allowed or denied. The @actions@ list
    -- the API actions to which the principal is granted or denied access.
    ResourceSharePermissionDetail -> Maybe Text
permission :: Prelude.Maybe Prelude.Text
  }
  deriving (ResourceSharePermissionDetail
-> ResourceSharePermissionDetail -> Bool
(ResourceSharePermissionDetail
 -> ResourceSharePermissionDetail -> Bool)
-> (ResourceSharePermissionDetail
    -> ResourceSharePermissionDetail -> Bool)
-> Eq ResourceSharePermissionDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceSharePermissionDetail
-> ResourceSharePermissionDetail -> Bool
$c/= :: ResourceSharePermissionDetail
-> ResourceSharePermissionDetail -> Bool
== :: ResourceSharePermissionDetail
-> ResourceSharePermissionDetail -> Bool
$c== :: ResourceSharePermissionDetail
-> ResourceSharePermissionDetail -> Bool
Prelude.Eq, ReadPrec [ResourceSharePermissionDetail]
ReadPrec ResourceSharePermissionDetail
Int -> ReadS ResourceSharePermissionDetail
ReadS [ResourceSharePermissionDetail]
(Int -> ReadS ResourceSharePermissionDetail)
-> ReadS [ResourceSharePermissionDetail]
-> ReadPrec ResourceSharePermissionDetail
-> ReadPrec [ResourceSharePermissionDetail]
-> Read ResourceSharePermissionDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceSharePermissionDetail]
$creadListPrec :: ReadPrec [ResourceSharePermissionDetail]
readPrec :: ReadPrec ResourceSharePermissionDetail
$creadPrec :: ReadPrec ResourceSharePermissionDetail
readList :: ReadS [ResourceSharePermissionDetail]
$creadList :: ReadS [ResourceSharePermissionDetail]
readsPrec :: Int -> ReadS ResourceSharePermissionDetail
$creadsPrec :: Int -> ReadS ResourceSharePermissionDetail
Prelude.Read, Int -> ResourceSharePermissionDetail -> ShowS
[ResourceSharePermissionDetail] -> ShowS
ResourceSharePermissionDetail -> String
(Int -> ResourceSharePermissionDetail -> ShowS)
-> (ResourceSharePermissionDetail -> String)
-> ([ResourceSharePermissionDetail] -> ShowS)
-> Show ResourceSharePermissionDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceSharePermissionDetail] -> ShowS
$cshowList :: [ResourceSharePermissionDetail] -> ShowS
show :: ResourceSharePermissionDetail -> String
$cshow :: ResourceSharePermissionDetail -> String
showsPrec :: Int -> ResourceSharePermissionDetail -> ShowS
$cshowsPrec :: Int -> ResourceSharePermissionDetail -> ShowS
Prelude.Show, (forall x.
 ResourceSharePermissionDetail
 -> Rep ResourceSharePermissionDetail x)
-> (forall x.
    Rep ResourceSharePermissionDetail x
    -> ResourceSharePermissionDetail)
-> Generic ResourceSharePermissionDetail
forall x.
Rep ResourceSharePermissionDetail x
-> ResourceSharePermissionDetail
forall x.
ResourceSharePermissionDetail
-> Rep ResourceSharePermissionDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResourceSharePermissionDetail x
-> ResourceSharePermissionDetail
$cfrom :: forall x.
ResourceSharePermissionDetail
-> Rep ResourceSharePermissionDetail x
Prelude.Generic)

-- |
-- Create a value of 'ResourceSharePermissionDetail' 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:
--
-- 'creationTime', 'resourceSharePermissionDetail_creationTime' - The date and time when the permission was created.
--
-- 'resourceType', 'resourceSharePermissionDetail_resourceType' - The resource type to which the permission applies.
--
-- 'lastUpdatedTime', 'resourceSharePermissionDetail_lastUpdatedTime' - The date and time when the permission was last updated.
--
-- 'arn', 'resourceSharePermissionDetail_arn' - The Amazon Resource Name (ARN) of the permission.
--
-- 'defaultVersion', 'resourceSharePermissionDetail_defaultVersion' - Specifies whether the version of the permission is set to the default
-- version for this permission.
--
-- 'name', 'resourceSharePermissionDetail_name' - The name of the permission.
--
-- 'version', 'resourceSharePermissionDetail_version' - The identifier for the version of the permission.
--
-- 'isResourceTypeDefault', 'resourceSharePermissionDetail_isResourceTypeDefault' - Specifies whether the version of the permission is set to the default
-- version for this resource type.
--
-- 'permission', 'resourceSharePermissionDetail_permission' - The permission\'s effect and actions in JSON format. The @effect@
-- indicates whether the actions are allowed or denied. The @actions@ list
-- the API actions to which the principal is granted or denied access.
newResourceSharePermissionDetail ::
  ResourceSharePermissionDetail
newResourceSharePermissionDetail :: ResourceSharePermissionDetail
newResourceSharePermissionDetail =
  ResourceSharePermissionDetail' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> ResourceSharePermissionDetail
ResourceSharePermissionDetail'
    { $sel:creationTime:ResourceSharePermissionDetail' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:ResourceSharePermissionDetail' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:ResourceSharePermissionDetail' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ResourceSharePermissionDetail' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultVersion:ResourceSharePermissionDetail' :: Maybe Bool
defaultVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ResourceSharePermissionDetail' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ResourceSharePermissionDetail' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isResourceTypeDefault:ResourceSharePermissionDetail' :: Maybe Bool
isResourceTypeDefault = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:permission:ResourceSharePermissionDetail' :: Maybe Text
permission = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time when the permission was created.
resourceSharePermissionDetail_creationTime :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.UTCTime)
resourceSharePermissionDetail_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_creationTime = (ResourceSharePermissionDetail -> Maybe POSIX)
-> (ResourceSharePermissionDetail
    -> Maybe POSIX -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe POSIX
a -> ResourceSharePermissionDetail
s {$sel:creationTime:ResourceSharePermissionDetail' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ResourceSharePermissionDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> ResourceSharePermissionDetail
 -> f ResourceSharePermissionDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ResourceSharePermissionDetail
-> f ResourceSharePermissionDetail
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 resource type to which the permission applies.
resourceSharePermissionDetail_resourceType :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)
resourceSharePermissionDetail_resourceType :: (Maybe Text -> f (Maybe Text))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_resourceType = (ResourceSharePermissionDetail -> Maybe Text)
-> (ResourceSharePermissionDetail
    -> Maybe Text -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Text
a -> ResourceSharePermissionDetail
s {$sel:resourceType:ResourceSharePermissionDetail' :: Maybe Text
resourceType = Maybe Text
a} :: ResourceSharePermissionDetail)

-- | The date and time when the permission was last updated.
resourceSharePermissionDetail_lastUpdatedTime :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.UTCTime)
resourceSharePermissionDetail_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_lastUpdatedTime = (ResourceSharePermissionDetail -> Maybe POSIX)
-> (ResourceSharePermissionDetail
    -> Maybe POSIX -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe POSIX
a -> ResourceSharePermissionDetail
s {$sel:lastUpdatedTime:ResourceSharePermissionDetail' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: ResourceSharePermissionDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> ResourceSharePermissionDetail
 -> f ResourceSharePermissionDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ResourceSharePermissionDetail
-> f ResourceSharePermissionDetail
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 Amazon Resource Name (ARN) of the permission.
resourceSharePermissionDetail_arn :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)
resourceSharePermissionDetail_arn :: (Maybe Text -> f (Maybe Text))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_arn = (ResourceSharePermissionDetail -> Maybe Text)
-> (ResourceSharePermissionDetail
    -> Maybe Text -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Text
a -> ResourceSharePermissionDetail
s {$sel:arn:ResourceSharePermissionDetail' :: Maybe Text
arn = Maybe Text
a} :: ResourceSharePermissionDetail)

-- | Specifies whether the version of the permission is set to the default
-- version for this permission.
resourceSharePermissionDetail_defaultVersion :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Bool)
resourceSharePermissionDetail_defaultVersion :: (Maybe Bool -> f (Maybe Bool))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_defaultVersion = (ResourceSharePermissionDetail -> Maybe Bool)
-> (ResourceSharePermissionDetail
    -> Maybe Bool -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Bool
defaultVersion :: Maybe Bool
$sel:defaultVersion:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Bool
defaultVersion} -> Maybe Bool
defaultVersion) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Bool
a -> ResourceSharePermissionDetail
s {$sel:defaultVersion:ResourceSharePermissionDetail' :: Maybe Bool
defaultVersion = Maybe Bool
a} :: ResourceSharePermissionDetail)

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

-- | The identifier for the version of the permission.
resourceSharePermissionDetail_version :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)
resourceSharePermissionDetail_version :: (Maybe Text -> f (Maybe Text))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_version = (ResourceSharePermissionDetail -> Maybe Text)
-> (ResourceSharePermissionDetail
    -> Maybe Text -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Text
version :: Maybe Text
$sel:version:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Text
version} -> Maybe Text
version) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Text
a -> ResourceSharePermissionDetail
s {$sel:version:ResourceSharePermissionDetail' :: Maybe Text
version = Maybe Text
a} :: ResourceSharePermissionDetail)

-- | Specifies whether the version of the permission is set to the default
-- version for this resource type.
resourceSharePermissionDetail_isResourceTypeDefault :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Bool)
resourceSharePermissionDetail_isResourceTypeDefault :: (Maybe Bool -> f (Maybe Bool))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_isResourceTypeDefault = (ResourceSharePermissionDetail -> Maybe Bool)
-> (ResourceSharePermissionDetail
    -> Maybe Bool -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Bool
isResourceTypeDefault :: Maybe Bool
$sel:isResourceTypeDefault:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Bool
isResourceTypeDefault} -> Maybe Bool
isResourceTypeDefault) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Bool
a -> ResourceSharePermissionDetail
s {$sel:isResourceTypeDefault:ResourceSharePermissionDetail' :: Maybe Bool
isResourceTypeDefault = Maybe Bool
a} :: ResourceSharePermissionDetail)

-- | The permission\'s effect and actions in JSON format. The @effect@
-- indicates whether the actions are allowed or denied. The @actions@ list
-- the API actions to which the principal is granted or denied access.
resourceSharePermissionDetail_permission :: Lens.Lens' ResourceSharePermissionDetail (Prelude.Maybe Prelude.Text)
resourceSharePermissionDetail_permission :: (Maybe Text -> f (Maybe Text))
-> ResourceSharePermissionDetail -> f ResourceSharePermissionDetail
resourceSharePermissionDetail_permission = (ResourceSharePermissionDetail -> Maybe Text)
-> (ResourceSharePermissionDetail
    -> Maybe Text -> ResourceSharePermissionDetail)
-> Lens
     ResourceSharePermissionDetail
     ResourceSharePermissionDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSharePermissionDetail' {Maybe Text
permission :: Maybe Text
$sel:permission:ResourceSharePermissionDetail' :: ResourceSharePermissionDetail -> Maybe Text
permission} -> Maybe Text
permission) (\s :: ResourceSharePermissionDetail
s@ResourceSharePermissionDetail' {} Maybe Text
a -> ResourceSharePermissionDetail
s {$sel:permission:ResourceSharePermissionDetail' :: Maybe Text
permission = Maybe Text
a} :: ResourceSharePermissionDetail)

instance Core.FromJSON ResourceSharePermissionDetail where
  parseJSON :: Value -> Parser ResourceSharePermissionDetail
parseJSON =
    String
-> (Object -> Parser ResourceSharePermissionDetail)
-> Value
-> Parser ResourceSharePermissionDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ResourceSharePermissionDetail"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> ResourceSharePermissionDetail
ResourceSharePermissionDetail'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> ResourceSharePermissionDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> ResourceSharePermissionDetail)
forall (f :: * -> *) a b. Functor 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
"creationTime")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> ResourceSharePermissionDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> ResourceSharePermissionDetail)
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
"resourceType")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> ResourceSharePermissionDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> ResourceSharePermissionDetail)
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
"lastUpdatedTime")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> ResourceSharePermissionDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> ResourceSharePermissionDetail)
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
"arn")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> ResourceSharePermissionDetail)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> ResourceSharePermissionDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"defaultVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> ResourceSharePermissionDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> ResourceSharePermissionDetail)
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 Text
   -> Maybe Bool -> Maybe Text -> ResourceSharePermissionDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Text -> ResourceSharePermissionDetail)
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
"version")
            Parser (Maybe Bool -> Maybe Text -> ResourceSharePermissionDetail)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> ResourceSharePermissionDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isResourceTypeDefault")
            Parser (Maybe Text -> ResourceSharePermissionDetail)
-> Parser (Maybe Text) -> Parser ResourceSharePermissionDetail
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
"permission")
      )

instance
  Prelude.Hashable
    ResourceSharePermissionDetail

instance Prelude.NFData ResourceSharePermissionDetail