{-# 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.WebSecurityScanner.Projects.ScanConfigs.ScanRuns.Stop
(
ProjectsScanConfigsScanRunsStopResource
, projectsScanConfigsScanRunsStop
, ProjectsScanConfigsScanRunsStop
, pscsrsXgafv
, pscsrsUploadProtocol
, pscsrsAccessToken
, pscsrsUploadType
, pscsrsPayload
, pscsrsName
, pscsrsCallback
) where
import Network.Google.Prelude
import Network.Google.WebSecurityScanner.Types
type ProjectsScanConfigsScanRunsStopResource =
"v1alpha" :>
CaptureMode "name" "stop" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StopScanRunRequest :>
Post '[JSON] ScanRun
data ProjectsScanConfigsScanRunsStop = ProjectsScanConfigsScanRunsStop'
{ _pscsrsXgafv :: !(Maybe Xgafv)
, _pscsrsUploadProtocol :: !(Maybe Text)
, _pscsrsAccessToken :: !(Maybe Text)
, _pscsrsUploadType :: !(Maybe Text)
, _pscsrsPayload :: !StopScanRunRequest
, _pscsrsName :: !Text
, _pscsrsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsScanConfigsScanRunsStop
:: StopScanRunRequest
-> Text
-> ProjectsScanConfigsScanRunsStop
projectsScanConfigsScanRunsStop pPscsrsPayload_ pPscsrsName_ =
ProjectsScanConfigsScanRunsStop'
{ _pscsrsXgafv = Nothing
, _pscsrsUploadProtocol = Nothing
, _pscsrsAccessToken = Nothing
, _pscsrsUploadType = Nothing
, _pscsrsPayload = pPscsrsPayload_
, _pscsrsName = pPscsrsName_
, _pscsrsCallback = Nothing
}
pscsrsXgafv :: Lens' ProjectsScanConfigsScanRunsStop (Maybe Xgafv)
pscsrsXgafv
= lens _pscsrsXgafv (\ s a -> s{_pscsrsXgafv = a})
pscsrsUploadProtocol :: Lens' ProjectsScanConfigsScanRunsStop (Maybe Text)
pscsrsUploadProtocol
= lens _pscsrsUploadProtocol
(\ s a -> s{_pscsrsUploadProtocol = a})
pscsrsAccessToken :: Lens' ProjectsScanConfigsScanRunsStop (Maybe Text)
pscsrsAccessToken
= lens _pscsrsAccessToken
(\ s a -> s{_pscsrsAccessToken = a})
pscsrsUploadType :: Lens' ProjectsScanConfigsScanRunsStop (Maybe Text)
pscsrsUploadType
= lens _pscsrsUploadType
(\ s a -> s{_pscsrsUploadType = a})
pscsrsPayload :: Lens' ProjectsScanConfigsScanRunsStop StopScanRunRequest
pscsrsPayload
= lens _pscsrsPayload
(\ s a -> s{_pscsrsPayload = a})
pscsrsName :: Lens' ProjectsScanConfigsScanRunsStop Text
pscsrsName
= lens _pscsrsName (\ s a -> s{_pscsrsName = a})
pscsrsCallback :: Lens' ProjectsScanConfigsScanRunsStop (Maybe Text)
pscsrsCallback
= lens _pscsrsCallback
(\ s a -> s{_pscsrsCallback = a})
instance GoogleRequest
ProjectsScanConfigsScanRunsStop where
type Rs ProjectsScanConfigsScanRunsStop = ScanRun
type Scopes ProjectsScanConfigsScanRunsStop =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsScanConfigsScanRunsStop'{..}
= go _pscsrsName _pscsrsXgafv _pscsrsUploadProtocol
_pscsrsAccessToken
_pscsrsUploadType
_pscsrsCallback
(Just AltJSON)
_pscsrsPayload
webSecurityScannerService
where go
= buildClient
(Proxy ::
Proxy ProjectsScanConfigsScanRunsStopResource)
mempty