{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:commitId:BatchGetCommitsError' :: Maybe Text
commitId = forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:BatchGetCommitsError' :: Maybe Text
errorCode = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:BatchGetCommitsError' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing
}
batchGetCommitsError_commitId :: Lens.Lens' BatchGetCommitsError (Prelude.Maybe Prelude.Text)
batchGetCommitsError_commitId :: Lens' BatchGetCommitsError (Maybe Text)
batchGetCommitsError_commitId = 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 :: Lens' BatchGetCommitsError (Maybe Text)
batchGetCommitsError_errorCode = 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 :: Lens' BatchGetCommitsError (Maybe Text)
batchGetCommitsError_errorMessage = 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 Data.FromJSON BatchGetCommitsError where
parseJSON :: Value -> Parser BatchGetCommitsError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetCommitsError"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> BatchGetCommitsError
BatchGetCommitsError'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"commitId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"errorCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"errorMessage")
)
instance Prelude.Hashable BatchGetCommitsError where
hashWithSalt :: Int -> BatchGetCommitsError -> Int
hashWithSalt Int
_salt BatchGetCommitsError' {Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe Text
commitId :: Maybe Text
$sel:errorMessage:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
$sel:errorCode:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
$sel:commitId:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
commitId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
instance Prelude.NFData BatchGetCommitsError where
rnf :: BatchGetCommitsError -> ()
rnf BatchGetCommitsError' {Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe Text
commitId :: Maybe Text
$sel:errorMessage:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
$sel:errorCode:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
$sel:commitId:BatchGetCommitsError' :: BatchGetCommitsError -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
commitId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage