{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.BatchDescribeMergeConflicts
-- 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)
--
-- Returns information about one or more merge conflicts in the attempted
-- merge of two commit specifiers using the squash or three-way merge
-- strategy.
module Amazonka.CodeCommit.BatchDescribeMergeConflicts
  ( -- * Creating a Request
    BatchDescribeMergeConflicts (..),
    newBatchDescribeMergeConflicts,

    -- * Request Lenses
    batchDescribeMergeConflicts_filePaths,
    batchDescribeMergeConflicts_conflictDetailLevel,
    batchDescribeMergeConflicts_nextToken,
    batchDescribeMergeConflicts_maxConflictFiles,
    batchDescribeMergeConflicts_maxMergeHunks,
    batchDescribeMergeConflicts_conflictResolutionStrategy,
    batchDescribeMergeConflicts_repositoryName,
    batchDescribeMergeConflicts_destinationCommitSpecifier,
    batchDescribeMergeConflicts_sourceCommitSpecifier,
    batchDescribeMergeConflicts_mergeOption,

    -- * Destructuring the Response
    BatchDescribeMergeConflictsResponse (..),
    newBatchDescribeMergeConflictsResponse,

    -- * Response Lenses
    batchDescribeMergeConflictsResponse_baseCommitId,
    batchDescribeMergeConflictsResponse_nextToken,
    batchDescribeMergeConflictsResponse_errors,
    batchDescribeMergeConflictsResponse_httpStatus,
    batchDescribeMergeConflictsResponse_conflicts,
    batchDescribeMergeConflictsResponse_destinationCommitId,
    batchDescribeMergeConflictsResponse_sourceCommitId,
  )
where

import Amazonka.CodeCommit.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newBatchDescribeMergeConflicts' smart constructor.
data BatchDescribeMergeConflicts = BatchDescribeMergeConflicts'
  { -- | The path of the target files used to describe the conflicts. If not
    -- specified, the default is all conflict files.
    BatchDescribeMergeConflicts -> Maybe [Text]
filePaths :: Prelude.Maybe [Prelude.Text],
    -- | The level of conflict detail to use. If unspecified, the default
    -- FILE_LEVEL is used, which returns a not-mergeable result if the same
    -- file has differences in both branches. If LINE_LEVEL is specified, a
    -- conflict is considered not mergeable if the same file in both branches
    -- has differences on the same line.
    BatchDescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
    -- | An enumeration token that, when provided in a request, returns the next
    -- batch of the results.
    BatchDescribeMergeConflicts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of files to include in the output.
    BatchDescribeMergeConflicts -> Maybe Int
maxConflictFiles :: Prelude.Maybe Prelude.Int,
    -- | The maximum number of merge hunks to include in the output.
    BatchDescribeMergeConflicts -> Maybe Int
maxMergeHunks :: Prelude.Maybe Prelude.Int,
    -- | Specifies which branch to use when resolving conflicts, or whether to
    -- attempt automatically merging two versions of a file. The default is
    -- NONE, which requires any conflicts to be resolved manually before the
    -- merge operation is successful.
    BatchDescribeMergeConflicts
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
    -- | The name of the repository that contains the merge conflicts you want to
    -- review.
    BatchDescribeMergeConflicts -> Text
repositoryName :: Prelude.Text,
    -- | The branch, tag, HEAD, or other fully qualified reference used to
    -- identify a commit (for example, a branch name or a full commit ID).
    BatchDescribeMergeConflicts -> Text
destinationCommitSpecifier :: Prelude.Text,
    -- | The branch, tag, HEAD, or other fully qualified reference used to
    -- identify a commit (for example, a branch name or a full commit ID).
    BatchDescribeMergeConflicts -> Text
sourceCommitSpecifier :: Prelude.Text,
    -- | The merge option or strategy you want to use to merge the code.
    BatchDescribeMergeConflicts -> MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
  }
  deriving (BatchDescribeMergeConflicts -> BatchDescribeMergeConflicts -> Bool
(BatchDescribeMergeConflicts
 -> BatchDescribeMergeConflicts -> Bool)
-> (BatchDescribeMergeConflicts
    -> BatchDescribeMergeConflicts -> Bool)
-> Eq BatchDescribeMergeConflicts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDescribeMergeConflicts -> BatchDescribeMergeConflicts -> Bool
$c/= :: BatchDescribeMergeConflicts -> BatchDescribeMergeConflicts -> Bool
== :: BatchDescribeMergeConflicts -> BatchDescribeMergeConflicts -> Bool
$c== :: BatchDescribeMergeConflicts -> BatchDescribeMergeConflicts -> Bool
Prelude.Eq, ReadPrec [BatchDescribeMergeConflicts]
ReadPrec BatchDescribeMergeConflicts
Int -> ReadS BatchDescribeMergeConflicts
ReadS [BatchDescribeMergeConflicts]
(Int -> ReadS BatchDescribeMergeConflicts)
-> ReadS [BatchDescribeMergeConflicts]
-> ReadPrec BatchDescribeMergeConflicts
-> ReadPrec [BatchDescribeMergeConflicts]
-> Read BatchDescribeMergeConflicts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDescribeMergeConflicts]
$creadListPrec :: ReadPrec [BatchDescribeMergeConflicts]
readPrec :: ReadPrec BatchDescribeMergeConflicts
$creadPrec :: ReadPrec BatchDescribeMergeConflicts
readList :: ReadS [BatchDescribeMergeConflicts]
$creadList :: ReadS [BatchDescribeMergeConflicts]
readsPrec :: Int -> ReadS BatchDescribeMergeConflicts
$creadsPrec :: Int -> ReadS BatchDescribeMergeConflicts
Prelude.Read, Int -> BatchDescribeMergeConflicts -> ShowS
[BatchDescribeMergeConflicts] -> ShowS
BatchDescribeMergeConflicts -> String
(Int -> BatchDescribeMergeConflicts -> ShowS)
-> (BatchDescribeMergeConflicts -> String)
-> ([BatchDescribeMergeConflicts] -> ShowS)
-> Show BatchDescribeMergeConflicts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDescribeMergeConflicts] -> ShowS
$cshowList :: [BatchDescribeMergeConflicts] -> ShowS
show :: BatchDescribeMergeConflicts -> String
$cshow :: BatchDescribeMergeConflicts -> String
showsPrec :: Int -> BatchDescribeMergeConflicts -> ShowS
$cshowsPrec :: Int -> BatchDescribeMergeConflicts -> ShowS
Prelude.Show, (forall x.
 BatchDescribeMergeConflicts -> Rep BatchDescribeMergeConflicts x)
