{-# 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.DescribeMergeConflicts
-- 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. If the merge option for the attempted merge is specified as
-- FAST_FORWARD_MERGE, an exception is thrown.
module Amazonka.CodeCommit.DescribeMergeConflicts
  ( -- * Creating a Request
    DescribeMergeConflicts (..),
    newDescribeMergeConflicts,

    -- * Request Lenses
    describeMergeConflicts_conflictDetailLevel,
    describeMergeConflicts_nextToken,
    describeMergeConflicts_maxMergeHunks,
    describeMergeConflicts_conflictResolutionStrategy,
    describeMergeConflicts_repositoryName,
    describeMergeConflicts_destinationCommitSpecifier,
    describeMergeConflicts_sourceCommitSpecifier,
    describeMergeConflicts_mergeOption,
    describeMergeConflicts_filePath,

    -- * Destructuring the Response
    DescribeMergeConflictsResponse (..),
    newDescribeMergeConflictsResponse,

    -- * Response Lenses
    describeMergeConflictsResponse_baseCommitId,
    describeMergeConflictsResponse_nextToken,
    describeMergeConflictsResponse_httpStatus,
    describeMergeConflictsResponse_conflictMetadata,
    describeMergeConflictsResponse_mergeHunks,
    describeMergeConflictsResponse_destinationCommitId,
    describeMergeConflictsResponse_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:/ 'newDescribeMergeConflicts' smart constructor.
data DescribeMergeConflicts = DescribeMergeConflicts'
  { -- | 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.
    DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
    -- | An enumeration token that, when provided in a request, returns the next
    -- batch of the results.
    DescribeMergeConflicts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of merge hunks to include in the output.
    DescribeMergeConflicts -> 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.
    DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
    -- | The name of the repository where you want to get information about a
    -- merge conflict.
    DescribeMergeConflicts -> 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).
    DescribeMergeConflicts -> 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).
    DescribeMergeConflicts -> Text
sourceCommitSpecifier :: Prelude.Text,
    -- | The merge option or strategy you want to use to merge the code.
    DescribeMergeConflicts -> MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum,
    -- | The path of the target files used to describe the conflicts.
    DescribeMergeConflicts -> Text
filePath :: Prelude.Text
  }
  deriving (DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
(DescribeMergeConflicts -> DescribeMergeConflicts -> Bool)
-> (DescribeMergeConflicts -> DescribeMergeConflicts -> Bool)
-> Eq DescribeMergeConflicts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
$c/= :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
== :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
$c== :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
Prelude.Eq, ReadPrec [DescribeMergeConflicts]
ReadPrec DescribeMergeConflicts
Int -> ReadS DescribeMergeConflicts
ReadS [DescribeMergeConflicts]
(Int -> ReadS DescribeMergeConflicts)
-> ReadS [DescribeMergeConflicts]
-> ReadPrec DescribeMergeConflicts
-> ReadPrec [DescribeMergeConflicts]
-> Read DescribeMergeConflicts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMergeConflicts]
$creadListPrec :: ReadPrec [DescribeMergeConflicts]
readPrec :: ReadPrec DescribeMergeConflicts
$creadPrec :: ReadPrec DescribeMergeConflicts
readList :: ReadS [DescribeMergeConflicts]
$creadList :: ReadS [DescribeMergeConflicts]
readsPrec :: Int -> ReadS DescribeMergeConflicts
$creadsPrec :: Int -> ReadS DescribeMergeConflicts
Prelude.Read, Int -> DescribeMergeConflicts -> ShowS
[DescribeMergeConflicts] -> ShowS
DescribeMergeConflicts -> String
(Int -> DescribeMergeConflicts -> ShowS)
-> (DescribeMergeConflicts -> String)
-> ([DescribeMergeConflicts] -> ShowS)
-> Show DescribeMergeConflicts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMergeConflicts] -> ShowS
$cshowList :: [DescribeMergeConflicts] -> ShowS
show :: DescribeMergeConflicts -> String
$cshow :: DescribeMergeConflicts -> String
showsPrec :: Int -> DescribeMergeConflicts -> ShowS
$cshowsPrec :: Int -> DescribeMergeConflicts -> ShowS
Prelude.Show, (forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x)
-> (forall x.
    Rep DescribeMergeConflicts x -> DescribeMergeConflicts)
