{-# 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.Start
(
ProjectsScanConfigsStartResource
, projectsScanConfigsStart
, ProjectsScanConfigsStart
, pscsXgafv
, pscsUploadProtocol
, pscsAccessToken
, pscsUploadType
, pscsPayload
, pscsName
, pscsCallback
) where
import Network.Google.Prelude
import Network.Google.WebSecurityScanner.Types
type ProjectsScanConfigsStartResource =
"v1alpha" :>
CaptureMode "name" "start" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StartScanRunRequest :>
Post '[JSON] ScanRun
data ProjectsScanConfigsStart = ProjectsScanConfigsStart'
{ _pscsXgafv :: !(Maybe Xgafv)
, _pscsUploadProtocol :: !(Maybe Text)
, _pscsAccessToken :: !(Maybe Text)
, _pscsUploadType :: !(Maybe Text)
, _pscsPayload :: !StartScanRunRequest
, _pscsName :: !Text
, _pscsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsScanConfigsStart
:: StartScanRunRequest
-> Text
-> ProjectsScanConfigsStart
projectsScanConfigsStart pPscsPayload_ pPscsName_ =
ProjectsScanConfigsStart'
{ _pscsXgafv = Nothing
, _pscsUploadProtocol = Nothing
, _pscsAccessToken = Nothing
, _pscsUploadType = Nothing
, _pscsPayload = pPscsPayload_
, _pscsName = pPscsName_
, _pscsCallback = Nothing
}
pscsXgafv :: Lens' ProjectsScanConfigsStart (Maybe Xgafv)
pscsXgafv
= lens _pscsXgafv (\ s a -> s{_pscsXgafv = a})
pscsUploadProtocol :: Lens' ProjectsScanConfigsStart (Maybe Text)
pscsUploadProtocol
= lens _pscsUploadProtocol
(\ s a -> s{_pscsUploadProtocol = a})
pscsAccessToken :: Lens' ProjectsScanConfigsStart (Maybe Text)
pscsAccessToken
= lens _pscsAccessToken
(\ s a -> s{_pscsAccessToken = a})
pscsUploadType :: Lens' ProjectsScanConfigsStart (Maybe Text)
pscsUploadType
= lens _pscsUploadType
(\ s a -> s{_pscsUploadType = a})
pscsPayload :: Lens' ProjectsScanConfigsStart StartScanRunRequest
pscsPayload
= lens _pscsPayload (\ s a -> s{_pscsPayload = a})
pscsName :: Lens' ProjectsScanConfigsStart Text
pscsName = lens _pscsName (\ s a -> s{_pscsName = a})
pscsCallback :: Lens' ProjectsScanConfigsStart (Maybe Text)
pscsCallback
= lens _pscsCallback (\ s a -> s{_pscsCallback = a})
instance GoogleRequest ProjectsScanConfigsStart where
type Rs ProjectsScanConfigsStart = ScanRun
type Scopes ProjectsScanConfigsStart =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsScanConfigsStart'{..}
= go _pscsName _pscsXgafv _pscsUploadProtocol
_pscsAccessToken
_pscsUploadType
_pscsCallback
(Just AltJSON)
_pscsPayload
webSecurityScannerService
where go
= buildClient
(Proxy :: Proxy ProjectsScanConfigsStartResource)
mempty