{-# 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.MergeBranchesByFastForward
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Merges two branches using the fast-forward merge strategy.
module Amazonka.CodeCommit.MergeBranchesByFastForward
  ( -- * Creating a Request
    MergeBranchesByFastForward (..),
    newMergeBranchesByFastForward,

    -- * Request Lenses
    mergeBranchesByFastForward_targetBranch,
    mergeBranchesByFastForward_repositoryName,
    mergeBranchesByFastForward_sourceCommitSpecifier,
    mergeBranchesByFastForward_destinationCommitSpecifier,

    -- * Destructuring the Response
    MergeBranchesByFastForwardResponse (..),
    newMergeBranchesByFastForwardResponse,

    -- * Response Lenses
    mergeBranchesByFastForwardResponse_commitId,
    mergeBranchesByFastForwardResponse_treeId,
    mergeBranchesByFastForwardResponse_httpStatus,
  )
where

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

-- | /See:/ 'newMergeBranchesByFastForward' smart constructor.
data MergeBranchesByFastForward = MergeBranchesByFastForward'
  { -- | The branch where the merge is applied.
    MergeBranchesByFastForward -> Maybe Text
targetBranch :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository where you want to merge two branches.
    MergeBranchesByFastForward -> 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).
    MergeBranchesByFastForward -> 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).
    MergeBranchesByFastForward -> Text
destinationCommitSpecifier :: Prelude.Text
  }
  deriving (MergeBranchesByFastForward -> MergeBranchesByFastForward -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesByFastForward -> MergeBranchesByFastForward -> Bool
$c/= :: MergeBranchesByFastForward -> MergeBranchesByFastForward -> Bool
== :: MergeBranchesByFastForward -> MergeBranchesByFastForward -> Bool
$c== :: MergeBranchesByFastForward -> MergeBranchesByFastForward -> Bool
Prelude.Eq, ReadPrec [MergeBranchesByFastForward]
ReadPrec MergeBranchesByFastForward
Int -> ReadS MergeBranchesByFastForward
ReadS [MergeBranchesByFastForward]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesByFastForward]
$creadListPrec :: ReadPrec [MergeBranchesByFastForward]
readPrec :: ReadPrec MergeBranchesByFastForward
$creadPrec :: ReadPrec MergeBranchesByFastForward
readList :: ReadS [MergeBranchesByFastForward]
$creadList :: ReadS [MergeBranchesByFastForward]
readsPrec :: Int -> ReadS MergeBranchesByFastForward
$creadsPrec :: Int -> ReadS MergeBranchesByFastForward
Prelude.Read, Int -> MergeBranchesByFastForward -> ShowS
[MergeBranchesByFastForward] -> ShowS
MergeBranchesByFastForward -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesByFastForward] -> ShowS
$cshowList :: [MergeBranchesByFastForward] -> ShowS
show :: MergeBranchesByFastForward -> String
$cshow :: MergeBranchesByFastForward -> String
showsPrec :: Int -> MergeBranchesByFastForward -> ShowS
$cshowsPrec :: Int -> MergeBranchesByFastForward -> ShowS
Prelude.Show, forall x.
Rep MergeBranchesByFastForward x -> MergeBranchesByFastForward
forall x.
MergeBranchesByFastForward -> Rep MergeBranchesByFastForward x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergeBranchesByFastForward x -> MergeBranchesByFastForward
$cfrom :: forall x.
MergeBranchesByFastForward -> Rep MergeBranchesByFastForward x
Prelude.Generic)

-- |
-- Create a value of 'MergeBranchesByFastForward' 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:
--
-- 'targetBranch', 'mergeBranchesByFastForward_targetBranch' - The branch where the merge is applied.
--
-- 'repositoryName', 'mergeBranchesByFastForward_repositoryName' - The name of the repository where you want to merge two branches.
--
-- 'sourceCommitSpecifier', 'mergeBranchesByFastForward_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', 'mergeBranchesByFastForward_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).
newMergeBranchesByFastForward ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'sourceCommitSpecifier'
  Prelude.Text ->
  -- | 'destinationCommitSpecifier'
  Prelude.Text ->
  MergeBranchesByFastForward
newMergeBranchesByFastForward :: Text -> Text -> Text -> MergeBranchesByFastForward
newMergeBranchesByFastForward
  Text
pRepositoryName_
  Text
pSourceCommitSpecifier_
  Text
pDestinationCommitSpecifier_ =
    MergeBranchesByFastForward'
      { $sel:targetBranch:MergeBranchesByFastForward' :: Maybe Text
targetBranch =
          forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:MergeBranchesByFastForward' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:sourceCommitSpecifier:MergeBranchesByFastForward' :: Text
sourceCommitSpecifier = Text
pSourceCommitSpecifier_,
        $sel:destinationCommitSpecifier:MergeBranchesByFastForward' :: Text
destinationCommitSpecifier =
          Text
pDestinationCommitSpecifier_
      }

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

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

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

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

instance Core.AWSRequest MergeBranchesByFastForward where
  type
    AWSResponse MergeBranchesByFastForward =
      MergeBranchesByFastForwardResponse
  request :: (Service -> Service)
-> MergeBranchesByFastForward -> Request MergeBranchesByFastForward
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy MergeBranchesByFastForward
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse MergeBranchesByFastForward)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text -> Int -> MergeBranchesByFastForwardResponse
MergeBranchesByFastForwardResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"commitId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"treeId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable MergeBranchesByFastForward where
  hashWithSalt :: Int -> MergeBranchesByFastForward -> Int
hashWithSalt Int
_salt MergeBranchesByFastForward' {Maybe Text
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:sourceCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:repositoryName:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:targetBranch:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetBranch
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
repositoryName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceCommitSpecifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationCommitSpecifier

instance Prelude.NFData MergeBranchesByFastForward where
  rnf :: MergeBranchesByFastForward -> ()
rnf MergeBranchesByFastForward' {Maybe Text
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:sourceCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:repositoryName:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:targetBranch:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetBranch
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
repositoryName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceCommitSpecifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationCommitSpecifier

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

instance Data.ToJSON MergeBranchesByFastForward where
  toJSON :: MergeBranchesByFastForward -> Value
toJSON MergeBranchesByFastForward' {Maybe Text
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:sourceCommitSpecifier:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:repositoryName:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Text
$sel:targetBranch:MergeBranchesByFastForward' :: MergeBranchesByFastForward -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"targetBranch" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
targetBranch,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"repositoryName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
repositoryName),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"sourceCommitSpecifier"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceCommitSpecifier
              ),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"destinationCommitSpecifier"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destinationCommitSpecifier
              )
          ]
      )

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

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

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

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

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

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

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

instance
  Prelude.NFData
    MergeBranchesByFastForwardResponse
  where
  rnf :: MergeBranchesByFastForwardResponse -> ()
rnf MergeBranchesByFastForwardResponse' {Int
Maybe Text
httpStatus :: Int
treeId :: Maybe Text
commitId :: Maybe Text
$sel:httpStatus:MergeBranchesByFastForwardResponse' :: MergeBranchesByFastForwardResponse -> Int
$sel:treeId:MergeBranchesByFastForwardResponse' :: MergeBranchesByFastForwardResponse -> Maybe Text
$sel:commitId:MergeBranchesByFastForwardResponse' :: MergeBranchesByFastForwardResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
commitId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
treeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus