{-# 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.CloudFunctions.Projects.Locations.Functions.Patch
(
ProjectsLocationsFunctionsPatchResource
, projectsLocationsFunctionsPatch
, ProjectsLocationsFunctionsPatch
, plfpXgafv
, plfpUploadProtocol
, plfpUpdateMask
, plfpAccessToken
, plfpUploadType
, plfpPayload
, plfpName
, plfpCallback
) where
import Network.Google.CloudFunctions.Types
import Network.Google.Prelude
type ProjectsLocationsFunctionsPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CloudFunction :>
Patch '[JSON] Operation
data ProjectsLocationsFunctionsPatch = ProjectsLocationsFunctionsPatch'
{ _plfpXgafv :: !(Maybe Xgafv)
, _plfpUploadProtocol :: !(Maybe Text)
, _plfpUpdateMask :: !(Maybe GFieldMask)
, _plfpAccessToken :: !(Maybe Text)
, _plfpUploadType :: !(Maybe Text)
, _plfpPayload :: !CloudFunction
, _plfpName :: !Text
, _plfpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsFunctionsPatch
:: CloudFunction
-> Text
-> ProjectsLocationsFunctionsPatch
projectsLocationsFunctionsPatch pPlfpPayload_ pPlfpName_ =
ProjectsLocationsFunctionsPatch'
{ _plfpXgafv = Nothing
, _plfpUploadProtocol = Nothing
, _plfpUpdateMask = Nothing
, _plfpAccessToken = Nothing
, _plfpUploadType = Nothing
, _plfpPayload = pPlfpPayload_
, _plfpName = pPlfpName_
, _plfpCallback = Nothing
}
plfpXgafv :: Lens' ProjectsLocationsFunctionsPatch (Maybe Xgafv)
plfpXgafv
= lens _plfpXgafv (\ s a -> s{_plfpXgafv = a})
plfpUploadProtocol :: Lens' ProjectsLocationsFunctionsPatch (Maybe Text)
plfpUploadProtocol
= lens _plfpUploadProtocol
(\ s a -> s{_plfpUploadProtocol = a})
plfpUpdateMask :: Lens' ProjectsLocationsFunctionsPatch (Maybe GFieldMask)
plfpUpdateMask
= lens _plfpUpdateMask
(\ s a -> s{_plfpUpdateMask = a})
plfpAccessToken :: Lens' ProjectsLocationsFunctionsPatch (Maybe Text)
plfpAccessToken
= lens _plfpAccessToken
(\ s a -> s{_plfpAccessToken = a})
plfpUploadType :: Lens' ProjectsLocationsFunctionsPatch (Maybe Text)
plfpUploadType
= lens _plfpUploadType
(\ s a -> s{_plfpUploadType = a})
plfpPayload :: Lens' ProjectsLocationsFunctionsPatch CloudFunction
plfpPayload
= lens _plfpPayload (\ s a -> s{_plfpPayload = a})
plfpName :: Lens' ProjectsLocationsFunctionsPatch Text
plfpName = lens _plfpName (\ s a -> s{_plfpName = a})
plfpCallback :: Lens' ProjectsLocationsFunctionsPatch (Maybe Text)
plfpCallback
= lens _plfpCallback (\ s a -> s{_plfpCallback = a})
instance GoogleRequest
ProjectsLocationsFunctionsPatch where
type Rs ProjectsLocationsFunctionsPatch = Operation
type Scopes ProjectsLocationsFunctionsPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsFunctionsPatch'{..}
= go _plfpName _plfpXgafv _plfpUploadProtocol
_plfpUpdateMask
_plfpAccessToken
_plfpUploadType
_plfpCallback
(Just AltJSON)
_plfpPayload
cloudFunctionsService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsFunctionsPatchResource)
mempty