{-# 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.CodeCommit.Types.BatchDescribeMergeConflictsError
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CodeCommit.Types.BatchDescribeMergeConflictsError 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

-- | Returns information about errors in a BatchDescribeMergeConflicts
-- operation.
--
-- /See:/ 'newBatchDescribeMergeConflictsError' smart constructor.
data BatchDescribeMergeConflictsError = BatchDescribeMergeConflictsError'
  { -- | The path to the file.
    BatchDescribeMergeConflictsError -> Text
filePath :: Prelude.Text,
    -- | The name of the exception.
    BatchDescribeMergeConflictsError -> Text
exceptionName :: Prelude.Text,
    -- | The message provided by the exception.
    BatchDescribeMergeConflictsError -> Text
message :: Prelude.Text
  }
  deriving (BatchDescribeMergeConflictsError
-> BatchDescribeMergeConflictsError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDescribeMergeConflictsError
-> BatchDescribeMergeConflictsError -> Bool
$c/= :: BatchDescribeMergeConflictsError
-> BatchDescribeMergeConflictsError -> Bool
== :: BatchDescribeMergeConflictsError
-> BatchDescribeMergeConflictsError -> Bool
$c== :: BatchDescribeMergeConflictsError
-> BatchDescribeMergeConflictsError -> Bool
Prelude.Eq, ReadPrec [BatchDescribeMergeConflictsError]
ReadPrec BatchDescribeMergeConflictsError
Int -> ReadS BatchDescribeMergeConflictsError
ReadS [BatchDescribeMergeConflictsError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDescribeMergeConflictsError]
$creadListPrec :: ReadPrec [BatchDescribeMergeConflictsError]
readPrec :: ReadPrec BatchDescribeMergeConflictsError
$creadPrec :: ReadPrec BatchDescribeMergeConflictsError
readList :: ReadS [BatchDescribeMergeConflictsError]
$creadList :: ReadS [BatchDescribeMergeConflictsError]
readsPrec :: Int -> ReadS BatchDescribeMergeConflictsError
$creadsPrec :: Int -> ReadS BatchDescribeMergeConflictsError
Prelude.Read, Int -> BatchDescribeMergeConflictsError -> ShowS
[BatchDescribeMergeConflictsError] -> ShowS
BatchDescribeMergeConflictsError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDescribeMergeConflictsError] -> ShowS
$cshowList :: [BatchDescribeMergeConflictsError] -> ShowS
show :: BatchDescribeMergeConflictsError -> String
$cshow :: BatchDescribeMergeConflictsError -> String
showsPrec :: Int -> BatchDescribeMergeConflictsError -> ShowS
$cshowsPrec :: Int -> BatchDescribeMergeConflictsError -> ShowS
Prelude.Show, forall x.
Rep BatchDescribeMergeConflictsError x
-> BatchDescribeMergeConflictsError
forall x.
BatchDescribeMergeConflictsError
-> Rep BatchDescribeMergeConflictsError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDescribeMergeConflictsError x
-> BatchDescribeMergeConflictsError
$cfrom :: forall x.
BatchDescribeMergeConflictsError
-> Rep BatchDescribeMergeConflictsError x
Prelude.Generic)

-- |
-- Create a value of 'BatchDescribeMergeConflictsError' 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:
--
-- 'filePath', 'batchDescribeMergeConflictsError_filePath' - The path to the file.
--
-- 'exceptionName', 'batchDescribeMergeConflictsError_exceptionName' - The name of the exception.
--
-- 'message', 'batchDescribeMergeConflictsError_message' - The message provided by the exception.
newBatchDescribeMergeConflictsError ::
  -- | 'filePath'
  Prelude.Text ->
  -- | 'exceptionName'
  Prelude.Text ->
  -- | 'message'
  Prelude.Text ->
  BatchDescribeMergeConflictsError
newBatchDescribeMergeConflictsError :: Text -> Text -> Text -> BatchDescribeMergeConflictsError
newBatchDescribeMergeConflictsError
  Text