-> (forall x.
    Rep BatchDescribeMergeConflicts x -> BatchDescribeMergeConflicts)
-> Generic BatchDescribeMergeConflicts
forall x.
Rep BatchDescribeMergeConflicts x -> BatchDescribeMergeConflicts
forall x.
BatchDescribeMergeConflicts -> Rep BatchDescribeMergeConflicts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDescribeMergeConflicts x -> BatchDescribeMergeConflicts
$cfrom :: forall x.
BatchDescribeMergeConflicts -> Rep BatchDescribeMergeConflicts x
Prelude.Generic)

-- |
-- Create a value of 'BatchDescribeMergeConflicts' 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:
--
-- 'filePaths', 'batchDescribeMergeConflicts_filePaths' - The path of the target files used to describe the conflicts. If not
-- specified, the default is all conflict files.
--
-- 'conflictDetailLevel', 'batchDescribeMergeConflicts_conflictDetailLevel' - The level of conflict detail to use. If unspecified, the default
-- FILE_LEVEL is used, which returns a not-mergeable result if the same
-- file has differences in both branches. If LINE_LEVEL is specified, a
-- conflict is considered not mergeable if the same file in both branches
-- has differences on the same line.
--
-- 'nextToken', 'batchDescribeMergeConflicts_nextToken' - An enumeration token that, when provided in a request, returns the next
-- batch of the results.
--
-- 'maxConflictFiles', 'batchDescribeMergeConflicts_maxConflictFiles' - The maximum number of files to include in the output.
--
-- 'maxMergeHunks', 'batchDescribeMergeConflicts_maxMergeHunks' - The maximum number of merge hunks to include in the output.
--
-- 'conflictResolutionStrategy', 'batchDescribeMergeConflicts_conflictResolutionStrategy' - Specifies which branch to use when resolving conflicts, or whether to
-- attempt automatically merging two versions of a file. The default is
-- NONE, which requires any conflicts to be resolved manually before the
-- merge operation is successful.
--
-- 'repositoryName', 'batchDescribeMergeConflicts_repositoryName' - The name of the repository that contains the merge conflicts you want to
-- review.
--
-- 'destinationCommitSpecifier', 'batchDescribeMergeConflicts_destinationCommitSpecifier' - The branch, tag, HEAD, or other fully qualified reference used to
-- identify a commit (for example, a branch name or a full commit ID).
--
-- 'sourceCommitSpecifier', 'batchDescribeMergeConflicts_sourceCommitSpecifier' - The branch, tag, HEAD, or other fully qualified reference used to
-- identify a commit (for example, a branch name or a full commit ID).
--
-- 'mergeOption', 'batchDescribeMergeConflicts_mergeOption' - The merge option or strategy you want to use to merge the code.
newBatchDescribeMergeConflicts ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'destinationCommitSpecifier'
  Prelude.Text ->
  -- | 'sourceCommitSpecifier'
  Prelude.Text ->
  -- | 'mergeOption'
  MergeOptionTypeEnum ->
  BatchDescribeMergeConflicts
newBatchDescribeMergeConflicts :: Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> BatchDescribeMergeConflicts
newBatchDescribeMergeConflicts
  Text
pRepositoryName_
  Text
pDestinationCommitSpecifier_
  Text
pSourceCommitSpecifier_
  MergeOptionTypeEnum
pMergeOption_ =
    BatchDescribeMergeConflicts' :: Maybe [Text]
-> Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe ConflictResolutionStrategyTypeEnum
-> Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> BatchDescribeMergeConflicts
BatchDescribeMergeConflicts'
      { $sel:filePaths:BatchDescribeMergeConflicts' :: Maybe [Text]
filePaths =
          Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictDetailLevel:BatchDescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:BatchDescribeMergeConflicts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxConflictFiles:BatchDescribeMergeConflicts' :: Maybe Int
maxConflictFiles = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:maxMergeHunks:BatchDescribeMergeConflicts' :: Maybe Int
maxMergeHunks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolutionStrategy:BatchDescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:BatchDescribeMergeConflicts' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:destinationCommitSpecifier:BatchDescribeMergeConflicts' :: Text
destinationCommitSpecifier =
          Text
pDestinationCommitSpecifier_,
        $sel:sourceCommitSpecifier:BatchDescribeMergeConflicts' :: Text
sourceCommitSpecifier =
          Text
pSourceCommitSpecifier_,
        $sel:mergeOption:BatchDescribeMergeConflicts' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
pMergeOption_
      }

-- | The path of the target files used to describe the conflicts. If not
-- specified, the default is all conflict files.
batchDescribeMergeConflicts_filePaths :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe [Prelude.Text])
batchDescribeMergeConflicts_filePaths :: (Maybe [Text] -> f (Maybe [Text]))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_filePaths = (BatchDescribeMergeConflicts -> Maybe [Text])
-> (BatchDescribeMergeConflicts
    -> Maybe [Text] -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe [Text]
filePaths :: Maybe [Text]
$sel:filePaths:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe [Text]
filePaths} -> Maybe [Text]
filePaths) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe [Text]
a -> BatchDescribeMergeConflicts
s {$sel:filePaths:BatchDescribeMergeConflicts' :: Maybe [Text]
filePaths = Maybe [Text]
a} :: BatchDescribeMergeConflicts) ((Maybe [Text] -> f (Maybe [Text]))
 -> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchDescribeMergeConflicts
-> f BatchDescribeMergeConflicts
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The level of conflict detail to use. If unspecified, the default
-- FILE_LEVEL is used, which returns a not-mergeable result if the same
-- file has differences in both branches. If LINE_LEVEL is specified, a
-- conflict is considered not mergeable if the same file in both branches
-- has differences on the same line.
batchDescribeMergeConflicts_conflictDetailLevel :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe ConflictDetailLevelTypeEnum)
batchDescribeMergeConflicts_conflictDetailLevel :: (Maybe ConflictDetailLevelTypeEnum
 -> f (Maybe ConflictDetailLevelTypeEnum))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_conflictDetailLevel = (BatchDescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum)
-> (BatchDescribeMergeConflicts
    -> Maybe ConflictDetailLevelTypeEnum
    -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe ConflictDetailLevelTypeEnum)
     (Maybe ConflictDetailLevelTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe ConflictDetailLevelTypeEnum
a -> BatchDescribeMergeConflicts
s {$sel:conflictDetailLevel:BatchDescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: BatchDescribeMergeConflicts)

-- | An enumeration token that, when provided in a request, returns the next
-- batch of the results.
batchDescribeMergeConflicts_nextToken :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe Prelude.Text)
batchDescribeMergeConflicts_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_nextToken = (BatchDescribeMergeConflicts -> Maybe Text)
-> (BatchDescribeMergeConflicts
    -> Maybe Text -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe Text
a -> BatchDescribeMergeConflicts
s {$sel:nextToken:BatchDescribeMergeConflicts' :: Maybe Text
nextToken = Maybe Text
a} :: BatchDescribeMergeConflicts)

-- | The maximum number of files to include in the output.
batchDescribeMergeConflicts_maxConflictFiles :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe Prelude.Int)
batchDescribeMergeConflicts_maxConflictFiles :: (Maybe Int -> f (Maybe Int))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_maxConflictFiles = (BatchDescribeMergeConflicts -> Maybe Int)
-> (BatchDescribeMergeConflicts
    -> Maybe Int -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe Int
maxConflictFiles :: Maybe Int
$sel:maxConflictFiles:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Int
maxConflictFiles} -> Maybe Int
maxConflictFiles) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe Int
a -> BatchDescribeMergeConflicts
s {$sel:maxConflictFiles:BatchDescribeMergeConflicts' :: Maybe Int
maxConflictFiles = Maybe Int
a} :: BatchDescribeMergeConflicts)

-- | The maximum number of merge hunks to include in the output.
batchDescribeMergeConflicts_maxMergeHunks :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe Prelude.Int)
batchDescribeMergeConflicts_maxMergeHunks :: (Maybe Int -> f (Maybe Int))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_maxMergeHunks = (BatchDescribeMergeConflicts -> Maybe Int)
-> (BatchDescribeMergeConflicts
    -> Maybe Int -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe Int
maxMergeHunks :: Maybe Int
$sel:maxMergeHunks:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Int
maxMergeHunks} -> Maybe Int
maxMergeHunks) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe Int
a -> BatchDescribeMergeConflicts
s {$sel:maxMergeHunks:BatchDescribeMergeConflicts' :: Maybe Int
maxMergeHunks = Maybe Int
a} :: BatchDescribeMergeConflicts)

-- | Specifies which branch to use when resolving conflicts, or whether to
-- attempt automatically merging two versions of a file. The default is
-- NONE, which requires any conflicts to be resolved manually before the
-- merge operation is successful.
batchDescribeMergeConflicts_conflictResolutionStrategy :: Lens.Lens' BatchDescribeMergeConflicts (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
batchDescribeMergeConflicts_conflictResolutionStrategy :: (Maybe ConflictResolutionStrategyTypeEnum
 -> f (Maybe ConflictResolutionStrategyTypeEnum))
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_conflictResolutionStrategy = (BatchDescribeMergeConflicts
 -> Maybe ConflictResolutionStrategyTypeEnum)
