{-# 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.Sheets.CopyTo
(
SpreadsheetsSheetsCopyToResource
, spreadsheetsSheetsCopyTo
, SpreadsheetsSheetsCopyTo
, ssctXgafv
, ssctUploadProtocol
, ssctAccessToken
, ssctSpreadsheetId
, ssctUploadType
, ssctPayload
, ssctSheetId
, ssctCallback
) where
import Network.Google.Prelude
import Network.Google.Sheets.Types
type SpreadsheetsSheetsCopyToResource =
"v4" :>
"spreadsheets" :>
Capture "spreadsheetId" Text :>
"sheets" :>
CaptureMode "sheetId" "copyTo" (Textual Int32) :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CopySheetToAnotherSpreadsheetRequest
:> Post '[JSON] SheetProperties
data SpreadsheetsSheetsCopyTo = SpreadsheetsSheetsCopyTo'
{ _ssctXgafv :: !(Maybe Xgafv)
, _ssctUploadProtocol :: !(Maybe Text)
, _ssctAccessToken :: !(Maybe Text)
, _ssctSpreadsheetId :: !Text
, _ssctUploadType :: !(Maybe Text)
, _ssctPayload :: !CopySheetToAnotherSpreadsheetRequest
, _ssctSheetId :: !(Textual Int32)
, _ssctCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
spreadsheetsSheetsCopyTo
:: Text
-> CopySheetToAnotherSpreadsheetRequest
-> Int32
-> SpreadsheetsSheetsCopyTo
spreadsheetsSheetsCopyTo pSsctSpreadsheetId_ pSsctPayload_ pSsctSheetId_ =
SpreadsheetsSheetsCopyTo'
{ _ssctXgafv = Nothing
, _ssctUploadProtocol = Nothing
, _ssctAccessToken = Nothing
, _ssctSpreadsheetId = pSsctSpreadsheetId_
, _ssctUploadType = Nothing
, _ssctPayload = pSsctPayload_
, _ssctSheetId = _Coerce # pSsctSheetId_
, _ssctCallback = Nothing
}
ssctXgafv :: Lens' SpreadsheetsSheetsCopyTo (Maybe Xgafv)
ssctXgafv
= lens _ssctXgafv (\ s a -> s{_ssctXgafv = a})
ssctUploadProtocol :: Lens' SpreadsheetsSheetsCopyTo (Maybe Text)
ssctUploadProtocol
= lens _ssctUploadProtocol
(\ s a -> s{_ssctUploadProtocol = a})
ssctAccessToken :: Lens' SpreadsheetsSheetsCopyTo (Maybe Text)
ssctAccessToken
= lens _ssctAccessToken
(\ s a -> s{_ssctAccessToken = a})
ssctSpreadsheetId :: Lens' SpreadsheetsSheetsCopyTo Text
ssctSpreadsheetId
= lens _ssctSpreadsheetId
(\ s a -> s{_ssctSpreadsheetId = a})
ssctUploadType :: Lens' SpreadsheetsSheetsCopyTo (Maybe Text)
ssctUploadType
= lens _ssctUploadType
(\ s a -> s{_ssctUploadType = a})
ssctPayload :: Lens' SpreadsheetsSheetsCopyTo CopySheetToAnotherSpreadsheetRequest
ssctPayload
= lens _ssctPayload (\ s a -> s{_ssctPayload = a})
ssctSheetId :: Lens' SpreadsheetsSheetsCopyTo Int32
ssctSheetId
= lens _ssctSheetId (\ s a -> s{_ssctSheetId = a}) .
_Coerce
ssctCallback :: Lens' SpreadsheetsSheetsCopyTo (Maybe Text)
ssctCallback
= lens _ssctCallback (\ s a -> s{_ssctCallback = a})
instance GoogleRequest SpreadsheetsSheetsCopyTo where
type Rs SpreadsheetsSheetsCopyTo = SheetProperties
type Scopes SpreadsheetsSheetsCopyTo =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"]
requestClient SpreadsheetsSheetsCopyTo'{..}
= go _ssctSpreadsheetId _ssctSheetId _ssctXgafv
_ssctUploadProtocol
_ssctAccessToken
_ssctUploadType
_ssctCallback
(Just AltJSON)
_ssctPayload
sheetsService
where go
= buildClient
(Proxy :: Proxy SpreadsheetsSheetsCopyToResource)
mempty