pFilePath_
  Text
pExceptionName_
  Text
pMessage_ =
    BatchDescribeMergeConflictsError'
      { $sel:filePath:BatchDescribeMergeConflictsError' :: Text
filePath =
          Text
pFilePath_,
        $sel:exceptionName:BatchDescribeMergeConflictsError' :: Text
exceptionName = Text
pExceptionName_,
        $sel:message:BatchDescribeMergeConflictsError' :: Text
message = Text
pMessage_
      }

-- | The path to the file.
batchDescribeMergeConflictsError_filePath :: Lens.Lens' BatchDescribeMergeConflictsError Prelude.Text
batchDescribeMergeConflictsError_filePath :: Lens' BatchDescribeMergeConflictsError Text
batchDescribeMergeConflictsError_filePath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsError' {Text
filePath :: Text
$sel:filePath:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
filePath} -> Text
filePath) (\s :: BatchDescribeMergeConflictsError
s@BatchDescribeMergeConflictsError' {} Text
a -> BatchDescribeMergeConflictsError
s {$sel:filePath:BatchDescribeMergeConflictsError' :: Text
filePath = Text
a} :: BatchDescribeMergeConflictsError)

-- | The name of the exception.
batchDescribeMergeConflictsError_exceptionName :: Lens.Lens' BatchDescribeMergeConflictsError Prelude.Text
batchDescribeMergeConflictsError_exceptionName :: Lens' BatchDescribeMergeConflictsError Text
batchDescribeMergeConflictsError_exceptionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsError' {Text
exceptionName :: Text
$sel:exceptionName:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
exceptionName} -> Text
exceptionName) (\s :: BatchDescribeMergeConflictsError
s@BatchDescribeMergeConflictsError' {} Text
a -> BatchDescribeMergeConflictsError
s {$sel:exceptionName:BatchDescribeMergeConflictsError' :: Text
exceptionName = Text
a} :: BatchDescribeMergeConflictsError)

-- | The message provided by the exception.
batchDescribeMergeConflictsError_message :: Lens.Lens' BatchDescribeMergeConflictsError Prelude.Text
batchDescribeMergeConflictsError_message :: Lens' BatchDescribeMergeConflictsError Text
batchDescribeMergeConflictsError_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsError' {Text
message :: Text
$sel:message:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
message} -> Text
message) (\s :: BatchDescribeMergeConflictsError
s@BatchDescribeMergeConflictsError' {} Text
a -> BatchDescribeMergeConflictsError
s {$sel:message:BatchDescribeMergeConflictsError' :: Text
message = Text
a} :: BatchDescribeMergeConflictsError)

instance
  Data.FromJSON
    BatchDescribeMergeConflictsError
  where
  parseJSON :: Value -> Parser BatchDescribeMergeConflictsError
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchDescribeMergeConflictsError"
      ( \Object
x ->
          Text -> Text -> Text -> BatchDescribeMergeConflictsError
BatchDescribeMergeConflictsError'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"filePath")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"exceptionName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"message")
      )

instance
  Prelude.Hashable
    BatchDescribeMergeConflictsError
  where
  hashWithSalt :: Int -> BatchDescribeMergeConflictsError -> Int
hashWithSalt
    Int
_salt
    BatchDescribeMergeConflictsError' {Text
message :: Text
exceptionName :: Text
filePath :: Text
$sel:message:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
$sel:exceptionName:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
$sel:filePath:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
filePath
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
exceptionName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
message

instance
  Prelude.NFData
    BatchDescribeMergeConflictsError
  where
  rnf :: BatchDescribeMergeConflictsError -> ()
rnf BatchDescribeMergeConflictsError' {Text
message :: Text
exceptionName :: Text
filePath :: Text
$sel:message:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
$sel:exceptionName:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
$sel:filePath:BatchDescribeMergeConflictsError' :: BatchDescribeMergeConflictsError -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
filePath
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
exceptionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
message