1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE NoImplicitPrelude #-}
6{-# LANGUAGE OverloadedStrings #-}
7{-# LANGUAGE RecordWildCards #-}
8{-# LANGUAGE TypeFamilies #-}
9{-# LANGUAGE TypeOperators #-}
11{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13{-# OPTIONS_GHC -fno-warn-unused-imports #-}
16-- Module : Network.Google.Resource.TaskQueue.Tasks.Update
17-- Copyright : (c) 2015-2016 Brendan Hay
18-- License : Mozilla Public License, v. 2.0.
19-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
23-- Update tasks that are leased out of a TaskQueue.
25-- /See:/ <https://developers.google.com/appengine/docs/python/taskqueue/rest TaskQueue API Reference> for @taskqueue.tasks.update@.
26module Network.Google.Resource.TaskQueue.Tasks.Update
31 -- * Creating a Request
43import Network.Google.Prelude
44import Network.Google.TaskQueue.Types
46-- | A resource alias for @taskqueue.tasks.update@ method which the
47-- 'TasksUpdate' request conforms to.
48type TasksUpdateResource =
52 Capture "project" Text :>
54 Capture "taskqueue" Text :>
56 Capture "task" Text :>
57 QueryParam "newLeaseSeconds" (Textual Int32) :>
58 QueryParam "alt" AltJSON :>
59 ReqBody '[JSON] Task :> Post '[JSON] Task
61-- | Update tasks that are leased out of a TaskQueue.
63-- /See:/ 'tasksUpdate' smart constructor.
64data TasksUpdate = TasksUpdate'
65 { _tuTaskQueue :: !Text
69 , _tuNewLeaseSeconds :: !(Textual Int32)
70 } deriving (Eq,Show,Data,Typeable,Generic)
72-- | Creates a value of 'TasksUpdate' with the minimum fields required to make a request.
74-- Use one of the following lenses to modify other fields as desired:
84-- * 'tuNewLeaseSeconds'
86 :: Text -- ^ 'tuTaskQueue'
87 -> Text -- ^ 'tuProject'
88 -> Task -- ^ 'tuPayload'
90 -> Int32 -- ^ 'tuNewLeaseSeconds'
92tasksUpdate pTuTaskQueue_ pTuProject_ pTuPayload_ pTuTask_ pTuNewLeaseSeconds_ =
94 { _tuTaskQueue = pTuTaskQueue_
95 , _tuProject = pTuProject_
96 , _tuPayload = pTuPayload_
98 , _tuNewLeaseSeconds = _Coerce # pTuNewLeaseSeconds_
101tuTaskQueue :: Lens' TasksUpdate Text
103 = lens _tuTaskQueue (\ s a -> s{_tuTaskQueue = a})
105-- | The project under which the queue lies.
106tuProject :: Lens' TasksUpdate Text
108 = lens _tuProject (\ s a -> s{_tuProject = a})
110-- | Multipart request metadata.
111tuPayload :: Lens' TasksUpdate Task
113 = lens _tuPayload (\ s a -> s{_tuPayload = a})
115tuTask :: Lens' TasksUpdate Text
116tuTask = lens _tuTask (\ s a -> s{_tuTask = a})
118-- | The new lease in seconds.
119tuNewLeaseSeconds :: Lens' TasksUpdate Int32
121 = lens _tuNewLeaseSeconds
122 (\ s a -> s{_tuNewLeaseSeconds = a})
125instance GoogleRequest TasksUpdate where
126 type Rs TasksUpdate = Task
127 type Scopes TasksUpdate =
128 '["https://www.googleapis.com/auth/taskqueue",
129 "https://www.googleapis.com/auth/taskqueue.consumer"]
130 requestClient TasksUpdate'{..}
131 = go _tuProject _tuTaskQueue _tuTask
132 (Just _tuNewLeaseSeconds)
137 = buildClient (Proxy :: Proxy TasksUpdateResource)
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