-> (BatchDescribeMergeConflicts
    -> Maybe ConflictResolutionStrategyTypeEnum
    -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     (Maybe ConflictResolutionStrategyTypeEnum)
     (Maybe ConflictResolutionStrategyTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Maybe ConflictResolutionStrategyTypeEnum
a -> BatchDescribeMergeConflicts
s {$sel:conflictResolutionStrategy:BatchDescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: BatchDescribeMergeConflicts)

-- | The name of the repository that contains the merge conflicts you want to
-- review.
batchDescribeMergeConflicts_repositoryName :: Lens.Lens' BatchDescribeMergeConflicts Prelude.Text
batchDescribeMergeConflicts_repositoryName :: (Text -> f Text)
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_repositoryName = (BatchDescribeMergeConflicts -> Text)
-> (BatchDescribeMergeConflicts
    -> Text -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts BatchDescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Text
repositoryName :: Text
$sel:repositoryName:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
repositoryName} -> Text
repositoryName) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Text
a -> BatchDescribeMergeConflicts
s {$sel:repositoryName:BatchDescribeMergeConflicts' :: Text
repositoryName = Text
a} :: BatchDescribeMergeConflicts)

-- | The branch, tag, HEAD, or other fully qualified reference used to
-- identify a commit (for example, a branch name or a full commit ID).
batchDescribeMergeConflicts_destinationCommitSpecifier :: Lens.Lens' BatchDescribeMergeConflicts Prelude.Text
batchDescribeMergeConflicts_destinationCommitSpecifier :: (Text -> f Text)
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_destinationCommitSpecifier = (BatchDescribeMergeConflicts -> Text)
-> (BatchDescribeMergeConflicts
    -> Text -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts BatchDescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Text
destinationCommitSpecifier :: Text
$sel:destinationCommitSpecifier:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
destinationCommitSpecifier} -> Text
destinationCommitSpecifier) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Text
a -> BatchDescribeMergeConflicts
s {$sel:destinationCommitSpecifier:BatchDescribeMergeConflicts' :: Text
destinationCommitSpecifier = Text
a} :: BatchDescribeMergeConflicts)

-- | The branch, tag, HEAD, or other fully qualified reference used to
-- identify a commit (for example, a branch name or a full commit ID).
batchDescribeMergeConflicts_sourceCommitSpecifier :: Lens.Lens' BatchDescribeMergeConflicts Prelude.Text
batchDescribeMergeConflicts_sourceCommitSpecifier :: (Text -> f Text)
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_sourceCommitSpecifier = (BatchDescribeMergeConflicts -> Text)
-> (BatchDescribeMergeConflicts
    -> Text -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts BatchDescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {Text
sourceCommitSpecifier :: Text
$sel:sourceCommitSpecifier:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
sourceCommitSpecifier} -> Text
sourceCommitSpecifier) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} Text
a -> BatchDescribeMergeConflicts
s {$sel:sourceCommitSpecifier:BatchDescribeMergeConflicts' :: Text
sourceCommitSpecifier = Text
a} :: BatchDescribeMergeConflicts)

-- | The merge option or strategy you want to use to merge the code.
batchDescribeMergeConflicts_mergeOption :: Lens.Lens' BatchDescribeMergeConflicts MergeOptionTypeEnum
batchDescribeMergeConflicts_mergeOption :: (MergeOptionTypeEnum -> f MergeOptionTypeEnum)
-> BatchDescribeMergeConflicts -> f BatchDescribeMergeConflicts
batchDescribeMergeConflicts_mergeOption = (BatchDescribeMergeConflicts -> MergeOptionTypeEnum)
-> (BatchDescribeMergeConflicts
    -> MergeOptionTypeEnum -> BatchDescribeMergeConflicts)
-> Lens
     BatchDescribeMergeConflicts
     BatchDescribeMergeConflicts
     MergeOptionTypeEnum
     MergeOptionTypeEnum
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflicts' {MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
$sel:mergeOption:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> MergeOptionTypeEnum
mergeOption} -> MergeOptionTypeEnum
mergeOption) (\s :: BatchDescribeMergeConflicts
s@BatchDescribeMergeConflicts' {} MergeOptionTypeEnum
a -> BatchDescribeMergeConflicts
s {$sel:mergeOption:BatchDescribeMergeConflicts' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
a} :: BatchDescribeMergeConflicts)

instance Core.AWSRequest BatchDescribeMergeConflicts where
  type
    AWSResponse BatchDescribeMergeConflicts =
      BatchDescribeMergeConflictsResponse
  request :: BatchDescribeMergeConflicts -> Request BatchDescribeMergeConflicts
