{-# 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.Patch
(
ColumnPatchResource
, columnPatch
, ColumnPatch
, cpPayload
, cpTableId
, cpColumnId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type ColumnPatchResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"columns" :>
Capture "columnId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Column :> Patch '[JSON] Column
data ColumnPatch = ColumnPatch'
{ _cpPayload :: !Column
, _cpTableId :: !Text
, _cpColumnId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
columnPatch
:: Column
-> Text
-> Text
-> ColumnPatch
columnPatch pCpPayload_ pCpTableId_ pCpColumnId_ =
ColumnPatch'
{ _cpPayload = pCpPayload_
, _cpTableId = pCpTableId_
, _cpColumnId = pCpColumnId_
}
cpPayload :: Lens' ColumnPatch Column
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
cpTableId :: Lens' ColumnPatch Text
cpTableId
= lens _cpTableId (\ s a -> s{_cpTableId = a})
cpColumnId :: Lens' ColumnPatch Text
cpColumnId
= lens _cpColumnId (\ s a -> s{_cpColumnId = a})
instance GoogleRequest ColumnPatch where
type Rs ColumnPatch = Column
type Scopes ColumnPatch =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient ColumnPatch'{..}
= go _cpTableId _cpColumnId (Just AltJSON) _cpPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy ColumnPatchResource)
mempty