1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18/**
19 * Service definition for Taskqueue (v1beta2).
20 *
21 * <p>
22 * Accesses a Google App Engine Pull Task Queue over REST.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/appengine/docs/python/taskqueue/rest" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_Taskqueue extends Google_Service
32{
33  /** Manage your Tasks and Taskqueues. */
34  const TASKQUEUE =
35      "https://www.googleapis.com/auth/taskqueue";
36  /** Consume Tasks from your Taskqueues. */
37  const TASKQUEUE_CONSUMER =
38      "https://www.googleapis.com/auth/taskqueue.consumer";
39
40  public $taskqueues;
41  public $tasks;
42
43  /**
44   * Constructs the internal representation of the Taskqueue service.
45   *
46   * @param Google_Client $client
47   */
48  public function __construct(Google_Client $client)
49  {
50    parent::__construct($client);
51    $this->rootUrl = 'https://www.googleapis.com/';
52    $this->servicePath = 'taskqueue/v1beta2/projects/';
53    $this->version = 'v1beta2';
54    $this->serviceName = 'taskqueue';
55
56    $this->taskqueues = new Google_Service_Taskqueue_Resource_Taskqueues(
57        $this,
58        $this->serviceName,
59        'taskqueues',
60        array(
61          'methods' => array(
62            'get' => array(
63              'path' => '{project}/taskqueues/{taskqueue}',
64              'httpMethod' => 'GET',
65              'parameters' => array(
66                'project' => array(
67                  'location' => 'path',
68                  'type' => 'string',
69                  'required' => true,
70                ),
71                'taskqueue' => array(
72                  'location' => 'path',
73                  'type' => 'string',
74                  'required' => true,
75                ),
76                'getStats' => array(
77                  'location' => 'query',
78                  'type' => 'boolean',
79                ),
80              ),
81            ),
82          )
83        )
84    );
85    $this->tasks = new Google_Service_Taskqueue_Resource_Tasks(
86        $this,
87        $this->serviceName,
88        'tasks',
89        array(
90          'methods' => array(
91            'delete' => array(
92              'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
93              'httpMethod' => 'DELETE',
94              'parameters' => array(
95                'project' => array(
96                  'location' => 'path',
97                  'type' => 'string',
98                  'required' => true,
99                ),
100                'taskqueue' => array(
101                  'location' => 'path',
102                  'type' => 'string',
103                  'required' => true,
104                ),
105                'task' => array(
106                  'location' => 'path',
107                  'type' => 'string',
108                  'required' => true,
109                ),
110              ),
111            ),'get' => array(
112              'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
113              'httpMethod' => 'GET',
114              'parameters' => array(
115                'project' => array(
116                  'location' => 'path',
117                  'type' => 'string',
118                  'required' => true,
119                ),
120                'taskqueue' => array(
121                  'location' => 'path',
122                  'type' => 'string',
123                  'required' => true,
124                ),
125                'task' => array(
126                  'location' => 'path',
127                  'type' => 'string',
128                  'required' => true,
129                ),
130              ),
131            ),'insert' => array(
132              'path' => '{project}/taskqueues/{taskqueue}/tasks',
133              'httpMethod' => 'POST',
134              'parameters' => array(
135                'project' => array(
136                  'location' => 'path',
137                  'type' => 'string',
138                  'required' => true,
139                ),
140                'taskqueue' => array(
141                  'location' => 'path',
142                  'type' => 'string',
143                  'required' => true,
144                ),
145              ),
146            ),'lease' => array(
147              'path' => '{project}/taskqueues/{taskqueue}/tasks/lease',
148              'httpMethod' => 'POST',
149              'parameters' => array(
150                'project' => array(
151                  'location' => 'path',
152                  'type' => 'string',
153                  'required' => true,
154                ),
155                'taskqueue' => array(
156                  'location' => 'path',
157                  'type' => 'string',
158                  'required' => true,
159                ),
160                'numTasks' => array(
161                  'location' => 'query',
162                  'type' => 'integer',
163                  'required' => true,
164                ),
165                'leaseSecs' => array(
166                  'location' => 'query',
167                  'type' => 'integer',
168                  'required' => true,
169                ),
170                'groupByTag' => array(
171                  'location' => 'query',
172                  'type' => 'boolean',
173                ),
174                'tag' => array(
175                  'location' => 'query',
176                  'type' => 'string',
177                ),
178              ),
179            ),'list' => array(
180              'path' => '{project}/taskqueues/{taskqueue}/tasks',
181              'httpMethod' => 'GET',
182              'parameters' => array(
183                'project' => array(
184                  'location' => 'path',
185                  'type' => 'string',
186                  'required' => true,
187                ),
188                'taskqueue' => array(
189                  'location' => 'path',
190                  'type' => 'string',
191                  'required' => true,
192                ),
193              ),
194            ),'patch' => array(
195              'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
196              'httpMethod' => 'PATCH',
197              'parameters' => array(
198                'project' => array(
199                  'location' => 'path',
200                  'type' => 'string',
201                  'required' => true,
202                ),
203                'taskqueue' => array(
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ),
208                'task' => array(
209                  'location' => 'path',
210                  'type' => 'string',
211                  'required' => true,
212                ),
213                'newLeaseSeconds' => array(
214                  'location' => 'query',
215                  'type' => 'integer',
216                  'required' => true,
217                ),
218              ),
219            ),'update' => array(
220              'path' => '{project}/taskqueues/{taskqueue}/tasks/{task}',
221              'httpMethod' => 'POST',
222              'parameters' => array(
223                'project' => array(
224                  'location' => 'path',
225                  'type' => 'string',
226                  'required' => true,
227                ),
228                'taskqueue' => array(
229                  'location' => 'path',
230                  'type' => 'string',
231                  'required' => true,
232                ),
233                'task' => array(
234                  'location' => 'path',
235                  'type' => 'string',
236                  'required' => true,
237                ),
238                'newLeaseSeconds' => array(
239                  'location' => 'query',
240                  'type' => 'integer',
241                  'required' => true,
242                ),
243              ),
244            ),
245          )
246        )
247    );
248  }
249}
250