{-# 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.CreateUnreferencedMergeCommit
(
CreateUnreferencedMergeCommit (..),
newCreateUnreferencedMergeCommit,
createUnreferencedMergeCommit_email,
createUnreferencedMergeCommit_authorName,
createUnreferencedMergeCommit_conflictDetailLevel,
createUnreferencedMergeCommit_commitMessage,
createUnreferencedMergeCommit_conflictResolution,
createUnreferencedMergeCommit_conflictResolutionStrategy,
createUnreferencedMergeCommit_keepEmptyFolders,
createUnreferencedMergeCommit_repositoryName,
createUnreferencedMergeCommit_sourceCommitSpecifier,
createUnreferencedMergeCommit_destinationCommitSpecifier,
createUnreferencedMergeCommit_mergeOption,
CreateUnreferencedMergeCommitResponse (..),
newCreateUnreferencedMergeCommitResponse,
createUnreferencedMergeCommitResponse_commitId,
createUnreferencedMergeCommitResponse_treeId,
createUnreferencedMergeCommitResponse_httpStatus,
)
where
import Amazonka.CodeCommit.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateUnreferencedMergeCommit = CreateUnreferencedMergeCommit'
{
CreateUnreferencedMergeCommit -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
CreateUnreferencedMergeCommit -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
CreateUnreferencedMergeCommit -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
CreateUnreferencedMergeCommit -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
CreateUnreferencedMergeCommit -> Maybe ConflictResolution
conflictResolution :: Prelude.Maybe ConflictResolution,
CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
CreateUnreferencedMergeCommit -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
CreateUnreferencedMergeCommit -> Text
repositoryName :: Prelude.Text,
CreateUnreferencedMergeCommit -> Text
sourceCommitSpecifier :: Prelude.Text,
CreateUnreferencedMergeCommit -> Text
destinationCommitSpecifier :: Prelude.Text,
CreateUnreferencedMergeCommit -> MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
}
deriving (CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
(CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool)
-> (CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool)
-> Eq CreateUnreferencedMergeCommit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
$c/= :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
== :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
$c== :: CreateUnreferencedMergeCommit
-> CreateUnreferencedMergeCommit -> Bool
Prelude.Eq, ReadPrec [CreateUnreferencedMergeCommit]
ReadPrec CreateUnreferencedMergeCommit
Int -> ReadS CreateUnreferencedMergeCommit
ReadS [CreateUnreferencedMergeCommit]
(Int -> ReadS CreateUnreferencedMergeCommit)
-> ReadS [CreateUnreferencedMergeCommit]
-> ReadPrec CreateUnreferencedMergeCommit
-> ReadPrec [CreateUnreferencedMergeCommit]
-> Read CreateUnreferencedMergeCommit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUnreferencedMergeCommit]
$creadListPrec :: ReadPrec [CreateUnreferencedMergeCommit]
readPrec :: ReadPrec CreateUnreferencedMergeCommit
$creadPrec :: ReadPrec CreateUnreferencedMergeCommit
readList :: ReadS [CreateUnreferencedMergeCommit]
$creadList :: ReadS [CreateUnreferencedMergeCommit]
readsPrec :: Int -> ReadS CreateUnreferencedMergeCommit
$creadsPrec :: Int -> ReadS CreateUnreferencedMergeCommit
Prelude.Read, Int -> CreateUnreferencedMergeCommit -> ShowS
[CreateUnreferencedMergeCommit] -> ShowS
CreateUnreferencedMergeCommit -> String
(Int -> CreateUnreferencedMergeCommit -> ShowS)
-> (CreateUnreferencedMergeCommit -> String)
-> ([CreateUnreferencedMergeCommit] -> ShowS)
-> Show CreateUnreferencedMergeCommit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUnreferencedMergeCommit] -> ShowS
$cshowList :: [CreateUnreferencedMergeCommit] -> ShowS
show :: CreateUnreferencedMergeCommit -> String
$cshow :: CreateUnreferencedMergeCommit -> String
showsPrec :: Int -> CreateUnreferencedMergeCommit -> ShowS
$cshowsPrec :: Int -> CreateUnreferencedMergeCommit -> ShowS
Prelude.Show, (forall x.
CreateUnreferencedMergeCommit
-> Rep CreateUnreferencedMergeCommit x)
-> (forall x.
Rep CreateUnreferencedMergeCommit x
-> CreateUnreferencedMergeCommit)
-> Generic CreateUnreferencedMergeCommit
forall x.
Rep CreateUnreferencedMergeCommit x
-> CreateUnreferencedMergeCommit
forall x.
CreateUnreferencedMergeCommit
-> Rep CreateUnreferencedMergeCommit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUnreferencedMergeCommit x
-> CreateUnreferencedMergeCommit
$cfrom :: forall x.
CreateUnreferencedMergeCommit
-> Rep CreateUnreferencedMergeCommit x
Prelude.Generic)
newCreateUnreferencedMergeCommit ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
MergeOptionTypeEnum ->
CreateUnreferencedMergeCommit
newCreateUnreferencedMergeCommit :: Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> CreateUnreferencedMergeCommit
newCreateUnreferencedMergeCommit
Text
pRepositoryName_
Text
pSourceCommitSpecifier_
Text
pDestinationCommitSpecifier_
MergeOptionTypeEnum
pMergeOption_ =
CreateUnreferencedMergeCommit' :: Maybe Text
-> Maybe Text
-> Maybe ConflictDetailLevelTypeEnum
-> Maybe Text
-> Maybe ConflictResolution
-> Maybe ConflictResolutionStrategyTypeEnum
-> Maybe Bool
-> Text
-> Text
-> Text
-> MergeOptionTypeEnum
-> CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit'
{ $sel:email:CreateUnreferencedMergeCommit' :: Maybe Text
email =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorName:CreateUnreferencedMergeCommit' :: Maybe Text
authorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:commitMessage:CreateUnreferencedMergeCommit' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolution:CreateUnreferencedMergeCommit' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: Maybe Bool
keepEmptyFolders = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:CreateUnreferencedMergeCommit' :: Text
repositoryName = Text
pRepositoryName_,
$sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
sourceCommitSpecifier =
Text
pSourceCommitSpecifier_,
$sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
destinationCommitSpecifier =
Text
pDestinationCommitSpecifier_,
$sel:mergeOption:CreateUnreferencedMergeCommit' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
pMergeOption_
}
createUnreferencedMergeCommit_email :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommit_email :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_email = (CreateUnreferencedMergeCommit -> Maybe Text)
-> (CreateUnreferencedMergeCommit
-> Maybe Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Text
email :: Maybe Text
$sel:email:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
email} -> Maybe Text
email) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Text
a -> CreateUnreferencedMergeCommit
s {$sel:email:CreateUnreferencedMergeCommit' :: Maybe Text
email = Maybe Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_authorName :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommit_authorName :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_authorName = (CreateUnreferencedMergeCommit -> Maybe Text)
-> (CreateUnreferencedMergeCommit
-> Maybe Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Text
authorName :: Maybe Text
$sel:authorName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
authorName} -> Maybe Text
authorName) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Text
a -> CreateUnreferencedMergeCommit
s {$sel:authorName:CreateUnreferencedMergeCommit' :: Maybe Text
authorName = Maybe Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_conflictDetailLevel :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe ConflictDetailLevelTypeEnum)
createUnreferencedMergeCommit_conflictDetailLevel :: (Maybe ConflictDetailLevelTypeEnum
-> f (Maybe ConflictDetailLevelTypeEnum))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_conflictDetailLevel = (CreateUnreferencedMergeCommit
-> Maybe ConflictDetailLevelTypeEnum)
-> (CreateUnreferencedMergeCommit
-> Maybe ConflictDetailLevelTypeEnum
-> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe ConflictDetailLevelTypeEnum)
(Maybe ConflictDetailLevelTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe ConflictDetailLevelTypeEnum
a -> CreateUnreferencedMergeCommit
s {$sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_commitMessage :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommit_commitMessage :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_commitMessage = (CreateUnreferencedMergeCommit -> Maybe Text)
-> (CreateUnreferencedMergeCommit
-> Maybe Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Text
a -> CreateUnreferencedMergeCommit
s {$sel:commitMessage:CreateUnreferencedMergeCommit' :: Maybe Text
commitMessage = Maybe Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_conflictResolution :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe ConflictResolution)
createUnreferencedMergeCommit_conflictResolution :: (Maybe ConflictResolution -> f (Maybe ConflictResolution))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_conflictResolution = (CreateUnreferencedMergeCommit -> Maybe ConflictResolution)
-> (CreateUnreferencedMergeCommit
-> Maybe ConflictResolution -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe ConflictResolution)
(Maybe ConflictResolution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe ConflictResolution
conflictResolution :: Maybe ConflictResolution
$sel:conflictResolution:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictResolution
conflictResolution} -> Maybe ConflictResolution
conflictResolution) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe ConflictResolution
a -> CreateUnreferencedMergeCommit
s {$sel:conflictResolution:CreateUnreferencedMergeCommit' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_conflictResolutionStrategy :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
createUnreferencedMergeCommit_conflictResolutionStrategy :: (Maybe ConflictResolutionStrategyTypeEnum
-> f (Maybe ConflictResolutionStrategyTypeEnum))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_conflictResolutionStrategy = (CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum)
-> (CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum
-> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe ConflictResolutionStrategyTypeEnum)
(Maybe ConflictResolutionStrategyTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe ConflictResolutionStrategyTypeEnum
a -> CreateUnreferencedMergeCommit
s {$sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_keepEmptyFolders :: Lens.Lens' CreateUnreferencedMergeCommit (Prelude.Maybe Prelude.Bool)
createUnreferencedMergeCommit_keepEmptyFolders :: (Maybe Bool -> f (Maybe Bool))
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_keepEmptyFolders = (CreateUnreferencedMergeCommit -> Maybe Bool)
-> (CreateUnreferencedMergeCommit
-> Maybe Bool -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Maybe Bool
a -> CreateUnreferencedMergeCommit
s {$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_repositoryName :: Lens.Lens' CreateUnreferencedMergeCommit Prelude.Text
createUnreferencedMergeCommit_repositoryName :: (Text -> f Text)
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_repositoryName = (CreateUnreferencedMergeCommit -> Text)
-> (CreateUnreferencedMergeCommit
-> Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Text
repositoryName :: Text
$sel:repositoryName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
repositoryName} -> Text
repositoryName) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Text
a -> CreateUnreferencedMergeCommit
s {$sel:repositoryName:CreateUnreferencedMergeCommit' :: Text
repositoryName = Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_sourceCommitSpecifier :: Lens.Lens' CreateUnreferencedMergeCommit Prelude.Text
createUnreferencedMergeCommit_sourceCommitSpecifier :: (Text -> f Text)
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_sourceCommitSpecifier = (CreateUnreferencedMergeCommit -> Text)
-> (CreateUnreferencedMergeCommit
-> Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Text
sourceCommitSpecifier :: Text
$sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
sourceCommitSpecifier} -> Text
sourceCommitSpecifier) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Text
a -> CreateUnreferencedMergeCommit
s {$sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
sourceCommitSpecifier = Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_destinationCommitSpecifier :: Lens.Lens' CreateUnreferencedMergeCommit Prelude.Text
createUnreferencedMergeCommit_destinationCommitSpecifier :: (Text -> f Text)
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_destinationCommitSpecifier = (CreateUnreferencedMergeCommit -> Text)
-> (CreateUnreferencedMergeCommit
-> Text -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {Text
destinationCommitSpecifier :: Text
$sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
destinationCommitSpecifier} -> Text
destinationCommitSpecifier) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} Text
a -> CreateUnreferencedMergeCommit
s {$sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: Text
destinationCommitSpecifier = Text
a} :: CreateUnreferencedMergeCommit)
createUnreferencedMergeCommit_mergeOption :: Lens.Lens' CreateUnreferencedMergeCommit MergeOptionTypeEnum
createUnreferencedMergeCommit_mergeOption :: (MergeOptionTypeEnum -> f MergeOptionTypeEnum)
-> CreateUnreferencedMergeCommit -> f CreateUnreferencedMergeCommit
createUnreferencedMergeCommit_mergeOption = (CreateUnreferencedMergeCommit -> MergeOptionTypeEnum)
-> (CreateUnreferencedMergeCommit
-> MergeOptionTypeEnum -> CreateUnreferencedMergeCommit)
-> Lens
CreateUnreferencedMergeCommit
CreateUnreferencedMergeCommit
MergeOptionTypeEnum
MergeOptionTypeEnum
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommit' {MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
$sel:mergeOption:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> MergeOptionTypeEnum
mergeOption} -> MergeOptionTypeEnum
mergeOption) (\s :: CreateUnreferencedMergeCommit
s@CreateUnreferencedMergeCommit' {} MergeOptionTypeEnum
a -> CreateUnreferencedMergeCommit
s {$sel:mergeOption:CreateUnreferencedMergeCommit' :: MergeOptionTypeEnum
mergeOption = MergeOptionTypeEnum
a} :: CreateUnreferencedMergeCommit)
instance
Core.AWSRequest
CreateUnreferencedMergeCommit
where
type
AWSResponse CreateUnreferencedMergeCommit =
CreateUnreferencedMergeCommitResponse
request :: CreateUnreferencedMergeCommit
-> Request CreateUnreferencedMergeCommit
request = Service
-> CreateUnreferencedMergeCommit
-> Request CreateUnreferencedMergeCommit
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateUnreferencedMergeCommit
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateUnreferencedMergeCommit)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateUnreferencedMergeCommit))
-> Logger
-> Service
-> Proxy CreateUnreferencedMergeCommit
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateUnreferencedMergeCommit)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse'
(Maybe Text
-> Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"commitId")
Either
String (Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateUnreferencedMergeCommitResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"treeId")
Either String (Int -> CreateUnreferencedMergeCommitResponse)
-> Either String Int
-> Either String CreateUnreferencedMergeCommitResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
CreateUnreferencedMergeCommit
instance Prelude.NFData CreateUnreferencedMergeCommit
instance Core.ToHeaders CreateUnreferencedMergeCommit where
toHeaders :: CreateUnreferencedMergeCommit -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateUnreferencedMergeCommit -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeCommit_20150413.CreateUnreferencedMergeCommit" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateUnreferencedMergeCommit where
toJSON :: CreateUnreferencedMergeCommit -> Value
toJSON CreateUnreferencedMergeCommit' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
MergeOptionTypeEnum
mergeOption :: MergeOptionTypeEnum
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
keepEmptyFolders :: Maybe Bool
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
commitMessage :: Maybe Text
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
authorName :: Maybe Text
email :: Maybe Text
$sel:mergeOption:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> MergeOptionTypeEnum
$sel:destinationCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:sourceCommitSpecifier:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:repositoryName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Text
$sel:keepEmptyFolders:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Bool
$sel:conflictResolutionStrategy:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit
-> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictResolution
$sel:commitMessage:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
$sel:conflictDetailLevel:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe ConflictDetailLevelTypeEnum
$sel:authorName:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
$sel:email:CreateUnreferencedMergeCommit' :: CreateUnreferencedMergeCommit -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"email" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
email,
(Text
"authorName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
authorName,
(Text
"conflictDetailLevel" Text -> ConflictDetailLevelTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConflictDetailLevelTypeEnum -> Pair)
-> Maybe ConflictDetailLevelTypeEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel,
(Text
"commitMessage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
commitMessage,
(Text
"conflictResolution" Text -> ConflictResolution -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConflictResolution -> Pair)
-> Maybe ConflictResolution -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolution
conflictResolution,
(Text
"conflictResolutionStrategy" Text -> ConflictResolutionStrategyTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConflictResolutionStrategyTypeEnum -> Pair)
-> Maybe ConflictResolutionStrategyTypeEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy,
(Text
"keepEmptyFolders" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
keepEmptyFolders,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"sourceCommitSpecifier"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceCommitSpecifier
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"destinationCommitSpecifier"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationCommitSpecifier
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"mergeOption" Text -> MergeOptionTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MergeOptionTypeEnum
mergeOption)
]
)
instance Core.ToPath CreateUnreferencedMergeCommit where
toPath :: CreateUnreferencedMergeCommit -> ByteString
toPath = ByteString -> CreateUnreferencedMergeCommit -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateUnreferencedMergeCommit where
toQuery :: CreateUnreferencedMergeCommit -> QueryString
toQuery = QueryString -> CreateUnreferencedMergeCommit -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateUnreferencedMergeCommitResponse = CreateUnreferencedMergeCommitResponse'
{
CreateUnreferencedMergeCommitResponse -> Maybe Text
commitId :: Prelude.Maybe Prelude.Text,
CreateUnreferencedMergeCommitResponse -> Maybe Text
treeId :: Prelude.Maybe Prelude.Text,
CreateUnreferencedMergeCommitResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
(CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool)
-> (CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool)
-> Eq CreateUnreferencedMergeCommitResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
$c/= :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
== :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
$c== :: CreateUnreferencedMergeCommitResponse
-> CreateUnreferencedMergeCommitResponse -> Bool
Prelude.Eq, ReadPrec [CreateUnreferencedMergeCommitResponse]
ReadPrec CreateUnreferencedMergeCommitResponse
Int -> ReadS CreateUnreferencedMergeCommitResponse
ReadS [CreateUnreferencedMergeCommitResponse]
(Int -> ReadS CreateUnreferencedMergeCommitResponse)
-> ReadS [CreateUnreferencedMergeCommitResponse]
-> ReadPrec CreateUnreferencedMergeCommitResponse
-> ReadPrec [CreateUnreferencedMergeCommitResponse]
-> Read CreateUnreferencedMergeCommitResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUnreferencedMergeCommitResponse]
$creadListPrec :: ReadPrec [CreateUnreferencedMergeCommitResponse]
readPrec :: ReadPrec CreateUnreferencedMergeCommitResponse
$creadPrec :: ReadPrec CreateUnreferencedMergeCommitResponse
readList :: ReadS [CreateUnreferencedMergeCommitResponse]
$creadList :: ReadS [CreateUnreferencedMergeCommitResponse]
readsPrec :: Int -> ReadS CreateUnreferencedMergeCommitResponse
$creadsPrec :: Int -> ReadS CreateUnreferencedMergeCommitResponse
Prelude.Read, Int -> CreateUnreferencedMergeCommitResponse -> ShowS
[CreateUnreferencedMergeCommitResponse] -> ShowS
CreateUnreferencedMergeCommitResponse -> String
(Int -> CreateUnreferencedMergeCommitResponse -> ShowS)
-> (CreateUnreferencedMergeCommitResponse -> String)
-> ([CreateUnreferencedMergeCommitResponse] -> ShowS)
-> Show CreateUnreferencedMergeCommitResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUnreferencedMergeCommitResponse] -> ShowS
$cshowList :: [CreateUnreferencedMergeCommitResponse] -> ShowS
show :: CreateUnreferencedMergeCommitResponse -> String
$cshow :: CreateUnreferencedMergeCommitResponse -> String
showsPrec :: Int -> CreateUnreferencedMergeCommitResponse -> ShowS
$cshowsPrec :: Int -> CreateUnreferencedMergeCommitResponse -> ShowS
Prelude.Show, (forall x.
CreateUnreferencedMergeCommitResponse
-> Rep CreateUnreferencedMergeCommitResponse x)
-> (forall x.
Rep CreateUnreferencedMergeCommitResponse x
-> CreateUnreferencedMergeCommitResponse)
-> Generic CreateUnreferencedMergeCommitResponse
forall x.
Rep CreateUnreferencedMergeCommitResponse x
-> CreateUnreferencedMergeCommitResponse
forall x.
CreateUnreferencedMergeCommitResponse
-> Rep CreateUnreferencedMergeCommitResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUnreferencedMergeCommitResponse x
-> CreateUnreferencedMergeCommitResponse
$cfrom :: forall x.
CreateUnreferencedMergeCommitResponse
-> Rep CreateUnreferencedMergeCommitResponse x
Prelude.Generic)
newCreateUnreferencedMergeCommitResponse ::
Prelude.Int ->
CreateUnreferencedMergeCommitResponse
newCreateUnreferencedMergeCommitResponse :: Int -> CreateUnreferencedMergeCommitResponse
newCreateUnreferencedMergeCommitResponse Int
pHttpStatus_ =
CreateUnreferencedMergeCommitResponse' :: Maybe Text
-> Maybe Text -> Int -> CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse'
{ $sel:commitId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
commitId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:treeId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
treeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateUnreferencedMergeCommitResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createUnreferencedMergeCommitResponse_commitId :: Lens.Lens' CreateUnreferencedMergeCommitResponse (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommitResponse_commitId :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommitResponse
-> f CreateUnreferencedMergeCommitResponse
createUnreferencedMergeCommitResponse_commitId = (CreateUnreferencedMergeCommitResponse -> Maybe Text)
-> (CreateUnreferencedMergeCommitResponse
-> Maybe Text -> CreateUnreferencedMergeCommitResponse)
-> Lens
CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommitResponse' {Maybe Text
commitId :: Maybe Text
$sel:commitId:CreateUnreferencedMergeCommitResponse' :: CreateUnreferencedMergeCommitResponse -> Maybe Text
commitId} -> Maybe Text
commitId) (\s :: CreateUnreferencedMergeCommitResponse
s@CreateUnreferencedMergeCommitResponse' {} Maybe Text
a -> CreateUnreferencedMergeCommitResponse
s {$sel:commitId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
commitId = Maybe Text
a} :: CreateUnreferencedMergeCommitResponse)
createUnreferencedMergeCommitResponse_treeId :: Lens.Lens' CreateUnreferencedMergeCommitResponse (Prelude.Maybe Prelude.Text)
createUnreferencedMergeCommitResponse_treeId :: (Maybe Text -> f (Maybe Text))
-> CreateUnreferencedMergeCommitResponse
-> f CreateUnreferencedMergeCommitResponse
createUnreferencedMergeCommitResponse_treeId = (CreateUnreferencedMergeCommitResponse -> Maybe Text)
-> (CreateUnreferencedMergeCommitResponse
-> Maybe Text -> CreateUnreferencedMergeCommitResponse)
-> Lens
CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommitResponse' {Maybe Text
treeId :: Maybe Text
$sel:treeId:CreateUnreferencedMergeCommitResponse' :: CreateUnreferencedMergeCommitResponse -> Maybe Text
treeId} -> Maybe Text
treeId) (\s :: CreateUnreferencedMergeCommitResponse
s@CreateUnreferencedMergeCommitResponse' {} Maybe Text
a -> CreateUnreferencedMergeCommitResponse
s {$sel:treeId:CreateUnreferencedMergeCommitResponse' :: Maybe Text
treeId = Maybe Text
a} :: CreateUnreferencedMergeCommitResponse)
createUnreferencedMergeCommitResponse_httpStatus :: Lens.Lens' CreateUnreferencedMergeCommitResponse Prelude.Int
createUnreferencedMergeCommitResponse_httpStatus :: (Int -> f Int)
-> CreateUnreferencedMergeCommitResponse
-> f CreateUnreferencedMergeCommitResponse
createUnreferencedMergeCommitResponse_httpStatus = (CreateUnreferencedMergeCommitResponse -> Int)
-> (CreateUnreferencedMergeCommitResponse
-> Int -> CreateUnreferencedMergeCommitResponse)
-> Lens
CreateUnreferencedMergeCommitResponse
CreateUnreferencedMergeCommitResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUnreferencedMergeCommitResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateUnreferencedMergeCommitResponse' :: CreateUnreferencedMergeCommitResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateUnreferencedMergeCommitResponse
s@CreateUnreferencedMergeCommitResponse' {} Int
a -> CreateUnreferencedMergeCommitResponse
s {$sel:httpStatus:CreateUnreferencedMergeCommitResponse' :: Int
httpStatus = Int
a} :: CreateUnreferencedMergeCommitResponse)
instance
Prelude.NFData
CreateUnreferencedMergeCommitResponse