request = Service
-> BatchDescribeMergeConflicts
-> Request BatchDescribeMergeConflicts
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDescribeMergeConflicts)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDescribeMergeConflicts))
-> Logger
-> Service
-> Proxy BatchDescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchDescribeMergeConflicts)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [BatchDescribeMergeConflictsError]
-> Int
-> [Conflict]
-> Text
-> Text
-> BatchDescribeMergeConflictsResponse
BatchDescribeMergeConflictsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [BatchDescribeMergeConflictsError]
 -> Int
 -> [Conflict]
 -> Text
 -> Text
 -> BatchDescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [BatchDescribeMergeConflictsError]
      -> Int
      -> [Conflict]
      -> Text
      -> Text
      -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"baseCommitId")
            Either
  String
  (Maybe Text
   -> Maybe [BatchDescribeMergeConflictsError]
   -> Int
   -> [Conflict]
   -> Text
   -> Text
   -> BatchDescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [BatchDescribeMergeConflictsError]
      -> Int
      -> [Conflict]
      -> Text
      -> Text
      -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either
  String
  (Maybe [BatchDescribeMergeConflictsError]
   -> Int
   -> [Conflict]
   -> Text
   -> Text
   -> BatchDescribeMergeConflictsResponse)
-> Either String (Maybe [BatchDescribeMergeConflictsError])
-> Either
     String
     (Int
      -> [Conflict]
      -> Text
      -> Text
      -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [BatchDescribeMergeConflictsError]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"errors" Either String (Maybe (Maybe [BatchDescribeMergeConflictsError]))
-> Maybe [BatchDescribeMergeConflictsError]
-> Either String (Maybe [BatchDescribeMergeConflictsError])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BatchDescribeMergeConflictsError]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> [Conflict]
   -> Text
   -> Text
   -> BatchDescribeMergeConflictsResponse)
-> Either String Int
-> Either
     String
     ([Conflict] -> Text -> Text -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([Conflict] -> Text -> Text -> BatchDescribeMergeConflictsResponse)
-> Either String [Conflict]
-> Either
     String (Text -> Text -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Conflict])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"conflicts" Either String (Maybe [Conflict])
-> [Conflict] -> Either String [Conflict]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Conflict]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Text -> Text -> BatchDescribeMergeConflictsResponse)
-> Either String Text
-> Either String (Text -> BatchDescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationCommitId")
            Either String (Text -> BatchDescribeMergeConflictsResponse)
-> Either String Text
-> Either String BatchDescribeMergeConflictsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"sourceCommitId")
      )

instance Prelude.Hashable BatchDescribeMergeConflicts

instance Prelude.NFData BatchDescribeMergeConflicts

instance Core.ToHeaders BatchDescribeMergeConflicts where
  toHeaders :: BatchDescribeMergeConflicts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchDescribeMergeConflicts -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeCommit_20150413.BatchDescribeMergeConflicts" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON BatchDescribeMergeConflicts where
  toJSON :: BatchDescribeMergeConflicts -> Value
toJSON BatchDescribeMergeConflicts' {Maybe Int
Maybe [Text]
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Text
MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
sourceCommitSpecifier :: Text
destinationCommitSpecifier :: Text
repositoryName :: Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
maxMergeHunks :: Maybe Int
maxConflictFiles :: Maybe Int
nextToken :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
filePaths :: Maybe [Text]
$sel:mergeOption:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> MergeOptionTypeEnum
$sel:sourceCommitSpecifier:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
$sel:destinationCommitSpecifier:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
$sel:repositoryName:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Text
$sel:conflictResolutionStrategy:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts
-> Maybe ConflictResolutionStrategyTypeEnum
$sel:maxMergeHunks:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Int
$sel:maxConflictFiles:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Int
$sel:nextToken:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe Text
$sel:conflictDetailLevel:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
$sel:filePaths:BatchDescribeMergeConflicts' :: BatchDescribeMergeConflicts -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filePaths" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
filePaths,
            (Text
"conflictDetailLevel" Text -> ConflictDetailLevelTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConflictDetailLevelTypeEnum -> Pair)
-> Maybe ConflictDetailLevelTypeEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel,
            (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxConflictFiles" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxConflictFiles,
            (Text
"maxMergeHunks" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxMergeHunks,
            (Text
"conflictResolutionStrategy" Text -> ConflictResolutionStrategyTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConflictResolutionStrategyTypeEnum -> Pair)
-> Maybe ConflictResolutionStrategyTypeEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"destinationCommitSpecifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationCommitSpecifier
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"sourceCommitSpecifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceCommitSpecifier
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"mergeOption" Text -> MergeOptionTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MergeOptionTypeEnum
mergeOption)
          ]
      )

instance Core.ToPath BatchDescribeMergeConflicts where
  toPath :: BatchDescribeMergeConflicts -> ByteString
toPath = ByteString -> BatchDescribeMergeConflicts -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery BatchDescribeMergeConflicts where
  toQuery :: BatchDescribeMergeConflicts -> QueryString