-> Generic DescribeMergeConflicts
forall x. Rep DescribeMergeConflicts x -> DescribeMergeConflicts
forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeMergeConflicts x -> DescribeMergeConflicts
$cfrom :: forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMergeConflicts' 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:
--
-- 'conflictDetailLevel', 'describeMergeConflicts_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', 'describeMergeConflicts_nextToken' - An enumeration token that, when provided in a request, returns the next
-- batch of the results.
--
-- 'maxMergeHunks', 'describeMergeConflicts_maxMergeHunks' - The maximum number of merge hunks to include in the output.
--
-- 'conflictResolutionStrategy', 'describeMergeConflicts_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', 'describeMergeConflicts_repositoryName' - The name of the repository where you want to get information about a
-- merge conflict.
--
-- 'destinationCommitSpecifier', 'describeMergeConflicts_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', 'describeMergeConflicts_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', 'describeMergeConflicts_mergeOption' - The merge option or strategy you want to use to merge the code.
--
-- 'filePath', 'describeMergeConflicts_filePath' - The path of the target files used to describe the conflicts.
newDescribeMergeConflicts ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'destinationCommitSpecifier'
  Prelude.Text ->
  -- | 'sourceCommitSpecifier'
  Prelude.Text ->
  -- | 'mergeOption'
  MergeOptionTypeEnum ->
  -- | 'filePath'
  Prelude.Text ->
  DescribeMergeConflicts
newDescribeMergeConflicts :: Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> Text
-> DescribeMergeConflicts
newDescribeMergeConflicts
  Text
pRepositoryName_
  Text
pDestinationCommitSpecifier_
  Text
pSourceCommitSpecifier_
  MergeOptionTypeEnum
pMergeOption_
  Text
pFilePath_ =
    DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe Int
-> Maybe ConflictResolutionStrategyTypeEnum
-> Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> Text
-> DescribeMergeConflicts
DescribeMergeConflicts'
      { $sel:conflictDetailLevel:DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel =
          Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeMergeConflicts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxMergeHunks:DescribeMergeConflicts' :: Maybe Int
maxMergeHunks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolutionStrategy:DescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:DescribeMergeConflicts' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:destinationCommitSpecifier:DescribeMergeConflicts' :: Text
destinationCommitSpecifier =
          Text
pDestinationCommitSpecifier_,
        $sel:sourceCommitSpecifier:DescribeMergeConflicts' :: Text
sourceCommitSpecifier = Text
pSourceCommitSpecifier_,
        $sel:mergeOption:DescribeMergeConflicts' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
pMergeOption_,
        $sel:filePath:DescribeMergeConflicts' :: Text
filePath = Text
pFilePath_
      }

-- | 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.
describeMergeConflicts_conflictDetailLevel :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe ConflictDetailLevelTypeEnum)
describeMergeConflicts_conflictDetailLevel :: (Maybe ConflictDetailLevelTypeEnum
 -> f (Maybe ConflictDetailLevelTypeEnum))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_conflictDetailLevel = (DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum)
-> (DescribeMergeConflicts
    -> Maybe ConflictDetailLevelTypeEnum -> DescribeMergeConflicts)
-> Lens
     DescribeMergeConflicts
     DescribeMergeConflicts
     (Maybe ConflictDetailLevelTypeEnum)
     (Maybe ConflictDetailLevelTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe ConflictDetailLevelTypeEnum
a -> DescribeMergeConflicts
s {$sel:conflictDetailLevel:DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: DescribeMergeConflicts)

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

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

-- | 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.
describeMergeConflicts_conflictResolutionStrategy :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
describeMergeConflicts_conflictResolutionStrategy :: (Maybe ConflictResolutionStrategyTypeEnum
 -> f (Maybe ConflictResolutionStrategyTypeEnum))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_conflictResolutionStrategy = (DescribeMergeConflicts
 -> Maybe ConflictResolutionStrategyTypeEnum)
-> (DescribeMergeConflicts
    -> Maybe ConflictResolutionStrategyTypeEnum
    -> DescribeMergeConflicts)
-> Lens
     DescribeMergeConflicts
     DescribeMergeConflicts
     (Maybe ConflictResolutionStrategyTypeEnum)
     (Maybe ConflictResolutionStrategyTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe ConflictResolutionStrategyTypeEnum
a -> DescribeMergeConflicts
s {$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: DescribeMergeConflicts)

-- | The name of the repository where you want to get information about a
-- merge conflict.
describeMergeConflicts_repositoryName :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_repositoryName :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_repositoryName = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
repositoryName :: Text
$sel:repositoryName:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
repositoryName} -> Text
repositoryName) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:repositoryName:DescribeMergeConflicts' :: Text
repositoryName = Text
a} :: DescribeMergeConflicts)

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

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

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

-- | The path of the target files used to describe the conflicts.
describeMergeConflicts_filePath :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_filePath :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_filePath = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
filePath :: Text
$sel:filePath:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
filePath} -> Text
filePath) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:filePath:DescribeMergeConflicts' :: Text
filePath = Text
a} :: DescribeMergeConflicts)

instance Core.AWSRequest DescribeMergeConflicts where
  type
    AWSResponse DescribeMergeConflicts =
      DescribeMergeConflictsResponse
  request :: DescribeMergeConflicts -> Request DescribeMergeConflicts
request = Service -> DescribeMergeConflicts -> Request DescribeMergeConflicts
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMergeConflicts)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeMergeConflicts))
-> Logger
-> Service
-> Proxy DescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMergeConflicts)))
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
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse
DescribeMergeConflictsResponse'
            (Maybe Text
 -> Maybe Text
 -> Int
 -> ConflictMetadata
 -> [MergeHunk]
 -> Text
 -> Text
 -> DescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Int
      -> ConflictMetadata
      -> [MergeHunk]
      -> Text
      -> Text
      -> DescribeMergeConflictsResponse)
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
   -> Int
   -> ConflictMetadata
   -> [MergeHunk]
   -> Text
   -> Text
   -> DescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> ConflictMetadata
      -> [MergeHunk]
      -> Text
      -> Text
      -> DescribeMergeConflictsResponse)
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
  (Int
   -> ConflictMetadata
   -> [MergeHunk]
   -> Text
   -> Text
   -> DescribeMergeConflictsResponse)
-> Either String Int
-> Either
     String
     (ConflictMetadata
      -> [MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
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
  (ConflictMetadata
   -> [MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
-> Either String ConflictMetadata
-> Either
     String
     ([MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ConflictMetadata
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"conflictMetadata")
            Either
  String
  ([MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
-> Either String [MergeHunk]
-> Either String (Text -> Text -> DescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [MergeHunk])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"mergeHunks" Either String (Maybe [MergeHunk])
-> [MergeHunk] -> Either String [MergeHunk]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [MergeHunk]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Text -> Text -> DescribeMergeConflictsResponse)
-> Either String Text
-> Either String (Text -> DescribeMergeConflictsResponse)
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 -> DescribeMergeConflictsResponse)
-> Either String Text
-> Either String DescribeMergeConflictsResponse
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 DescribeMergeConflicts

instance Prelude.NFData DescribeMergeConflicts

instance Core.ToHeaders DescribeMergeConflicts where
  toHeaders :: DescribeMergeConflicts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeMergeConflicts -> 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.DescribeMergeConflicts" ::
                          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 DescribeMergeConflicts where
  toJSON :: DescribeMergeConflicts -> Value
toJSON DescribeMergeConflicts' {Maybe Int
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Text
MergeOptionTypeEnum
filePath :: Text
mergeOption :: MergeOptionTypeEnum
sourceCommitSpecifier :: Text
destinationCommitSpecifier :: Text
repositoryName :: Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
maxMergeHunks :: Maybe Int
nextToken :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:filePath:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:mergeOption:DescribeMergeConflicts' :: DescribeMergeConflicts -> MergeOptionTypeEnum
$sel:sourceCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:destinationCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:repositoryName:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
$sel:maxMergeHunks:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Int
$sel:nextToken:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Text
$sel:conflictDetailLevel:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"filePath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
filePath)
          ]
      )

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

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

-- | /See:/ 'newDescribeMergeConflictsResponse' smart constructor.
data DescribeMergeConflictsResponse = DescribeMergeConflictsResponse'
  { -- | The commit ID of the merge base.
    DescribeMergeConflictsResponse -> 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.
    DescribeMergeConflictsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeMergeConflictsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Contains metadata about the conflicts found in the merge.
    DescribeMergeConflictsResponse -> ConflictMetadata
conflictMetadata :: ConflictMetadata,
    -- | A list of merge hunks of the differences between the files or lines.
    DescribeMergeConflictsResponse -> [MergeHunk]
mergeHunks :: [MergeHunk],
    -- | The commit ID of the destination commit specifier that was used in the
    -- merge evaluation.
    DescribeMergeConflictsResponse -> Text
destinationCommitId :: Prelude.Text,
    -- | The commit ID of the source commit specifier that was used in the merge
    -- evaluation.
    DescribeMergeConflictsResponse -> Text
sourceCommitId :: Prelude.Text
  }
  deriving (DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
(DescribeMergeConflictsResponse
 -> DescribeMergeConflictsResponse -> Bool)
-> (DescribeMergeConflictsResponse
    -> DescribeMergeConflictsResponse -> Bool)
-> Eq DescribeMergeConflictsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
$c/= :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
== :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
$c== :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMergeConflictsResponse]
ReadPrec DescribeMergeConflictsResponse
Int -> ReadS DescribeMergeConflictsResponse
ReadS [DescribeMergeConflictsResponse]
(Int -> ReadS DescribeMergeConflictsResponse)
-> ReadS [DescribeMergeConflictsResponse]
-> ReadPrec DescribeMergeConflictsResponse
-> ReadPrec [DescribeMergeConflictsResponse]
-> Read DescribeMergeConflictsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMergeConflictsResponse]
$creadListPrec :: ReadPrec [DescribeMergeConflictsResponse]
readPrec :: ReadPrec DescribeMergeConflictsResponse
$creadPrec :: ReadPrec DescribeMergeConflictsResponse
readList :: ReadS [DescribeMergeConflictsResponse]
$creadList :: ReadS [DescribeMergeConflictsResponse]
readsPrec :: Int -> ReadS DescribeMergeConflictsResponse
$creadsPrec :: Int -> ReadS DescribeMergeConflictsResponse
Prelude.Read, Int -> DescribeMergeConflictsResponse -> ShowS
[DescribeMergeConflictsResponse] -> ShowS
DescribeMergeConflictsResponse -> String
(Int -> DescribeMergeConflictsResponse -> ShowS)
-> (DescribeMergeConflictsResponse -> String)
-> ([DescribeMergeConflictsResponse] -> ShowS)
-> Show DescribeMergeConflictsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMergeConflictsResponse] -> ShowS
$cshowList :: [DescribeMergeConflictsResponse] -> ShowS
show :: DescribeMergeConflictsResponse -> String
$cshow :: DescribeMergeConflictsResponse -> String
showsPrec :: Int -> DescribeMergeConflictsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMergeConflictsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMergeConflictsResponse
 -> Rep DescribeMergeConflictsResponse x)
