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.Insert
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-- Insert a new task in a TaskQueue
25-- /See:/ <https://developers.google.com/appengine/docs/python/taskqueue/rest TaskQueue API Reference> for @taskqueue.tasks.insert@.
26module Network.Google.Resource.TaskQueue.Tasks.Insert
31 -- * Creating a Request
41import Network.Google.Prelude
42import Network.Google.TaskQueue.Types
44-- | A resource alias for @taskqueue.tasks.insert@ method which the
45-- 'TasksInsert' request conforms to.
46type TasksInsertResource =
50 Capture "project" Text :>
52 Capture "taskqueue" Text :>
54 QueryParam "alt" AltJSON :>
55 ReqBody '[JSON] Task :> Post '[JSON] Task
57-- | Insert a new task in a TaskQueue
59-- /See:/ 'tasksInsert' smart constructor.
60data TasksInsert = TasksInsert'
61 { _tiTaskQueue :: !Text
64 } deriving (Eq,Show,Data,Typeable,Generic)
66-- | Creates a value of 'TasksInsert' with the minimum fields required to make a request.
68-- Use one of the following lenses to modify other fields as desired:
76 :: Text -- ^ 'tiTaskQueue'
77 -> Text -- ^ 'tiProject'
78 -> Task -- ^ 'tiPayload'
80tasksInsert pTiTaskQueue_ pTiProject_ pTiPayload_ =
82 { _tiTaskQueue = pTiTaskQueue_
83 , _tiProject = pTiProject_
84 , _tiPayload = pTiPayload_
87-- | The taskqueue to insert the task into
88tiTaskQueue :: Lens' TasksInsert Text
90 = lens _tiTaskQueue (\ s a -> s{_tiTaskQueue = a})
92-- | The project under which the queue lies
93tiProject :: Lens' TasksInsert Text
95 = lens _tiProject (\ s a -> s{_tiProject = a})
97-- | Multipart request metadata.
98tiPayload :: Lens' TasksInsert Task
100 = lens _tiPayload (\ s a -> s{_tiPayload = a})
102instance GoogleRequest TasksInsert where
103 type Rs TasksInsert = Task
104 type Scopes TasksInsert =
105 '["https://www.googleapis.com/auth/taskqueue",
106 "https://www.googleapis.com/auth/taskqueue.consumer"]
107 requestClient TasksInsert'{..}
108 = go _tiProject _tiTaskQueue (Just AltJSON)
112 = buildClient (Proxy :: Proxy TasksInsertResource)
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