{-# 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.Update
(
StyleUpdateResource
, styleUpdate
, StyleUpdate
, suPayload
, suStyleId
, suTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type StyleUpdateResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"styles" :>
Capture "styleId" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StyleSetting :>
Put '[JSON] StyleSetting
data StyleUpdate = StyleUpdate'
{ _suPayload :: !StyleSetting
, _suStyleId :: !(Textual Int32)
, _suTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
styleUpdate
:: StyleSetting
-> Int32
-> Text
-> StyleUpdate
styleUpdate pSuPayload_ pSuStyleId_ pSuTableId_ =
StyleUpdate'
{ _suPayload = pSuPayload_
, _suStyleId = _Coerce # pSuStyleId_
, _suTableId = pSuTableId_
}
suPayload :: Lens' StyleUpdate StyleSetting
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a})
suStyleId :: Lens' StyleUpdate Int32
suStyleId
= lens _suStyleId (\ s a -> s{_suStyleId = a}) .
_Coerce
suTableId :: Lens' StyleUpdate Text
suTableId
= lens _suTableId (\ s a -> s{_suTableId = a})
instance GoogleRequest StyleUpdate where
type Rs StyleUpdate = StyleSetting
type Scopes StyleUpdate =
'["https://www.googleapis.com/auth/fusiontables"]
requestClient StyleUpdate'{..}
= go _suTableId _suStyleId (Just AltJSON) _suPayload
fusionTablesService
where go
= buildClient (Proxy :: Proxy StyleUpdateResource)
mempty