-> (forall x.
    Rep DescribeMergeConflictsResponse x
    -> DescribeMergeConflictsResponse)
-> Generic DescribeMergeConflictsResponse
forall x.
Rep DescribeMergeConflictsResponse x
-> DescribeMergeConflictsResponse
forall x.
DescribeMergeConflictsResponse
-> Rep DescribeMergeConflictsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMergeConflictsResponse x
-> DescribeMergeConflictsResponse
$cfrom :: forall x.
DescribeMergeConflictsResponse
-> Rep DescribeMergeConflictsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMergeConflictsResponse' 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', 'describeMergeConflictsResponse_baseCommitId' - The commit ID of the merge base.
--
-- 'nextToken', 'describeMergeConflictsResponse_nextToken' - An enumeration token that can be used in a request to return the next
-- batch of the results.
--
-- 'httpStatus', 'describeMergeConflictsResponse_httpStatus' - The response's http status code.
--
-- 'conflictMetadata', 'describeMergeConflictsResponse_conflictMetadata' - Contains metadata about the conflicts found in the merge.
--
-- 'mergeHunks', 'describeMergeConflictsResponse_mergeHunks' - A list of merge hunks of the differences between the files or lines.
--
-- 'destinationCommitId', 'describeMergeConflictsResponse_destinationCommitId' - The commit ID of the destination commit specifier that was used in the
-- merge evaluation.
--
-- 'sourceCommitId', 'describeMergeConflictsResponse_sourceCommitId' - The commit ID of the source commit specifier that was used in the merge
-- evaluation.
newDescribeMergeConflictsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'conflictMetadata'
  ConflictMetadata ->
  -- | 'destinationCommitId'
  Prelude.Text ->
  -- | 'sourceCommitId'
  Prelude.Text ->
  DescribeMergeConflictsResponse
newDescribeMergeConflictsResponse :: Int
-> ConflictMetadata
-> Text
-> Text
-> DescribeMergeConflictsResponse
newDescribeMergeConflictsResponse
  Int
pHttpStatus_
  ConflictMetadata
pConflictMetadata_
  Text
pDestinationCommitId_
  Text
pSourceCommitId_ =
    DescribeMergeConflictsResponse' :: Maybe Text
