{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CodeCommit.Types.BatchDescribeMergeConflictsError where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(BatchDescribeMergeConflictsError
 -> BatchDescribeMergeConflictsError -> Bool)
-> (BatchDescribeMergeConflictsError
    -> BatchDescribeMergeConflictsError -> Bool)
-> Eq BatchDescribeMergeConflictsError
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]
(Int -> ReadS BatchDescribeMergeConflictsError)
-> ReadS [BatchDescribeMergeConflictsError]
-> ReadPrec BatchDescribeMergeConflictsError
-> ReadPrec [BatchDescribeMergeConflictsError]
-> Read 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
(Int -> BatchDescribeMergeConflictsError -> ShowS)
-> (BatchDescribeMergeConflictsError -> String)
-> ([BatchDescribeMergeConflictsError] -> ShowS)
-> Show BatchDescribeMergeConflictsError
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.
 BatchDescribeMergeConflictsError
 -> Rep BatchDescribeMergeConflictsError x)
-> (forall x.
    Rep BatchDescribeMergeConflictsError x
    -> BatchDescribeMergeConflictsError)
-> Generic BatchDescribeMergeConflictsError
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' :: Text -> Text -> Text -> BatchDescribeMergeConflictsError
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 :: (Text -> f Text)
-> BatchDescribeMergeConflictsError
-> f BatchDescribeMergeConflictsError
batchDescribeMergeConflictsError_filePath = (BatchDescribeMergeConflictsError -> Text)
-> (BatchDescribeMergeConflictsError
    -> Text -> BatchDescribeMergeConflictsError)
-> Lens
     BatchDescribeMergeConflictsError
     BatchDescribeMergeConflictsError
     Text
     Text
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 :: (Text -> f Text)
-> BatchDescribeMergeConflictsError
-> f BatchDescribeMergeConflictsError
batchDescribeMergeConflictsError_exceptionName = (BatchDescribeMergeConflictsError -> Text)
-> (BatchDescribeMergeConflictsError
    -> Text -> BatchDescribeMergeConflictsError)
-> Lens
     BatchDescribeMergeConflictsError
     BatchDescribeMergeConflictsError
     Text
     Text
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 :: (Text -> f Text)
-> BatchDescribeMergeConflictsError
-> f BatchDescribeMergeConflictsError
batchDescribeMergeConflictsError_message = (BatchDescribeMergeConflictsError -> Text)
-> (BatchDescribeMergeConflictsError
    -> Text -> BatchDescribeMergeConflictsError)
-> Lens
     BatchDescribeMergeConflictsError
     BatchDescribeMergeConflictsError
     Text
     Text
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
  Core.FromJSON
    BatchDescribeMergeConflictsError
  where
  parseJSON :: Value -> Parser BatchDescribeMergeConflictsError
parseJSON =
    String
-> (Object -> Parser BatchDescribeMergeConflictsError)
-> Value
-> Parser BatchDescribeMergeConflictsError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchDescribeMergeConflictsError"
      ( \Object
x ->
          Text -> Text -> Text -> BatchDescribeMergeConflictsError
BatchDescribeMergeConflictsError'
            (Text -> Text -> Text -> BatchDescribeMergeConflictsError)
-> Parser Text
-> Parser (Text -> Text -> BatchDescribeMergeConflictsError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"filePath")
            Parser (Text -> Text -> BatchDescribeMergeConflictsError)
-> Parser Text -> Parser (Text -> BatchDescribeMergeConflictsError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"exceptionName")
            Parser (Text -> BatchDescribeMergeConflictsError)
-> Parser Text -> Parser BatchDescribeMergeConflictsError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"message")
      )

instance
  Prelude.Hashable
    BatchDescribeMergeConflictsError

instance
  Prelude.NFData
    BatchDescribeMergeConflictsError