{-# 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.CloudProFiler.Projects.ProFiles.Patch
(
ProjectsProFilesPatchResource
, projectsProFilesPatch
, ProjectsProFilesPatch
, ppfpXgafv
, ppfpUploadProtocol
, ppfpUpdateMask
, ppfpAccessToken
, ppfpUploadType
, ppfpPayload
, ppfpName
, ppfpCallback
) where
import Network.Google.CloudProFiler.Types
import Network.Google.Prelude
type ProjectsProFilesPatchResource =
"v2" :>
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] ProFile :> Patch '[JSON] ProFile
data ProjectsProFilesPatch = ProjectsProFilesPatch'
{ _ppfpXgafv :: !(Maybe Xgafv)
, _ppfpUploadProtocol :: !(Maybe Text)
, _ppfpUpdateMask :: !(Maybe GFieldMask)
, _ppfpAccessToken :: !(Maybe Text)
, _ppfpUploadType :: !(Maybe Text)
, _ppfpPayload :: !ProFile
, _ppfpName :: !Text
, _ppfpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsProFilesPatch
:: ProFile
-> Text
-> ProjectsProFilesPatch
projectsProFilesPatch pPpfpPayload_ pPpfpName_ =
ProjectsProFilesPatch'
{ _ppfpXgafv = Nothing
, _ppfpUploadProtocol = Nothing
, _ppfpUpdateMask = Nothing
, _ppfpAccessToken = Nothing
, _ppfpUploadType = Nothing
, _ppfpPayload = pPpfpPayload_
, _ppfpName = pPpfpName_
, _ppfpCallback = Nothing
}
ppfpXgafv :: Lens' ProjectsProFilesPatch (Maybe Xgafv)
ppfpXgafv
= lens _ppfpXgafv (\ s a -> s{_ppfpXgafv = a})
ppfpUploadProtocol :: Lens' ProjectsProFilesPatch (Maybe Text)
ppfpUploadProtocol
= lens _ppfpUploadProtocol
(\ s a -> s{_ppfpUploadProtocol = a})
ppfpUpdateMask :: Lens' ProjectsProFilesPatch (Maybe GFieldMask)
ppfpUpdateMask
= lens _ppfpUpdateMask
(\ s a -> s{_ppfpUpdateMask = a})
ppfpAccessToken :: Lens' ProjectsProFilesPatch (Maybe Text)
ppfpAccessToken
= lens _ppfpAccessToken
(\ s a -> s{_ppfpAccessToken = a})
ppfpUploadType :: Lens' ProjectsProFilesPatch (Maybe Text)
ppfpUploadType
= lens _ppfpUploadType
(\ s a -> s{_ppfpUploadType = a})
ppfpPayload :: Lens' ProjectsProFilesPatch ProFile
ppfpPayload
= lens _ppfpPayload (\ s a -> s{_ppfpPayload = a})
ppfpName :: Lens' ProjectsProFilesPatch Text
ppfpName = lens _ppfpName (\ s a -> s{_ppfpName = a})
ppfpCallback :: Lens' ProjectsProFilesPatch (Maybe Text)
ppfpCallback
= lens _ppfpCallback (\ s a -> s{_ppfpCallback = a})
instance GoogleRequest ProjectsProFilesPatch where
type Rs ProjectsProFilesPatch = ProFile
type Scopes ProjectsProFilesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.write"]
requestClient ProjectsProFilesPatch'{..}
= go _ppfpName _ppfpXgafv _ppfpUploadProtocol
_ppfpUpdateMask
_ppfpAccessToken
_ppfpUploadType
_ppfpCallback
(Just AltJSON)
_ppfpPayload
cloudProfilerService
where go
= buildClient
(Proxy :: Proxy ProjectsProFilesPatchResource)
mempty