{-# 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.Patch
(
StylePatchResource
, stylePatch
, StylePatch
, spPayload
, spStyleId
, spTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type StylePatchResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"styles" :>
Capture "styleId" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StyleSetting :>
Patch '[JSON] StyleSetting
data StylePatch = StylePatch'
{ _spPayload :: !StyleSetting
, _spStyleId :: !(Textual Int32)
, _spTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
stylePatch
:: StyleSetting
-> Int32
-> Text
-> StylePatch
stylePatch pSpPayload_ pSpStyleId_ pSpTableId_ =
StylePatch'
{ _spPayload = pSpPayload_
, _spStyleId = _Coerce # pSpStyleId_
, _spTableId = pSpTableId_
}
spPayload :: Lens' StylePatch StyleSetting
spPayload
= lens _spPayload (\ s a -> s{_spPayload = a})
spStyleId :: Lens' StylePatch Int32
spStyleId
= lens _spStyleId (\ s a -> s{_spStyleId = a}) .
_Coerce
spTableId :: Lens' StylePatch Text
spTableId
= lens _spTableId (\ s a -> s{_spTableId = a})
instance GoogleRequest StylePatch where
type Rs StylePatch = StyleSetting
type Scopes StylePatch =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient StylePatch'{..}
= go _spTableId _spStyleId (Just AltJSON) _spPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy StylePatchResource)
mempty