{-# 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.Style.Insert
(
StyleInsertResource
, styleInsert
, StyleInsert
, siPayload
, siTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type StyleInsertResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"styles" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StyleSetting :>
Post '[JSON] StyleSetting
data StyleInsert = StyleInsert'
{ _siPayload :: !StyleSetting
, _siTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
styleInsert
:: StyleSetting
-> Text
-> StyleInsert
styleInsert pSiPayload_ pSiTableId_ =
StyleInsert'
{ _siPayload = pSiPayload_
, _siTableId = pSiTableId_
}
siPayload :: Lens' StyleInsert StyleSetting
siPayload
= lens _siPayload (\ s a -> s{_siPayload = a})
siTableId :: Lens' StyleInsert Text
siTableId
= lens _siTableId (\ s a -> s{_siTableId = a})
instance GoogleRequest StyleInsert where
type Rs StyleInsert = StyleSetting
type Scopes StyleInsert =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient StyleInsert'{..}
= go _siTableId (Just AltJSON) _siPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy StyleInsertResource)
mempty