{-# 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.MergeBranchesByThreeWay
-- 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)
--
-- Merges two specified branches using the three-way merge strategy.
module Amazonka.CodeCommit.MergeBranchesByThreeWay
  ( -- * Creating a Request
    MergeBranchesByThreeWay (..),
    newMergeBranchesByThreeWay,

    -- * Request Lenses
    mergeBranchesByThreeWay_email,
    mergeBranchesByThreeWay_authorName,
    mergeBranchesByThreeWay_targetBranch,
    mergeBranchesByThreeWay_conflictDetailLevel,
    mergeBranchesByThreeWay_commitMessage,
    mergeBranchesByThreeWay_conflictResolution,
    mergeBranchesByThreeWay_conflictResolutionStrategy,
    mergeBranchesByThreeWay_keepEmptyFolders,
    mergeBranchesByThreeWay_repositoryName,
    mergeBranchesByThreeWay_sourceCommitSpecifier,
    mergeBranchesByThreeWay_destinationCommitSpecifier,

    -- * Destructuring the Response
    MergeBranchesByThreeWayResponse (..),
    newMergeBranchesByThreeWayResponse,

    -- * Response Lenses
    mergeBranchesByThreeWayResponse_commitId,
    mergeBranchesByThreeWayResponse_treeId,
    mergeBranchesByThreeWayResponse_httpStatus,
  )
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:/ 'newMergeBranchesByThreeWay' smart constructor.
data MergeBranchesByThreeWay = MergeBranchesByThreeWay'
  { -- | The email address of the person merging the branches. This information
    -- is used in the commit information for the merge.
    MergeBranchesByThreeWay -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
    -- | The name of the author who created the commit. This information is used
    -- as both the author and committer for the commit.
    MergeBranchesByThreeWay -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
    -- | The branch where the merge is applied.
    MergeBranchesByThreeWay -> Maybe Text
targetBranch :: 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.
    MergeBranchesByThreeWay -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
    -- | The commit message to include in the commit information for the merge.
    MergeBranchesByThreeWay -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
    -- | If AUTOMERGE is the conflict resolution strategy, a list of inputs to
    -- use when resolving conflicts during a merge.
    MergeBranchesByThreeWay -> Maybe ConflictResolution
conflictResolution :: Prelude.Maybe ConflictResolution,
    -- | 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.
    MergeBranchesByThreeWay -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
    -- | If the commit contains deletions, whether to keep a folder or folder
    -- structure if the changes leave the folders empty. If true, a .gitkeep
    -- file is created for empty folders. The default is false.
    MergeBranchesByThreeWay -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
    -- | The name of the repository where you want to merge two branches.
    MergeBranchesByThreeWay -> 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).
    MergeBranchesByThreeWay -> Text
sourceCommitSpecifier :: 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).
    MergeBranchesByThreeWay -> Text
destinationCommitSpecifier :: Prelude.Text
  }
  deriving (MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool
(MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool)
-> (MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool)
-> Eq MergeBranchesByThreeWay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool
$c/= :: MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool
== :: MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool
$c== :: MergeBranchesByThreeWay -> MergeBranchesByThreeWay -> Bool
Prelude.Eq, ReadPrec [MergeBranchesByThreeWay]
ReadPrec MergeBranchesByThreeWay
Int -> ReadS MergeBranchesByThreeWay
ReadS [MergeBranchesByThreeWay]
(Int -> ReadS MergeBranchesByThreeWay)
-> ReadS [MergeBranchesByThreeWay]
-> ReadPrec MergeBranchesByThreeWay
-> ReadPrec [MergeBranchesByThreeWay]
-> Read MergeBranchesByThreeWay
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesByThreeWay]
$creadListPrec :: ReadPrec [MergeBranchesByThreeWay]
readPrec :: ReadPrec MergeBranchesByThreeWay
$creadPrec :: ReadPrec MergeBranchesByThreeWay
readList :: ReadS [MergeBranchesByThreeWay]
$creadList :: ReadS [MergeBranchesByThreeWay]
readsPrec :: Int -> ReadS MergeBranchesByThreeWay
$creadsPrec :: Int -> ReadS MergeBranchesByThreeWay
Prelude.Read, Int -> MergeBranchesByThreeWay -> ShowS
[MergeBranchesByThreeWay] -> ShowS
MergeBranchesByThreeWay -> String
(Int -> MergeBranchesByThreeWay -> ShowS)
-> (MergeBranchesByThreeWay -> String)
-> ([MergeBranchesByThreeWay] -> ShowS)
-> Show MergeBranchesByThreeWay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesByThreeWay] -> ShowS
$cshowList :: [MergeBranchesByThreeWay] -> ShowS
show :: MergeBranchesByThreeWay -> String
$cshow :: MergeBranchesByThreeWay -> String
showsPrec :: Int -> MergeBranchesByThreeWay -> ShowS
$cshowsPrec :: Int -> MergeBranchesByThreeWay -> ShowS
Prelude.Show, (forall x.
 MergeBranchesByThreeWay -> Rep MergeBranchesByThreeWay x)
-> (forall x.
    Rep MergeBranchesByThreeWay x -> MergeBranchesByThreeWay)
-> Generic MergeBranchesByThreeWay
forall x. Rep MergeBranchesByThreeWay x -> MergeBranchesByThreeWay
forall x. MergeBranchesByThreeWay -> Rep MergeBranchesByThreeWay x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MergeBranchesByThreeWay x -> MergeBranchesByThreeWay
$cfrom :: forall x. MergeBranchesByThreeWay -> Rep MergeBranchesByThreeWay x
Prelude.Generic)

-- |
-- Create a value of 'MergeBranchesByThreeWay' 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:
--
-- 'email', 'mergeBranchesByThreeWay_email' - The email address of the person merging the branches. This information
-- is used in the commit information for the merge.
--
-- 'authorName', 'mergeBranchesByThreeWay_authorName' - The name of the author who created the commit. This information is used
-- as both the author and committer for the commit.
--
-- 'targetBranch', 'mergeBranchesByThreeWay_targetBranch' - The branch where the merge is applied.
--
-- 'conflictDetailLevel', 'mergeBranchesByThreeWay_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.
--
-- 'commitMessage', 'mergeBranchesByThreeWay_commitMessage' - The commit message to include in the commit information for the merge.
--
-- 'conflictResolution', 'mergeBranchesByThreeWay_conflictResolution' - If AUTOMERGE is the conflict resolution strategy, a list of inputs to
-- use when resolving conflicts during a merge.
--
-- 'conflictResolutionStrategy', 'mergeBranchesByThreeWay_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.
--
-- 'keepEmptyFolders', 'mergeBranchesByThreeWay_keepEmptyFolders' - If the commit contains deletions, whether to keep a folder or folder
-- structure if the changes leave the folders empty. If true, a .gitkeep
-- file is created for empty folders. The default is false.
--
-- 'repositoryName', 'mergeBranchesByThreeWay_repositoryName' - The name of the repository where you want to merge two branches.
--
-- 'sourceCommitSpecifier', 'mergeBranchesByThreeWay_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).
--
-- 'destinationCommitSpecifier', 'mergeBranchesByThreeWay_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).
newMergeBranchesByThreeWay ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'sourceCommitSpecifier'
  Prelude.Text ->
  -- | 'destinationCommitSpecifier'
  Prelude.Text ->
  MergeBranchesByThreeWay
newMergeBranchesByThreeWay :: Text -> Text -> Text -> MergeBranchesByThreeWay
newMergeBranchesByThreeWay
  Text
pRepositoryName_
  Text
pSourceCommitSpecifier_
  Text
pDestinationCommitSpecifier_ =
    MergeBranchesByThreeWay' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe ConflictResolution
