{-# 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.FusionTables.Table.Copy
(
TableCopyResource
, tableCopy
, TableCopy
, tcTableId
, tcCopyPresentation
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TableCopyResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"copy" :>
QueryParam "copyPresentation" Bool :>
QueryParam "alt" AltJSON :> Post '[JSON] Table
data TableCopy = TableCopy'
{ _tcTableId :: !Text
, _tcCopyPresentation :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
tableCopy
:: Text
-> TableCopy
tableCopy pTcTableId_ =
TableCopy'
{ _tcTableId = pTcTableId_
, _tcCopyPresentation = Nothing
}
tcTableId :: Lens' TableCopy Text
tcTableId
= lens _tcTableId (\ s a -> s{_tcTableId = a})
tcCopyPresentation :: Lens' TableCopy (Maybe Bool)
tcCopyPresentation
= lens _tcCopyPresentation
(\ s a -> s{_tcCopyPresentation = a})
instance GoogleRequest TableCopy where
type Rs TableCopy = Table
type Scopes TableCopy =
'["https://www.googleapis.com/auth/fusiontables",
"https://www.googleapis.com/auth/fusiontables.readonly"]
requestClient TableCopy'{..}
= go _tcTableId _tcCopyPresentation (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy TableCopyResource)
mempty