{-# 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.TaskQueue.Tasks.List
(
TasksListResource
, tasksList
, TasksList
, tTaskQueue
, tProject
) where
import Network.Google.Prelude
import Network.Google.TaskQueue.Types
type TasksListResource =
"taskqueue" :>
"v1beta2" :>
"projects" :>
Capture "project" Text :>
"taskqueues" :>
Capture "taskqueue" Text :>
"tasks" :>
QueryParam "alt" AltJSON :> Get '[JSON] Tasks2
-- | List Tasks in a TaskQueue
--
-- /See:/ 'tasksList' smart constructor.
data TasksList = TasksList'
{ _tTaskQueue :: !Text
, _tProject :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'TasksList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tTaskQueue'
--
-- * 'tProject'
tasksList
:: Text -- ^ 'tTaskQueue'
-> Text -- ^ 'tProject'
-> TasksList
tasksList pTTaskQueue_ pTProject_ =
TasksList'
{ _tTaskQueue = pTTaskQueue_
, _tProject = pTProject_
}
-- | The id of the taskqueue to list tasks from.
tTaskQueue :: Lens' TasksList Text
tTaskQueue
= lens _tTaskQueue (\ s a -> s{_tTaskQueue = a})
-- | The project under which the queue lies.
tProject :: Lens' TasksList Text
tProject = lens _tProject (\ s a -> s{_tProject = a})
instance GoogleRequest TasksList where
type Rs TasksList = Tasks2
type Scopes TasksList =
'["https://www.googleapis.com/auth/taskqueue",
"https://www.googleapis.com/auth/taskqueue.consumer"]
requestClient TasksList'{..}
= go _tProject _tTaskQueue (Just AltJSON)
taskQueueService
where go
= buildClient (Proxy :: Proxy TasksListResource)
mempty