{-# 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.MergePullRequestByThreeWay
(
MergePullRequestByThreeWay (..),
newMergePullRequestByThreeWay,
mergePullRequestByThreeWay_email,
mergePullRequestByThreeWay_authorName,
mergePullRequestByThreeWay_conflictDetailLevel,
mergePullRequestByThreeWay_commitMessage,
mergePullRequestByThreeWay_conflictResolution,
mergePullRequestByThreeWay_conflictResolutionStrategy,
mergePullRequestByThreeWay_keepEmptyFolders,
mergePullRequestByThreeWay_sourceCommitId,
mergePullRequestByThreeWay_pullRequestId,
mergePullRequestByThreeWay_repositoryName,
MergePullRequestByThreeWayResponse (..),
newMergePullRequestByThreeWayResponse,
mergePullRequestByThreeWayResponse_pullRequest,
mergePullRequestByThreeWayResponse_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 MergePullRequestByThreeWay = MergePullRequestByThreeWay'
{
MergePullRequestByThreeWay -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
MergePullRequestByThreeWay -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
MergePullRequestByThreeWay -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
MergePullRequestByThreeWay -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
MergePullRequestByThreeWay -> Maybe ConflictResolution
conflictResolution :: Prelude.Maybe ConflictResolution,
MergePullRequestByThreeWay
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
MergePullRequestByThreeWay -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
MergePullRequestByThreeWay -> Maybe Text
sourceCommitId :: Prelude.Maybe Prelude.Text,
MergePullRequestByThreeWay -> Text
pullRequestId :: Prelude.Text,
MergePullRequestByThreeWay -> Text
repositoryName :: Prelude.Text
}
deriving (MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool
(MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool)
-> (MergePullRequestByThreeWay
-> MergePullRequestByThreeWay -> Bool)
-> Eq MergePullRequestByThreeWay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool
$c/= :: MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool
== :: MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool
$c== :: MergePullRequestByThreeWay -> MergePullRequestByThreeWay -> Bool
Prelude.Eq, ReadPrec [MergePullRequestByThreeWay]
ReadPrec MergePullRequestByThreeWay
Int -> ReadS MergePullRequestByThreeWay
ReadS [MergePullRequestByThreeWay]
(Int -> ReadS MergePullRequestByThreeWay)
-> ReadS [MergePullRequestByThreeWay]
-> ReadPrec MergePullRequestByThreeWay
-> ReadPrec [MergePullRequestByThreeWay]
-> Read MergePullRequestByThreeWay
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergePullRequestByThreeWay]
$creadListPrec :: ReadPrec [MergePullRequestByThreeWay]
readPrec :: ReadPrec MergePullRequestByThreeWay
$creadPrec :: ReadPrec MergePullRequestByThreeWay
readList :: ReadS [MergePullRequestByThreeWay]
$creadList :: ReadS [MergePullRequestByThreeWay]
readsPrec :: Int -> ReadS MergePullRequestByThreeWay
$creadsPrec :: Int -> ReadS MergePullRequestByThreeWay
Prelude.Read, Int -> MergePullRequestByThreeWay -> ShowS
[MergePullRequestByThreeWay] -> ShowS
MergePullRequestByThreeWay -> String
(Int -> MergePullRequestByThreeWay -> ShowS)
-> (MergePullRequestByThreeWay -> String)
-> ([MergePullRequestByThreeWay] -> ShowS)
-> Show MergePullRequestByThreeWay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergePullRequestByThreeWay] -> ShowS
$cshowList :: [MergePullRequestByThreeWay] -> ShowS
show :: MergePullRequestByThreeWay -> String
$cshow :: MergePullRequestByThreeWay -> String
showsPrec :: Int -> MergePullRequestByThreeWay -> ShowS
$cshowsPrec :: Int -> MergePullRequestByThreeWay -> ShowS
Prelude.Show, (forall x.
MergePullRequestByThreeWay -> Rep MergePullRequestByThreeWay x)
-> (forall x.
Rep MergePullRequestByThreeWay x -> MergePullRequestByThreeWay)
-> Generic MergePullRequestByThreeWay
forall x.
Rep MergePullRequestByThreeWay x -> MergePullRequestByThreeWay
forall x.
MergePullRequestByThreeWay -> Rep MergePullRequestByThreeWay x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergePullRequestByThreeWay x -> MergePullRequestByThreeWay
$cfrom :: forall x.
MergePullRequestByThreeWay -> Rep MergePullRequestByThreeWay x
Prelude.Generic)
newMergePullRequestByThreeWay ::
Prelude.Text ->
Prelude.Text ->
MergePullRequestByThreeWay
newMergePullRequestByThreeWay :: Text -> Text -> MergePullRequestByThreeWay
newMergePullRequestByThreeWay
Text
pPullRequestId_
Text
pRepositoryName_ =
MergePullRequestByThreeWay' :: Maybe Text
-> Maybe Text
-> Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe ConflictResolution
-> Maybe ConflictResolutionStrategyTypeEnum
-> Maybe Bool
-> Maybe Text
-> Text
-> Text
-> MergePullRequestByThreeWay
MergePullRequestByThreeWay'
{ $sel:email:MergePullRequestByThreeWay' :: Maybe Text
email =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorName:MergePullRequestByThreeWay' :: Maybe Text
authorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conflictDetailLevel:MergePullRequestByThreeWay' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:commitMessage:MergePullRequestByThreeWay' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolution:MergePullRequestByThreeWay' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolutionStrategy:MergePullRequestByThreeWay' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:keepEmptyFolders:MergePullRequestByThreeWay' :: Maybe Bool
keepEmptyFolders = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:sourceCommitId:MergePullRequestByThreeWay' :: Maybe Text
sourceCommitId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullRequestId:MergePullRequestByThreeWay' :: Text
pullRequestId = Text
pPullRequestId_,
$sel:repositoryName:MergePullRequestByThreeWay' :: Text
repositoryName = Text
pRepositoryName_
}
mergePullRequestByThreeWay_email :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe Prelude.Text)
mergePullRequestByThreeWay_email :: (Maybe Text -> f (Maybe Text))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_email = (MergePullRequestByThreeWay -> Maybe Text)
-> (MergePullRequestByThreeWay
-> Maybe Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe Text
email :: Maybe Text
$sel:email:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
email} -> Maybe Text
email) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe Text
a -> MergePullRequestByThreeWay
s {$sel:email:MergePullRequestByThreeWay' :: Maybe Text
email = Maybe Text
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_authorName :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe Prelude.Text)
mergePullRequestByThreeWay_authorName :: (Maybe Text -> f (Maybe Text))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_authorName = (MergePullRequestByThreeWay -> Maybe Text)
-> (MergePullRequestByThreeWay
-> Maybe Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe Text
authorName :: Maybe Text
$sel:authorName:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
authorName} -> Maybe Text
authorName) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe Text
a -> MergePullRequestByThreeWay
s {$sel:authorName:MergePullRequestByThreeWay' :: Maybe Text
authorName = Maybe Text
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_conflictDetailLevel :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe ConflictDetailLevelTypeEnum)
mergePullRequestByThreeWay_conflictDetailLevel :: (Maybe ConflictDetailLevelTypeEnum
-> f (Maybe ConflictDetailLevelTypeEnum))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_conflictDetailLevel = (MergePullRequestByThreeWay -> Maybe ConflictDetailLevelTypeEnum)
-> (MergePullRequestByThreeWay
-> Maybe ConflictDetailLevelTypeEnum -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe ConflictDetailLevelTypeEnum)
(Maybe ConflictDetailLevelTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe ConflictDetailLevelTypeEnum
a -> MergePullRequestByThreeWay
s {$sel:conflictDetailLevel:MergePullRequestByThreeWay' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_commitMessage :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe Prelude.Text)
mergePullRequestByThreeWay_commitMessage :: (Maybe Text -> f (Maybe Text))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_commitMessage = (MergePullRequestByThreeWay -> Maybe Text)
-> (MergePullRequestByThreeWay
-> Maybe Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe Text
a -> MergePullRequestByThreeWay
s {$sel:commitMessage:MergePullRequestByThreeWay' :: Maybe Text
commitMessage = Maybe Text
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_conflictResolution :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe ConflictResolution)
mergePullRequestByThreeWay_conflictResolution :: (Maybe ConflictResolution -> f (Maybe ConflictResolution))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_conflictResolution = (MergePullRequestByThreeWay -> Maybe ConflictResolution)
-> (MergePullRequestByThreeWay
-> Maybe ConflictResolution -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe ConflictResolution)
(Maybe ConflictResolution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe ConflictResolution
conflictResolution :: Maybe ConflictResolution
$sel:conflictResolution:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe ConflictResolution
conflictResolution} -> Maybe ConflictResolution
conflictResolution) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe ConflictResolution
a -> MergePullRequestByThreeWay
s {$sel:conflictResolution:MergePullRequestByThreeWay' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_conflictResolutionStrategy :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
mergePullRequestByThreeWay_conflictResolutionStrategy :: (Maybe ConflictResolutionStrategyTypeEnum
-> f (Maybe ConflictResolutionStrategyTypeEnum))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_conflictResolutionStrategy = (MergePullRequestByThreeWay
-> Maybe ConflictResolutionStrategyTypeEnum)
-> (MergePullRequestByThreeWay
-> Maybe ConflictResolutionStrategyTypeEnum
-> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe ConflictResolutionStrategyTypeEnum)
(Maybe ConflictResolutionStrategyTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe ConflictResolutionStrategyTypeEnum
a -> MergePullRequestByThreeWay
s {$sel:conflictResolutionStrategy:MergePullRequestByThreeWay' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_keepEmptyFolders :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe Prelude.Bool)
mergePullRequestByThreeWay_keepEmptyFolders :: (Maybe Bool -> f (Maybe Bool))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_keepEmptyFolders = (MergePullRequestByThreeWay -> Maybe Bool)
-> (MergePullRequestByThreeWay
-> Maybe Bool -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe Bool
a -> MergePullRequestByThreeWay
s {$sel:keepEmptyFolders:MergePullRequestByThreeWay' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_sourceCommitId :: Lens.Lens' MergePullRequestByThreeWay (Prelude.Maybe Prelude.Text)
mergePullRequestByThreeWay_sourceCommitId :: (Maybe Text -> f (Maybe Text))
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_sourceCommitId = (MergePullRequestByThreeWay -> Maybe Text)
-> (MergePullRequestByThreeWay
-> Maybe Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay
MergePullRequestByThreeWay
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Maybe Text
sourceCommitId :: Maybe Text
$sel:sourceCommitId:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
sourceCommitId} -> Maybe Text
sourceCommitId) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Maybe Text
a -> MergePullRequestByThreeWay
s {$sel:sourceCommitId:MergePullRequestByThreeWay' :: Maybe Text
sourceCommitId = Maybe Text
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_pullRequestId :: Lens.Lens' MergePullRequestByThreeWay Prelude.Text
mergePullRequestByThreeWay_pullRequestId :: (Text -> f Text)
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_pullRequestId = (MergePullRequestByThreeWay -> Text)
-> (MergePullRequestByThreeWay
-> Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay MergePullRequestByThreeWay Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Text
pullRequestId :: Text
$sel:pullRequestId:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Text
pullRequestId} -> Text
pullRequestId) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Text
a -> MergePullRequestByThreeWay
s {$sel:pullRequestId:MergePullRequestByThreeWay' :: Text
pullRequestId = Text
a} :: MergePullRequestByThreeWay)
mergePullRequestByThreeWay_repositoryName :: Lens.Lens' MergePullRequestByThreeWay Prelude.Text
mergePullRequestByThreeWay_repositoryName :: (Text -> f Text)
-> MergePullRequestByThreeWay -> f MergePullRequestByThreeWay
mergePullRequestByThreeWay_repositoryName = (MergePullRequestByThreeWay -> Text)
-> (MergePullRequestByThreeWay
-> Text -> MergePullRequestByThreeWay)
-> Lens
MergePullRequestByThreeWay MergePullRequestByThreeWay Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWay' {Text
repositoryName :: Text
$sel:repositoryName:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Text
repositoryName} -> Text
repositoryName) (\s :: MergePullRequestByThreeWay
s@MergePullRequestByThreeWay' {} Text
a -> MergePullRequestByThreeWay
s {$sel:repositoryName:MergePullRequestByThreeWay' :: Text
repositoryName = Text
a} :: MergePullRequestByThreeWay)
instance Core.AWSRequest MergePullRequestByThreeWay where
type
AWSResponse MergePullRequestByThreeWay =
MergePullRequestByThreeWayResponse
request :: MergePullRequestByThreeWay -> Request MergePullRequestByThreeWay
request = Service
-> MergePullRequestByThreeWay -> Request MergePullRequestByThreeWay
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy MergePullRequestByThreeWay
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse MergePullRequestByThreeWay)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse MergePullRequestByThreeWay))
-> Logger
-> Service
-> Proxy MergePullRequestByThreeWay
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse MergePullRequestByThreeWay)))
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 PullRequest -> Int -> MergePullRequestByThreeWayResponse
MergePullRequestByThreeWayResponse'
(Maybe PullRequest -> Int -> MergePullRequestByThreeWayResponse)
-> Either String (Maybe PullRequest)
-> Either String (Int -> MergePullRequestByThreeWayResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe PullRequest)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pullRequest")
Either String (Int -> MergePullRequestByThreeWayResponse)
-> Either String Int
-> Either String MergePullRequestByThreeWayResponse
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 MergePullRequestByThreeWay
instance Prelude.NFData MergePullRequestByThreeWay
instance Core.ToHeaders MergePullRequestByThreeWay where
toHeaders :: MergePullRequestByThreeWay -> ResponseHeaders
toHeaders =
ResponseHeaders -> MergePullRequestByThreeWay -> 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.MergePullRequestByThreeWay" ::
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 MergePullRequestByThreeWay where
toJSON :: MergePullRequestByThreeWay -> Value
toJSON MergePullRequestByThreeWay' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
repositoryName :: Text
pullRequestId :: Text
sourceCommitId :: Maybe Text
keepEmptyFolders :: Maybe Bool
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
commitMessage :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
authorName :: Maybe Text
email :: Maybe Text
$sel:repositoryName:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Text
$sel:pullRequestId:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Text
$sel:sourceCommitId:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
$sel:keepEmptyFolders:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Bool
$sel:conflictResolutionStrategy:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay
-> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe ConflictResolution
$sel:commitMessage:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
$sel:conflictDetailLevel:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe ConflictDetailLevelTypeEnum
$sel:authorName:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> Maybe Text
$sel:email:MergePullRequestByThreeWay' :: MergePullRequestByThreeWay -> 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,
(Text
"sourceCommitId" 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
sourceCommitId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"pullRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pullRequestId),
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)
]
)
instance Core.ToPath MergePullRequestByThreeWay where
toPath :: MergePullRequestByThreeWay -> ByteString
toPath = ByteString -> MergePullRequestByThreeWay -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery MergePullRequestByThreeWay where
toQuery :: MergePullRequestByThreeWay -> QueryString
toQuery = QueryString -> MergePullRequestByThreeWay -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data MergePullRequestByThreeWayResponse = MergePullRequestByThreeWayResponse'
{ MergePullRequestByThreeWayResponse -> Maybe PullRequest
pullRequest :: Prelude.Maybe PullRequest,
MergePullRequestByThreeWayResponse -> Int
httpStatus :: Prelude.Int
}
deriving (MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool
(MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool)
-> (MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool)
-> Eq MergePullRequestByThreeWayResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool
$c/= :: MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool
== :: MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool
$c== :: MergePullRequestByThreeWayResponse
-> MergePullRequestByThreeWayResponse -> Bool
Prelude.Eq, ReadPrec [MergePullRequestByThreeWayResponse]
ReadPrec MergePullRequestByThreeWayResponse
Int -> ReadS MergePullRequestByThreeWayResponse
ReadS [MergePullRequestByThreeWayResponse]
(Int -> ReadS MergePullRequestByThreeWayResponse)
-> ReadS [MergePullRequestByThreeWayResponse]
-> ReadPrec MergePullRequestByThreeWayResponse
-> ReadPrec [MergePullRequestByThreeWayResponse]
-> Read MergePullRequestByThreeWayResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergePullRequestByThreeWayResponse]
$creadListPrec :: ReadPrec [MergePullRequestByThreeWayResponse]
readPrec :: ReadPrec MergePullRequestByThreeWayResponse
$creadPrec :: ReadPrec MergePullRequestByThreeWayResponse
readList :: ReadS [MergePullRequestByThreeWayResponse]
$creadList :: ReadS [MergePullRequestByThreeWayResponse]
readsPrec :: Int -> ReadS MergePullRequestByThreeWayResponse
$creadsPrec :: Int -> ReadS MergePullRequestByThreeWayResponse
Prelude.Read, Int -> MergePullRequestByThreeWayResponse -> ShowS
[MergePullRequestByThreeWayResponse] -> ShowS
MergePullRequestByThreeWayResponse -> String
(Int -> MergePullRequestByThreeWayResponse -> ShowS)
-> (MergePullRequestByThreeWayResponse -> String)
-> ([MergePullRequestByThreeWayResponse] -> ShowS)
-> Show MergePullRequestByThreeWayResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergePullRequestByThreeWayResponse] -> ShowS
$cshowList :: [MergePullRequestByThreeWayResponse] -> ShowS
show :: MergePullRequestByThreeWayResponse -> String
$cshow :: MergePullRequestByThreeWayResponse -> String
showsPrec :: Int -> MergePullRequestByThreeWayResponse -> ShowS
$cshowsPrec :: Int -> MergePullRequestByThreeWayResponse -> ShowS
Prelude.Show, (forall x.
MergePullRequestByThreeWayResponse
-> Rep MergePullRequestByThreeWayResponse x)
-> (forall x.
Rep MergePullRequestByThreeWayResponse x
-> MergePullRequestByThreeWayResponse)
-> Generic MergePullRequestByThreeWayResponse
forall x.
Rep MergePullRequestByThreeWayResponse x
-> MergePullRequestByThreeWayResponse
forall x.
MergePullRequestByThreeWayResponse
-> Rep MergePullRequestByThreeWayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergePullRequestByThreeWayResponse x
-> MergePullRequestByThreeWayResponse
$cfrom :: forall x.
MergePullRequestByThreeWayResponse
-> Rep MergePullRequestByThreeWayResponse x
Prelude.Generic)
newMergePullRequestByThreeWayResponse ::
Prelude.Int ->
MergePullRequestByThreeWayResponse
newMergePullRequestByThreeWayResponse :: Int -> MergePullRequestByThreeWayResponse
newMergePullRequestByThreeWayResponse Int
pHttpStatus_ =
MergePullRequestByThreeWayResponse' :: Maybe PullRequest -> Int -> MergePullRequestByThreeWayResponse
MergePullRequestByThreeWayResponse'
{ $sel:pullRequest:MergePullRequestByThreeWayResponse' :: Maybe PullRequest
pullRequest =
Maybe PullRequest
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:MergePullRequestByThreeWayResponse' :: Int
httpStatus = Int
pHttpStatus_
}
mergePullRequestByThreeWayResponse_pullRequest :: Lens.Lens' MergePullRequestByThreeWayResponse (Prelude.Maybe PullRequest)
mergePullRequestByThreeWayResponse_pullRequest :: (Maybe PullRequest -> f (Maybe PullRequest))
-> MergePullRequestByThreeWayResponse
-> f MergePullRequestByThreeWayResponse
mergePullRequestByThreeWayResponse_pullRequest = (MergePullRequestByThreeWayResponse -> Maybe PullRequest)
-> (MergePullRequestByThreeWayResponse
-> Maybe PullRequest -> MergePullRequestByThreeWayResponse)
-> Lens
MergePullRequestByThreeWayResponse
MergePullRequestByThreeWayResponse
(Maybe PullRequest)
(Maybe PullRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWayResponse' {Maybe PullRequest
pullRequest :: Maybe PullRequest
$sel:pullRequest:MergePullRequestByThreeWayResponse' :: MergePullRequestByThreeWayResponse -> Maybe PullRequest
pullRequest} -> Maybe PullRequest
pullRequest) (\s :: MergePullRequestByThreeWayResponse
s@MergePullRequestByThreeWayResponse' {} Maybe PullRequest
a -> MergePullRequestByThreeWayResponse
s {$sel:pullRequest:MergePullRequestByThreeWayResponse' :: Maybe PullRequest
pullRequest = Maybe PullRequest
a} :: MergePullRequestByThreeWayResponse)
mergePullRequestByThreeWayResponse_httpStatus :: Lens.Lens' MergePullRequestByThreeWayResponse Prelude.Int
mergePullRequestByThreeWayResponse_httpStatus :: (Int -> f Int)
-> MergePullRequestByThreeWayResponse
-> f MergePullRequestByThreeWayResponse
mergePullRequestByThreeWayResponse_httpStatus = (MergePullRequestByThreeWayResponse -> Int)
-> (MergePullRequestByThreeWayResponse
-> Int -> MergePullRequestByThreeWayResponse)
-> Lens
MergePullRequestByThreeWayResponse
MergePullRequestByThreeWayResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergePullRequestByThreeWayResponse' {Int
httpStatus :: Int
$sel:httpStatus:MergePullRequestByThreeWayResponse' :: MergePullRequestByThreeWayResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: MergePullRequestByThreeWayResponse
s@MergePullRequestByThreeWayResponse' {} Int
a -> MergePullRequestByThreeWayResponse
s {$sel:httpStatus:MergePullRequestByThreeWayResponse' :: Int
httpStatus = Int
a} :: MergePullRequestByThreeWayResponse)
instance
Prelude.NFData
MergePullRequestByThreeWayResponse