{-# 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.CreateUnreferencedMergeCommit
-- 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)
--
-- Creates an unreferenced commit that represents the result of merging two
-- branches using a specified merge strategy. This can help you determine
-- the outcome of a potential merge. This API cannot be used with the
-- fast-forward merge strategy because that strategy does not create a
-- merge commit.
--
-- This unreferenced merge commit can only be accessed using the GetCommit
-- API or through git commands such as git fetch. To retrieve this commit,
-- you must specify its commit ID or otherwise reference it.
module Amazonka.CodeCommit.CreateUnreferencedMergeCommit
  ( -- * Creating a Request
    CreateUnreferencedMergeCommit (..),
    newCreateUnreferencedMergeCommit,

    -- * Request Lenses
    createUnreferencedMergeCommit_email,
    createUnreferencedMergeCommit_authorName,
    createUnreferencedMergeCommit_conflictDetailLevel,
    createUnreferencedMergeCommit_commitMessage,
    createUnreferencedMergeCommit_conflictResolution,
    createUnreferencedMergeCommit_conflictResolutionStrategy,
    createUnreferencedMergeCommit_keepEmptyFolders,
    createUnreferencedMergeCommit_repositoryName,
    createUnreferencedMergeCommit_sourceCommitSpecifier,
    createUnreferencedMergeCommit_destinationCommitSpecifier,
    createUnreferencedMergeCommit_mergeOption,

    -- * Destructuring the Response
    CreateUnreferencedMergeCommitResponse (..),
    newCreateUnreferencedMergeCommitResponse,

    -- * Response Lenses
    createUnreferencedMergeCommitResponse_commitId,
    createUnreferencedMergeCommitResponse_treeId,
    createUnreferencedMergeCommitResponse_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:/ 'newCreateUnreferencedMergeCommit' smart constructor.
data CreateUnreferencedMergeCommit = CreateUnreferencedMergeCommit'
  { -- | The email address for the person who created the unreferenced commit.
    CreateUnreferencedMergeCommit -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
    -- | The name of the author who created the unreferenced commit. This
    -- information is used as both the author and committer for the commit.
    CreateUnreferencedMergeCommit -> Maybe Text
authorName :: 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.
    CreateUnreferencedMergeCommit -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
    -- | The commit message for the unreferenced commit.
    CreateUnreferencedMergeCommit -> 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.
    CreateUnreferencedMergeCommit -> 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.
    CreateUnreferencedMergeCommit
-> 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.
    CreateUnreferencedMergeCommit -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
    -- | The name of the repository where you want to create the unreferenced
    -- merge commit.
    CreateUnreferencedMergeCommit -> 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).
    CreateUnreferencedMergeCommit -> 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).
    CreateUnreferencedMergeCommit -> Text
destinationCommitSpecifier :: Prelude.Text,
    -- | The merge option or strategy you want to use to merge the code.
    CreateUnreferencedMergeCommit -> MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
  }
  deriving (CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
(CreateUnreferencedMergeCommit
 -> CreateUnreferencedMergeCommit -> Bool)
-> (CreateUnreferencedMergeCommit
    -> CreateUnreferencedMergeCommit -> Bool)
-> Eq CreateUnreferencedMergeCommit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
$c/= :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
== :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
$c== :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
Prelude.Eq, ReadPrec [CreateUnreferencedMergeCommit]
ReadPrec CreateUnreferencedMergeCommit
Int -> ReadS CreateUnreferencedMergeCommit
ReadS [CreateUnreferencedMergeCommit]
(Int -> ReadS CreateUnreferencedMergeCommit)
-> ReadS [CreateUnreferencedMergeCommit]
-> ReadPrec CreateUnreferencedMergeCommit
-> ReadPrec [CreateUnreferencedMergeCommit]
-> Read CreateUnreferencedMergeCommit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUnreferencedMergeCommit]
$creadListPrec :: ReadPrec [CreateUnreferencedMergeCommit]
readPrec :: ReadPrec CreateUnreferencedMergeCommit
$creadPrec :: ReadPrec CreateUnreferencedMergeCommit
readList :: ReadS [CreateUnreferencedMergeCommit]
$creadList :: ReadS [CreateUnreferencedMergeCommit]
readsPrec :: Int -> ReadS CreateUnreferencedMergeCommit
$creadsPrec :: Int -> ReadS CreateUnreferencedMergeCommit
Prelude.Read, Int -> CreateUnreferencedMergeCommit -> ShowS
[CreateUnreferencedMergeCommit] -> ShowS
CreateUnreferencedMergeCommit -> String
(Int -> CreateUnreferencedMergeCommit -> ShowS)
-> (CreateUnreferencedMergeCommit -> String)
-> ([CreateUnreferencedMergeCommit] -> ShowS)
-> Show CreateUnreferencedMergeCommit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUnreferencedMergeCommit] -> ShowS
$cshowList :: [CreateUnreferencedMergeCommit] -> ShowS
show :: CreateUnreferencedMergeCommit -> String
$cshow :: CreateUnreferencedMergeCommit -> String
showsPrec :: Int -> CreateUnreferencedMergeCommit -> ShowS
$cshowsPrec :: Int -> CreateUnreferencedMergeCommit -> ShowS
Prelude.Show, (forall x.
 CreateUnreferencedMergeCommit
 -> Rep CreateUnreferencedMergeCommit x)
