{-# 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.Logging.Entries.Write
(
EntriesWriteResource
, entriesWrite
, EntriesWrite
, ewXgafv
, ewUploadProtocol
, ewAccessToken
, ewUploadType
, ewPayload
, ewCallback
) where
import Network.Google.Logging.Types
import Network.Google.Prelude
type EntriesWriteResource =
"v2" :>
"entries:write" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] WriteLogEntriesRequest :>
Post '[JSON] WriteLogEntriesResponse
data EntriesWrite = EntriesWrite'
{ _ewXgafv :: !(Maybe Xgafv)
, _ewUploadProtocol :: !(Maybe Text)
, _ewAccessToken :: !(Maybe Text)
, _ewUploadType :: !(Maybe Text)
, _ewPayload :: !WriteLogEntriesRequest
, _ewCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
entriesWrite
:: WriteLogEntriesRequest
-> EntriesWrite
entriesWrite pEwPayload_ =
EntriesWrite'
{ _ewXgafv = Nothing
, _ewUploadProtocol = Nothing
, _ewAccessToken = Nothing
, _ewUploadType = Nothing
, _ewPayload = pEwPayload_
, _ewCallback = Nothing
}
ewXgafv :: Lens' EntriesWrite (Maybe Xgafv)
ewXgafv = lens _ewXgafv (\ s a -> s{_ewXgafv = a})
ewUploadProtocol :: Lens' EntriesWrite (Maybe Text)
ewUploadProtocol
= lens _ewUploadProtocol
(\ s a -> s{_ewUploadProtocol = a})
ewAccessToken :: Lens' EntriesWrite (Maybe Text)
ewAccessToken
= lens _ewAccessToken
(\ s a -> s{_ewAccessToken = a})
ewUploadType :: Lens' EntriesWrite (Maybe Text)
ewUploadType
= lens _ewUploadType (\ s a -> s{_ewUploadType = a})
ewPayload :: Lens' EntriesWrite WriteLogEntriesRequest
ewPayload
= lens _ewPayload (\ s a -> s{_ewPayload = a})
ewCallback :: Lens' EntriesWrite (Maybe Text)
ewCallback
= lens _ewCallback (\ s a -> s{_ewCallback = a})
instance GoogleRequest EntriesWrite where
type Rs EntriesWrite = WriteLogEntriesResponse
type Scopes EntriesWrite =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin",
"https://www.googleapis.com/auth/logging.write"]
requestClient EntriesWrite'{..}
= go _ewXgafv _ewUploadProtocol _ewAccessToken
_ewUploadType
_ewCallback
(Just AltJSON)
_ewPayload
loggingService
where go
= buildClient (Proxy :: Proxy EntriesWriteResource)
mempty