{-# 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.DLP.Projects.DlpJobs.Cancel
(
ProjectsDlpJobsCancelResource
, projectsDlpJobsCancel
, ProjectsDlpJobsCancel
, pdjcXgafv
, pdjcUploadProtocol
, pdjcAccessToken
, pdjcUploadType
, pdjcPayload
, pdjcName
, pdjcCallback
) where
import Network.Google.DLP.Types
import Network.Google.Prelude
type ProjectsDlpJobsCancelResource =
"v2" :>
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] GooglePrivacyDlpV2CancelDlpJobRequest
:> Post '[JSON] GoogleProtobufEmpty
data ProjectsDlpJobsCancel = ProjectsDlpJobsCancel'
{ _pdjcXgafv :: !(Maybe Xgafv)
, _pdjcUploadProtocol :: !(Maybe Text)
, _pdjcAccessToken :: !(Maybe Text)
, _pdjcUploadType :: !(Maybe Text)
, _pdjcPayload :: !GooglePrivacyDlpV2CancelDlpJobRequest
, _pdjcName :: !Text
, _pdjcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsDlpJobsCancel
:: GooglePrivacyDlpV2CancelDlpJobRequest
-> Text
-> ProjectsDlpJobsCancel
projectsDlpJobsCancel pPdjcPayload_ pPdjcName_ =
ProjectsDlpJobsCancel'
{ _pdjcXgafv = Nothing
, _pdjcUploadProtocol = Nothing
, _pdjcAccessToken = Nothing
, _pdjcUploadType = Nothing
, _pdjcPayload = pPdjcPayload_
, _pdjcName = pPdjcName_
, _pdjcCallback = Nothing
}
pdjcXgafv :: Lens' ProjectsDlpJobsCancel (Maybe Xgafv)
pdjcXgafv
= lens _pdjcXgafv (\ s a -> s{_pdjcXgafv = a})
pdjcUploadProtocol :: Lens' ProjectsDlpJobsCancel (Maybe Text)
pdjcUploadProtocol
= lens _pdjcUploadProtocol
(\ s a -> s{_pdjcUploadProtocol = a})
pdjcAccessToken :: Lens' ProjectsDlpJobsCancel (Maybe Text)
pdjcAccessToken
= lens _pdjcAccessToken
(\ s a -> s{_pdjcAccessToken = a})
pdjcUploadType :: Lens' ProjectsDlpJobsCancel (Maybe Text)
pdjcUploadType
= lens _pdjcUploadType
(\ s a -> s{_pdjcUploadType = a})
pdjcPayload :: Lens' ProjectsDlpJobsCancel GooglePrivacyDlpV2CancelDlpJobRequest
pdjcPayload
= lens _pdjcPayload (\ s a -> s{_pdjcPayload = a})
pdjcName :: Lens' ProjectsDlpJobsCancel Text
pdjcName = lens _pdjcName (\ s a -> s{_pdjcName = a})
pdjcCallback :: Lens' ProjectsDlpJobsCancel (Maybe Text)
pdjcCallback
= lens _pdjcCallback (\ s a -> s{_pdjcCallback = a})
instance GoogleRequest ProjectsDlpJobsCancel where
type Rs ProjectsDlpJobsCancel = GoogleProtobufEmpty
type Scopes ProjectsDlpJobsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsDlpJobsCancel'{..}
= go _pdjcName _pdjcXgafv _pdjcUploadProtocol
_pdjcAccessToken
_pdjcUploadType
_pdjcCallback
(Just AltJSON)
_pdjcPayload
dLPService
where go
= buildClient
(Proxy :: Proxy ProjectsDlpJobsCancelResource)
mempty