-> (forall x.
    Rep CreateUnreferencedMergeCommit x
    -> CreateUnreferencedMergeCommit)
-> Generic CreateUnreferencedMergeCommit
forall x.
Rep CreateUnreferencedMergeCommit x
-> CreateUnreferencedMergeCommit
forall x.
CreateUnreferencedMergeCommit
-> Rep CreateUnreferencedMergeCommit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUnreferencedMergeCommit x
-> CreateUnreferencedMergeCommit
$cfrom :: forall x.
CreateUnreferencedMergeCommit
-> Rep CreateUnreferencedMergeCommit x
Prelude.Generic)

-- |
-- Create a value of 'CreateUnreferencedMergeCommit' 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', 'createUnreferencedMergeCommit_email' - The email address for the person who created the unreferenced commit.
--
-- 'authorName', 'createUnreferencedMergeCommit_authorName' - The name of the author who created the unreferenced commit. This
-- information is used as both the author and committer for the commit.
--
-- 'conflictDetailLevel', 'createUnreferencedMergeCommit_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', 'createUnreferencedMergeCommit_commitMessage' - The commit message for the unreferenced commit.
--
-- 'conflictResolution', 'createUnreferencedMergeCommit_conflictResolution' - If AUTOMERGE is the conflict resolution strategy, a list of inputs to
-- use when resolving conflicts during a merge.
--
-- 'conflictResolutionStrategy', 'createUnreferencedMergeCommit_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', 'createUnreferencedMergeCommit_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', 'createUnreferencedMergeCommit_repositoryName' - The name of the repository where you want to create the unreferenced
-- merge commit.
--
-- 'sourceCommitSpecifier', 'createUnreferencedMergeCommit_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', 'createUnreferencedMergeCommit_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).
--
-- 'mergeOption', 'createUnreferencedMergeCommit_mergeOption' - The merge option or strategy you want to use to merge the code.
newCreateUnreferencedMergeCommit ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'sourceCommitSpecifier'
  Prelude.Text ->
  -- | 'destinationCommitSpecifier'
  Prelude.Text ->
  -- | 'mergeOption'
  MergeOptionTypeEnum ->
  CreateUnreferencedMergeCommit
newCreateUnreferencedMergeCommit :: Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> CreateUnreferencedMergeCommit
newCreateUnreferencedMergeCommit
  Text
pRepositoryName_
  Text
pSourceCommitSpecifier_
  Text
pDestinationCommitSpecifier_
  MergeOptionTypeEnum
pMergeOption_ =
    CreateUnreferencedMergeCommit' :: Maybe Text
-> Maybe Text
-> Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe ConflictResolution
-> Maybe ConflictResolutionStrategyTypeEnum
-> Maybe Bool
-> Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit'
      { $sel:email:CreateUnreferencedMergeCommit' :: Maybe Text
email =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:authorName:CreateUnreferencedMergeCommit' :: Maybe Text
authorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:commitMessage:CreateUnreferencedMergeCommit' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolution:CreateUnreferencedMergeCommit' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
forall a. Maybe a
Prelude.Nothing,
        $sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
        $sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: Maybe Bool
keepEmptyFolders = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:CreateUnreferencedMergeCommit' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
sourceCommitSpecifier =
          Text
pSourceCommitSpecifier_,
        $sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
destinationCommitSpecifier =
          Text
pDestinationCommitSpecifier_,
        $sel:mergeOption:CreateUnreferencedMergeCommit' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
pMergeOption_
      }

-- | The email address for the person who created the unreferenced commit.
createUnreferencedMergeCommit_email :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommit_email :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_email = (CreateUnreferencedMergeCommit -> Maybe Text)
-> (CreateUnreferencedMergeCommit
    -> Maybe Text -> CreateUnreferencedMergeCommit)
