{-# 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.Task.Get
(
TaskGetResource
, taskGet
, TaskGet
, tggTaskId
, tggTableId
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TaskGetResource =
"fusiontables" :>
"v2" :>
"tables" :>
Capture "tableId" Text :>
"tasks" :>
Capture "taskId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Task
data TaskGet = TaskGet'
{ _tggTaskId :: !Text
, _tggTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
taskGet
:: Text
-> Text
-> TaskGet
taskGet pTggTaskId_ pTggTableId_ =
TaskGet'
{ _tggTaskId = pTggTaskId_
, _tggTableId = pTggTableId_
}
tggTaskId :: Lens' TaskGet Text
tggTaskId
= lens _tggTaskId (\ s a -> s{_tggTaskId = a})
tggTableId :: Lens' TaskGet Text
tggTableId
= lens _tggTableId (\ s a -> s{_tggTableId = a})
instance GoogleRequest TaskGet where
type Rs TaskGet = Task
type Scopes TaskGet =
'["https://www.googleapis.com/auth/fusiontables",
"https://www.googleapis.com/auth/fusiontables.readonly"]
requestClient TaskGet'{..}
= go _tggTableId _tggTaskId (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy TaskGetResource) mempty