{-# 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.Tasks.Tasks.Get
(
TasksGetResource
, tasksGet
, TasksGet
, tgTaskList
, tgTask
) where
import Network.Google.AppsTasks.Types
import Network.Google.Prelude
type TasksGetResource =
"tasks" :>
"v1" :>
"lists" :>
Capture "tasklist" Text :>
"tasks" :>
Capture "task" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Task
data TasksGet = TasksGet'
{ _tgTaskList :: !Text
, _tgTask :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tasksGet
:: Text
-> Text
-> TasksGet
tasksGet pTgTaskList_ pTgTask_ =
TasksGet'
{ _tgTaskList = pTgTaskList_
, _tgTask = pTgTask_
}
tgTaskList :: Lens' TasksGet Text
tgTaskList
= lens _tgTaskList (\ s a -> s{_tgTaskList = a})
tgTask :: Lens' TasksGet Text
tgTask = lens _tgTask (\ s a -> s{_tgTask = a})
instance GoogleRequest TasksGet where
type Rs TasksGet = Task
type Scopes TasksGet =
'["https://www.googleapis.com/auth/tasks",
"https://www.googleapis.com/auth/tasks.readonly"]
requestClient TasksGet'{..}
= go _tgTaskList _tgTask (Just AltJSON)
appsTasksService
where go
= buildClient (Proxy :: Proxy TasksGetResource)
mempty