-> Maybe ConflictResolutionStrategyTypeEnum
-> Maybe Bool
-> Text
-> Text
-> Text
-> MergeBranchesByThreeWay
MergeBranchesByThreeWay'
      { $sel:email:MergeBranchesByThreeWay' :: Maybe Text
email = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:authorName:MergeBranchesByThreeWay' :: Maybe Text
authorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:targetBranch:MergeBranchesByThreeWay' :: Maybe Text
targetBranch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictDetailLevel:MergeBranchesByThreeWay' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:commitMessage:MergeBranchesByThreeWay' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolution:MergeBranchesByThreeWay' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolutionStrategy:MergeBranchesByThreeWay' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:keepEmptyFolders:MergeBranchesByThreeWay' :: Maybe Bool
keepEmptyFolders = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:MergeBranchesByThreeWay' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:sourceCommitSpecifier:MergeBranchesByThreeWay' :: Text
sourceCommitSpecifier = Text
pSourceCommitSpecifier_,
        $sel:destinationCommitSpecifier:MergeBranchesByThreeWay' :: Text
destinationCommitSpecifier =
          Text
pDestinationCommitSpecifier_
      }

-- | The email address of the person merging the branches. This information
-- is used in the commit information for the merge.
mergeBranchesByThreeWay_email :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWay_email :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_email = (MergeBranchesByThreeWay -> Maybe Text)
-> (MergeBranchesByThreeWay
    -> Maybe Text -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe Text
email :: Maybe Text
$sel:email:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
email} -> Maybe Text
email) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe Text
a -> MergeBranchesByThreeWay
s {$sel:email:MergeBranchesByThreeWay' :: Maybe Text
email = Maybe Text
a} :: MergeBranchesByThreeWay)

-- | The name of the author who created the commit. This information is used
-- as both the author and committer for the commit.
mergeBranchesByThreeWay_authorName :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWay_authorName :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_authorName = (MergeBranchesByThreeWay -> Maybe Text)
-> (MergeBranchesByThreeWay
    -> Maybe Text -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe Text
authorName :: Maybe Text
$sel:authorName:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
authorName} -> Maybe Text
authorName) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe Text
a -> MergeBranchesByThreeWay
s {$sel:authorName:MergeBranchesByThreeWay' :: Maybe Text
authorName = Maybe Text
a} :: MergeBranchesByThreeWay)

-- | The branch where the merge is applied.
mergeBranchesByThreeWay_targetBranch :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWay_targetBranch :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_targetBranch = (MergeBranchesByThreeWay -> Maybe Text)
-> (MergeBranchesByThreeWay
    -> Maybe Text -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe Text
targetBranch :: Maybe Text
$sel:targetBranch:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
targetBranch} -> Maybe Text
targetBranch) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe Text
a -> MergeBranchesByThreeWay
s {$sel:targetBranch:MergeBranchesByThreeWay' :: Maybe Text
targetBranch = Maybe Text
a} :: MergeBranchesByThreeWay)

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

-- | The commit message to include in the commit information for the merge.
mergeBranchesByThreeWay_commitMessage :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWay_commitMessage :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_commitMessage = (MergeBranchesByThreeWay -> Maybe Text)
-> (MergeBranchesByThreeWay
    -> Maybe Text -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe Text
a -> MergeBranchesByThreeWay
s {$sel:commitMessage:MergeBranchesByThreeWay' :: Maybe Text
commitMessage = Maybe Text
a} :: MergeBranchesByThreeWay)

-- | If AUTOMERGE is the conflict resolution strategy, a list of inputs to
-- use when resolving conflicts during a merge.
mergeBranchesByThreeWay_conflictResolution :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe ConflictResolution)
mergeBranchesByThreeWay_conflictResolution :: (Maybe ConflictResolution -> f (Maybe ConflictResolution))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_conflictResolution = (MergeBranchesByThreeWay -> Maybe ConflictResolution)
-> (MergeBranchesByThreeWay
    -> Maybe ConflictResolution -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe ConflictResolution)
     (Maybe ConflictResolution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe ConflictResolution
conflictResolution :: Maybe ConflictResolution
$sel:conflictResolution:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe ConflictResolution
conflictResolution} -> Maybe ConflictResolution
conflictResolution) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe ConflictResolution
a -> MergeBranchesByThreeWay
s {$sel:conflictResolution:MergeBranchesByThreeWay' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
a} :: MergeBranchesByThreeWay)

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

-- | If the commit contains deletions, whether to keep a folder or folder
-- structure if the changes leave the folders empty. If true, a .gitkeep
-- file is created for empty folders. The default is false.
mergeBranchesByThreeWay_keepEmptyFolders :: Lens.Lens' MergeBranchesByThreeWay (Prelude.Maybe Prelude.Bool)
mergeBranchesByThreeWay_keepEmptyFolders :: (Maybe Bool -> f (Maybe Bool))
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_keepEmptyFolders = (MergeBranchesByThreeWay -> Maybe Bool)
-> (MergeBranchesByThreeWay
    -> Maybe Bool -> MergeBranchesByThreeWay)