toQuery = QueryString -> BatchDescribeMergeConflicts -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newBatchDescribeMergeConflictsResponse' smart constructor.
data BatchDescribeMergeConflictsResponse = BatchDescribeMergeConflictsResponse'
  { -- | The commit ID of the merge base.
    BatchDescribeMergeConflictsResponse -> Maybe Text
baseCommitId :: Prelude.Maybe Prelude.Text,
    -- | An enumeration token that can be used in a request to return the next
    -- batch of the results.
    BatchDescribeMergeConflictsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of any errors returned while describing the merge conflicts for
    -- each file.
    BatchDescribeMergeConflictsResponse
-> Maybe [BatchDescribeMergeConflictsError]
errors :: Prelude.Maybe [BatchDescribeMergeConflictsError],
    -- | The response's http status code.
    BatchDescribeMergeConflictsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of conflicts for each file, including the conflict metadata and
    -- the hunks of the differences between the files.
    BatchDescribeMergeConflictsResponse -> [Conflict]
conflicts :: [Conflict],
    -- | The commit ID of the destination commit specifier that was used in the
    -- merge evaluation.
    BatchDescribeMergeConflictsResponse -> Text
destinationCommitId :: Prelude.Text,
    -- | The commit ID of the source commit specifier that was used in the merge
    -- evaluation.
    BatchDescribeMergeConflictsResponse -> Text
sourceCommitId :: Prelude.Text
  }
  deriving (BatchDescribeMergeConflictsResponse
-> BatchDescribeMergeConflictsResponse -> Bool
(BatchDescribeMergeConflictsResponse
 -> BatchDescribeMergeConflictsResponse -> Bool)
-> (BatchDescribeMergeConflictsResponse
    -> BatchDescribeMergeConflictsResponse -> Bool)
-> Eq BatchDescribeMergeConflictsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDescribeMergeConflictsResponse
-> BatchDescribeMergeConflictsResponse -> Bool
$c/= :: BatchDescribeMergeConflictsResponse
-> BatchDescribeMergeConflictsResponse -> Bool
== :: BatchDescribeMergeConflictsResponse
-> BatchDescribeMergeConflictsResponse -> Bool
$c== :: BatchDescribeMergeConflictsResponse
-> BatchDescribeMergeConflictsResponse -> Bool
Prelude.Eq, ReadPrec [BatchDescribeMergeConflictsResponse]
ReadPrec BatchDescribeMergeConflictsResponse
Int -> ReadS BatchDescribeMergeConflictsResponse
ReadS [BatchDescribeMergeConflictsResponse]
(Int -> ReadS BatchDescribeMergeConflictsResponse)
-> ReadS [BatchDescribeMergeConflictsResponse]
-> ReadPrec BatchDescribeMergeConflictsResponse
-> ReadPrec [BatchDescribeMergeConflictsResponse]
-> Read BatchDescribeMergeConflictsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDescribeMergeConflictsResponse]
$creadListPrec :: ReadPrec [BatchDescribeMergeConflictsResponse]
readPrec :: ReadPrec BatchDescribeMergeConflictsResponse
$creadPrec :: ReadPrec BatchDescribeMergeConflictsResponse
readList :: ReadS [BatchDescribeMergeConflictsResponse]
$creadList :: ReadS [BatchDescribeMergeConflictsResponse]
readsPrec :: Int -> ReadS BatchDescribeMergeConflictsResponse
$creadsPrec :: Int -> ReadS BatchDescribeMergeConflictsResponse
Prelude.Read, Int -> BatchDescribeMergeConflictsResponse -> ShowS
[BatchDescribeMergeConflictsResponse] -> ShowS
BatchDescribeMergeConflictsResponse -> String
(Int -> BatchDescribeMergeConflictsResponse -> ShowS)
-> (BatchDescribeMergeConflictsResponse -> String)
-> ([BatchDescribeMergeConflictsResponse] -> ShowS)
-> Show BatchDescribeMergeConflictsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDescribeMergeConflictsResponse] -> ShowS
$cshowList :: [BatchDescribeMergeConflictsResponse] -> ShowS
show :: BatchDescribeMergeConflictsResponse -> String
$cshow :: BatchDescribeMergeConflictsResponse -> String
showsPrec :: Int -> BatchDescribeMergeConflictsResponse -> ShowS
$cshowsPrec :: Int -> BatchDescribeMergeConflictsResponse -> ShowS
Prelude.Show, (forall x.
 BatchDescribeMergeConflictsResponse
 -> Rep BatchDescribeMergeConflictsResponse x)
-> (forall x.
    Rep BatchDescribeMergeConflictsResponse x
    -> BatchDescribeMergeConflictsResponse)
-> Generic BatchDescribeMergeConflictsResponse
forall x.
Rep BatchDescribeMergeConflictsResponse x
-> BatchDescribeMergeConflictsResponse
forall x.
BatchDescribeMergeConflictsResponse
-> Rep BatchDescribeMergeConflictsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDescribeMergeConflictsResponse x
-> BatchDescribeMergeConflictsResponse
$cfrom :: forall x.
BatchDescribeMergeConflictsResponse
-> Rep BatchDescribeMergeConflictsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDescribeMergeConflictsResponse' 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:
--
-- 'baseCommitId', 'batchDescribeMergeConflictsResponse_baseCommitId' - The commit ID of the merge base.
--
-- 'nextToken', 'batchDescribeMergeConflictsResponse_nextToken' - An enumeration token that can be used in a request to return the next
-- batch of the results.
--
-- 'errors', 'batchDescribeMergeConflictsResponse_errors' - A list of any errors returned while describing the merge conflicts for
-- each file.
--
-- 'httpStatus', 'batchDescribeMergeConflictsResponse_httpStatus' - The response's http status code.
--
-- 'conflicts', 'batchDescribeMergeConflictsResponse_conflicts' - A list of conflicts for each file, including the conflict metadata and
-- the hunks of the differences between the files.
--
-- 'destinationCommitId', 'batchDescribeMergeConflictsResponse_destinationCommitId' - The commit ID of the destination commit specifier that was used in the
-- merge evaluation.
--
-- 'sourceCommitId', 'batchDescribeMergeConflictsResponse_sourceCommitId' - The commit ID of the source commit specifier that was used in the merge
-- evaluation.
newBatchDescribeMergeConflictsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'destinationCommitId'
  Prelude.Text ->
  -- | 'sourceCommitId'
  Prelude.Text ->
  BatchDescribeMergeConflictsResponse
