1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE RecordWildCards #-}
5{-# LANGUAGE TypeFamilies #-}
6{-# LANGUAGE TypeOperators #-}
8{-# OPTIONS_GHC -fno-warn-unused-imports #-}
9{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12-- Module : Network.Google.API.Taskqueue.Tasks.Delete
13-- Copyright : (c) 2015 Brendan Hay
14-- License : Mozilla Public License, v. 2.0.
15-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
16-- Stability : auto-generated
17-- Portability : non-portable (GHC extensions)
19-- | Delete a task from a TaskQueue.
21-- /See:/ <https://developers.google.com/appengine/docs/python/taskqueue/rest TaskQueue API Reference> for @taskqueue.tasks.delete@.
22module Network.Google.API.Taskqueue.Tasks.Delete
27 -- * Creating a Request
44import Network.Google.AppEngine.TaskQueue.Types
45import Network.Google.Prelude
47-- | A resource alias for taskqueue.tasks.delete which the
48-- 'TasksDelete'' request conforms to.
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" Text :>
59 QueryParam "oauth_token" Text :>
60 QueryParam "fields" Text :>
61 QueryParam "alt" Alt :> Delete '[JSON] ()
63-- | Delete a task from a TaskQueue.
65-- /See:/ 'tasksDelete'' smart constructor.
66data TasksDelete' = TasksDelete'
67 { _tdTaskqueue :: !Text
68 , _tdQuotaUser :: !(Maybe Text)
69 , _tdPrettyPrint :: !Bool
71 , _tdUserIp :: !(Maybe Text)
72 , _tdKey :: !(Maybe Text)
74 , _tdOauthToken :: !(Maybe Text)
75 , _tdFields :: !(Maybe Text)
77 } deriving (Eq,Read,Show,Data,Typeable,Generic)
79-- | Creates a value of 'TasksDelete'' with the minimum fields required to make a request.
81-- Use one of the following lenses to modify other fields as desired:
103 :: Text -- ^ 'taskqueue'
104 -> Text -- ^ 'project'
107tasksDelete' pTdTaskqueue_ pTdProject_ pTdTask_ =
109 { _tdTaskqueue = pTdTaskqueue_
110 , _tdQuotaUser = Nothing
111 , _tdPrettyPrint = True
112 , _tdProject = pTdProject_
113 , _tdUserIp = Nothing
116 , _tdOauthToken = Nothing
117 , _tdFields = Nothing
121-- | The taskqueue to delete a task from.
122tdTaskqueue :: Lens' TasksDelete' Text
124 = lens _tdTaskqueue (\ s a -> s{_tdTaskqueue = a})
126-- | Available to use for quota purposes for server-side applications. Can be
127-- any arbitrary string assigned to a user, but should not exceed 40
128-- characters. Overrides userIp if both are provided.
129tdQuotaUser :: Lens' TasksDelete' (Maybe Text)
131 = lens _tdQuotaUser (\ s a -> s{_tdQuotaUser = a})
133-- | Returns response with indentations and line breaks.
134tdPrettyPrint :: Lens' TasksDelete' Bool
136 = lens _tdPrettyPrint
137 (\ s a -> s{_tdPrettyPrint = a})
139-- | The project under which the queue lies.
140tdProject :: Lens' TasksDelete' Text
142 = lens _tdProject (\ s a -> s{_tdProject = a})
144-- | IP address of the site where the request originates. Use this if you
145-- want to enforce per-user limits.
146tdUserIp :: Lens' TasksDelete' (Maybe Text)
147tdUserIp = lens _tdUserIp (\ s a -> s{_tdUserIp = a})
149-- | API key. Your API key identifies your project and provides you with API
150-- access, quota, and reports. Required unless you provide an OAuth 2.0
152tdKey :: Lens' TasksDelete' (Maybe Text)
153tdKey = lens _tdKey (\ s a -> s{_tdKey = a})
155-- | The id of the task to delete.
156tdTask :: Lens' TasksDelete' Text
157tdTask = lens _tdTask (\ s a -> s{_tdTask = a})
159-- | OAuth 2.0 token for the current user.
160tdOauthToken :: Lens' TasksDelete' (Maybe Text)
162 = lens _tdOauthToken (\ s a -> s{_tdOauthToken = a})
164-- | Selector specifying which fields to include in a partial response.
165tdFields :: Lens' TasksDelete' (Maybe Text)
166tdFields = lens _tdFields (\ s a -> s{_tdFields = a})
168-- | Data format for the response.
169tdAlt :: Lens' TasksDelete' Alt
170tdAlt = lens _tdAlt (\ s a -> s{_tdAlt = a})
172instance GoogleRequest TasksDelete' where
173 type Rs TasksDelete' = ()
175 = requestWithRoute defReq appEngineTaskQueueURL
176 requestWithRoute r u TasksDelete'{..}
177 = go _tdTaskqueue _tdQuotaUser (Just _tdPrettyPrint)
186 = clientWithRoute (Proxy :: Proxy TasksDeleteAPI) r u
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