{-# 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.Values.BatchUpdate
(
SpreadsheetsValuesBatchUpdateResource
, spreadsheetsValuesBatchUpdate
, SpreadsheetsValuesBatchUpdate
, svbuXgafv
, svbuUploadProtocol
, svbuAccessToken
, svbuSpreadsheetId
, svbuUploadType
, svbuPayload
, svbuCallback
) where
import Network.Google.Prelude
import Network.Google.Sheets.Types
type SpreadsheetsValuesBatchUpdateResource =
"v4" :>
"spreadsheets" :>
Capture "spreadsheetId" Text :>
"values:batchUpdate" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchUpdateValuesRequest :>
Post '[JSON] BatchUpdateValuesResponse
data SpreadsheetsValuesBatchUpdate = SpreadsheetsValuesBatchUpdate'
{ _svbuXgafv :: !(Maybe Xgafv)
, _svbuUploadProtocol :: !(Maybe Text)
, _svbuAccessToken :: !(Maybe Text)
, _svbuSpreadsheetId :: !Text
, _svbuUploadType :: !(Maybe Text)
, _svbuPayload :: !BatchUpdateValuesRequest
, _svbuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spreadsheetsValuesBatchUpdate
:: Text
-> BatchUpdateValuesRequest
-> SpreadsheetsValuesBatchUpdate
spreadsheetsValuesBatchUpdate pSvbuSpreadsheetId_ pSvbuPayload_ =
SpreadsheetsValuesBatchUpdate'
{ _svbuXgafv = Nothing
, _svbuUploadProtocol = Nothing
, _svbuAccessToken = Nothing
, _svbuSpreadsheetId = pSvbuSpreadsheetId_
, _svbuUploadType = Nothing
, _svbuPayload = pSvbuPayload_
, _svbuCallback = Nothing
}
svbuXgafv :: Lens' SpreadsheetsValuesBatchUpdate (Maybe Xgafv)
svbuXgafv
= lens _svbuXgafv (\ s a -> s{_svbuXgafv = a})
svbuUploadProtocol :: Lens' SpreadsheetsValuesBatchUpdate (Maybe Text)
svbuUploadProtocol
= lens _svbuUploadProtocol
(\ s a -> s{_svbuUploadProtocol = a})
svbuAccessToken :: Lens' SpreadsheetsValuesBatchUpdate (Maybe Text)
svbuAccessToken
= lens _svbuAccessToken
(\ s a -> s{_svbuAccessToken = a})
svbuSpreadsheetId :: Lens' SpreadsheetsValuesBatchUpdate Text
svbuSpreadsheetId
= lens _svbuSpreadsheetId
(\ s a -> s{_svbuSpreadsheetId = a})
svbuUploadType :: Lens' SpreadsheetsValuesBatchUpdate (Maybe Text)
svbuUploadType
= lens _svbuUploadType
(\ s a -> s{_svbuUploadType = a})
svbuPayload :: Lens' SpreadsheetsValuesBatchUpdate BatchUpdateValuesRequest
svbuPayload
= lens _svbuPayload (\ s a -> s{_svbuPayload = a})
svbuCallback :: Lens' SpreadsheetsValuesBatchUpdate (Maybe Text)
svbuCallback
= lens _svbuCallback (\ s a -> s{_svbuCallback = a})
instance GoogleRequest SpreadsheetsValuesBatchUpdate
where
type Rs SpreadsheetsValuesBatchUpdate =
BatchUpdateValuesResponse
type Scopes SpreadsheetsValuesBatchUpdate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"]
requestClient SpreadsheetsValuesBatchUpdate'{..}
= go _svbuSpreadsheetId _svbuXgafv
_svbuUploadProtocol
_svbuAccessToken
_svbuUploadType
_svbuCallback
(Just AltJSON)
_svbuPayload
sheetsService
where go
= buildClient
(Proxy ::
Proxy SpreadsheetsValuesBatchUpdateResource)
mempty