{-# 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.MergeBranchesBySquash
-- 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 branches using the squash merge strategy.
module Amazonka.CodeCommit.MergeBranchesBySquash
  ( -- * Creating a Request
    MergeBranchesBySquash (..),
    newMergeBranchesBySquash,

    -- * Request Lenses
    mergeBranchesBySquash_email,
    mergeBranchesBySquash_authorName,
    mergeBranchesBySquash_targetBranch,
    mergeBranchesBySquash_conflictDetailLevel,
    mergeBranchesBySquash_commitMessage,
    mergeBranchesBySquash_conflictResolution,
    mergeBranchesBySquash_conflictResolutionStrategy,
    mergeBranchesBySquash_keepEmptyFolders,
    mergeBranchesBySquash_repositoryName,
    mergeBranchesBySquash_sourceCommitSpecifier,
    mergeBranchesBySquash_destinationCommitSpecifier,

    -- * Destructuring the Response
    MergeBranchesBySquashResponse (..),
    newMergeBranchesBySquashResponse,

    -- * Response Lenses
    mergeBranchesBySquashResponse_commitId,
    mergeBranchesBySquashResponse_treeId,
    mergeBranchesBySquashResponse_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:/ 'newMergeBranchesBySquash' smart constructor.
data MergeBranchesBySquash = MergeBranchesBySquash'
  { -- | The email address of the person merging the branches. This information
    -- is used in the commit information for the merge.
    MergeBranchesBySquash -> 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.
    MergeBranchesBySquash -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
    -- | The branch where the merge is applied.
    MergeBranchesBySquash -> 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.
    MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
    -- | The commit message for the merge.
    MergeBranchesBySquash -> 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.
    MergeBranchesBySquash -> 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.
    MergeBranchesBySquash -> 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 this is specified
    -- as true, a .gitkeep file is created for empty folders. The default is
    -- false.
    MergeBranchesBySquash -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
    -- | The name of the repository where you want to merge two branches.
    MergeBranchesBySquash -> 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).
    MergeBranchesBySquash -> 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).
    MergeBranchesBySquash -> Text
destinationCommitSpecifier :: Prelude.Text
  }
  deriving (MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
(MergeBranchesBySquash -> MergeBranchesBySquash -> Bool)
-> (MergeBranchesBySquash -> MergeBranchesBySquash -> Bool)
-> Eq MergeBranchesBySquash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
$c/= :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
== :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
$c== :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
Prelude.Eq, ReadPrec [MergeBranchesBySquash]
ReadPrec MergeBranchesBySquash
Int -> ReadS MergeBranchesBySquash
ReadS [MergeBranchesBySquash]
(Int -> ReadS MergeBranchesBySquash)
-> ReadS [MergeBranchesBySquash]
-> ReadPrec MergeBranchesBySquash
-> ReadPrec [MergeBranchesBySquash]
-> Read MergeBranchesBySquash
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesBySquash]
$creadListPrec :: ReadPrec [MergeBranchesBySquash]
readPrec :: ReadPrec MergeBranchesBySquash
$creadPrec :: ReadPrec MergeBranchesBySquash
readList :: ReadS [MergeBranchesBySquash]
$creadList :: ReadS [MergeBranchesBySquash]
readsPrec :: Int -> ReadS MergeBranchesBySquash
$creadsPrec :: Int -> ReadS MergeBranchesBySquash
Prelude.Read, Int -> MergeBranchesBySquash -> ShowS
[MergeBranchesBySquash] -> ShowS
MergeBranchesBySquash -> String
(Int -> MergeBranchesBySquash -> ShowS)
-> (MergeBranchesBySquash -> String)
-> ([MergeBranchesBySquash] -> ShowS)
-> Show MergeBranchesBySquash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesBySquash] -> ShowS
$cshowList :: [MergeBranchesBySquash] -> ShowS
show :: MergeBranchesBySquash -> String
$cshow :: MergeBranchesBySquash -> String
showsPrec :: Int -> MergeBranchesBySquash -> ShowS
$cshowsPrec :: Int -> MergeBranchesBySquash -> ShowS
Prelude.Show, (forall x. MergeBranchesBySquash -> Rep MergeBranchesBySquash x)
-> (forall x. Rep MergeBranchesBySquash x -> MergeBranchesBySquash)
-> Generic MergeBranchesBySquash
forall x. Rep MergeBranchesBySquash x -> MergeBranchesBySquash
forall x. MergeBranchesBySquash -> Rep MergeBranchesBySquash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MergeBranchesBySquash x -> MergeBranchesBySquash
$cfrom :: forall x. MergeBranchesBySquash -> Rep MergeBranchesBySquash x
Prelude.Generic)

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

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

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

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

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

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

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

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

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

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

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

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

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

instance Prelude.NFData MergeBranchesBySquash

instance Core.ToHeaders MergeBranchesBySquash where
  toHeaders :: MergeBranchesBySquash -> ResponseHeaders
toHeaders =
    ResponseHeaders -> MergeBranchesBySquash -> 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.MergeBranchesBySquash" ::
                          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 MergeBranchesBySquash where
  toJSON :: MergeBranchesBySquash -> Value
toJSON MergeBranchesBySquash' {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:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:repositoryName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:keepEmptyFolders:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Bool
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolution
$sel:commitMessage:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:conflictDetailLevel:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
$sel:targetBranch:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:authorName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:email:MergeBranchesBySquash' :: MergeBranchesBySquash -> 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 MergeBranchesBySquash where
  toPath :: MergeBranchesBySquash -> ByteString
toPath = ByteString -> MergeBranchesBySquash -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

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

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

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

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

instance Prelude.NFData MergeBranchesBySquashResponse