{-# 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.BinaryAuthorization.Projects.Attestors.Update
(
ProjectsAttestorsUpdateResource
, projectsAttestorsUpdate
, ProjectsAttestorsUpdate
, pauXgafv
, pauUploadProtocol
, pauAccessToken
, pauUploadType
, pauPayload
, pauName
, pauCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsAttestorsUpdateResource =
"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] Attestor :> Put '[JSON] Attestor
data ProjectsAttestorsUpdate = ProjectsAttestorsUpdate'
{ _pauXgafv :: !(Maybe Xgafv)
, _pauUploadProtocol :: !(Maybe Text)
, _pauAccessToken :: !(Maybe Text)
, _pauUploadType :: !(Maybe Text)
, _pauPayload :: !Attestor
, _pauName :: !Text
, _pauCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAttestorsUpdate
:: Attestor
-> Text
-> ProjectsAttestorsUpdate
projectsAttestorsUpdate pPauPayload_ pPauName_ =
ProjectsAttestorsUpdate'
{ _pauXgafv = Nothing
, _pauUploadProtocol = Nothing
, _pauAccessToken = Nothing
, _pauUploadType = Nothing
, _pauPayload = pPauPayload_
, _pauName = pPauName_
, _pauCallback = Nothing
}
pauXgafv :: Lens' ProjectsAttestorsUpdate (Maybe Xgafv)
pauXgafv = lens _pauXgafv (\ s a -> s{_pauXgafv = a})
pauUploadProtocol :: Lens' ProjectsAttestorsUpdate (Maybe Text)
pauUploadProtocol
= lens _pauUploadProtocol
(\ s a -> s{_pauUploadProtocol = a})
pauAccessToken :: Lens' ProjectsAttestorsUpdate (Maybe Text)
pauAccessToken
= lens _pauAccessToken
(\ s a -> s{_pauAccessToken = a})
pauUploadType :: Lens' ProjectsAttestorsUpdate (Maybe Text)
pauUploadType
= lens _pauUploadType
(\ s a -> s{_pauUploadType = a})
pauPayload :: Lens' ProjectsAttestorsUpdate Attestor
pauPayload
= lens _pauPayload (\ s a -> s{_pauPayload = a})
pauName :: Lens' ProjectsAttestorsUpdate Text
pauName = lens _pauName (\ s a -> s{_pauName = a})
pauCallback :: Lens' ProjectsAttestorsUpdate (Maybe Text)
pauCallback
= lens _pauCallback (\ s a -> s{_pauCallback = a})
instance GoogleRequest ProjectsAttestorsUpdate where
type Rs ProjectsAttestorsUpdate = Attestor
type Scopes ProjectsAttestorsUpdate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsAttestorsUpdate'{..}
= go _pauName _pauXgafv _pauUploadProtocol
_pauAccessToken
_pauUploadType
_pauCallback
(Just AltJSON)
_pauPayload
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsAttestorsUpdateResource)
mempty