{-# 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.CreateOffline
(
ProjectsProFilesCreateOfflineResource
, projectsProFilesCreateOffline
, ProjectsProFilesCreateOffline
, ppfcoParent
, ppfcoXgafv
, ppfcoUploadProtocol
, ppfcoAccessToken
, ppfcoUploadType
, ppfcoPayload
, ppfcoCallback
) where
import Network.Google.CloudProFiler.Types
import Network.Google.Prelude
type ProjectsProFilesCreateOfflineResource =
"v2" :>
Capture "parent" Text :>
"profiles:createOffline" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProFile :> Post '[JSON] ProFile
data ProjectsProFilesCreateOffline = ProjectsProFilesCreateOffline'
{ _ppfcoParent :: !Text
, _ppfcoXgafv :: !(Maybe Xgafv)
, _ppfcoUploadProtocol :: !(Maybe Text)
, _ppfcoAccessToken :: !(Maybe Text)
, _ppfcoUploadType :: !(Maybe Text)
, _ppfcoPayload :: !ProFile
, _ppfcoCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsProFilesCreateOffline
:: Text
-> ProFile
-> ProjectsProFilesCreateOffline
projectsProFilesCreateOffline pPpfcoParent_ pPpfcoPayload_ =
ProjectsProFilesCreateOffline'
{ _ppfcoParent = pPpfcoParent_
, _ppfcoXgafv = Nothing
, _ppfcoUploadProtocol = Nothing
, _ppfcoAccessToken = Nothing
, _ppfcoUploadType = Nothing
, _ppfcoPayload = pPpfcoPayload_
, _ppfcoCallback = Nothing
}
ppfcoParent :: Lens' ProjectsProFilesCreateOffline Text
ppfcoParent
= lens _ppfcoParent (\ s a -> s{_ppfcoParent = a})
ppfcoXgafv :: Lens' ProjectsProFilesCreateOffline (Maybe Xgafv)
ppfcoXgafv
= lens _ppfcoXgafv (\ s a -> s{_ppfcoXgafv = a})
ppfcoUploadProtocol :: Lens' ProjectsProFilesCreateOffline (Maybe Text)
ppfcoUploadProtocol
= lens _ppfcoUploadProtocol
(\ s a -> s{_ppfcoUploadProtocol = a})
ppfcoAccessToken :: Lens' ProjectsProFilesCreateOffline (Maybe Text)
ppfcoAccessToken
= lens _ppfcoAccessToken
(\ s a -> s{_ppfcoAccessToken = a})
ppfcoUploadType :: Lens' ProjectsProFilesCreateOffline (Maybe Text)
ppfcoUploadType
= lens _ppfcoUploadType
(\ s a -> s{_ppfcoUploadType = a})
ppfcoPayload :: Lens' ProjectsProFilesCreateOffline ProFile
ppfcoPayload
= lens _ppfcoPayload (\ s a -> s{_ppfcoPayload = a})
ppfcoCallback :: Lens' ProjectsProFilesCreateOffline (Maybe Text)
ppfcoCallback
= lens _ppfcoCallback
(\ s a -> s{_ppfcoCallback = a})
instance GoogleRequest ProjectsProFilesCreateOffline
where
type Rs ProjectsProFilesCreateOffline = ProFile
type Scopes ProjectsProFilesCreateOffline =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.write"]
requestClient ProjectsProFilesCreateOffline'{..}
= go _ppfcoParent _ppfcoXgafv _ppfcoUploadProtocol
_ppfcoAccessToken
_ppfcoUploadType
_ppfcoCallback
(Just AltJSON)
_ppfcoPayload
cloudProfilerService
where go
= buildClient
(Proxy ::
Proxy ProjectsProFilesCreateOfflineResource)
mempty