{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CodeCommit.MergeBranchesBySquash
(
MergeBranchesBySquash (..),
newMergeBranchesBySquash,
mergeBranchesBySquash_authorName,
mergeBranchesBySquash_commitMessage,
mergeBranchesBySquash_conflictDetailLevel,
mergeBranchesBySquash_conflictResolution,
mergeBranchesBySquash_conflictResolutionStrategy,
mergeBranchesBySquash_email,
mergeBranchesBySquash_keepEmptyFolders,
mergeBranchesBySquash_targetBranch,
mergeBranchesBySquash_repositoryName,
mergeBranchesBySquash_sourceCommitSpecifier,
mergeBranchesBySquash_destinationCommitSpecifier,
MergeBranchesBySquashResponse (..),
newMergeBranchesBySquashResponse,
mergeBranchesBySquashResponse_commitId,
mergeBranchesBySquashResponse_treeId,
mergeBranchesBySquashResponse_httpStatus,
)
where
import Amazonka.CodeCommit.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data MergeBranchesBySquash = MergeBranchesBySquash'
{
MergeBranchesBySquash -> Maybe Text
authorName :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Prelude.Maybe ConflictDetailLevelTypeEnum,
MergeBranchesBySquash -> Maybe ConflictResolution
conflictResolution :: Prelude.Maybe ConflictResolution,
MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Prelude.Maybe ConflictResolutionStrategyTypeEnum,
MergeBranchesBySquash -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
MergeBranchesBySquash -> Maybe Text
targetBranch :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquash -> Text
repositoryName :: Prelude.Text,
MergeBranchesBySquash -> Text
sourceCommitSpecifier :: Prelude.Text,
MergeBranchesBySquash -> Text
destinationCommitSpecifier :: Prelude.Text
}
deriving (MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
$c/= :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
== :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
$c== :: MergeBranchesBySquash -> MergeBranchesBySquash -> Bool
Prelude.Eq, ReadPrec [MergeBranchesBySquash]
ReadPrec MergeBranchesBySquash
Int -> ReadS MergeBranchesBySquash
ReadS [MergeBranchesBySquash]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesBySquash]
$creadListPrec :: ReadPrec [MergeBranchesBySquash]
readPrec :: ReadPrec MergeBranchesBySquash
$creadPrec :: ReadPrec MergeBranchesBySquash
readList :: ReadS [MergeBranchesBySquash]
$creadList :: ReadS [MergeBranchesBySquash]
readsPrec :: Int -> ReadS MergeBranchesBySquash
$creadsPrec :: Int -> ReadS MergeBranchesBySquash
Prelude.Read, Int -> MergeBranchesBySquash -> ShowS
[MergeBranchesBySquash] -> ShowS
MergeBranchesBySquash -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesBySquash] -> ShowS
$cshowList :: [MergeBranchesBySquash] -> ShowS
show :: MergeBranchesBySquash -> String
$cshow :: MergeBranchesBySquash -> String
showsPrec :: Int -> MergeBranchesBySquash -> ShowS
$cshowsPrec :: Int -> MergeBranchesBySquash -> ShowS
Prelude.Show, forall x. Rep MergeBranchesBySquash x -> MergeBranchesBySquash
forall x. MergeBranchesBySquash -> Rep MergeBranchesBySquash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MergeBranchesBySquash x -> MergeBranchesBySquash
$cfrom :: forall x. MergeBranchesBySquash -> Rep MergeBranchesBySquash x
Prelude.Generic)
newMergeBranchesBySquash ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
MergeBranchesBySquash
newMergeBranchesBySquash :: Text -> Text -> Text -> MergeBranchesBySquash
newMergeBranchesBySquash
Text
pRepositoryName_
Text
pSourceCommitSpecifier_
Text
pDestinationCommitSpecifier_ =
MergeBranchesBySquash'
{ $sel:authorName:MergeBranchesBySquash' :: Maybe Text
authorName =
forall a. Maybe a
Prelude.Nothing,
$sel:commitMessage:MergeBranchesBySquash' :: Maybe Text
commitMessage = forall a. Maybe a
Prelude.Nothing,
$sel:conflictDetailLevel:MergeBranchesBySquash' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolution:MergeBranchesBySquash' :: Maybe ConflictResolution
conflictResolution = forall a. Maybe a
Prelude.Nothing,
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = forall a. Maybe a
Prelude.Nothing,
$sel:email:MergeBranchesBySquash' :: Maybe Text
email = forall a. Maybe a
Prelude.Nothing,
$sel:keepEmptyFolders:MergeBranchesBySquash' :: Maybe Bool
keepEmptyFolders = forall a. Maybe a
Prelude.Nothing,
$sel:targetBranch:MergeBranchesBySquash' :: Maybe Text
targetBranch = forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:MergeBranchesBySquash' :: Text
repositoryName = Text
pRepositoryName_,
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: Text
sourceCommitSpecifier = Text
pSourceCommitSpecifier_,
$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: Text
destinationCommitSpecifier =
Text
pDestinationCommitSpecifier_
}
mergeBranchesBySquash_authorName :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe Prelude.Text)
mergeBranchesBySquash_authorName :: Lens' MergeBranchesBySquash (Maybe Text)
mergeBranchesBySquash_authorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe Text
authorName :: Maybe Text
$sel:authorName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
authorName} -> Maybe Text
authorName) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe Text
a -> MergeBranchesBySquash
s {$sel:authorName:MergeBranchesBySquash' :: Maybe Text
authorName = Maybe Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_commitMessage :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe Prelude.Text)
mergeBranchesBySquash_commitMessage :: Lens' MergeBranchesBySquash (Maybe Text)
mergeBranchesBySquash_commitMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe Text
a -> MergeBranchesBySquash
s {$sel:commitMessage:MergeBranchesBySquash' :: Maybe Text
commitMessage = Maybe Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_conflictDetailLevel :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe ConflictDetailLevelTypeEnum)
mergeBranchesBySquash_conflictDetailLevel :: Lens' MergeBranchesBySquash (Maybe ConflictDetailLevelTypeEnum)
mergeBranchesBySquash_conflictDetailLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
$sel:conflictDetailLevel:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel} -> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe ConflictDetailLevelTypeEnum
a -> MergeBranchesBySquash
s {$sel:conflictDetailLevel:MergeBranchesBySquash' :: Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel = Maybe ConflictDetailLevelTypeEnum
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_conflictResolution :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe ConflictResolution)
mergeBranchesBySquash_conflictResolution :: Lens' MergeBranchesBySquash (Maybe ConflictResolution)
mergeBranchesBySquash_conflictResolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe ConflictResolution
conflictResolution :: Maybe ConflictResolution
$sel:conflictResolution:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolution
conflictResolution} -> Maybe ConflictResolution
conflictResolution) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe ConflictResolution
a -> MergeBranchesBySquash
s {$sel:conflictResolution:MergeBranchesBySquash' :: Maybe ConflictResolution
conflictResolution = Maybe ConflictResolution
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_conflictResolutionStrategy :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe ConflictResolutionStrategyTypeEnum)
mergeBranchesBySquash_conflictResolutionStrategy :: Lens'
MergeBranchesBySquash (Maybe ConflictResolutionStrategyTypeEnum)
mergeBranchesBySquash_conflictResolutionStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy} -> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe ConflictResolutionStrategyTypeEnum
a -> MergeBranchesBySquash
s {$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy = Maybe ConflictResolutionStrategyTypeEnum
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_email :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe Prelude.Text)
mergeBranchesBySquash_email :: Lens' MergeBranchesBySquash (Maybe Text)
mergeBranchesBySquash_email = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe Text
email :: Maybe Text
$sel:email:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
email} -> Maybe Text
email) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe Text
a -> MergeBranchesBySquash
s {$sel:email:MergeBranchesBySquash' :: Maybe Text
email = Maybe Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_keepEmptyFolders :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe Prelude.Bool)
mergeBranchesBySquash_keepEmptyFolders :: Lens' MergeBranchesBySquash (Maybe Bool)
mergeBranchesBySquash_keepEmptyFolders = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe Bool
a -> MergeBranchesBySquash
s {$sel:keepEmptyFolders:MergeBranchesBySquash' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_targetBranch :: Lens.Lens' MergeBranchesBySquash (Prelude.Maybe Prelude.Text)
mergeBranchesBySquash_targetBranch :: Lens' MergeBranchesBySquash (Maybe Text)
mergeBranchesBySquash_targetBranch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Maybe Text
targetBranch :: Maybe Text
$sel:targetBranch:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
targetBranch} -> Maybe Text
targetBranch) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Maybe Text
a -> MergeBranchesBySquash
s {$sel:targetBranch:MergeBranchesBySquash' :: Maybe Text
targetBranch = Maybe Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_repositoryName :: Lens.Lens' MergeBranchesBySquash Prelude.Text
mergeBranchesBySquash_repositoryName :: Lens' MergeBranchesBySquash Text
mergeBranchesBySquash_repositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Text
repositoryName :: Text
$sel:repositoryName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
repositoryName} -> Text
repositoryName) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Text
a -> MergeBranchesBySquash
s {$sel:repositoryName:MergeBranchesBySquash' :: Text
repositoryName = Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_sourceCommitSpecifier :: Lens.Lens' MergeBranchesBySquash Prelude.Text
mergeBranchesBySquash_sourceCommitSpecifier :: Lens' MergeBranchesBySquash Text
mergeBranchesBySquash_sourceCommitSpecifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Text
sourceCommitSpecifier :: Text
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
sourceCommitSpecifier} -> Text
sourceCommitSpecifier) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Text
a -> MergeBranchesBySquash
s {$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: Text
sourceCommitSpecifier = Text
a} :: MergeBranchesBySquash)
mergeBranchesBySquash_destinationCommitSpecifier :: Lens.Lens' MergeBranchesBySquash Prelude.Text
mergeBranchesBySquash_destinationCommitSpecifier :: Lens' MergeBranchesBySquash Text
mergeBranchesBySquash_destinationCommitSpecifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquash' {Text
destinationCommitSpecifier :: Text
$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
destinationCommitSpecifier} -> Text
destinationCommitSpecifier) (\s :: MergeBranchesBySquash
s@MergeBranchesBySquash' {} Text
a -> MergeBranchesBySquash
s {$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: Text
destinationCommitSpecifier = Text
a} :: MergeBranchesBySquash)
instance Core.AWSRequest MergeBranchesBySquash where
type
AWSResponse MergeBranchesBySquash =
MergeBranchesBySquashResponse
request :: (Service -> Service)
-> MergeBranchesBySquash -> Request MergeBranchesBySquash
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy MergeBranchesBySquash
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse MergeBranchesBySquash)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe Text -> Int -> MergeBranchesBySquashResponse
MergeBranchesBySquashResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"commitId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"treeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable MergeBranchesBySquash where
hashWithSalt :: Int -> MergeBranchesBySquash -> Int
hashWithSalt Int
_salt MergeBranchesBySquash' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
keepEmptyFolders :: Maybe Bool
email :: Maybe Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
commitMessage :: Maybe Text
authorName :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:repositoryName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:targetBranch:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:keepEmptyFolders:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Bool
$sel:email:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolution
$sel:conflictDetailLevel:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
$sel:commitMessage:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:authorName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authorName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
commitMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConflictResolution
conflictResolution
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
email
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
keepEmptyFolders
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetBranch
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
repositoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceCommitSpecifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationCommitSpecifier
instance Prelude.NFData MergeBranchesBySquash where
rnf :: MergeBranchesBySquash -> ()
rnf MergeBranchesBySquash' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
keepEmptyFolders :: Maybe Bool
email :: Maybe Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
commitMessage :: Maybe Text
authorName :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:repositoryName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:targetBranch:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:keepEmptyFolders:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Bool
$sel:email:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolution
$sel:conflictDetailLevel:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
$sel:commitMessage:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:authorName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authorName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
commitMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConflictResolution
conflictResolution
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
email
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
keepEmptyFolders
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetBranch
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
repositoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceCommitSpecifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationCommitSpecifier
instance Data.ToHeaders MergeBranchesBySquash where
toHeaders :: MergeBranchesBySquash -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"CodeCommit_20150413.MergeBranchesBySquash" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON MergeBranchesBySquash where
toJSON :: MergeBranchesBySquash -> Value
toJSON MergeBranchesBySquash' {Maybe Bool
Maybe Text
Maybe ConflictDetailLevelTypeEnum
Maybe ConflictResolutionStrategyTypeEnum
Maybe ConflictResolution
Text
destinationCommitSpecifier :: Text
sourceCommitSpecifier :: Text
repositoryName :: Text
targetBranch :: Maybe Text
keepEmptyFolders :: Maybe Bool
email :: Maybe Text
conflictResolutionStrategy :: Maybe ConflictResolutionStrategyTypeEnum
conflictResolution :: Maybe ConflictResolution
conflictDetailLevel :: Maybe ConflictDetailLevelTypeEnum
commitMessage :: Maybe Text
authorName :: Maybe Text
$sel:destinationCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:sourceCommitSpecifier:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:repositoryName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Text
$sel:targetBranch:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:keepEmptyFolders:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Bool
$sel:email:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:conflictResolutionStrategy:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolutionStrategyTypeEnum
$sel:conflictResolution:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictResolution
$sel:conflictDetailLevel:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe ConflictDetailLevelTypeEnum
$sel:commitMessage:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
$sel:authorName:MergeBranchesBySquash' :: MergeBranchesBySquash -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"authorName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
authorName,
(Key
"commitMessage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
commitMessage,
(Key
"conflictDetailLevel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictDetailLevelTypeEnum
conflictDetailLevel,
(Key
"conflictResolution" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolution
conflictResolution,
(Key
"conflictResolutionStrategy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConflictResolutionStrategyTypeEnum
conflictResolutionStrategy,
(Key
"email" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
email,
(Key
"keepEmptyFolders" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
keepEmptyFolders,
(Key
"targetBranch" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
targetBranch,
forall a. a -> Maybe a
Prelude.Just
(Key
"repositoryName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
repositoryName),
forall a. a -> Maybe a
Prelude.Just
( Key
"sourceCommitSpecifier"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceCommitSpecifier
),
forall a. a -> Maybe a
Prelude.Just
( Key
"destinationCommitSpecifier"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destinationCommitSpecifier
)
]
)
instance Data.ToPath MergeBranchesBySquash where
toPath :: MergeBranchesBySquash -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery MergeBranchesBySquash where
toQuery :: MergeBranchesBySquash -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data MergeBranchesBySquashResponse = MergeBranchesBySquashResponse'
{
MergeBranchesBySquashResponse -> Maybe Text
commitId :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquashResponse -> Maybe Text
treeId :: Prelude.Maybe Prelude.Text,
MergeBranchesBySquashResponse -> Int
httpStatus :: Prelude.Int
}
deriving (MergeBranchesBySquashResponse
-> MergeBranchesBySquashResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeBranchesBySquashResponse
-> MergeBranchesBySquashResponse -> Bool
$c/= :: MergeBranchesBySquashResponse
-> MergeBranchesBySquashResponse -> Bool
== :: MergeBranchesBySquashResponse
-> MergeBranchesBySquashResponse -> Bool
$c== :: MergeBranchesBySquashResponse
-> MergeBranchesBySquashResponse -> Bool
Prelude.Eq, ReadPrec [MergeBranchesBySquashResponse]
ReadPrec MergeBranchesBySquashResponse
Int -> ReadS MergeBranchesBySquashResponse
ReadS [MergeBranchesBySquashResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeBranchesBySquashResponse]
$creadListPrec :: ReadPrec [MergeBranchesBySquashResponse]
readPrec :: ReadPrec MergeBranchesBySquashResponse
$creadPrec :: ReadPrec MergeBranchesBySquashResponse
readList :: ReadS [MergeBranchesBySquashResponse]
$creadList :: ReadS [MergeBranchesBySquashResponse]
readsPrec :: Int -> ReadS MergeBranchesBySquashResponse
$creadsPrec :: Int -> ReadS MergeBranchesBySquashResponse
Prelude.Read, Int -> MergeBranchesBySquashResponse -> ShowS
[MergeBranchesBySquashResponse] -> ShowS
MergeBranchesBySquashResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeBranchesBySquashResponse] -> ShowS
$cshowList :: [MergeBranchesBySquashResponse] -> ShowS
show :: MergeBranchesBySquashResponse -> String
$cshow :: MergeBranchesBySquashResponse -> String
showsPrec :: Int -> MergeBranchesBySquashResponse -> ShowS
$cshowsPrec :: Int -> MergeBranchesBySquashResponse -> ShowS
Prelude.Show, forall x.
Rep MergeBranchesBySquashResponse x
-> MergeBranchesBySquashResponse
forall x.
MergeBranchesBySquashResponse
-> Rep MergeBranchesBySquashResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergeBranchesBySquashResponse x
-> MergeBranchesBySquashResponse
$cfrom :: forall x.
MergeBranchesBySquashResponse
-> Rep MergeBranchesBySquashResponse x
Prelude.Generic)
newMergeBranchesBySquashResponse ::
Prelude.Int ->
MergeBranchesBySquashResponse
newMergeBranchesBySquashResponse :: Int -> MergeBranchesBySquashResponse
newMergeBranchesBySquashResponse Int
pHttpStatus_ =
MergeBranchesBySquashResponse'
{ $sel:commitId:MergeBranchesBySquashResponse' :: Maybe Text
commitId =
forall a. Maybe a
Prelude.Nothing,
$sel:treeId:MergeBranchesBySquashResponse' :: Maybe Text
treeId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:MergeBranchesBySquashResponse' :: Int
httpStatus = Int
pHttpStatus_
}
mergeBranchesBySquashResponse_commitId :: Lens.Lens' MergeBranchesBySquashResponse (Prelude.Maybe Prelude.Text)
mergeBranchesBySquashResponse_commitId :: Lens' MergeBranchesBySquashResponse (Maybe Text)
mergeBranchesBySquashResponse_commitId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquashResponse' {Maybe Text
commitId :: Maybe Text
$sel:commitId:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Maybe Text
commitId} -> Maybe Text
commitId) (\s :: MergeBranchesBySquashResponse
s@MergeBranchesBySquashResponse' {} Maybe Text
a -> MergeBranchesBySquashResponse
s {$sel:commitId:MergeBranchesBySquashResponse' :: Maybe Text
commitId = Maybe Text
a} :: MergeBranchesBySquashResponse)
mergeBranchesBySquashResponse_treeId :: Lens.Lens' MergeBranchesBySquashResponse (Prelude.Maybe Prelude.Text)
mergeBranchesBySquashResponse_treeId :: Lens' MergeBranchesBySquashResponse (Maybe Text)
mergeBranchesBySquashResponse_treeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquashResponse' {Maybe Text
treeId :: Maybe Text
$sel:treeId:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Maybe Text
treeId} -> Maybe Text
treeId) (\s :: MergeBranchesBySquashResponse
s@MergeBranchesBySquashResponse' {} Maybe Text
a -> MergeBranchesBySquashResponse
s {$sel:treeId:MergeBranchesBySquashResponse' :: Maybe Text
treeId = Maybe Text
a} :: MergeBranchesBySquashResponse)
mergeBranchesBySquashResponse_httpStatus :: Lens.Lens' MergeBranchesBySquashResponse Prelude.Int
mergeBranchesBySquashResponse_httpStatus :: Lens' MergeBranchesBySquashResponse Int
mergeBranchesBySquashResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeBranchesBySquashResponse' {Int
httpStatus :: Int
$sel:httpStatus:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: MergeBranchesBySquashResponse
s@MergeBranchesBySquashResponse' {} Int
a -> MergeBranchesBySquashResponse
s {$sel:httpStatus:MergeBranchesBySquashResponse' :: Int
httpStatus = Int
a} :: MergeBranchesBySquashResponse)
instance Prelude.NFData MergeBranchesBySquashResponse where
rnf :: MergeBranchesBySquashResponse -> ()
rnf MergeBranchesBySquashResponse' {Int
Maybe Text
httpStatus :: Int
treeId :: Maybe Text
commitId :: Maybe Text
$sel:httpStatus:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Int
$sel:treeId:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Maybe Text
$sel:commitId:MergeBranchesBySquashResponse' :: MergeBranchesBySquashResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
commitId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
treeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus