1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE OverloadedStrings #-}
5{-# LANGUAGE RecordWildCards #-}
6{-# LANGUAGE TypeFamilies #-}
7{-# LANGUAGE TypeOperators #-}
9{-# OPTIONS_GHC -fno-warn-unused-imports #-}
10{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
13-- Module : Network.Google.Resource.Taskqueue.Tasks.Get
14-- Copyright : (c) 2015 Brendan Hay
15-- License : Mozilla Public License, v. 2.0.
16-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
17-- Stability : auto-generated
18-- Portability : non-portable (GHC extensions)
20-- | Get a particular task from a TaskQueue.
22-- /See:/ <https://developers.google.com/appengine/docs/python/taskqueue/rest TaskQueue API Reference> for @TaskqueueTasksGet@.
23module Network.Google.Resource.Taskqueue.Tasks.Get
28 -- * Creating a Request
44import Network.Google.AppEngineTaskQueue.Types
45import Network.Google.Prelude
47-- | A resource alias for @TaskqueueTasksGet@ which the
48-- 'TasksGet'' request conforms to.
49type TasksGetResource =
50 Capture "project" Text :>
52 Capture "taskqueue" Text :>
54 Capture "task" Text :>
55 QueryParam "quotaUser" Text :>
56 QueryParam "prettyPrint" Bool :>
57 QueryParam "userIp" Text :>
58 QueryParam "key" Key :>
59 QueryParam "oauth_token" OAuthToken :>
60 QueryParam "fields" Text :>
61 QueryParam "alt" AltJSON :> Get '[JSON] Task
63-- | Get a particular task from a TaskQueue.
65-- /See:/ 'tasksGet'' smart constructor.
66data TasksGet' = TasksGet'
67 { _tgTaskqueue :: !Text
68 , _tgQuotaUser :: !(Maybe Text)
69 , _tgPrettyPrint :: !Bool
71 , _tgUserIP :: !(Maybe Text)
72 , _tgKey :: !(Maybe Key)
74 , _tgOAuthToken :: !(Maybe OAuthToken)
75 , _tgFields :: !(Maybe Text)
76 } deriving (Eq,Read,Show,Data,Typeable,Generic)
78-- | Creates a value of 'TasksGet'' with the minimum fields required to make a request.
80-- Use one of the following lenses to modify other fields as desired:
100 :: Text -- ^ 'taskqueue'
101 -> Text -- ^ 'project'
104tasksGet' pTgTaskqueue_ pTgProject_ pTgTask_ =
106 { _tgTaskqueue = pTgTaskqueue_
107 , _tgQuotaUser = Nothing
108 , _tgPrettyPrint = True
109 , _tgProject = pTgProject_
110 , _tgUserIP = Nothing
113 , _tgOAuthToken = Nothing
114 , _tgFields = Nothing
117-- | The taskqueue in which the task belongs.
118tgTaskqueue :: Lens' TasksGet' Text
120 = lens _tgTaskqueue (\ s a -> s{_tgTaskqueue = a})
122-- | Available to use for quota purposes for server-side applications. Can be
123-- any arbitrary string assigned to a user, but should not exceed 40
124-- characters. Overrides userIp if both are provided.
125tgQuotaUser :: Lens' TasksGet' (Maybe Text)
127 = lens _tgQuotaUser (\ s a -> s{_tgQuotaUser = a})
129-- | Returns response with indentations and line breaks.
130tgPrettyPrint :: Lens' TasksGet' Bool
132 = lens _tgPrettyPrint
133 (\ s a -> s{_tgPrettyPrint = a})
135-- | The project under which the queue lies.
136tgProject :: Lens' TasksGet' Text
138 = lens _tgProject (\ s a -> s{_tgProject = a})
140-- | IP address of the site where the request originates. Use this if you
141-- want to enforce per-user limits.
142tgUserIP :: Lens' TasksGet' (Maybe Text)
143tgUserIP = lens _tgUserIP (\ s a -> s{_tgUserIP = a})
145-- | API key. Your API key identifies your project and provides you with API
146-- access, quota, and reports. Required unless you provide an OAuth 2.0
148tgKey :: Lens' TasksGet' (Maybe Key)
149tgKey = lens _tgKey (\ s a -> s{_tgKey = a})
151-- | The task to get properties of.
152tgTask :: Lens' TasksGet' Text
153tgTask = lens _tgTask (\ s a -> s{_tgTask = a})
155-- | OAuth 2.0 token for the current user.
156tgOAuthToken :: Lens' TasksGet' (Maybe OAuthToken)
158 = lens _tgOAuthToken (\ s a -> s{_tgOAuthToken = a})
160-- | Selector specifying which fields to include in a partial response.
161tgFields :: Lens' TasksGet' (Maybe Text)
162tgFields = lens _tgFields (\ s a -> s{_tgFields = a})
164instance GoogleAuth TasksGet' where
165 authKey = tgKey . _Just
166 authToken = tgOAuthToken . _Just
168instance GoogleRequest TasksGet' where
169 type Rs TasksGet' = Task
171 = requestWithRoute defReq appEngineTaskQueueURL
172 requestWithRoute r u TasksGet'{..}
173 = go _tgTaskqueue _tgQuotaUser (Just _tgPrettyPrint)
182 = clientWithRoute (Proxy :: Proxy TasksGetResource) r
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list