{-# 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.Insert
(
TableInsertResource
, tableInsert
, TableInsert
, tiPayload
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TableInsertResource =
"fusiontables" :>
"v2" :>
"tables" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Table :> Post '[JSON] Table
newtype TableInsert = TableInsert'
{ _tiPayload :: Table
} deriving (Eq,Show,Data,Typeable,Generic)
tableInsert
:: Table
-> TableInsert
tableInsert pTiPayload_ =
TableInsert'
{ _tiPayload = pTiPayload_
}
tiPayload :: Lens' TableInsert Table
tiPayload
= lens _tiPayload (\ s a -> s{_tiPayload = a})
instance GoogleRequest TableInsert where
type Rs TableInsert = Table
type Scopes TableInsert =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient TableInsert'{..}
= go (Just AltJSON) _tiPayload fusionTablesService
where go
= buildClient (Proxy :: Proxy TableInsertResource)
mempty