{-# 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.Update
(
ColumnUpdateResource
, columnUpdate
, ColumnUpdate
, cuPayload
, cuTableId
, cuColumnId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type ColumnUpdateResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"columns" :>
Capture "columnId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Column :> Put '[JSON] Column
data ColumnUpdate = ColumnUpdate'
{ _cuPayload :: !Column
, _cuTableId :: !Text
, _cuColumnId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
columnUpdate
:: Column
-> Text
-> Text
-> ColumnUpdate
columnUpdate pCuPayload_ pCuTableId_ pCuColumnId_ =
ColumnUpdate'
{ _cuPayload = pCuPayload_
, _cuTableId = pCuTableId_
, _cuColumnId = pCuColumnId_
}
cuPayload :: Lens' ColumnUpdate Column
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
cuTableId :: Lens' ColumnUpdate Text
cuTableId
= lens _cuTableId (\ s a -> s{_cuTableId = a})
cuColumnId :: Lens' ColumnUpdate Text
cuColumnId
= lens _cuColumnId (\ s a -> s{_cuColumnId = a})
instance GoogleRequest ColumnUpdate where
type Rs ColumnUpdate = Column
type Scopes ColumnUpdate =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient ColumnUpdate'{..}
= go _cuTableId _cuColumnId (Just AltJSON) _cuPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy ColumnUpdateResource)
mempty