{-# 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.DescribeMergeConflicts
(
DescribeMergeConflicts (..),
newDescribeMergeConflicts,
describeMergeConflicts_conflictDetailLevel,
describeMergeConflicts_nextToken,
describeMergeConflicts_maxMergeHunks,
describeMergeConflicts_conflictResolutionStrategy,
describeMergeConflicts_repositoryName,
describeMergeConflicts_destinationCommitSpecifier,
describeMergeConflicts_sourceCommitSpecifier,
describeMergeConflicts_mergeOption,
describeMergeConflicts_filePath,
DescribeMergeConflictsResponse (..),
newDescribeMergeConflictsResponse,
describeMergeConflictsResponse_baseCommitId,
describeMergeConflictsResponse_nextToken,
describeMergeConflictsResponse_httpStatus,
describeMergeConflictsResponse_conflictMetadata,
describeMergeConflictsResponse_mergeHunks,
describeMergeConflictsResponse_destinationCommitId,
describeMergeConflictsResponse_sourceCommitId,
)
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 DescribeMergeConflicts = DescribeMergeConflicts'
{
DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
DescribeMergeConflicts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMergeConflicts -> Maybe Int
maxMergeHunks :: Prelude.Maybe Prelude.Int,
DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
DescribeMergeConflicts -> Text
repositoryName :: Prelude.Text,
DescribeMergeConflicts -> Text
destinationCommitSpecifier :: Prelude.Text,
DescribeMergeConflicts -> Text
sourceCommitSpecifier :: Prelude.Text,
DescribeMergeConflicts -> MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum,
DescribeMergeConflicts -> Text
filePath :: Prelude.Text
}
deriving (DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
(DescribeMergeConflicts -> DescribeMergeConflicts -> Bool)
-> (DescribeMergeConflicts -> DescribeMergeConflicts -> Bool)
-> Eq DescribeMergeConflicts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
$c/= :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
== :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
$c== :: DescribeMergeConflicts -> DescribeMergeConflicts -> Bool
Prelude.Eq, ReadPrec [DescribeMergeConflicts]
ReadPrec DescribeMergeConflicts
Int -> ReadS DescribeMergeConflicts
ReadS [DescribeMergeConflicts]
(Int -> ReadS DescribeMergeConflicts)
-> ReadS [DescribeMergeConflicts]
-> ReadPrec DescribeMergeConflicts
-> ReadPrec [DescribeMergeConflicts]
-> Read DescribeMergeConflicts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMergeConflicts]
$creadListPrec :: ReadPrec [DescribeMergeConflicts]
readPrec :: ReadPrec DescribeMergeConflicts
$creadPrec :: ReadPrec DescribeMergeConflicts
readList :: ReadS [DescribeMergeConflicts]
$creadList :: ReadS [DescribeMergeConflicts]
readsPrec :: Int -> ReadS DescribeMergeConflicts
$creadsPrec :: Int -> ReadS DescribeMergeConflicts
Prelude.Read, Int -> DescribeMergeConflicts -> ShowS
[DescribeMergeConflicts] -> ShowS
DescribeMergeConflicts -> String
(Int -> DescribeMergeConflicts -> ShowS)
-> (DescribeMergeConflicts -> String)
-> ([DescribeMergeConflicts] -> ShowS)
-> Show DescribeMergeConflicts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMergeConflicts] -> ShowS
$cshowList :: [DescribeMergeConflicts] -> ShowS
show :: DescribeMergeConflicts -> String
$cshow :: DescribeMergeConflicts -> String
showsPrec :: Int -> DescribeMergeConflicts -> ShowS
$cshowsPrec :: Int -> DescribeMergeConflicts -> ShowS
Prelude.Show, (forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x)
-> (forall x.
Rep DescribeMergeConflicts x -> DescribeMergeConflicts)
-> Generic DescribeMergeConflicts
forall x. Rep DescribeMergeConflicts x -> DescribeMergeConflicts
forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeMergeConflicts x -> DescribeMergeConflicts
$cfrom :: forall x. DescribeMergeConflicts -> Rep DescribeMergeConflicts x
Prelude.Generic)
newDescribeMergeConflicts ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
MergeOptionTypeEnum ->
Prelude.Text ->
DescribeMergeConflicts
newDescribeMergeConflicts :: Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> Text
-> DescribeMergeConflicts
newDescribeMergeConflicts
Text
pRepositoryName_
Text
pDestinationCommitSpecifier_
Text
pSourceCommitSpecifier_
MergeOptionTypeEnum
pMergeOption_
Text
pFilePath_ =
DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe Int
-> Maybe ConflictResolutionStrategyTypeEnum
-> Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> Text
-> DescribeMergeConflicts
DescribeMergeConflicts'
{ $sel:conflictDetailLevel:DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel =
Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMergeConflicts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxMergeHunks:DescribeMergeConflicts' :: Maybe Int
maxMergeHunks = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:DescribeMergeConflicts' :: Text
repositoryName = Text
pRepositoryName_,
$sel:destinationCommitSpecifier:DescribeMergeConflicts' :: Text
destinationCommitSpecifier =
Text
pDestinationCommitSpecifier_,
$sel:sourceCommitSpecifier:DescribeMergeConflicts' :: Text
sourceCommitSpecifier = Text
pSourceCommitSpecifier_,
$sel:mergeOption:DescribeMergeConflicts' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
pMergeOption_,
$sel:filePath:DescribeMergeConflicts' :: Text
filePath = Text
pFilePath_
}
describeMergeConflicts_conflictDetailLevel :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe ConflictDetailLevelTypeEnum)
describeMergeConflicts_conflictDetailLevel :: (Maybe ConflictDetailLevelTypeEnum
-> f (Maybe ConflictDetailLevelTypeEnum))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_conflictDetailLevel = (DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum)
-> (DescribeMergeConflicts
-> Maybe ConflictDetailLevelTypeEnum -> DescribeMergeConflicts)
-> Lens
DescribeMergeConflicts
DescribeMergeConflicts
(Maybe ConflictDetailLevelTypeEnum)
(Maybe ConflictDetailLevelTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe ConflictDetailLevelTypeEnum
a -> DescribeMergeConflicts
s {$sel:conflictDetailLevel:DescribeMergeConflicts' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: DescribeMergeConflicts)
describeMergeConflicts_nextToken :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe Prelude.Text)
describeMergeConflicts_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_nextToken = (DescribeMergeConflicts -> Maybe Text)
-> (DescribeMergeConflicts -> Maybe Text -> DescribeMergeConflicts)
-> Lens
DescribeMergeConflicts
DescribeMergeConflicts
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe Text
a -> DescribeMergeConflicts
s {$sel:nextToken:DescribeMergeConflicts' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMergeConflicts)
describeMergeConflicts_maxMergeHunks :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe Prelude.Int)
describeMergeConflicts_maxMergeHunks :: (Maybe Int -> f (Maybe Int))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_maxMergeHunks = (DescribeMergeConflicts -> Maybe Int)
-> (DescribeMergeConflicts -> Maybe Int -> DescribeMergeConflicts)
-> Lens
DescribeMergeConflicts
DescribeMergeConflicts
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe Int
maxMergeHunks :: Maybe Int
$sel:maxMergeHunks:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Int
maxMergeHunks} -> Maybe Int
maxMergeHunks) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe Int
a -> DescribeMergeConflicts
s {$sel:maxMergeHunks:DescribeMergeConflicts' :: Maybe Int
maxMergeHunks = Maybe Int
a} :: DescribeMergeConflicts)
describeMergeConflicts_conflictResolutionStrategy :: Lens.Lens' DescribeMergeConflicts (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
describeMergeConflicts_conflictResolutionStrategy :: (Maybe ConflictResolutionStrategyTypeEnum
-> f (Maybe ConflictResolutionStrategyTypeEnum))
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_conflictResolutionStrategy = (DescribeMergeConflicts
-> Maybe ConflictResolutionStrategyTypeEnum)
-> (DescribeMergeConflicts
-> Maybe ConflictResolutionStrategyTypeEnum
-> DescribeMergeConflicts)
-> Lens
DescribeMergeConflicts
DescribeMergeConflicts
(Maybe ConflictResolutionStrategyTypeEnum)
(Maybe ConflictResolutionStrategyTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Maybe ConflictResolutionStrategyTypeEnum
a -> DescribeMergeConflicts
s {$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: DescribeMergeConflicts)
describeMergeConflicts_repositoryName :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_repositoryName :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_repositoryName = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
repositoryName :: Text
$sel:repositoryName:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
repositoryName} -> Text
repositoryName) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:repositoryName:DescribeMergeConflicts' :: Text
repositoryName = Text
a} :: DescribeMergeConflicts)
describeMergeConflicts_destinationCommitSpecifier :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_destinationCommitSpecifier :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_destinationCommitSpecifier = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
destinationCommitSpecifier :: Text
$sel:destinationCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
destinationCommitSpecifier} -> Text
destinationCommitSpecifier) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:destinationCommitSpecifier:DescribeMergeConflicts' :: Text
destinationCommitSpecifier = Text
a} :: DescribeMergeConflicts)
describeMergeConflicts_sourceCommitSpecifier :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_sourceCommitSpecifier :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_sourceCommitSpecifier = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
sourceCommitSpecifier :: Text
$sel:sourceCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
sourceCommitSpecifier} -> Text
sourceCommitSpecifier) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:sourceCommitSpecifier:DescribeMergeConflicts' :: Text
sourceCommitSpecifier = Text
a} :: DescribeMergeConflicts)
describeMergeConflicts_mergeOption :: Lens.Lens' DescribeMergeConflicts MergeOptionTypeEnum
describeMergeConflicts_mergeOption :: (MergeOptionTypeEnum -> f MergeOptionTypeEnum)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_mergeOption = (DescribeMergeConflicts -> MergeOptionTypeEnum)
-> (DescribeMergeConflicts
-> MergeOptionTypeEnum -> DescribeMergeConflicts)
-> Lens
DescribeMergeConflicts
DescribeMergeConflicts
MergeOptionTypeEnum
MergeOptionTypeEnum
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
$sel:mergeOption:DescribeMergeConflicts' :: DescribeMergeConflicts -> MergeOptionTypeEnum
mergeOption} -> MergeOptionTypeEnum
mergeOption) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} MergeOptionTypeEnum
a -> DescribeMergeConflicts
s {$sel:mergeOption:DescribeMergeConflicts' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
a} :: DescribeMergeConflicts)
describeMergeConflicts_filePath :: Lens.Lens' DescribeMergeConflicts Prelude.Text
describeMergeConflicts_filePath :: (Text -> f Text)
-> DescribeMergeConflicts -> f DescribeMergeConflicts
describeMergeConflicts_filePath = (DescribeMergeConflicts -> Text)
-> (DescribeMergeConflicts -> Text -> DescribeMergeConflicts)
-> Lens DescribeMergeConflicts DescribeMergeConflicts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflicts' {Text
filePath :: Text
$sel:filePath:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
filePath} -> Text
filePath) (\s :: DescribeMergeConflicts
s@DescribeMergeConflicts' {} Text
a -> DescribeMergeConflicts
s {$sel:filePath:DescribeMergeConflicts' :: Text
filePath = Text
a} :: DescribeMergeConflicts)
instance Core.AWSRequest DescribeMergeConflicts where
type
AWSResponse DescribeMergeConflicts =
DescribeMergeConflictsResponse
request :: DescribeMergeConflicts -> Request DescribeMergeConflicts
request = Service -> DescribeMergeConflicts -> Request DescribeMergeConflicts
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeMergeConflicts)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeMergeConflicts))
-> Logger
-> Service
-> Proxy DescribeMergeConflicts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeMergeConflicts)))
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
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse
DescribeMergeConflictsResponse'
(Maybe Text
-> Maybe Text
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse)
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
"baseCommitId")
Either
String
(Maybe Text
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse)
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
"nextToken")
Either
String
(Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse)
-> Either String Int
-> Either
String
(ConflictMetadata
-> [MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
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))
Either
String
(ConflictMetadata
-> [MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
-> Either String ConflictMetadata
-> Either
String
([MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ConflictMetadata
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"conflictMetadata")
Either
String
([MergeHunk] -> Text -> Text -> DescribeMergeConflictsResponse)
-> Either String [MergeHunk]
-> Either String (Text -> Text -> DescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [MergeHunk])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"mergeHunks" Either String (Maybe [MergeHunk])
-> [MergeHunk] -> Either String [MergeHunk]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [MergeHunk]
forall a. Monoid a => a
Prelude.mempty)
Either String (Text -> Text -> DescribeMergeConflictsResponse)
-> Either String Text
-> Either String (Text -> DescribeMergeConflictsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationCommitId")
Either String (Text -> DescribeMergeConflictsResponse)
-> Either String Text
-> Either String DescribeMergeConflictsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"sourceCommitId")
)
instance Prelude.Hashable DescribeMergeConflicts
instance Prelude.NFData DescribeMergeConflicts
instance Core.ToHeaders DescribeMergeConflicts where
toHeaders :: DescribeMergeConflicts -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeMergeConflicts -> 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.DescribeMergeConflicts" ::
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 DescribeMergeConflicts where
toJSON :: DescribeMergeConflicts -> Value
toJSON DescribeMergeConflicts' {Maybe Int
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Text
MergeOptionTypeEnum
filePath :: Text
mergeOption :: MergeOptionTypeEnum
sourceCommitSpecifier :: Text
destinationCommitSpecifier :: Text
repositoryName :: Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
maxMergeHunks :: Maybe Int
nextToken :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:filePath:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:mergeOption:DescribeMergeConflicts' :: DescribeMergeConflicts -> MergeOptionTypeEnum
$sel:sourceCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:destinationCommitSpecifier:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:repositoryName:DescribeMergeConflicts' :: DescribeMergeConflicts -> Text
$sel:conflictResolutionStrategy:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictResolutionStrategyTypeEnum
$sel:maxMergeHunks:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Int
$sel:nextToken:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe Text
$sel:conflictDetailLevel:DescribeMergeConflicts' :: DescribeMergeConflicts -> Maybe ConflictDetailLevelTypeEnum
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"nextToken" 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
nextToken,
(Text
"maxMergeHunks" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxMergeHunks,
(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,
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
"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
"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
"mergeOption" Text -> MergeOptionTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MergeOptionTypeEnum
mergeOption),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"filePath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
filePath)
]
)
instance Core.ToPath DescribeMergeConflicts where
toPath :: DescribeMergeConflicts -> ByteString
toPath = ByteString -> DescribeMergeConflicts -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeMergeConflicts where
toQuery :: DescribeMergeConflicts -> QueryString
toQuery = QueryString -> DescribeMergeConflicts -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeMergeConflictsResponse = DescribeMergeConflictsResponse'
{
DescribeMergeConflictsResponse -> Maybe Text
baseCommitId :: Prelude.Maybe Prelude.Text,
DescribeMergeConflictsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMergeConflictsResponse -> Int
httpStatus :: Prelude.Int,
DescribeMergeConflictsResponse -> ConflictMetadata
conflictMetadata :: ConflictMetadata,
DescribeMergeConflictsResponse -> [MergeHunk]
mergeHunks :: [MergeHunk],
DescribeMergeConflictsResponse -> Text
destinationCommitId :: Prelude.Text,
DescribeMergeConflictsResponse -> Text
sourceCommitId :: Prelude.Text
}
deriving (DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
(DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool)
-> (DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool)
-> Eq DescribeMergeConflictsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
$c/= :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
== :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
$c== :: DescribeMergeConflictsResponse
-> DescribeMergeConflictsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMergeConflictsResponse]
ReadPrec DescribeMergeConflictsResponse
Int -> ReadS DescribeMergeConflictsResponse
ReadS [DescribeMergeConflictsResponse]
(Int -> ReadS DescribeMergeConflictsResponse)
-> ReadS [DescribeMergeConflictsResponse]
-> ReadPrec DescribeMergeConflictsResponse
-> ReadPrec [DescribeMergeConflictsResponse]
-> Read DescribeMergeConflictsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMergeConflictsResponse]
$creadListPrec :: ReadPrec [DescribeMergeConflictsResponse]
readPrec :: ReadPrec DescribeMergeConflictsResponse
$creadPrec :: ReadPrec DescribeMergeConflictsResponse
readList :: ReadS [DescribeMergeConflictsResponse]
$creadList :: ReadS [DescribeMergeConflictsResponse]
readsPrec :: Int -> ReadS DescribeMergeConflictsResponse
$creadsPrec :: Int -> ReadS DescribeMergeConflictsResponse
Prelude.Read, Int -> DescribeMergeConflictsResponse -> ShowS
[DescribeMergeConflictsResponse] -> ShowS
DescribeMergeConflictsResponse -> String
(Int -> DescribeMergeConflictsResponse -> ShowS)
-> (DescribeMergeConflictsResponse -> String)
-> ([DescribeMergeConflictsResponse] -> ShowS)
-> Show DescribeMergeConflictsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMergeConflictsResponse] -> ShowS
$cshowList :: [DescribeMergeConflictsResponse] -> ShowS
show :: DescribeMergeConflictsResponse -> String
$cshow :: DescribeMergeConflictsResponse -> String
showsPrec :: Int -> DescribeMergeConflictsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMergeConflictsResponse -> ShowS
Prelude.Show, (forall x.
DescribeMergeConflictsResponse
-> Rep DescribeMergeConflictsResponse x)
-> (forall x.
Rep DescribeMergeConflictsResponse x
-> DescribeMergeConflictsResponse)
-> Generic DescribeMergeConflictsResponse
forall x.
Rep DescribeMergeConflictsResponse x
-> DescribeMergeConflictsResponse
forall x.
DescribeMergeConflictsResponse
-> Rep DescribeMergeConflictsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMergeConflictsResponse x
-> DescribeMergeConflictsResponse
$cfrom :: forall x.
DescribeMergeConflictsResponse
-> Rep DescribeMergeConflictsResponse x
Prelude.Generic)
newDescribeMergeConflictsResponse ::
Prelude.Int ->
ConflictMetadata ->
Prelude.Text ->
Prelude.Text ->
DescribeMergeConflictsResponse
newDescribeMergeConflictsResponse :: Int
-> ConflictMetadata
-> Text
-> Text
-> DescribeMergeConflictsResponse
newDescribeMergeConflictsResponse
Int
pHttpStatus_
ConflictMetadata
pConflictMetadata_
Text
pDestinationCommitId_
Text
pSourceCommitId_ =
DescribeMergeConflictsResponse' :: Maybe Text
-> Maybe Text
-> Int
-> ConflictMetadata
-> [MergeHunk]
-> Text
-> Text
-> DescribeMergeConflictsResponse
DescribeMergeConflictsResponse'
{ $sel:baseCommitId:DescribeMergeConflictsResponse' :: Maybe Text
baseCommitId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMergeConflictsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeMergeConflictsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:conflictMetadata:DescribeMergeConflictsResponse' :: ConflictMetadata
conflictMetadata = ConflictMetadata
pConflictMetadata_,
$sel:mergeHunks:DescribeMergeConflictsResponse' :: [MergeHunk]
mergeHunks = [MergeHunk]
forall a. Monoid a => a
Prelude.mempty,
$sel:destinationCommitId:DescribeMergeConflictsResponse' :: Text
destinationCommitId = Text
pDestinationCommitId_,
$sel:sourceCommitId:DescribeMergeConflictsResponse' :: Text
sourceCommitId = Text
pSourceCommitId_
}
describeMergeConflictsResponse_baseCommitId :: Lens.Lens' DescribeMergeConflictsResponse (Prelude.Maybe Prelude.Text)
describeMergeConflictsResponse_baseCommitId :: (Maybe Text -> f (Maybe Text))
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_baseCommitId = (DescribeMergeConflictsResponse -> Maybe Text)
-> (DescribeMergeConflictsResponse
-> Maybe Text -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Maybe Text
baseCommitId :: Maybe Text
$sel:baseCommitId:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Maybe Text
baseCommitId} -> Maybe Text
baseCommitId) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Maybe Text
a -> DescribeMergeConflictsResponse
s {$sel:baseCommitId:DescribeMergeConflictsResponse' :: Maybe Text
baseCommitId = Maybe Text
a} :: DescribeMergeConflictsResponse)
describeMergeConflictsResponse_nextToken :: Lens.Lens' DescribeMergeConflictsResponse (Prelude.Maybe Prelude.Text)
describeMergeConflictsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_nextToken = (DescribeMergeConflictsResponse -> Maybe Text)
-> (DescribeMergeConflictsResponse
-> Maybe Text -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Maybe Text
a -> DescribeMergeConflictsResponse
s {$sel:nextToken:DescribeMergeConflictsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMergeConflictsResponse)
describeMergeConflictsResponse_httpStatus :: Lens.Lens' DescribeMergeConflictsResponse Prelude.Int
describeMergeConflictsResponse_httpStatus :: (Int -> f Int)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_httpStatus = (DescribeMergeConflictsResponse -> Int)
-> (DescribeMergeConflictsResponse
-> Int -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Int
a -> DescribeMergeConflictsResponse
s {$sel:httpStatus:DescribeMergeConflictsResponse' :: Int
httpStatus = Int
a} :: DescribeMergeConflictsResponse)
describeMergeConflictsResponse_conflictMetadata :: Lens.Lens' DescribeMergeConflictsResponse ConflictMetadata
describeMergeConflictsResponse_conflictMetadata :: (ConflictMetadata -> f ConflictMetadata)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_conflictMetadata = (DescribeMergeConflictsResponse -> ConflictMetadata)
-> (DescribeMergeConflictsResponse
-> ConflictMetadata -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
ConflictMetadata
ConflictMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {ConflictMetadata
conflictMetadata :: ConflictMetadata
$sel:conflictMetadata:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> ConflictMetadata
conflictMetadata} -> ConflictMetadata
conflictMetadata) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} ConflictMetadata
a -> DescribeMergeConflictsResponse
s {$sel:conflictMetadata:DescribeMergeConflictsResponse' :: ConflictMetadata
conflictMetadata = ConflictMetadata
a} :: DescribeMergeConflictsResponse)
describeMergeConflictsResponse_mergeHunks :: Lens.Lens' DescribeMergeConflictsResponse [MergeHunk]
describeMergeConflictsResponse_mergeHunks :: ([MergeHunk] -> f [MergeHunk])
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_mergeHunks = (DescribeMergeConflictsResponse -> [MergeHunk])
-> (DescribeMergeConflictsResponse
-> [MergeHunk] -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
[MergeHunk]
[MergeHunk]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {[MergeHunk]
mergeHunks :: [MergeHunk]
$sel:mergeHunks:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> [MergeHunk]
mergeHunks} -> [MergeHunk]
mergeHunks) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} [MergeHunk]
a -> DescribeMergeConflictsResponse
s {$sel:mergeHunks:DescribeMergeConflictsResponse' :: [MergeHunk]
mergeHunks = [MergeHunk]
a} :: DescribeMergeConflictsResponse) (([MergeHunk] -> f [MergeHunk])
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse)
-> (([MergeHunk] -> f [MergeHunk]) -> [MergeHunk] -> f [MergeHunk])
-> ([MergeHunk] -> f [MergeHunk])
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MergeHunk] -> f [MergeHunk]) -> [MergeHunk] -> f [MergeHunk]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMergeConflictsResponse_destinationCommitId :: Lens.Lens' DescribeMergeConflictsResponse Prelude.Text
describeMergeConflictsResponse_destinationCommitId :: (Text -> f Text)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_destinationCommitId = (DescribeMergeConflictsResponse -> Text)
-> (DescribeMergeConflictsResponse
-> Text -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Text
destinationCommitId :: Text
$sel:destinationCommitId:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Text
destinationCommitId} -> Text
destinationCommitId) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Text
a -> DescribeMergeConflictsResponse
s {$sel:destinationCommitId:DescribeMergeConflictsResponse' :: Text
destinationCommitId = Text
a} :: DescribeMergeConflictsResponse)
describeMergeConflictsResponse_sourceCommitId :: Lens.Lens' DescribeMergeConflictsResponse Prelude.Text
describeMergeConflictsResponse_sourceCommitId :: (Text -> f Text)
-> DescribeMergeConflictsResponse
-> f DescribeMergeConflictsResponse
describeMergeConflictsResponse_sourceCommitId = (DescribeMergeConflictsResponse -> Text)
-> (DescribeMergeConflictsResponse
-> Text -> DescribeMergeConflictsResponse)
-> Lens
DescribeMergeConflictsResponse
DescribeMergeConflictsResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMergeConflictsResponse' {Text
sourceCommitId :: Text
$sel:sourceCommitId:DescribeMergeConflictsResponse' :: DescribeMergeConflictsResponse -> Text
sourceCommitId} -> Text
sourceCommitId) (\s :: DescribeMergeConflictsResponse
s@DescribeMergeConflictsResponse' {} Text
a -> DescribeMergeConflictsResponse
s {$sel:sourceCommitId:DescribeMergeConflictsResponse' :: Text
sourceCommitId = Text
a} :: DescribeMergeConflictsResponse)
instance
Prelude.NFData
DescribeMergeConflictsResponse