{-# 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 #-}
module Amazonka.CodeCommit.MergeBranchesBySquash
(
MergeBranchesBySquash (..),
newMergeBranchesBySquash,
mergeBranchesBySquash_email,
mergeBranchesBySquash_authorName,
mergeBranchesBySquash_targetBranch,
mergeBranchesBySquash_conflictDetailLevel,
mergeBranchesBySquash_commitMessage,
mergeBranchesBySquash_conflictResolution,
mergeBranchesBySquash_conflictResolutionStrategy,
mergeBranchesBySquash_keepEmptyFolders,
mergeBranchesBySquash_repositoryName,
mergeBranchesBySquash_sourceCommitSpecifier,
mergeBranchesBySquash_destinationCommitSpecifier,
MergeBranchesBySquashResponse (..),
newMergeBranchesBySquashResponse,
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
data MergeBranchesBySquash = MergeBranchesBySquash'
{
MergeBranchesBySquash -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe Text
targetBranch :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
MergeBranchesBySquash -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe ConflictResolution
conflictResolution :: Prelude.Maybe ConflictResolution,
MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
MergeBranchesBySquash -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
MergeBranchesBySquash -> Text
repositoryName :: Prelude.Text,
MergeBranchesBySquash -> Text
sourceCommitSpecifier :: Prelude.Text,
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)
newMergeBranchesBySquash ::
Prelude.Text ->
Prelude.Text ->
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_
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
data MergeBranchesBySquashResponse = MergeBranchesBySquashResponse'
{
MergeBranchesBySquashResponse -> Maybe Text
commitId :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquashResponse -> Maybe Text
treeId :: Prelude.Maybe Prelude.Text,
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)
newMergeBranchesBySquashResponse ::
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_
}
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)
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)
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