newBatchDescribeMergeConflictsResponse :: Int -> Text -> Text -> BatchDescribeMergeConflictsResponse
newBatchDescribeMergeConflictsResponse
  Int
pHttpStatus_
  Text
pDestinationCommitId_
  Text
pSourceCommitId_ =
    BatchDescribeMergeConflictsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [BatchDescribeMergeConflictsError]
-> Int
-> [Conflict]
-> Text
-> Text
-> BatchDescribeMergeConflictsResponse
BatchDescribeMergeConflictsResponse'
      { $sel:baseCommitId:BatchDescribeMergeConflictsResponse' :: Maybe Text
baseCommitId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:BatchDescribeMergeConflictsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:errors:BatchDescribeMergeConflictsResponse' :: Maybe [BatchDescribeMergeConflictsError]
errors = Maybe [BatchDescribeMergeConflictsError]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:BatchDescribeMergeConflictsResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:conflicts:BatchDescribeMergeConflictsResponse' :: [Conflict]
conflicts = [Conflict]
forall a. Monoid a => a
Prelude.mempty,
        $sel:destinationCommitId:BatchDescribeMergeConflictsResponse' :: Text
destinationCommitId =
          Text
pDestinationCommitId_,
        $sel:sourceCommitId:BatchDescribeMergeConflictsResponse' :: Text
sourceCommitId = Text
pSourceCommitId_
      }

-- | The commit ID of the merge base.
batchDescribeMergeConflictsResponse_baseCommitId :: Lens.Lens' BatchDescribeMergeConflictsResponse (Prelude.Maybe Prelude.Text)
batchDescribeMergeConflictsResponse_baseCommitId :: (Maybe Text -> f (Maybe Text))
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_baseCommitId = (BatchDescribeMergeConflictsResponse -> Maybe Text)
-> (BatchDescribeMergeConflictsResponse
    -> Maybe Text -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Maybe Text
baseCommitId :: Maybe Text
$sel:baseCommitId:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> Maybe Text
baseCommitId} -> Maybe Text
baseCommitId) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Maybe Text
a -> BatchDescribeMergeConflictsResponse
s {$sel:baseCommitId:BatchDescribeMergeConflictsResponse' :: Maybe Text
baseCommitId = Maybe Text
a} :: BatchDescribeMergeConflictsResponse)

-- | An enumeration token that can be used in a request to return the next
-- batch of the results.
batchDescribeMergeConflictsResponse_nextToken :: Lens.Lens' BatchDescribeMergeConflictsResponse (Prelude.Maybe Prelude.Text)
batchDescribeMergeConflictsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_nextToken = (BatchDescribeMergeConflictsResponse -> Maybe Text)
-> (BatchDescribeMergeConflictsResponse
    -> Maybe Text -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Maybe Text
a -> BatchDescribeMergeConflictsResponse
s {$sel:nextToken:BatchDescribeMergeConflictsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: BatchDescribeMergeConflictsResponse)

-- | A list of any errors returned while describing the merge conflicts for
-- each file.
batchDescribeMergeConflictsResponse_errors :: Lens.Lens' BatchDescribeMergeConflictsResponse (Prelude.Maybe [BatchDescribeMergeConflictsError])
batchDescribeMergeConflictsResponse_errors :: (Maybe [BatchDescribeMergeConflictsError]
 -> f (Maybe [BatchDescribeMergeConflictsError]))
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_errors = (BatchDescribeMergeConflictsResponse
 -> Maybe [BatchDescribeMergeConflictsError])
-> (BatchDescribeMergeConflictsResponse
    -> Maybe [BatchDescribeMergeConflictsError]
    -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     (Maybe [BatchDescribeMergeConflictsError])
     (Maybe [BatchDescribeMergeConflictsError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Maybe [BatchDescribeMergeConflictsError]
errors :: Maybe [BatchDescribeMergeConflictsError]
$sel:errors:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse
-> Maybe [BatchDescribeMergeConflictsError]
errors} -> Maybe [BatchDescribeMergeConflictsError]
errors) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Maybe [BatchDescribeMergeConflictsError]
a -> BatchDescribeMergeConflictsResponse
s {$sel:errors:BatchDescribeMergeConflictsResponse' :: Maybe [BatchDescribeMergeConflictsError]
errors = Maybe [BatchDescribeMergeConflictsError]
a} :: BatchDescribeMergeConflictsResponse) ((Maybe [BatchDescribeMergeConflictsError]
  -> f (Maybe [BatchDescribeMergeConflictsError]))
 -> BatchDescribeMergeConflictsResponse
 -> f BatchDescribeMergeConflictsResponse)
-> ((Maybe [BatchDescribeMergeConflictsError]
     -> f (Maybe [BatchDescribeMergeConflictsError]))
    -> Maybe [BatchDescribeMergeConflictsError]
    -> f (Maybe [BatchDescribeMergeConflictsError]))
-> (Maybe [BatchDescribeMergeConflictsError]
    -> f (Maybe [BatchDescribeMergeConflictsError]))
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
-> Iso
     (Maybe [BatchDescribeMergeConflictsError])
     (Maybe [BatchDescribeMergeConflictsError])
     (Maybe [BatchDescribeMergeConflictsError])
     (Maybe [BatchDescribeMergeConflictsError])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
  [BatchDescribeMergeConflictsError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
batchDescribeMergeConflictsResponse_httpStatus :: Lens.Lens' BatchDescribeMergeConflictsResponse Prelude.Int
batchDescribeMergeConflictsResponse_httpStatus :: (Int -> f Int)
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_httpStatus = (BatchDescribeMergeConflictsResponse -> Int)
-> (BatchDescribeMergeConflictsResponse
    -> Int -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Int
a -> BatchDescribeMergeConflictsResponse
s {$sel:httpStatus:BatchDescribeMergeConflictsResponse' :: Int
httpStatus = Int
a} :: BatchDescribeMergeConflictsResponse)

-- | A list of conflicts for each file, including the conflict metadata and
-- the hunks of the differences between the files.
batchDescribeMergeConflictsResponse_conflicts :: Lens.Lens' BatchDescribeMergeConflictsResponse [Conflict]
batchDescribeMergeConflictsResponse_conflicts :: ([Conflict] -> f [Conflict])
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_conflicts = (BatchDescribeMergeConflictsResponse -> [Conflict])
-> (BatchDescribeMergeConflictsResponse
    -> [Conflict] -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     [Conflict]
     [Conflict]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {[Conflict]
conflicts :: [Conflict]
$sel:conflicts:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> [Conflict]
conflicts} -> [Conflict]
conflicts) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} [Conflict]
a -> BatchDescribeMergeConflictsResponse
s {$sel:conflicts:BatchDescribeMergeConflictsResponse' :: [Conflict]
conflicts = [Conflict]
a} :: BatchDescribeMergeConflictsResponse) (([Conflict] -> f [Conflict])
 -> BatchDescribeMergeConflictsResponse
 -> f BatchDescribeMergeConflictsResponse)
-> (([Conflict] -> f [Conflict]) -> [Conflict] -> f [Conflict])
-> ([Conflict] -> f [Conflict])
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Conflict] -> f [Conflict]) -> [Conflict] -> f [Conflict]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The commit ID of the destination commit specifier that was used in the
-- merge evaluation.
batchDescribeMergeConflictsResponse_destinationCommitId :: Lens.Lens' BatchDescribeMergeConflictsResponse Prelude.Text
batchDescribeMergeConflictsResponse_destinationCommitId :: (Text -> f Text)
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_destinationCommitId = (BatchDescribeMergeConflictsResponse -> Text)
-> (BatchDescribeMergeConflictsResponse
    -> Text -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Text
destinationCommitId :: Text
$sel:destinationCommitId:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> Text
destinationCommitId} -> Text
destinationCommitId) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Text
a -> BatchDescribeMergeConflictsResponse
s {$sel:destinationCommitId:BatchDescribeMergeConflictsResponse' :: Text
destinationCommitId = Text
a} :: BatchDescribeMergeConflictsResponse)

-- | The commit ID of the source commit specifier that was used in the merge
-- evaluation.
batchDescribeMergeConflictsResponse_sourceCommitId :: Lens.Lens' BatchDescribeMergeConflictsResponse Prelude.Text
batchDescribeMergeConflictsResponse_sourceCommitId :: (Text -> f Text)
-> BatchDescribeMergeConflictsResponse
-> f BatchDescribeMergeConflictsResponse
batchDescribeMergeConflictsResponse_sourceCommitId = (BatchDescribeMergeConflictsResponse -> Text)
-> (BatchDescribeMergeConflictsResponse
    -> Text -> BatchDescribeMergeConflictsResponse)
-> Lens
     BatchDescribeMergeConflictsResponse
     BatchDescribeMergeConflictsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDescribeMergeConflictsResponse' {Text
sourceCommitId :: Text
$sel:sourceCommitId:BatchDescribeMergeConflictsResponse' :: BatchDescribeMergeConflictsResponse -> Text
sourceCommitId} -> Text
sourceCommitId) (\s :: BatchDescribeMergeConflictsResponse
s@BatchDescribeMergeConflictsResponse' {} Text
a -> BatchDescribeMergeConflictsResponse
s {$sel:sourceCommitId:BatchDescribeMergeConflictsResponse' :: Text
sourceCommitId = Text
a} :: BatchDescribeMergeConflictsResponse)

instance
  Prelude.NFData
    BatchDescribeMergeConflictsResponse