-> Lens
     CreateUnreferencedMergeCommit
     CreateUnreferencedMergeCommit
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Text
email :: Maybe Text
$sel:email:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
email} -> Maybe Text
email) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Text
a -> CreateUnreferencedMergeCommit
s {$sel:email:CreateUnreferencedMergeCommit' :: Maybe Text
email = Maybe Text
a} :: CreateUnreferencedMergeCommit)

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

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

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

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

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

-- | 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.
createUnreferencedMergeCommit_keepEmptyFolders :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Bool)
createUnreferencedMergeCommit_keepEmptyFolders :: (Maybe Bool -> f (Maybe Bool))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_keepEmptyFolders = (CreateUnreferencedMergeCommit -> Maybe Bool)
-> (CreateUnreferencedMergeCommit
    -> Maybe Bool -> CreateUnreferencedMergeCommit)
-> Lens
     CreateUnreferencedMergeCommit
     CreateUnreferencedMergeCommit
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Bool
a -> CreateUnreferencedMergeCommit
s {$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: CreateUnreferencedMergeCommit)

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

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

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

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

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

instance Prelude.NFData CreateUnreferencedMergeCommit

instance Core.ToHeaders CreateUnreferencedMergeCommit where
  toHeaders :: CreateUnreferencedMergeCommit -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateUnreferencedMergeCommit -> 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.CreateUnreferencedMergeCommit" ::
                          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 CreateUnreferencedMergeCommit where
  toJSON :: CreateUnreferencedMergeCommit -> Value
toJSON CreateUnreferencedMergeCommit' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
keepEmptyFolders :: Maybe Bool
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
commitMessage :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
authorName :: Maybe Text
email :: Maybe Text
$sel:mergeOption:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> MergeOptionTypeEnum
$sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:repositoryName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Bool
$sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictResolution
$sel:commitMessage:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
$sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictDetailLevelTypeEnum
$sel:authorName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
$sel:email:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> 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
"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
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"mergeOption" Text -> MergeOptionTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MergeOptionTypeEnum
mergeOption)
          ]
      )

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

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

-- | /See:/ 'newCreateUnreferencedMergeCommitResponse' smart constructor.
data CreateUnreferencedMergeCommitResponse = CreateUnreferencedMergeCommitResponse'
  { -- | The full commit ID of the commit that contains your merge results.
    CreateUnreferencedMergeCommitResponse -> Maybe Text
commitId :: Prelude.Maybe Prelude.Text,
    -- | The full SHA-1 pointer of the tree information for the commit that
    -- contains the merge results.
    CreateUnreferencedMergeCommitResponse -> Maybe Text
treeId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateUnreferencedMergeCommitResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
(CreateUnreferencedMergeCommitResponse
 -> CreateUnreferencedMergeCommitResponse -> Bool)
-> (CreateUnreferencedMergeCommitResponse
    -> CreateUnreferencedMergeCommitResponse -> Bool)
-> Eq CreateUnreferencedMergeCommitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
$c/= :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
== :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
$c== :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
Prelude.Eq, ReadPrec [CreateUnreferencedMergeCommitResponse]
ReadPrec CreateUnreferencedMergeCommitResponse
Int -> ReadS CreateUnreferencedMergeCommitResponse
ReadS [CreateUnreferencedMergeCommitResponse]
(Int -> ReadS CreateUnreferencedMergeCommitResponse)
-> ReadS [CreateUnreferencedMergeCommitResponse]
-> ReadPrec CreateUnreferencedMergeCommitResponse
-> ReadPrec [CreateUnreferencedMergeCommitResponse]
-> Read CreateUnreferencedMergeCommitResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUnreferencedMergeCommitResponse]
$creadListPrec :: ReadPrec [CreateUnreferencedMergeCommitResponse]
readPrec :: ReadPrec CreateUnreferencedMergeCommitResponse
$creadPrec :: ReadPrec CreateUnreferencedMergeCommitResponse
readList :: ReadS [CreateUnreferencedMergeCommitResponse]
$creadList :: ReadS [CreateUnreferencedMergeCommitResponse]
readsPrec :: Int -> ReadS CreateUnreferencedMergeCommitResponse
$creadsPrec :: Int -> ReadS CreateUnreferencedMergeCommitResponse
Prelude.Read, Int -> CreateUnreferencedMergeCommitResponse -> ShowS
[CreateUnreferencedMergeCommitResponse] -> ShowS
CreateUnreferencedMergeCommitResponse -> String
(Int -> CreateUnreferencedMergeCommitResponse -> ShowS)
-> (CreateUnreferencedMergeCommitResponse -> String)
-> ([CreateUnreferencedMergeCommitResponse] -> ShowS)
-> Show CreateUnreferencedMergeCommitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUnreferencedMergeCommitResponse] -> ShowS
$cshowList :: [CreateUnreferencedMergeCommitResponse] -> ShowS
show :: CreateUnreferencedMergeCommitResponse -> String
$cshow :: CreateUnreferencedMergeCommitResponse -> String
showsPrec :: Int -> CreateUnreferencedMergeCommitResponse -> ShowS
$cshowsPrec :: Int -> CreateUnreferencedMergeCommitResponse -> ShowS
Prelude.Show, (forall x.
 CreateUnreferencedMergeCommitResponse
 -> Rep CreateUnreferencedMergeCommitResponse x)
-> (forall x.
    Rep CreateUnreferencedMergeCommitResponse x
    -> CreateUnreferencedMergeCommitResponse)
-> Generic CreateUnreferencedMergeCommitResponse
forall x.
Rep CreateUnreferencedMergeCommitResponse x
-> CreateUnreferencedMergeCommitResponse
forall x.
CreateUnreferencedMergeCommitResponse
-> Rep CreateUnreferencedMergeCommitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUnreferencedMergeCommitResponse x
-> CreateUnreferencedMergeCommitResponse
$cfrom :: forall x.
CreateUnreferencedMergeCommitResponse
-> Rep CreateUnreferencedMergeCommitResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateUnreferencedMergeCommitResponse' 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', 'createUnreferencedMergeCommitResponse_commitId' - The full commit ID of the commit that contains your merge results.
--
-- 'treeId', 'createUnreferencedMergeCommitResponse_treeId' - The full SHA-1 pointer of the tree information for the commit that
-- contains the merge results.
--
-- 'httpStatus', 'createUnreferencedMergeCommitResponse_httpStatus' - The response's http status code.
newCreateUnreferencedMergeCommitResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateUnreferencedMergeCommitResponse
newCreateUnreferencedMergeCommitResponse :: Int -> CreateUnreferencedMergeCommitResponse
newCreateUnreferencedMergeCommitResponse Int
pHttpStatus_ =
  CreateUnreferencedMergeCommitResponse' :: Maybe Text
-> Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse'
    { $sel:commitId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
commitId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:treeId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
treeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateUnreferencedMergeCommitResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The full commit ID of the commit that contains your merge results.
createUnreferencedMergeCommitResponse_commitId :: Lens.Lens' CreateUnreferencedMergeCommitResponse (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommitResponse_commitId :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommitResponse
-> f CreateUnreferencedMergeCommitResponse
createUnreferencedMergeCommitResponse_commitId = (CreateUnreferencedMergeCommitResponse -> Maybe Text)
-> (CreateUnreferencedMergeCommitResponse
    -> Maybe Text -> CreateUnreferencedMergeCommitResponse)
-> Lens
     CreateUnreferencedMergeCommitResponse
     CreateUnreferencedMergeCommitResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommitResponse' {Maybe Text
commitId :: Maybe Text
$sel:commitId:CreateUnreferencedMergeCommitResponse' :: CreateUnreferencedMergeCommitResponse -> Maybe Text
commitId} -> Maybe Text
commitId) (\s :: CreateUnreferencedMergeCommitResponse
s@CreateUnreferencedMergeCommitResponse' {} Maybe Text
a -> CreateUnreferencedMergeCommitResponse
s {$sel:commitId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
commitId = Maybe Text
a} :: CreateUnreferencedMergeCommitResponse)

-- | The full SHA-1 pointer of the tree information for the commit that
-- contains the merge results.
createUnreferencedMergeCommitResponse_treeId :: Lens.Lens' CreateUnreferencedMergeCommitResponse (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommitResponse_treeId :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommitResponse
-> f CreateUnreferencedMergeCommitResponse
createUnreferencedMergeCommitResponse_treeId = (CreateUnreferencedMergeCommitResponse -> Maybe Text)
-> (CreateUnreferencedMergeCommitResponse
    -> Maybe Text -> CreateUnreferencedMergeCommitResponse)
-> Lens
     CreateUnreferencedMergeCommitResponse
     CreateUnreferencedMergeCommitResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommitResponse' {Maybe Text
treeId :: Maybe Text
$sel:treeId:CreateUnreferencedMergeCommitResponse' :: CreateUnreferencedMergeCommitResponse -> Maybe Text
treeId} -> Maybe Text
treeId) (\s :: CreateUnreferencedMergeCommitResponse
s@CreateUnreferencedMergeCommitResponse' {} Maybe Text
a -> CreateUnreferencedMergeCommitResponse
s {$sel:treeId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
treeId = Maybe Text
a} :: CreateUnreferencedMergeCommitResponse)

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

instance
  Prelude.NFData
    CreateUnreferencedMergeCommitResponse