{-# 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.Create
(
ProjectsScanConfigsCreateResource
, projectsScanConfigsCreate
, ProjectsScanConfigsCreate
, psccParent
, psccXgafv
, psccUploadProtocol
, psccAccessToken
, psccUploadType
, psccPayload
, psccCallback
) where
import Network.Google.Prelude
import Network.Google.WebSecurityScanner.Types
type ProjectsScanConfigsCreateResource =
"v1alpha" :>
Capture "parent" Text :>
"scanConfigs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ScanConfig :> Post '[JSON] ScanConfig
data ProjectsScanConfigsCreate = ProjectsScanConfigsCreate'
{ _psccParent :: !Text
, _psccXgafv :: !(Maybe Xgafv)
, _psccUploadProtocol :: !(Maybe Text)
, _psccAccessToken :: !(Maybe Text)
, _psccUploadType :: !(Maybe Text)
, _psccPayload :: !ScanConfig
, _psccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsScanConfigsCreate
:: Text
-> ScanConfig
-> ProjectsScanConfigsCreate
projectsScanConfigsCreate pPsccParent_ pPsccPayload_ =
ProjectsScanConfigsCreate'
{ _psccParent = pPsccParent_
, _psccXgafv = Nothing
, _psccUploadProtocol = Nothing
, _psccAccessToken = Nothing
, _psccUploadType = Nothing
, _psccPayload = pPsccPayload_
, _psccCallback = Nothing
}
psccParent :: Lens' ProjectsScanConfigsCreate Text
psccParent
= lens _psccParent (\ s a -> s{_psccParent = a})
psccXgafv :: Lens' ProjectsScanConfigsCreate (Maybe Xgafv)
psccXgafv
= lens _psccXgafv (\ s a -> s{_psccXgafv = a})
psccUploadProtocol :: Lens' ProjectsScanConfigsCreate (Maybe Text)
psccUploadProtocol
= lens _psccUploadProtocol
(\ s a -> s{_psccUploadProtocol = a})
psccAccessToken :: Lens' ProjectsScanConfigsCreate (Maybe Text)
psccAccessToken
= lens _psccAccessToken
(\ s a -> s{_psccAccessToken = a})
psccUploadType :: Lens' ProjectsScanConfigsCreate (Maybe Text)
psccUploadType
= lens _psccUploadType
(\ s a -> s{_psccUploadType = a})
psccPayload :: Lens' ProjectsScanConfigsCreate ScanConfig
psccPayload
= lens _psccPayload (\ s a -> s{_psccPayload = a})
psccCallback :: Lens' ProjectsScanConfigsCreate (Maybe Text)
psccCallback
= lens _psccCallback (\ s a -> s{_psccCallback = a})
instance GoogleRequest ProjectsScanConfigsCreate
where
type Rs ProjectsScanConfigsCreate = ScanConfig
type Scopes ProjectsScanConfigsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsScanConfigsCreate'{..}
= go _psccParent _psccXgafv _psccUploadProtocol
_psccAccessToken
_psccUploadType
_psccCallback
(Just AltJSON)
_psccPayload
webSecurityScannerService
where go
= buildClient
(Proxy :: Proxy ProjectsScanConfigsCreateResource)
mempty