{-# 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.ClientMessages.Log
(
ClientMessagesLogResource
, clientMessagesLog
, ClientMessagesLog
, cmlXgafv
, cmlUploadProtocol
, cmlAccessToken
, cmlUploadType
, cmlPayload
, cmlCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type ClientMessagesLogResource =
"v2" :>
"clientMessages:log" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LogMessageRequest :>
Post '[JSON] LogMessageResponse
data ClientMessagesLog = ClientMessagesLog'
{ _cmlXgafv :: !(Maybe Xgafv)
, _cmlUploadProtocol :: !(Maybe Text)
, _cmlAccessToken :: !(Maybe Text)
, _cmlUploadType :: !(Maybe Text)
, _cmlPayload :: !LogMessageRequest
, _cmlCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clientMessagesLog
:: LogMessageRequest
-> ClientMessagesLog
clientMessagesLog pCmlPayload_ =
ClientMessagesLog'
{ _cmlXgafv = Nothing
, _cmlUploadProtocol = Nothing
, _cmlAccessToken = Nothing
, _cmlUploadType = Nothing
, _cmlPayload = pCmlPayload_
, _cmlCallback = Nothing
}
cmlXgafv :: Lens' ClientMessagesLog (Maybe Xgafv)
cmlXgafv = lens _cmlXgafv (\ s a -> s{_cmlXgafv = a})
cmlUploadProtocol :: Lens' ClientMessagesLog (Maybe Text)
cmlUploadProtocol
= lens _cmlUploadProtocol
(\ s a -> s{_cmlUploadProtocol = a})
cmlAccessToken :: Lens' ClientMessagesLog (Maybe Text)
cmlAccessToken
= lens _cmlAccessToken
(\ s a -> s{_cmlAccessToken = a})
cmlUploadType :: Lens' ClientMessagesLog (Maybe Text)
cmlUploadType
= lens _cmlUploadType
(\ s a -> s{_cmlUploadType = a})
cmlPayload :: Lens' ClientMessagesLog LogMessageRequest
cmlPayload
= lens _cmlPayload (\ s a -> s{_cmlPayload = a})
cmlCallback :: Lens' ClientMessagesLog (Maybe Text)
cmlCallback
= lens _cmlCallback (\ s a -> s{_cmlCallback = a})
instance GoogleRequest ClientMessagesLog where
type Rs ClientMessagesLog = LogMessageResponse
type Scopes ClientMessagesLog = '[]
requestClient ClientMessagesLog'{..}
= go _cmlXgafv _cmlUploadProtocol _cmlAccessToken
_cmlUploadType
_cmlCallback
(Just AltJSON)
_cmlPayload
partnersService
where go
= buildClient
(Proxy :: Proxy ClientMessagesLogResource)
mempty