{-# 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.Get
(
StyleGetResource
, styleGet
, StyleGet
, sgStyleId
, sgTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type StyleGetResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"styles" :>
Capture "styleId" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] StyleSetting
data StyleGet = StyleGet'
{ _sgStyleId :: !(Textual Int32)
, _sgTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
styleGet
:: Int32
-> Text
-> StyleGet
styleGet pSgStyleId_ pSgTableId_ =
StyleGet'
{ _sgStyleId = _Coerce # pSgStyleId_
, _sgTableId = pSgTableId_
}
sgStyleId :: Lens' StyleGet Int32
sgStyleId
= lens _sgStyleId (\ s a -> s{_sgStyleId = a}) .
_Coerce
sgTableId :: Lens' StyleGet Text
sgTableId
= lens _sgTableId (\ s a -> s{_sgTableId = a})
instance GoogleRequest StyleGet where
type Rs StyleGet = StyleSetting
type Scopes StyleGet =
'["https://www.googleapis.com/auth/fusiontables",
"https://www.googleapis.com/auth/fusiontables.readonly"]
requestClient StyleGet'{..}
= go _sgTableId _sgStyleId (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy StyleGetResource)
mempty