{-# 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.Column.Insert
(
ColumnInsertResource
, columnInsert
, ColumnInsert
, ciPayload
, ciTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type ColumnInsertResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"columns" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Column :> Post '[JSON] Column
data ColumnInsert =
ColumnInsert'
{ _ciPayload :: !Column
, _ciTableId :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
columnInsert
:: Column
-> Text
-> ColumnInsert
columnInsert pCiPayload_ pCiTableId_ =
ColumnInsert' {_ciPayload = pCiPayload_, _ciTableId = pCiTableId_}
ciPayload :: Lens' ColumnInsert Column
ciPayload
= lens _ciPayload (\ s a -> s{_ciPayload = a})
ciTableId :: Lens' ColumnInsert Text
ciTableId
= lens _ciTableId (\ s a -> s{_ciTableId = a})
instance GoogleRequest ColumnInsert where
type Rs ColumnInsert = Column
type Scopes ColumnInsert =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient ColumnInsert'{..}
= go _ciTableId (Just AltJSON) _ciPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy ColumnInsertResource)
mempty