-> Lens
     MergeBranchesByThreeWay
     MergeBranchesByThreeWay
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Maybe Bool
a -> MergeBranchesByThreeWay
s {$sel:keepEmptyFolders:MergeBranchesByThreeWay' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: MergeBranchesByThreeWay)

-- | The name of the repository where you want to merge two branches.
mergeBranchesByThreeWay_repositoryName :: Lens.Lens' MergeBranchesByThreeWay Prelude.Text
mergeBranchesByThreeWay_repositoryName :: (Text -> f Text)
-> MergeBranchesByThreeWay -> f MergeBranchesByThreeWay
mergeBranchesByThreeWay_repositoryName = (MergeBranchesByThreeWay -> Text)
-> (MergeBranchesByThreeWay -> Text -> MergeBranchesByThreeWay)
-> Lens MergeBranchesByThreeWay MergeBranchesByThreeWay Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWay' {Text
repositoryName :: Text
$sel:repositoryName:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Text
repositoryName} -> Text
repositoryName) (\s :: MergeBranchesByThreeWay
s@MergeBranchesByThreeWay' {} Text
a -> MergeBranchesByThreeWay
s {$sel:repositoryName:MergeBranchesByThreeWay' :: Text
repositoryName = Text
a} :: MergeBranchesByThreeWay)

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

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

instance Core.AWSRequest MergeBranchesByThreeWay where
  type
    AWSResponse MergeBranchesByThreeWay =
      MergeBranchesByThreeWayResponse
  request :: MergeBranchesByThreeWay -> Request MergeBranchesByThreeWay
request = Service
-> MergeBranchesByThreeWay -> Request MergeBranchesByThreeWay
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy MergeBranchesByThreeWay
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse MergeBranchesByThreeWay)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse MergeBranchesByThreeWay))
-> Logger
-> Service
-> Proxy MergeBranchesByThreeWay
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse MergeBranchesByThreeWay)))
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 -> MergeBranchesByThreeWayResponse
MergeBranchesByThreeWayResponse'
            (Maybe Text
 -> Maybe Text -> Int -> MergeBranchesByThreeWayResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> MergeBranchesByThreeWayResponse)
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
"commitId")
            Either
  String (Maybe Text -> Int -> MergeBranchesByThreeWayResponse)
-> Either String (Maybe Text)
-> Either String (Int -> MergeBranchesByThreeWayResponse)
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
"treeId")
            Either String (Int -> MergeBranchesByThreeWayResponse)
-> Either String Int
-> Either String MergeBranchesByThreeWayResponse
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))
      )

instance Prelude.Hashable MergeBranchesByThreeWay

instance Prelude.NFData MergeBranchesByThreeWay

instance Core.ToHeaders MergeBranchesByThreeWay where
  toHeaders :: MergeBranchesByThreeWay -> ResponseHeaders
toHeaders =
    ResponseHeaders -> MergeBranchesByThreeWay -> 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.MergeBranchesByThreeWay" ::
                          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 MergeBranchesByThreeWay where
  toJSON :: MergeBranchesByThreeWay -> Value
