{-# 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.Operations.Cancel
(
OperationsCancelResource
, operationsCancel
, OperationsCancel
, ocXgafv
, ocUploadProtocol
, ocAccessToken
, ocUploadType
, ocPayload
, ocName
, ocCallback
) where
import Network.Google.ContainerBuilder.Types
import Network.Google.Prelude
type OperationsCancelResource =
"v1" :>
CaptureMode "name" "cancel" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CancelOperationRequest :>
Post '[JSON] Empty
data OperationsCancel = OperationsCancel'
{ _ocXgafv :: !(Maybe Xgafv)
, _ocUploadProtocol :: !(Maybe Text)
, _ocAccessToken :: !(Maybe Text)
, _ocUploadType :: !(Maybe Text)
, _ocPayload :: !CancelOperationRequest
, _ocName :: !Text
, _ocCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationsCancel
:: CancelOperationRequest
-> Text
-> OperationsCancel
operationsCancel pOcPayload_ pOcName_ =
OperationsCancel'
{ _ocXgafv = Nothing
, _ocUploadProtocol = Nothing
, _ocAccessToken = Nothing
, _ocUploadType = Nothing
, _ocPayload = pOcPayload_
, _ocName = pOcName_
, _ocCallback = Nothing
}
ocXgafv :: Lens' OperationsCancel (Maybe Xgafv)
ocXgafv = lens _ocXgafv (\ s a -> s{_ocXgafv = a})
ocUploadProtocol :: Lens' OperationsCancel (Maybe Text)
ocUploadProtocol
= lens _ocUploadProtocol
(\ s a -> s{_ocUploadProtocol = a})
ocAccessToken :: Lens' OperationsCancel (Maybe Text)
ocAccessToken
= lens _ocAccessToken
(\ s a -> s{_ocAccessToken = a})
ocUploadType :: Lens' OperationsCancel (Maybe Text)
ocUploadType
= lens _ocUploadType (\ s a -> s{_ocUploadType = a})
ocPayload :: Lens' OperationsCancel CancelOperationRequest
ocPayload
= lens _ocPayload (\ s a -> s{_ocPayload = a})
ocName :: Lens' OperationsCancel Text
ocName = lens _ocName (\ s a -> s{_ocName = a})
ocCallback :: Lens' OperationsCancel (Maybe Text)
ocCallback
= lens _ocCallback (\ s a -> s{_ocCallback = a})
instance GoogleRequest OperationsCancel where
type Rs OperationsCancel = Empty
type Scopes OperationsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OperationsCancel'{..}
= go _ocName _ocXgafv _ocUploadProtocol
_ocAccessToken
_ocUploadType
_ocCallback
(Just AltJSON)
_ocPayload
containerBuilderService
where go
= buildClient
(Proxy :: Proxy OperationsCancelResource)
mempty