{-# 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.BatchClear
(
SpreadsheetsValuesBatchClearResource
, spreadsheetsValuesBatchClear
, SpreadsheetsValuesBatchClear
, svbcXgafv
, svbcUploadProtocol
, svbcAccessToken
, svbcSpreadsheetId
, svbcUploadType
, svbcPayload
, svbcCallback
) where
import Network.Google.Prelude
import Network.Google.Sheets.Types
type SpreadsheetsValuesBatchClearResource =
"v4" :>
"spreadsheets" :>
Capture "spreadsheetId" Text :>
"values:batchClear" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchClearValuesRequest :>
Post '[JSON] BatchClearValuesResponse
data SpreadsheetsValuesBatchClear = SpreadsheetsValuesBatchClear'
{ _svbcXgafv :: !(Maybe Xgafv)
, _svbcUploadProtocol :: !(Maybe Text)
, _svbcAccessToken :: !(Maybe Text)
, _svbcSpreadsheetId :: !Text
, _svbcUploadType :: !(Maybe Text)
, _svbcPayload :: !BatchClearValuesRequest
, _svbcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spreadsheetsValuesBatchClear
:: Text
-> BatchClearValuesRequest
-> SpreadsheetsValuesBatchClear
spreadsheetsValuesBatchClear pSvbcSpreadsheetId_ pSvbcPayload_ =
SpreadsheetsValuesBatchClear'
{ _svbcXgafv = Nothing
, _svbcUploadProtocol = Nothing
, _svbcAccessToken = Nothing
, _svbcSpreadsheetId = pSvbcSpreadsheetId_
, _svbcUploadType = Nothing
, _svbcPayload = pSvbcPayload_
, _svbcCallback = Nothing
}
svbcXgafv :: Lens' SpreadsheetsValuesBatchClear (Maybe Xgafv)
svbcXgafv
= lens _svbcXgafv (\ s a -> s{_svbcXgafv = a})
svbcUploadProtocol :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
svbcUploadProtocol
= lens _svbcUploadProtocol
(\ s a -> s{_svbcUploadProtocol = a})
svbcAccessToken :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
svbcAccessToken
= lens _svbcAccessToken
(\ s a -> s{_svbcAccessToken = a})
svbcSpreadsheetId :: Lens' SpreadsheetsValuesBatchClear Text
svbcSpreadsheetId
= lens _svbcSpreadsheetId
(\ s a -> s{_svbcSpreadsheetId = a})
svbcUploadType :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
svbcUploadType
= lens _svbcUploadType
(\ s a -> s{_svbcUploadType = a})
svbcPayload :: Lens' SpreadsheetsValuesBatchClear BatchClearValuesRequest
svbcPayload
= lens _svbcPayload (\ s a -> s{_svbcPayload = a})
svbcCallback :: Lens' SpreadsheetsValuesBatchClear (Maybe Text)
svbcCallback
= lens _svbcCallback (\ s a -> s{_svbcCallback = a})
instance GoogleRequest SpreadsheetsValuesBatchClear
where
type Rs SpreadsheetsValuesBatchClear =
BatchClearValuesResponse
type Scopes SpreadsheetsValuesBatchClear =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"]
requestClient SpreadsheetsValuesBatchClear'{..}
= go _svbcSpreadsheetId _svbcXgafv
_svbcUploadProtocol
_svbcAccessToken
_svbcUploadType
_svbcCallback
(Just AltJSON)
_svbcPayload
sheetsService
where go
= buildClient
(Proxy :: Proxy SpreadsheetsValuesBatchClearResource)
mempty