{-# 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.AuditManager.Types.BatchCreateDelegationByAssessmentError where
import Amazonka.AuditManager.Types.CreateDelegationRequest
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchCreateDelegationByAssessmentError = BatchCreateDelegationByAssessmentError'
{
BatchCreateDelegationByAssessmentError
-> Maybe CreateDelegationRequest
createDelegationRequest :: Prelude.Maybe CreateDelegationRequest,
BatchCreateDelegationByAssessmentError -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
BatchCreateDelegationByAssessmentError -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool
(BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool)
-> (BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool)
-> Eq BatchCreateDelegationByAssessmentError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool
$c/= :: BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool
== :: BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool
$c== :: BatchCreateDelegationByAssessmentError
-> BatchCreateDelegationByAssessmentError -> Bool
Prelude.Eq, ReadPrec [BatchCreateDelegationByAssessmentError]
ReadPrec BatchCreateDelegationByAssessmentError
Int -> ReadS BatchCreateDelegationByAssessmentError
ReadS [BatchCreateDelegationByAssessmentError]
(Int -> ReadS BatchCreateDelegationByAssessmentError)
-> ReadS [BatchCreateDelegationByAssessmentError]
-> ReadPrec BatchCreateDelegationByAssessmentError
-> ReadPrec [BatchCreateDelegationByAssessmentError]
-> Read BatchCreateDelegationByAssessmentError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchCreateDelegationByAssessmentError]
$creadListPrec :: ReadPrec [BatchCreateDelegationByAssessmentError]
readPrec :: ReadPrec BatchCreateDelegationByAssessmentError
$creadPrec :: ReadPrec BatchCreateDelegationByAssessmentError
readList :: ReadS [BatchCreateDelegationByAssessmentError]
$creadList :: ReadS [BatchCreateDelegationByAssessmentError]
readsPrec :: Int -> ReadS BatchCreateDelegationByAssessmentError
$creadsPrec :: Int -> ReadS BatchCreateDelegationByAssessmentError
Prelude.Read, Int -> BatchCreateDelegationByAssessmentError -> ShowS
[BatchCreateDelegationByAssessmentError] -> ShowS
BatchCreateDelegationByAssessmentError -> String
(Int -> BatchCreateDelegationByAssessmentError -> ShowS)
-> (BatchCreateDelegationByAssessmentError -> String)
-> ([BatchCreateDelegationByAssessmentError] -> ShowS)
-> Show BatchCreateDelegationByAssessmentError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchCreateDelegationByAssessmentError] -> ShowS
$cshowList :: [BatchCreateDelegationByAssessmentError] -> ShowS
show :: BatchCreateDelegationByAssessmentError -> String
$cshow :: BatchCreateDelegationByAssessmentError -> String
showsPrec :: Int -> BatchCreateDelegationByAssessmentError -> ShowS
$cshowsPrec :: Int -> BatchCreateDelegationByAssessmentError -> ShowS
Prelude.Show, (forall x.
BatchCreateDelegationByAssessmentError
-> Rep BatchCreateDelegationByAssessmentError x)
-> (forall x.
Rep BatchCreateDelegationByAssessmentError x
-> BatchCreateDelegationByAssessmentError)
-> Generic BatchCreateDelegationByAssessmentError
forall x.
Rep BatchCreateDelegationByAssessmentError x
-> BatchCreateDelegationByAssessmentError
forall x.
BatchCreateDelegationByAssessmentError
-> Rep BatchCreateDelegationByAssessmentError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchCreateDelegationByAssessmentError x
-> BatchCreateDelegationByAssessmentError
$cfrom :: forall x.
BatchCreateDelegationByAssessmentError
-> Rep BatchCreateDelegationByAssessmentError x
Prelude.Generic)
newBatchCreateDelegationByAssessmentError ::
BatchCreateDelegationByAssessmentError
newBatchCreateDelegationByAssessmentError :: BatchCreateDelegationByAssessmentError
newBatchCreateDelegationByAssessmentError =
BatchCreateDelegationByAssessmentError' :: Maybe CreateDelegationRequest
-> Maybe Text
-> Maybe Text
-> BatchCreateDelegationByAssessmentError
BatchCreateDelegationByAssessmentError'
{ $sel:createDelegationRequest:BatchCreateDelegationByAssessmentError' :: Maybe CreateDelegationRequest
createDelegationRequest =
Maybe CreateDelegationRequest
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:BatchCreateDelegationByAssessmentError' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BatchCreateDelegationByAssessmentError' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
batchCreateDelegationByAssessmentError_createDelegationRequest :: Lens.Lens' BatchCreateDelegationByAssessmentError (Prelude.Maybe CreateDelegationRequest)
batchCreateDelegationByAssessmentError_createDelegationRequest :: (Maybe CreateDelegationRequest
-> f (Maybe CreateDelegationRequest))
-> BatchCreateDelegationByAssessmentError
-> f BatchCreateDelegationByAssessmentError
batchCreateDelegationByAssessmentError_createDelegationRequest = (BatchCreateDelegationByAssessmentError
-> Maybe CreateDelegationRequest)
-> (BatchCreateDelegationByAssessmentError
-> Maybe CreateDelegationRequest
-> BatchCreateDelegationByAssessmentError)
-> Lens
BatchCreateDelegationByAssessmentError
BatchCreateDelegationByAssessmentError
(Maybe CreateDelegationRequest)
(Maybe CreateDelegationRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateDelegationByAssessmentError' {Maybe CreateDelegationRequest
createDelegationRequest :: Maybe CreateDelegationRequest
$sel:createDelegationRequest:BatchCreateDelegationByAssessmentError' :: BatchCreateDelegationByAssessmentError
-> Maybe CreateDelegationRequest
createDelegationRequest} -> Maybe CreateDelegationRequest
createDelegationRequest) (\s :: BatchCreateDelegationByAssessmentError
s@BatchCreateDelegationByAssessmentError' {} Maybe CreateDelegationRequest
a -> BatchCreateDelegationByAssessmentError
s {$sel:createDelegationRequest:BatchCreateDelegationByAssessmentError' :: Maybe CreateDelegationRequest
createDelegationRequest = Maybe CreateDelegationRequest
a} :: BatchCreateDelegationByAssessmentError)
batchCreateDelegationByAssessmentError_errorCode :: Lens.Lens' BatchCreateDelegationByAssessmentError (Prelude.Maybe Prelude.Text)
batchCreateDelegationByAssessmentError_errorCode :: (Maybe Text -> f (Maybe Text))
-> BatchCreateDelegationByAssessmentError
-> f BatchCreateDelegationByAssessmentError
batchCreateDelegationByAssessmentError_errorCode = (BatchCreateDelegationByAssessmentError -> Maybe Text)
-> (BatchCreateDelegationByAssessmentError
-> Maybe Text -> BatchCreateDelegationByAssessmentError)
-> Lens
BatchCreateDelegationByAssessmentError
BatchCreateDelegationByAssessmentError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateDelegationByAssessmentError' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:BatchCreateDelegationByAssessmentError' :: BatchCreateDelegationByAssessmentError -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: BatchCreateDelegationByAssessmentError
s@BatchCreateDelegationByAssessmentError' {} Maybe Text
a -> BatchCreateDelegationByAssessmentError
s {$sel:errorCode:BatchCreateDelegationByAssessmentError' :: Maybe Text
errorCode = Maybe Text
a} :: BatchCreateDelegationByAssessmentError)
batchCreateDelegationByAssessmentError_errorMessage :: Lens.Lens' BatchCreateDelegationByAssessmentError (Prelude.Maybe Prelude.Text)
batchCreateDelegationByAssessmentError_errorMessage :: (Maybe Text -> f (Maybe Text))
-> BatchCreateDelegationByAssessmentError
-> f BatchCreateDelegationByAssessmentError
batchCreateDelegationByAssessmentError_errorMessage = (BatchCreateDelegationByAssessmentError -> Maybe Text)
-> (BatchCreateDelegationByAssessmentError
-> Maybe Text -> BatchCreateDelegationByAssessmentError)
-> Lens
BatchCreateDelegationByAssessmentError
BatchCreateDelegationByAssessmentError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateDelegationByAssessmentError' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:BatchCreateDelegationByAssessmentError' :: BatchCreateDelegationByAssessmentError -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: BatchCreateDelegationByAssessmentError
s@BatchCreateDelegationByAssessmentError' {} Maybe Text
a -> BatchCreateDelegationByAssessmentError
s {$sel:errorMessage:BatchCreateDelegationByAssessmentError' :: Maybe Text
errorMessage = Maybe Text
a} :: BatchCreateDelegationByAssessmentError)
instance
Core.FromJSON
BatchCreateDelegationByAssessmentError
where
parseJSON :: Value -> Parser BatchCreateDelegationByAssessmentError
parseJSON =
String
-> (Object -> Parser BatchCreateDelegationByAssessmentError)
-> Value
-> Parser BatchCreateDelegationByAssessmentError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchCreateDelegationByAssessmentError"
( \Object
x ->
Maybe CreateDelegationRequest
-> Maybe Text
-> Maybe Text
-> BatchCreateDelegationByAssessmentError
BatchCreateDelegationByAssessmentError'
(Maybe CreateDelegationRequest
-> Maybe Text
-> Maybe Text
-> BatchCreateDelegationByAssessmentError)
-> Parser (Maybe CreateDelegationRequest)
-> Parser
(Maybe Text
-> Maybe Text -> BatchCreateDelegationByAssessmentError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CreateDelegationRequest)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createDelegationRequest")
Parser
(Maybe Text
-> Maybe Text -> BatchCreateDelegationByAssessmentError)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BatchCreateDelegationByAssessmentError)
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
"errorCode")
Parser (Maybe Text -> BatchCreateDelegationByAssessmentError)
-> Parser (Maybe Text)
-> Parser BatchCreateDelegationByAssessmentError
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
"errorMessage")
)
instance
Prelude.Hashable
BatchCreateDelegationByAssessmentError
instance
Prelude.NFData
BatchCreateDelegationByAssessmentError