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 CloudTasks (v2).
20 *
21 * <p>
22 * Manages the execution of large numbers of distributed requests.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://cloud.google.com/tasks/" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_CloudTasks extends Google_Service
32{
33  /** View and manage your data across Google Cloud Platform services. */
34  const CLOUD_PLATFORM =
35      "https://www.googleapis.com/auth/cloud-platform";
36
37  public $projects_locations;
38  public $projects_locations_queues;
39  public $projects_locations_queues_tasks;
40
41  /**
42   * Constructs the internal representation of the CloudTasks service.
43   *
44   * @param Google_Client $client
45   */
46  public function __construct(Google_Client $client)
47  {
48    parent::__construct($client);
49    $this->rootUrl = 'https://cloudtasks.googleapis.com/';
50    $this->servicePath = '';
51    $this->batchPath = 'batch';
52    $this->version = 'v2';
53    $this->serviceName = 'cloudtasks';
54
55    $this->projects_locations = new Google_Service_CloudTasks_Resource_ProjectsLocations(
56        $this,
57        $this->serviceName,
58        'locations',
59        array(
60          'methods' => array(
61            'get' => array(
62              'path' => 'v2/{+name}',
63              'httpMethod' => 'GET',
64              'parameters' => array(
65                'name' => array(
66                  'location' => 'path',
67                  'type' => 'string',
68                  'required' => true,
69                ),
70              ),
71            ),'list' => array(
72              'path' => 'v2/{+name}/locations',
73              'httpMethod' => 'GET',
74              'parameters' => array(
75                'name' => array(
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ),
80                'pageToken' => array(
81                  'location' => 'query',
82                  'type' => 'string',
83                ),
84                'pageSize' => array(
85                  'location' => 'query',
86                  'type' => 'integer',
87                ),
88                'filter' => array(
89                  'location' => 'query',
90                  'type' => 'string',
91                ),
92              ),
93            ),
94          )
95        )
96    );
97    $this->projects_locations_queues = new Google_Service_CloudTasks_Resource_ProjectsLocationsQueues(
98        $this,
99        $this->serviceName,
100        'queues',
101        array(
102          'methods' => array(
103            'create' => array(
104              'path' => 'v2/{+parent}/queues',
105              'httpMethod' => 'POST',
106              'parameters' => array(
107                'parent' => array(
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ),
112              ),
113            ),'delete' => array(
114              'path' => 'v2/{+name}',
115              'httpMethod' => 'DELETE',
116              'parameters' => array(
117                'name' => array(
118                  'location' => 'path',
119                  'type' => 'string',
120                  'required' => true,
121                ),
122              ),
123            ),'get' => array(
124              'path' => 'v2/{+name}',
125              'httpMethod' => 'GET',
126              'parameters' => array(
127                'name' => array(
128                  'location' => 'path',
129                  'type' => 'string',
130                  'required' => true,
131                ),
132              ),
133            ),'getIamPolicy' => array(
134              'path' => 'v2/{+resource}:getIamPolicy',
135              'httpMethod' => 'POST',
136              'parameters' => array(
137                'resource' => array(
138                  'location' => 'path',
139                  'type' => 'string',
140                  'required' => true,
141                ),
142              ),
143            ),'list' => array(
144              'path' => 'v2/{+parent}/queues',
145              'httpMethod' => 'GET',
146              'parameters' => array(
147                'parent' => array(
148                  'location' => 'path',
149                  'type' => 'string',
150                  'required' => true,
151                ),
152                'filter' => array(
153                  'location' => 'query',
154                  'type' => 'string',
155                ),
156                'pageToken' => array(
157                  'location' => 'query',
158                  'type' => 'string',
159                ),
160                'pageSize' => array(
161                  'location' => 'query',
162                  'type' => 'integer',
163                ),
164              ),
165            ),'patch' => array(
166              'path' => 'v2/{+name}',
167              'httpMethod' => 'PATCH',
168              'parameters' => array(
169                'name' => array(
170                  'location' => 'path',
171                  'type' => 'string',
172                  'required' => true,
173                ),
174                'updateMask' => array(
175                  'location' => 'query',
176                  'type' => 'string',
177                ),
178              ),
179            ),'pause' => array(
180              'path' => 'v2/{+name}:pause',
181              'httpMethod' => 'POST',
182              'parameters' => array(
183                'name' => array(
184                  'location' => 'path',
185                  'type' => 'string',
186                  'required' => true,
187                ),
188              ),
189            ),'purge' => array(
190              'path' => 'v2/{+name}:purge',
191              'httpMethod' => 'POST',
192              'parameters' => array(
193                'name' => array(
194                  'location' => 'path',
195                  'type' => 'string',
196                  'required' => true,
197                ),
198              ),
199            ),'resume' => array(
200              'path' => 'v2/{+name}:resume',
201              'httpMethod' => 'POST',
202              'parameters' => array(
203                'name' => array(
204                  'location' => 'path',
205                  'type' => 'string',
206                  'required' => true,
207                ),
208              ),
209            ),'setIamPolicy' => array(
210              'path' => 'v2/{+resource}:setIamPolicy',
211              'httpMethod' => 'POST',
212              'parameters' => array(
213                'resource' => array(
214                  'location' => 'path',
215                  'type' => 'string',
216                  'required' => true,
217                ),
218              ),
219            ),'testIamPermissions' => array(
220              'path' => 'v2/{+resource}:testIamPermissions',
221              'httpMethod' => 'POST',
222              'parameters' => array(
223                'resource' => array(
224                  'location' => 'path',
225                  'type' => 'string',
226                  'required' => true,
227                ),
228              ),
229            ),
230          )
231        )
232    );
233    $this->projects_locations_queues_tasks = new Google_Service_CloudTasks_Resource_ProjectsLocationsQueuesTasks(
234        $this,
235        $this->serviceName,
236        'tasks',
237        array(
238          'methods' => array(
239            'create' => array(
240              'path' => 'v2/{+parent}/tasks',
241              'httpMethod' => 'POST',
242              'parameters' => array(
243                'parent' => array(
244                  'location' => 'path',
245                  'type' => 'string',
246                  'required' => true,
247                ),
248              ),
249            ),'delete' => array(
250              'path' => 'v2/{+name}',
251              'httpMethod' => 'DELETE',
252              'parameters' => array(
253                'name' => array(
254                  'location' => 'path',
255                  'type' => 'string',
256                  'required' => true,
257                ),
258              ),
259            ),'get' => array(
260              'path' => 'v2/{+name}',
261              'httpMethod' => 'GET',
262              'parameters' => array(
263                'name' => array(
264                  'location' => 'path',
265                  'type' => 'string',
266                  'required' => true,
267                ),
268                'responseView' => array(
269                  'location' => 'query',
270                  'type' => 'string',
271                ),
272              ),
273            ),'list' => array(
274              'path' => 'v2/{+parent}/tasks',
275              'httpMethod' => 'GET',
276              'parameters' => array(
277                'parent' => array(
278                  'location' => 'path',
279                  'type' => 'string',
280                  'required' => true,
281                ),
282                'responseView' => array(
283                  'location' => 'query',
284                  'type' => 'string',
285                ),
286                'pageToken' => array(
287                  'location' => 'query',
288                  'type' => 'string',
289                ),
290                'pageSize' => array(
291                  'location' => 'query',
292                  'type' => 'integer',
293                ),
294              ),
295            ),'run' => array(
296              'path' => 'v2/{+name}:run',
297              'httpMethod' => 'POST',
298              'parameters' => array(
299                'name' => array(
300                  'location' => 'path',
301                  'type' => 'string',
302                  'required' => true,
303                ),
304              ),
305            ),
306          )
307        )
308    );
309  }
310}
311