{-# 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.Partners.UserEvents.Log
(
UserEventsLogResource
, userEventsLog
, UserEventsLog
, uelXgafv
, uelUploadProtocol
, uelAccessToken
, uelUploadType
, uelPayload
, uelCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type UserEventsLogResource =
"v2" :>
"userEvents:log" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LogUserEventRequest :>
Post '[JSON] LogUserEventResponse
data UserEventsLog = UserEventsLog'
{ _uelXgafv :: !(Maybe Xgafv)
, _uelUploadProtocol :: !(Maybe Text)
, _uelAccessToken :: !(Maybe Text)
, _uelUploadType :: !(Maybe Text)
, _uelPayload :: !LogUserEventRequest
, _uelCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userEventsLog
:: LogUserEventRequest
-> UserEventsLog
userEventsLog pUelPayload_ =
UserEventsLog'
{ _uelXgafv = Nothing
, _uelUploadProtocol = Nothing
, _uelAccessToken = Nothing
, _uelUploadType = Nothing
, _uelPayload = pUelPayload_
, _uelCallback = Nothing
}
uelXgafv :: Lens' UserEventsLog (Maybe Xgafv)
uelXgafv = lens _uelXgafv (\ s a -> s{_uelXgafv = a})
uelUploadProtocol :: Lens' UserEventsLog (Maybe Text)
uelUploadProtocol
= lens _uelUploadProtocol
(\ s a -> s{_uelUploadProtocol = a})
uelAccessToken :: Lens' UserEventsLog (Maybe Text)
uelAccessToken
= lens _uelAccessToken
(\ s a -> s{_uelAccessToken = a})
uelUploadType :: Lens' UserEventsLog (Maybe Text)
uelUploadType
= lens _uelUploadType
(\ s a -> s{_uelUploadType = a})
uelPayload :: Lens' UserEventsLog LogUserEventRequest
uelPayload
= lens _uelPayload (\ s a -> s{_uelPayload = a})
uelCallback :: Lens' UserEventsLog (Maybe Text)
uelCallback
= lens _uelCallback (\ s a -> s{_uelCallback = a})
instance GoogleRequest UserEventsLog where
type Rs UserEventsLog = LogUserEventResponse
type Scopes UserEventsLog = '[]
requestClient UserEventsLog'{..}
= go _uelXgafv _uelUploadProtocol _uelAccessToken
_uelUploadType
_uelCallback
(Just AltJSON)
_uelPayload
partnersService
where go
= buildClient (Proxy :: Proxy UserEventsLogResource)
mempty