{-# 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.ContainerAnalysis.Projects.ScanConfigs.Update
(
ProjectsScanConfigsUpdateResource
, projectsScanConfigsUpdate
, ProjectsScanConfigsUpdate
, pscuXgafv
, pscuUploadProtocol
, pscuAccessToken
, pscuUploadType
, pscuPayload
, pscuName
, pscuCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsScanConfigsUpdateResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ScanConfig :> Put '[JSON] ScanConfig
data ProjectsScanConfigsUpdate = ProjectsScanConfigsUpdate'
{ _pscuXgafv :: !(Maybe Xgafv)
, _pscuUploadProtocol :: !(Maybe Text)
, _pscuAccessToken :: !(Maybe Text)
, _pscuUploadType :: !(Maybe Text)
, _pscuPayload :: !ScanConfig
, _pscuName :: !Text
, _pscuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsScanConfigsUpdate
:: ScanConfig
-> Text
-> ProjectsScanConfigsUpdate
projectsScanConfigsUpdate pPscuPayload_ pPscuName_ =
ProjectsScanConfigsUpdate'
{ _pscuXgafv = Nothing
, _pscuUploadProtocol = Nothing
, _pscuAccessToken = Nothing
, _pscuUploadType = Nothing
, _pscuPayload = pPscuPayload_
, _pscuName = pPscuName_
, _pscuCallback = Nothing
}
pscuXgafv :: Lens' ProjectsScanConfigsUpdate (Maybe Xgafv)
pscuXgafv
= lens _pscuXgafv (\ s a -> s{_pscuXgafv = a})
pscuUploadProtocol :: Lens' ProjectsScanConfigsUpdate (Maybe Text)
pscuUploadProtocol
= lens _pscuUploadProtocol
(\ s a -> s{_pscuUploadProtocol = a})
pscuAccessToken :: Lens' ProjectsScanConfigsUpdate (Maybe Text)
pscuAccessToken
= lens _pscuAccessToken
(\ s a -> s{_pscuAccessToken = a})
pscuUploadType :: Lens' ProjectsScanConfigsUpdate (Maybe Text)
pscuUploadType
= lens _pscuUploadType
(\ s a -> s{_pscuUploadType = a})
pscuPayload :: Lens' ProjectsScanConfigsUpdate ScanConfig
pscuPayload
= lens _pscuPayload (\ s a -> s{_pscuPayload = a})
pscuName :: Lens' ProjectsScanConfigsUpdate Text
pscuName = lens _pscuName (\ s a -> s{_pscuName = a})
pscuCallback :: Lens' ProjectsScanConfigsUpdate (Maybe Text)
pscuCallback
= lens _pscuCallback (\ s a -> s{_pscuCallback = a})
instance GoogleRequest ProjectsScanConfigsUpdate
where
type Rs ProjectsScanConfigsUpdate = ScanConfig
type Scopes ProjectsScanConfigsUpdate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsScanConfigsUpdate'{..}
= go _pscuName _pscuXgafv _pscuUploadProtocol
_pscuAccessToken
_pscuUploadType
_pscuCallback
(Just AltJSON)
_pscuPayload
containerAnalysisService
where go
= buildClient
(Proxy :: Proxy ProjectsScanConfigsUpdateResource)
mempty