{-# 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 #-}
module Amazonka.LakeFormation.Types.BatchPermissionsFailureEntry where
import qualified Amazonka.Core as Core
import Amazonka.LakeFormation.Types.BatchPermissionsRequestEntry
import Amazonka.LakeFormation.Types.ErrorDetail
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchPermissionsFailureEntry = BatchPermissionsFailureEntry'
{
BatchPermissionsFailureEntry -> Maybe ErrorDetail
error :: Prelude.Maybe ErrorDetail,
BatchPermissionsFailureEntry -> Maybe BatchPermissionsRequestEntry
requestEntry :: Prelude.Maybe BatchPermissionsRequestEntry
}
deriving (BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool
(BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool)
-> (BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool)
-> Eq BatchPermissionsFailureEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool
$c/= :: BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool
== :: BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool
$c== :: BatchPermissionsFailureEntry
-> BatchPermissionsFailureEntry -> Bool
Prelude.Eq, ReadPrec [BatchPermissionsFailureEntry]
ReadPrec BatchPermissionsFailureEntry
Int -> ReadS BatchPermissionsFailureEntry
ReadS [BatchPermissionsFailureEntry]
(Int -> ReadS BatchPermissionsFailureEntry)
-> ReadS [BatchPermissionsFailureEntry]
-> ReadPrec BatchPermissionsFailureEntry
-> ReadPrec [BatchPermissionsFailureEntry]
-> Read BatchPermissionsFailureEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPermissionsFailureEntry]
$creadListPrec :: ReadPrec [BatchPermissionsFailureEntry]
readPrec :: ReadPrec BatchPermissionsFailureEntry
$creadPrec :: ReadPrec BatchPermissionsFailureEntry
readList :: ReadS [BatchPermissionsFailureEntry]
$creadList :: ReadS [BatchPermissionsFailureEntry]
readsPrec :: Int -> ReadS BatchPermissionsFailureEntry
$creadsPrec :: Int -> ReadS BatchPermissionsFailureEntry
Prelude.Read, Int -> BatchPermissionsFailureEntry -> ShowS
[BatchPermissionsFailureEntry] -> ShowS
BatchPermissionsFailureEntry -> String
(Int -> BatchPermissionsFailureEntry -> ShowS)
-> (BatchPermissionsFailureEntry -> String)
-> ([BatchPermissionsFailureEntry] -> ShowS)
-> Show BatchPermissionsFailureEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPermissionsFailureEntry] -> ShowS
$cshowList :: [BatchPermissionsFailureEntry] -> ShowS
show :: BatchPermissionsFailureEntry -> String
$cshow :: BatchPermissionsFailureEntry -> String
showsPrec :: Int -> BatchPermissionsFailureEntry -> ShowS
$cshowsPrec :: Int -> BatchPermissionsFailureEntry -> ShowS
Prelude.Show, (forall x.
BatchPermissionsFailureEntry -> Rep BatchPermissionsFailureEntry x)
-> (forall x.
Rep BatchPermissionsFailureEntry x -> BatchPermissionsFailureEntry)
-> Generic BatchPermissionsFailureEntry
forall x.
Rep BatchPermissionsFailureEntry x -> BatchPermissionsFailureEntry
forall x.
BatchPermissionsFailureEntry -> Rep BatchPermissionsFailureEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchPermissionsFailureEntry x -> BatchPermissionsFailureEntry
$cfrom :: forall x.
BatchPermissionsFailureEntry -> Rep BatchPermissionsFailureEntry x
Prelude.Generic)
newBatchPermissionsFailureEntry ::
BatchPermissionsFailureEntry
newBatchPermissionsFailureEntry :: BatchPermissionsFailureEntry
newBatchPermissionsFailureEntry =
BatchPermissionsFailureEntry' :: Maybe ErrorDetail
-> Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry
BatchPermissionsFailureEntry'
{ $sel:error:BatchPermissionsFailureEntry' :: Maybe ErrorDetail
error =
Maybe ErrorDetail
forall a. Maybe a
Prelude.Nothing,
$sel:requestEntry:BatchPermissionsFailureEntry' :: Maybe BatchPermissionsRequestEntry
requestEntry = Maybe BatchPermissionsRequestEntry
forall a. Maybe a
Prelude.Nothing
}
batchPermissionsFailureEntry_error :: Lens.Lens' BatchPermissionsFailureEntry (Prelude.Maybe ErrorDetail)
batchPermissionsFailureEntry_error :: (Maybe ErrorDetail -> f (Maybe ErrorDetail))
-> BatchPermissionsFailureEntry -> f BatchPermissionsFailureEntry
batchPermissionsFailureEntry_error = (BatchPermissionsFailureEntry -> Maybe ErrorDetail)
-> (BatchPermissionsFailureEntry
-> Maybe ErrorDetail -> BatchPermissionsFailureEntry)
-> Lens
BatchPermissionsFailureEntry
BatchPermissionsFailureEntry
(Maybe ErrorDetail)
(Maybe ErrorDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPermissionsFailureEntry' {Maybe ErrorDetail
error :: Maybe ErrorDetail
$sel:error:BatchPermissionsFailureEntry' :: BatchPermissionsFailureEntry -> Maybe ErrorDetail
error} -> Maybe ErrorDetail
error) (\s :: BatchPermissionsFailureEntry
s@BatchPermissionsFailureEntry' {} Maybe ErrorDetail
a -> BatchPermissionsFailureEntry
s {$sel:error:BatchPermissionsFailureEntry' :: Maybe ErrorDetail
error = Maybe ErrorDetail
a} :: BatchPermissionsFailureEntry)
batchPermissionsFailureEntry_requestEntry :: Lens.Lens' BatchPermissionsFailureEntry (Prelude.Maybe BatchPermissionsRequestEntry)
batchPermissionsFailureEntry_requestEntry :: (Maybe BatchPermissionsRequestEntry
-> f (Maybe BatchPermissionsRequestEntry))
-> BatchPermissionsFailureEntry -> f BatchPermissionsFailureEntry
batchPermissionsFailureEntry_requestEntry = (BatchPermissionsFailureEntry
-> Maybe BatchPermissionsRequestEntry)
-> (BatchPermissionsFailureEntry
-> Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry)
-> Lens
BatchPermissionsFailureEntry
BatchPermissionsFailureEntry
(Maybe BatchPermissionsRequestEntry)
(Maybe BatchPermissionsRequestEntry)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPermissionsFailureEntry' {Maybe BatchPermissionsRequestEntry
requestEntry :: Maybe BatchPermissionsRequestEntry
$sel:requestEntry:BatchPermissionsFailureEntry' :: BatchPermissionsFailureEntry -> Maybe BatchPermissionsRequestEntry
requestEntry} -> Maybe BatchPermissionsRequestEntry
requestEntry) (\s :: BatchPermissionsFailureEntry
s@BatchPermissionsFailureEntry' {} Maybe BatchPermissionsRequestEntry
a -> BatchPermissionsFailureEntry
s {$sel:requestEntry:BatchPermissionsFailureEntry' :: Maybe BatchPermissionsRequestEntry
requestEntry = Maybe BatchPermissionsRequestEntry
a} :: BatchPermissionsFailureEntry)
instance Core.FromJSON BatchPermissionsFailureEntry where
parseJSON :: Value -> Parser BatchPermissionsFailureEntry
parseJSON =
String
-> (Object -> Parser BatchPermissionsFailureEntry)
-> Value
-> Parser BatchPermissionsFailureEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchPermissionsFailureEntry"
( \Object
x ->
Maybe ErrorDetail
-> Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry
BatchPermissionsFailureEntry'
(Maybe ErrorDetail
-> Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry)
-> Parser (Maybe ErrorDetail)
-> Parser
(Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ErrorDetail)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Error")
Parser
(Maybe BatchPermissionsRequestEntry
-> BatchPermissionsFailureEntry)
-> Parser (Maybe BatchPermissionsRequestEntry)
-> Parser BatchPermissionsFailureEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchPermissionsRequestEntry)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestEntry")
)
instance
Prelude.Hashable
BatchPermissionsFailureEntry
instance Prelude.NFData BatchPermissionsFailureEntry