toJSON MergeBranchesByThreeWay' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
keepEmptyFolders :: Maybe Bool
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
commitMessage :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
targetBranch :: Maybe Text
authorName :: Maybe Text
email :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Text
$sel:sourceCommitSpecifier:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Text
$sel:repositoryName:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Text
$sel:keepEmptyFolders:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Bool
$sel:conflictResolutionStrategy:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe ConflictResolution
$sel:commitMessage:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
$sel:conflictDetailLevel:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe ConflictDetailLevelTypeEnum
$sel:targetBranch:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
$sel:authorName:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
$sel:email:MergeBranchesByThreeWay' :: MergeBranchesByThreeWay -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"email" 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
email,
            (Text
"authorName" 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
authorName,
            (Text
"targetBranch" 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
targetBranch,
            (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
"commitMessage" 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
commitMessage,
            (Text
"conflictResolution" Text -> ConflictResolution -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConflictResolution -> Pair)
-> Maybe ConflictResolution -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolution
conflictResolution,
            (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,
            (Text
"keepEmptyFolders" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
keepEmptyFolders,
            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
"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
"destinationCommitSpecifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationCommitSpecifier
              )
          ]
      )

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

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

-- | /See:/ 'newMergeBranchesByThreeWayResponse' smart constructor.
data MergeBranchesByThreeWayResponse = MergeBranchesByThreeWayResponse'
  { -- | The commit ID of the merge in the destination or target branch.
    MergeBranchesByThreeWayResponse -> Maybe Text
commitId :: Prelude.Maybe Prelude.Text,
    -- | The tree ID of the merge in the destination or target branch.
    MergeBranchesByThreeWayResponse -> Maybe Text
treeId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    MergeBranchesByThreeWayResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (MergeBranchesByThreeWayResponse
-> MergeBranchesByThreeWayResponse -> Bool
(MergeBranchesByThreeWayResponse
 -> MergeBranchesByThreeWayResponse -> Bool)
-> (MergeBranchesByThreeWayResponse
    -> MergeBranchesByThreeWayResponse -> Bool)
-> Eq MergeBranchesByThreeWayResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesByThreeWayResponse
-> MergeBranchesByThreeWayResponse -> Bool
$c/= :: MergeBranchesByThreeWayResponse
-> MergeBranchesByThreeWayResponse -> Bool
== :: MergeBranchesByThreeWayResponse
-> MergeBranchesByThreeWayResponse -> Bool
$c== :: MergeBranchesByThreeWayResponse
-> MergeBranchesByThreeWayResponse -> Bool
Prelude.Eq, ReadPrec [MergeBranchesByThreeWayResponse]
ReadPrec MergeBranchesByThreeWayResponse
Int -> ReadS MergeBranchesByThreeWayResponse
ReadS [MergeBranchesByThreeWayResponse]
(Int -> ReadS MergeBranchesByThreeWayResponse)
-> ReadS [MergeBranchesByThreeWayResponse]
-> ReadPrec MergeBranchesByThreeWayResponse
-> ReadPrec [MergeBranchesByThreeWayResponse]
-> Read MergeBranchesByThreeWayResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesByThreeWayResponse]
$creadListPrec :: ReadPrec [MergeBranchesByThreeWayResponse]
readPrec :: ReadPrec MergeBranchesByThreeWayResponse
$creadPrec :: ReadPrec MergeBranchesByThreeWayResponse
readList :: ReadS [MergeBranchesByThreeWayResponse]
$creadList :: ReadS [MergeBranchesByThreeWayResponse]
readsPrec :: Int -> ReadS MergeBranchesByThreeWayResponse
$creadsPrec :: Int -> ReadS MergeBranchesByThreeWayResponse
Prelude.Read, Int -> MergeBranchesByThreeWayResponse -> ShowS
[MergeBranchesByThreeWayResponse] -> ShowS
MergeBranchesByThreeWayResponse -> String
(Int -> MergeBranchesByThreeWayResponse -> ShowS)
-> (MergeBranchesByThreeWayResponse -> String)
-> ([MergeBranchesByThreeWayResponse] -> ShowS)
-> Show MergeBranchesByThreeWayResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesByThreeWayResponse] -> ShowS
$cshowList :: [MergeBranchesByThreeWayResponse] -> ShowS
show :: MergeBranchesByThreeWayResponse -> String
$cshow :: MergeBranchesByThreeWayResponse -> String
showsPrec :: Int -> MergeBranchesByThreeWayResponse -> ShowS
$cshowsPrec :: Int -> MergeBranchesByThreeWayResponse -> ShowS
Prelude.Show, (forall x.
 MergeBranchesByThreeWayResponse
 -> Rep MergeBranchesByThreeWayResponse x)
-> (forall x.
    Rep MergeBranchesByThreeWayResponse x
    -> MergeBranchesByThreeWayResponse)
-> Generic MergeBranchesByThreeWayResponse
forall x.
Rep MergeBranchesByThreeWayResponse x
-> MergeBranchesByThreeWayResponse
forall x.
MergeBranchesByThreeWayResponse
-> Rep MergeBranchesByThreeWayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergeBranchesByThreeWayResponse x
-> MergeBranchesByThreeWayResponse
$cfrom :: forall x.
MergeBranchesByThreeWayResponse
-> Rep MergeBranchesByThreeWayResponse x
Prelude.Generic)

-- |
-- Create a value of 'MergeBranchesByThreeWayResponse' 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:
--
-- 'commitId', 'mergeBranchesByThreeWayResponse_commitId' - The commit ID of the merge in the destination or target branch.
--
-- 'treeId', 'mergeBranchesByThreeWayResponse_treeId' - The tree ID of the merge in the destination or target branch.
--
-- 'httpStatus', 'mergeBranchesByThreeWayResponse_httpStatus' - The response's http status code.
newMergeBranchesByThreeWayResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  MergeBranchesByThreeWayResponse
newMergeBranchesByThreeWayResponse :: Int -> MergeBranchesByThreeWayResponse
newMergeBranchesByThreeWayResponse Int
pHttpStatus_ =
  MergeBranchesByThreeWayResponse' :: Maybe Text -> Maybe Text -> Int -> MergeBranchesByThreeWayResponse
MergeBranchesByThreeWayResponse'
    { $sel:commitId:MergeBranchesByThreeWayResponse' :: Maybe Text
commitId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:treeId:MergeBranchesByThreeWayResponse' :: Maybe Text
treeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:MergeBranchesByThreeWayResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The commit ID of the merge in the destination or target branch.
mergeBranchesByThreeWayResponse_commitId :: Lens.Lens' MergeBranchesByThreeWayResponse (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWayResponse_commitId :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWayResponse
-> f MergeBranchesByThreeWayResponse
mergeBranchesByThreeWayResponse_commitId = (MergeBranchesByThreeWayResponse -> Maybe Text)
-> (MergeBranchesByThreeWayResponse
    -> Maybe Text -> MergeBranchesByThreeWayResponse)
-> Lens
     MergeBranchesByThreeWayResponse
     MergeBranchesByThreeWayResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWayResponse' {Maybe Text
commitId :: Maybe Text
$sel:commitId:MergeBranchesByThreeWayResponse' :: MergeBranchesByThreeWayResponse -> Maybe Text
commitId} -> Maybe Text
commitId) (\s :: MergeBranchesByThreeWayResponse
s@MergeBranchesByThreeWayResponse' {} Maybe Text
a -> MergeBranchesByThreeWayResponse
s {$sel:commitId:MergeBranchesByThreeWayResponse' :: Maybe Text
commitId = Maybe Text
a} :: MergeBranchesByThreeWayResponse)

