{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Cloudbuild.Projects.Builds.Cancel
(
ProjectsBuildsCancelResource
, projectsBuildsCancel
, ProjectsBuildsCancel
, pbcXgafv
, pbcUploadProtocol
, pbcAccessToken
, pbcUploadType
, pbcPayload
, pbcId
, pbcProjectId
, pbcCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type ProjectsBuildsCancelResource =
"v1" :>
"projects" :>
Capture "projectId" Text :>
"builds" :>
CaptureMode "id" "cancel" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CancelBuildRequest :>
Post '[JSON] Build
data ProjectsBuildsCancel = ProjectsBuildsCancel'
{ _pbcXgafv :: !(Maybe Xgafv)
, _pbcUploadProtocol :: !(Maybe Text)
, _pbcAccessToken :: !(Maybe Text)
, _pbcUploadType :: !(Maybe Text)
, _pbcPayload :: !CancelBuildRequest
, _pbcId :: !Text
, _pbcProjectId :: !Text
, _pbcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsBuildsCancel
:: CancelBuildRequest
-> Text
-> Text
-> ProjectsBuildsCancel
projectsBuildsCancel pPbcPayload_ pPbcId_ pPbcProjectId_ =
ProjectsBuildsCancel'
{ _pbcXgafv = Nothing
, _pbcUploadProtocol = Nothing
, _pbcAccessToken = Nothing
, _pbcUploadType = Nothing
, _pbcPayload = pPbcPayload_
, _pbcId = pPbcId_
, _pbcProjectId = pPbcProjectId_
, _pbcCallback = Nothing
}
pbcXgafv :: Lens' ProjectsBuildsCancel (Maybe Xgafv)
pbcXgafv = lens _pbcXgafv (\ s a -> s{_pbcXgafv = a})
pbcUploadProtocol :: Lens' ProjectsBuildsCancel (Maybe Text)
pbcUploadProtocol
= lens _pbcUploadProtocol
(\ s a -> s{_pbcUploadProtocol = a})
pbcAccessToken :: Lens' ProjectsBuildsCancel (Maybe Text)
pbcAccessToken
= lens _pbcAccessToken
(\ s a -> s{_pbcAccessToken = a})
pbcUploadType :: Lens' ProjectsBuildsCancel (Maybe Text)
pbcUploadType
= lens _pbcUploadType
(\ s a -> s{_pbcUploadType = a})
pbcPayload :: Lens' ProjectsBuildsCancel CancelBuildRequest
pbcPayload
= lens _pbcPayload (\ s a -> s{_pbcPayload = a})
pbcId :: Lens' ProjectsBuildsCancel Text
pbcId = lens _pbcId (\ s a -> s{_pbcId = a})
pbcProjectId :: Lens' ProjectsBuildsCancel Text
pbcProjectId
= lens _pbcProjectId (\ s a -> s{_pbcProjectId = a})
pbcCallback :: Lens' ProjectsBuildsCancel (Maybe Text)
pbcCallback
= lens _pbcCallback (\ s a -> s{_pbcCallback = a})
instance GoogleRequest ProjectsBuildsCancel where
type Rs ProjectsBuildsCancel = Build
type Scopes ProjectsBuildsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsBuildsCancel'{..}
= go _pbcProjectId _pbcId _pbcXgafv
_pbcUploadProtocol
_pbcAccessToken
_pbcUploadType
_pbcCallback
(Just AltJSON)
_pbcPayload
containerBuilderService
where go
= buildClient
(Proxy :: Proxy ProjectsBuildsCancelResource)
mempty