{-# 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.Template.Get
(
TemplateGetResource
, templateGet
, TemplateGet
, temeTemplateId
, temeTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TemplateGetResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"templates" :>
Capture "templateId" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Template
data TemplateGet = TemplateGet'
{ _temeTemplateId :: !(Textual Int32)
, _temeTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
templateGet
:: Int32
-> Text
-> TemplateGet
templateGet pTemeTemplateId_ pTemeTableId_ =
TemplateGet'
{ _temeTemplateId = _Coerce # pTemeTemplateId_
, _temeTableId = pTemeTableId_
}
temeTemplateId :: Lens' TemplateGet Int32
temeTemplateId
= lens _temeTemplateId
(\ s a -> s{_temeTemplateId = a})
. _Coerce
temeTableId :: Lens' TemplateGet Text
temeTableId
= lens _temeTableId (\ s a -> s{_temeTableId = a})
instance GoogleRequest TemplateGet where
type Rs TemplateGet = Template
type Scopes TemplateGet =
'["https://www.googleapis.com/auth/fusiontables",
"https://www.googleapis.com/auth/fusiontables.readonly"]
requestClient TemplateGet'{..}
= go _temeTableId _temeTemplateId (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy TemplateGetResource)
mempty