{-# 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.Sheets.Spreadsheets.BatchUpdate
(
SpreadsheetsBatchUpdateResource
, spreadsheetsBatchUpdate
, SpreadsheetsBatchUpdate
, sbuXgafv
, sbuUploadProtocol
, sbuAccessToken
, sbuSpreadsheetId
, sbuUploadType
, sbuPayload
, sbuCallback
) where
import Network.Google.Prelude
import Network.Google.Sheets.Types
type SpreadsheetsBatchUpdateResource =
"v4" :>
"spreadsheets" :>
CaptureMode "spreadsheetId" "batchUpdate" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchUpdateSpreadsheetRequest :>
Post '[JSON] BatchUpdateSpreadsheetResponse
data SpreadsheetsBatchUpdate = SpreadsheetsBatchUpdate'
{ _sbuXgafv :: !(Maybe Xgafv)
, _sbuUploadProtocol :: !(Maybe Text)
, _sbuAccessToken :: !(Maybe Text)
, _sbuSpreadsheetId :: !Text
, _sbuUploadType :: !(Maybe Text)
, _sbuPayload :: !BatchUpdateSpreadsheetRequest
, _sbuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spreadsheetsBatchUpdate
:: Text
-> BatchUpdateSpreadsheetRequest
-> SpreadsheetsBatchUpdate
spreadsheetsBatchUpdate pSbuSpreadsheetId_ pSbuPayload_ =
SpreadsheetsBatchUpdate'
{ _sbuXgafv = Nothing
, _sbuUploadProtocol = Nothing
, _sbuAccessToken = Nothing
, _sbuSpreadsheetId = pSbuSpreadsheetId_
, _sbuUploadType = Nothing
, _sbuPayload = pSbuPayload_
, _sbuCallback = Nothing
}
sbuXgafv :: Lens' SpreadsheetsBatchUpdate (Maybe Xgafv)
sbuXgafv = lens _sbuXgafv (\ s a -> s{_sbuXgafv = a})
sbuUploadProtocol :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuUploadProtocol
= lens _sbuUploadProtocol
(\ s a -> s{_sbuUploadProtocol = a})
sbuAccessToken :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuAccessToken
= lens _sbuAccessToken
(\ s a -> s{_sbuAccessToken = a})
sbuSpreadsheetId :: Lens' SpreadsheetsBatchUpdate Text
sbuSpreadsheetId
= lens _sbuSpreadsheetId
(\ s a -> s{_sbuSpreadsheetId = a})
sbuUploadType :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuUploadType
= lens _sbuUploadType
(\ s a -> s{_sbuUploadType = a})
sbuPayload :: Lens' SpreadsheetsBatchUpdate BatchUpdateSpreadsheetRequest
sbuPayload
= lens _sbuPayload (\ s a -> s{_sbuPayload = a})
sbuCallback :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuCallback
= lens _sbuCallback (\ s a -> s{_sbuCallback = a})
instance GoogleRequest SpreadsheetsBatchUpdate where
type Rs SpreadsheetsBatchUpdate =
BatchUpdateSpreadsheetResponse
type Scopes SpreadsheetsBatchUpdate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"]
requestClient SpreadsheetsBatchUpdate'{..}
= go _sbuSpreadsheetId _sbuXgafv _sbuUploadProtocol
_sbuAccessToken
_sbuUploadType
_sbuCallback
(Just AltJSON)
_sbuPayload
sheetsService
where go
= buildClient
(Proxy :: Proxy SpreadsheetsBatchUpdateResource)
mempty