-- | The tree ID of the merge in the destination or target branch.
mergeBranchesByThreeWayResponse_treeId :: Lens.Lens' MergeBranchesByThreeWayResponse (Prelude.Maybe Prelude.Text)
mergeBranchesByThreeWayResponse_treeId :: (Maybe Text -> f (Maybe Text))
-> MergeBranchesByThreeWayResponse
-> f MergeBranchesByThreeWayResponse
mergeBranchesByThreeWayResponse_treeId = (MergeBranchesByThreeWayResponse -> Maybe Text)
-> (MergeBranchesByThreeWayResponse
    -> Maybe Text -> MergeBranchesByThreeWayResponse)
-> Lens
     MergeBranchesByThreeWayResponse
     MergeBranchesByThreeWayResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesByThreeWayResponse' {Maybe Text
treeId :: Maybe Text
$sel:treeId:MergeBranchesByThreeWayResponse' :: MergeBranchesByThreeWayResponse -> Maybe Text
treeId} -> Maybe Text
treeId) (\s :: MergeBranchesByThreeWayResponse
s@MergeBranchesByThreeWayResponse' {} Maybe Text
a -> MergeBranchesByThreeWayResponse
s {$sel:treeId:MergeBranchesByThreeWayResponse' :: Maybe Text
treeId = Maybe Text
a} :: MergeBranchesByThreeWayResponse)

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

instance
  Prelude.NFData
    MergeBranchesByThreeWayResponse