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