-> Maybe Text
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse
DescribeMergeConflictsResponse'
      { $sel:baseCommitId:DescribeMergeConflictsResponse' :: Maybe Text
baseCommitId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeMergeConflictsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeMergeConflictsResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:conflictMetadata:DescribeMergeConflictsResponse' :: ConflictMetadata
conflictMetadata = ConflictMetadata
pConflictMetadata_,
        $sel:mergeHunks:DescribeMergeConflictsResponse' :: [MergeHunk]
mergeHunks = [MergeHunk]
forall a. Monoid a => a
Prelude.mempty,
        $sel:destinationCommitId:DescribeMergeConflictsResponse' :: Text
destinationCommitId = Text
pDestinationCommitId_,
        $sel:sourceCommitId:DescribeMergeConflictsResponse' :: Text
sourceCommitId = Text
pSourceCommitId_
      }

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

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

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

-- | Contains metadata about the conflicts found in the merge.
describeMergeConflictsResponse_conflictMetadata :: Lens.Lens' DescribeMergeConflictsResponse ConflictMetadata
describeMergeConflictsResponse_conflictMetadata :: (ConflictMetadata -> f ConflictMetadata)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_conflictMetadata = (DescribeMergeConflictsResponse -> ConflictMetadata)
-> (DescribeMergeConflictsResponse
    -> ConflictMetadata -> DescribeMergeConflictsResponse)
-> Lens
     DescribeMergeConflictsResponse
     DescribeMergeConflictsResponse
     ConflictMetadata
     ConflictMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {ConflictMetadata
conflictMetadata :: ConflictMetadata
$sel:conflictMetadata:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> ConflictMetadata
conflictMetadata} -> ConflictMetadata
conflictMetadata) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} ConflictMetadata
a -> DescribeMergeConflictsResponse
s {$sel:conflictMetadata:DescribeMergeConflictsResponse' :: ConflictMetadata
conflictMetadata = ConflictMetadata
a} :: DescribeMergeConflictsResponse)

-- | A list of merge hunks of the differences between the files or lines.
describeMergeConflictsResponse_mergeHunks :: Lens.Lens' DescribeMergeConflictsResponse [MergeHunk]
describeMergeConflictsResponse_mergeHunks :: ([MergeHunk] -> f [MergeHunk])
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_mergeHunks = (DescribeMergeConflictsResponse -> [MergeHunk])
-> (DescribeMergeConflictsResponse
    -> [MergeHunk] -> DescribeMergeConflictsResponse)
-> Lens
     DescribeMergeConflictsResponse
     DescribeMergeConflictsResponse
     [MergeHunk]
     [MergeHunk]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {[MergeHunk]
mergeHunks :: [MergeHunk]
$sel:mergeHunks:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> [MergeHunk]
mergeHunks} -> [MergeHunk]
mergeHunks) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} [MergeHunk]
a -> DescribeMergeConflictsResponse
s {$sel:mergeHunks:DescribeMergeConflictsResponse' :: [MergeHunk]
mergeHunks = [MergeHunk]
a} :: DescribeMergeConflictsResponse) (([MergeHunk] -> f [MergeHunk])
 -> DescribeMergeConflictsResponse
 -> f DescribeMergeConflictsResponse)
-> (([MergeHunk] -> f [MergeHunk]) -> [MergeHunk] -> f [MergeHunk])
-> ([MergeHunk] -> f [MergeHunk])
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MergeHunk] -> f [MergeHunk]) -> [MergeHunk] -> f [MergeHunk]
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.
describeMergeConflictsResponse_destinationCommitId :: Lens.Lens' DescribeMergeConflictsResponse Prelude.Text
describeMergeConflictsResponse_destinationCommitId :: (Text -> f Text)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_destinationCommitId = (DescribeMergeConflictsResponse -> Text)
-> (DescribeMergeConflictsResponse
    -> Text -> DescribeMergeConflictsResponse)
-> Lens
     DescribeMergeConflictsResponse
     DescribeMergeConflictsResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Text
destinationCommitId :: Text
$sel:destinationCommitId:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Text
destinationCommitId} -> Text
destinationCommitId) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Text
a -> DescribeMergeConflictsResponse
s {$sel:destinationCommitId:DescribeMergeConflictsResponse' :: Text
destinationCommitId = Text
a} :: DescribeMergeConflictsResponse)

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

instance
  Prelude.NFData
    DescribeMergeConflictsResponse