{-# 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.Jobs.Projects.ClientEvents.Create
(
ProjectsClientEventsCreateResource
, projectsClientEventsCreate
, ProjectsClientEventsCreate
, pcecParent
, pcecXgafv
, pcecUploadProtocol
, pcecAccessToken
, pcecUploadType
, pcecPayload
, pcecCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsClientEventsCreateResource =
"v3p1beta1" :>
Capture "parent" Text :>
"clientEvents" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateClientEventRequest :>
Post '[JSON] ClientEvent
data ProjectsClientEventsCreate = ProjectsClientEventsCreate'
{ _pcecParent :: !Text
, _pcecXgafv :: !(Maybe Xgafv)
, _pcecUploadProtocol :: !(Maybe Text)
, _pcecAccessToken :: !(Maybe Text)
, _pcecUploadType :: !(Maybe Text)
, _pcecPayload :: !CreateClientEventRequest
, _pcecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsClientEventsCreate
:: Text
-> CreateClientEventRequest
-> ProjectsClientEventsCreate
projectsClientEventsCreate pPcecParent_ pPcecPayload_ =
ProjectsClientEventsCreate'
{ _pcecParent = pPcecParent_
, _pcecXgafv = Nothing
, _pcecUploadProtocol = Nothing
, _pcecAccessToken = Nothing
, _pcecUploadType = Nothing
, _pcecPayload = pPcecPayload_
, _pcecCallback = Nothing
}
pcecParent :: Lens' ProjectsClientEventsCreate Text
pcecParent
= lens _pcecParent (\ s a -> s{_pcecParent = a})
pcecXgafv :: Lens' ProjectsClientEventsCreate (Maybe Xgafv)
pcecXgafv
= lens _pcecXgafv (\ s a -> s{_pcecXgafv = a})
pcecUploadProtocol :: Lens' ProjectsClientEventsCreate (Maybe Text)
pcecUploadProtocol
= lens _pcecUploadProtocol
(\ s a -> s{_pcecUploadProtocol = a})
pcecAccessToken :: Lens' ProjectsClientEventsCreate (Maybe Text)
pcecAccessToken
= lens _pcecAccessToken
(\ s a -> s{_pcecAccessToken = a})
pcecUploadType :: Lens' ProjectsClientEventsCreate (Maybe Text)
pcecUploadType
= lens _pcecUploadType
(\ s a -> s{_pcecUploadType = a})
pcecPayload :: Lens' ProjectsClientEventsCreate CreateClientEventRequest
pcecPayload
= lens _pcecPayload (\ s a -> s{_pcecPayload = a})
pcecCallback :: Lens' ProjectsClientEventsCreate (Maybe Text)
pcecCallback
= lens _pcecCallback (\ s a -> s{_pcecCallback = a})
instance GoogleRequest ProjectsClientEventsCreate
where
type Rs ProjectsClientEventsCreate = ClientEvent
type Scopes ProjectsClientEventsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsClientEventsCreate'{..}
= go _pcecParent _pcecXgafv _pcecUploadProtocol
_pcecAccessToken
_pcecUploadType
_pcecCallback
(Just AltJSON)
_pcecPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsClientEventsCreateResource)
mempty