{-# 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.GetByDataFilter
(
SpreadsheetsGetByDataFilterResource
, spreadsheetsGetByDataFilter
, SpreadsheetsGetByDataFilter
, sgbdfXgafv
, sgbdfUploadProtocol
, sgbdfAccessToken
, sgbdfSpreadsheetId
, sgbdfUploadType
, sgbdfPayload
, sgbdfCallback
) where
import Network.Google.Prelude
import Network.Google.Sheets.Types
type SpreadsheetsGetByDataFilterResource =
"v4" :>
"spreadsheets" :>
CaptureMode "spreadsheetId" "getByDataFilter" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GetSpreadsheetByDataFilterRequest :>
Post '[JSON] Spreadsheet
data SpreadsheetsGetByDataFilter = SpreadsheetsGetByDataFilter'
{ _sgbdfXgafv :: !(Maybe Xgafv)
, _sgbdfUploadProtocol :: !(Maybe Text)
, _sgbdfAccessToken :: !(Maybe Text)
, _sgbdfSpreadsheetId :: !Text
, _sgbdfUploadType :: !(Maybe Text)
, _sgbdfPayload :: !GetSpreadsheetByDataFilterRequest
, _sgbdfCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spreadsheetsGetByDataFilter
:: Text
-> GetSpreadsheetByDataFilterRequest
-> SpreadsheetsGetByDataFilter
spreadsheetsGetByDataFilter pSgbdfSpreadsheetId_ pSgbdfPayload_ =
SpreadsheetsGetByDataFilter'
{ _sgbdfXgafv = Nothing
, _sgbdfUploadProtocol = Nothing
, _sgbdfAccessToken = Nothing
, _sgbdfSpreadsheetId = pSgbdfSpreadsheetId_
, _sgbdfUploadType = Nothing
, _sgbdfPayload = pSgbdfPayload_
, _sgbdfCallback = Nothing
}
sgbdfXgafv :: Lens' SpreadsheetsGetByDataFilter (Maybe Xgafv)
sgbdfXgafv
= lens _sgbdfXgafv (\ s a -> s{_sgbdfXgafv = a})
sgbdfUploadProtocol :: Lens' SpreadsheetsGetByDataFilter (Maybe Text)
sgbdfUploadProtocol
= lens _sgbdfUploadProtocol
(\ s a -> s{_sgbdfUploadProtocol = a})
sgbdfAccessToken :: Lens' SpreadsheetsGetByDataFilter (Maybe Text)
sgbdfAccessToken
= lens _sgbdfAccessToken
(\ s a -> s{_sgbdfAccessToken = a})
sgbdfSpreadsheetId :: Lens' SpreadsheetsGetByDataFilter Text
sgbdfSpreadsheetId
= lens _sgbdfSpreadsheetId
(\ s a -> s{_sgbdfSpreadsheetId = a})
sgbdfUploadType :: Lens' SpreadsheetsGetByDataFilter (Maybe Text)
sgbdfUploadType
= lens _sgbdfUploadType
(\ s a -> s{_sgbdfUploadType = a})
sgbdfPayload :: Lens' SpreadsheetsGetByDataFilter GetSpreadsheetByDataFilterRequest
sgbdfPayload
= lens _sgbdfPayload (\ s a -> s{_sgbdfPayload = a})
sgbdfCallback :: Lens' SpreadsheetsGetByDataFilter (Maybe Text)
sgbdfCallback
= lens _sgbdfCallback
(\ s a -> s{_sgbdfCallback = a})
instance GoogleRequest SpreadsheetsGetByDataFilter
where
type Rs SpreadsheetsGetByDataFilter = Spreadsheet
type Scopes SpreadsheetsGetByDataFilter =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"]
requestClient SpreadsheetsGetByDataFilter'{..}
= go _sgbdfSpreadsheetId _sgbdfXgafv
_sgbdfUploadProtocol
_sgbdfAccessToken
_sgbdfUploadType
_sgbdfCallback
(Just AltJSON)
_sgbdfPayload
sheetsService
where go
= buildClient
(Proxy :: Proxy SpreadsheetsGetByDataFilterResource)
mempty