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 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for PubsubLite (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | </p>
|
---|
27 | *
|
---|
28 | * <p>
|
---|
29 | * For more information about this service, see the API
|
---|
30 | * <a href="https://cloud.google.com/pubsub/lite/docs" target="_blank">Documentation</a>
|
---|
31 | * </p>
|
---|
32 | *
|
---|
33 | * @author Google, Inc.
|
---|
34 | */
|
---|
35 | class PubsubLite extends \Google\Service
|
---|
36 | {
|
---|
37 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
---|
38 | const CLOUD_PLATFORM =
|
---|
39 | "https://www.googleapis.com/auth/cloud-platform";
|
---|
40 |
|
---|
41 | public $admin_projects_locations_operations;
|
---|
42 | public $admin_projects_locations_reservations;
|
---|
43 | public $admin_projects_locations_reservations_topics;
|
---|
44 | public $admin_projects_locations_subscriptions;
|
---|
45 | public $admin_projects_locations_topics;
|
---|
46 | public $admin_projects_locations_topics_subscriptions;
|
---|
47 | public $cursor_projects_locations_subscriptions;
|
---|
48 | public $cursor_projects_locations_subscriptions_cursors;
|
---|
49 | public $topicStats_projects_locations_topics;
|
---|
50 | public $rootUrlTemplate;
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * Constructs the internal representation of the PubsubLite service.
|
---|
54 | *
|
---|
55 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
56 | * config array to pass to a new Client instance.
|
---|
57 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
58 | */
|
---|
59 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
60 | {
|
---|
61 | parent::__construct($clientOrConfig);
|
---|
62 | $this->rootUrl = $rootUrl ?: 'https://pubsublite.googleapis.com/';
|
---|
63 | $this->rootUrlTemplate = $rootUrl ?: 'https://pubsublite.UNIVERSE_DOMAIN/';
|
---|
64 | $this->servicePath = '';
|
---|
65 | $this->batchPath = 'batch';
|
---|
66 | $this->version = 'v1';
|
---|
67 | $this->serviceName = 'pubsublite';
|
---|
68 |
|
---|
69 | $this->admin_projects_locations_operations = new PubsubLite\Resource\AdminProjectsLocationsOperations(
|
---|
70 | $this,
|
---|
71 | $this->serviceName,
|
---|
72 | 'operations',
|
---|
73 | [
|
---|
74 | 'methods' => [
|
---|
75 | 'cancel' => [
|
---|
76 | 'path' => 'v1/admin/{+name}:cancel',
|
---|
77 | 'httpMethod' => 'POST',
|
---|
78 | 'parameters' => [
|
---|
79 | 'name' => [
|
---|
80 | 'location' => 'path',
|
---|
81 | 'type' => 'string',
|
---|
82 | 'required' => true,
|
---|
83 | ],
|
---|
84 | ],
|
---|
85 | ],'delete' => [
|
---|
86 | 'path' => 'v1/admin/{+name}',
|
---|
87 | 'httpMethod' => 'DELETE',
|
---|
88 | 'parameters' => [
|
---|
89 | 'name' => [
|
---|
90 | 'location' => 'path',
|
---|
91 | 'type' => 'string',
|
---|
92 | 'required' => true,
|
---|
93 | ],
|
---|
94 | ],
|
---|
95 | ],'get' => [
|
---|
96 | 'path' => 'v1/admin/{+name}',
|
---|
97 | 'httpMethod' => 'GET',
|
---|
98 | 'parameters' => [
|
---|
99 | 'name' => [
|
---|
100 | 'location' => 'path',
|
---|
101 | 'type' => 'string',
|
---|
102 | 'required' => true,
|
---|
103 | ],
|
---|
104 | ],
|
---|
105 | ],'list' => [
|
---|
106 | 'path' => 'v1/admin/{+name}/operations',
|
---|
107 | 'httpMethod' => 'GET',
|
---|
108 | 'parameters' => [
|
---|
109 | 'name' => [
|
---|
110 | 'location' => 'path',
|
---|
111 | 'type' => 'string',
|
---|
112 | 'required' => true,
|
---|
113 | ],
|
---|
114 | 'filter' => [
|
---|
115 | 'location' => 'query',
|
---|
116 | 'type' => 'string',
|
---|
117 | ],
|
---|
118 | 'pageSize' => [
|
---|
119 | 'location' => 'query',
|
---|
120 | 'type' => 'integer',
|
---|
121 | ],
|
---|
122 | 'pageToken' => [
|
---|
123 | 'location' => 'query',
|
---|
124 | 'type' => 'string',
|
---|
125 | ],
|
---|
126 | ],
|
---|
127 | ],
|
---|
128 | ]
|
---|
129 | ]
|
---|
130 | );
|
---|
131 | $this->admin_projects_locations_reservations = new PubsubLite\Resource\AdminProjectsLocationsReservations(
|
---|
132 | $this,
|
---|
133 | $this->serviceName,
|
---|
134 | 'reservations',
|
---|
135 | [
|
---|
136 | 'methods' => [
|
---|
137 | 'create' => [
|
---|
138 | 'path' => 'v1/admin/{+parent}/reservations',
|
---|
139 | 'httpMethod' => 'POST',
|
---|
140 | 'parameters' => [
|
---|
141 | 'parent' => [
|
---|
142 | 'location' => 'path',
|
---|
143 | 'type' => 'string',
|
---|
144 | 'required' => true,
|
---|
145 | ],
|
---|
146 | 'reservationId' => [
|
---|
147 | 'location' => 'query',
|
---|
148 | 'type' => 'string',
|
---|
149 | ],
|
---|
150 | ],
|
---|
151 | ],'delete' => [
|
---|
152 | 'path' => 'v1/admin/{+name}',
|
---|
153 | 'httpMethod' => 'DELETE',
|
---|
154 | 'parameters' => [
|
---|
155 | 'name' => [
|
---|
156 | 'location' => 'path',
|
---|
157 | 'type' => 'string',
|
---|
158 | 'required' => true,
|
---|
159 | ],
|
---|
160 | ],
|
---|
161 | ],'get' => [
|
---|
162 | 'path' => 'v1/admin/{+name}',
|
---|
163 | 'httpMethod' => 'GET',
|
---|
164 | 'parameters' => [
|
---|
165 | 'name' => [
|
---|
166 | 'location' => 'path',
|
---|
167 | 'type' => 'string',
|
---|
168 | 'required' => true,
|
---|
169 | ],
|
---|
170 | ],
|
---|
171 | ],'list' => [
|
---|
172 | 'path' => 'v1/admin/{+parent}/reservations',
|
---|
173 | 'httpMethod' => 'GET',
|
---|
174 | 'parameters' => [
|
---|
175 | 'parent' => [
|
---|
176 | 'location' => 'path',
|
---|
177 | 'type' => 'string',
|
---|
178 | 'required' => true,
|
---|
179 | ],
|
---|
180 | 'pageSize' => [
|
---|
181 | 'location' => 'query',
|
---|
182 | 'type' => 'integer',
|
---|
183 | ],
|
---|
184 | 'pageToken' => [
|
---|
185 | 'location' => 'query',
|
---|
186 | 'type' => 'string',
|
---|
187 | ],
|
---|
188 | ],
|
---|
189 | ],'patch' => [
|
---|
190 | 'path' => 'v1/admin/{+name}',
|
---|
191 | 'httpMethod' => 'PATCH',
|
---|
192 | 'parameters' => [
|
---|
193 | 'name' => [
|
---|
194 | 'location' => 'path',
|
---|
195 | 'type' => 'string',
|
---|
196 | 'required' => true,
|
---|
197 | ],
|
---|
198 | 'updateMask' => [
|
---|
199 | 'location' => 'query',
|
---|
200 | 'type' => 'string',
|
---|
201 | ],
|
---|
202 | ],
|
---|
203 | ],
|
---|
204 | ]
|
---|
205 | ]
|
---|
206 | );
|
---|
207 | $this->admin_projects_locations_reservations_topics = new PubsubLite\Resource\AdminProjectsLocationsReservationsTopics(
|
---|
208 | $this,
|
---|
209 | $this->serviceName,
|
---|
210 | 'topics',
|
---|
211 | [
|
---|
212 | 'methods' => [
|
---|
213 | 'list' => [
|
---|
214 | 'path' => 'v1/admin/{+name}/topics',
|
---|
215 | 'httpMethod' => 'GET',
|
---|
216 | 'parameters' => [
|
---|
217 | 'name' => [
|
---|
218 | 'location' => 'path',
|
---|
219 | 'type' => 'string',
|
---|
220 | 'required' => true,
|
---|
221 | ],
|
---|
222 | 'pageSize' => [
|
---|
223 | 'location' => 'query',
|
---|
224 | 'type' => 'integer',
|
---|
225 | ],
|
---|
226 | 'pageToken' => [
|
---|
227 | 'location' => 'query',
|
---|
228 | 'type' => 'string',
|
---|
229 | ],
|
---|
230 | ],
|
---|
231 | ],
|
---|
232 | ]
|
---|
233 | ]
|
---|
234 | );
|
---|
235 | $this->admin_projects_locations_subscriptions = new PubsubLite\Resource\AdminProjectsLocationsSubscriptions(
|
---|
236 | $this,
|
---|
237 | $this->serviceName,
|
---|
238 | 'subscriptions',
|
---|
239 | [
|
---|
240 | 'methods' => [
|
---|
241 | 'create' => [
|
---|
242 | 'path' => 'v1/admin/{+parent}/subscriptions',
|
---|
243 | 'httpMethod' => 'POST',
|
---|
244 | 'parameters' => [
|
---|
245 | 'parent' => [
|
---|
246 | 'location' => 'path',
|
---|
247 | 'type' => 'string',
|
---|
248 | 'required' => true,
|
---|
249 | ],
|
---|
250 | 'skipBacklog' => [
|
---|
251 | 'location' => 'query',
|
---|
252 | 'type' => 'boolean',
|
---|
253 | ],
|
---|
254 | 'subscriptionId' => [
|
---|
255 | 'location' => 'query',
|
---|
256 | 'type' => 'string',
|
---|
257 | ],
|
---|
258 | ],
|
---|
259 | ],'delete' => [
|
---|
260 | 'path' => 'v1/admin/{+name}',
|
---|
261 | 'httpMethod' => 'DELETE',
|
---|
262 | 'parameters' => [
|
---|
263 | 'name' => [
|
---|
264 | 'location' => 'path',
|
---|
265 | 'type' => 'string',
|
---|
266 | 'required' => true,
|
---|
267 | ],
|
---|
268 | ],
|
---|
269 | ],'get' => [
|
---|
270 | 'path' => 'v1/admin/{+name}',
|
---|
271 | 'httpMethod' => 'GET',
|
---|
272 | 'parameters' => [
|
---|
273 | 'name' => [
|
---|
274 | 'location' => 'path',
|
---|
275 | 'type' => 'string',
|
---|
276 | 'required' => true,
|
---|
277 | ],
|
---|
278 | ],
|
---|
279 | ],'list' => [
|
---|
280 | 'path' => 'v1/admin/{+parent}/subscriptions',
|
---|
281 | 'httpMethod' => 'GET',
|
---|
282 | 'parameters' => [
|
---|
283 | 'parent' => [
|
---|
284 | 'location' => 'path',
|
---|
285 | 'type' => 'string',
|
---|
286 | 'required' => true,
|
---|
287 | ],
|
---|
288 | 'pageSize' => [
|
---|
289 | 'location' => 'query',
|
---|
290 | 'type' => 'integer',
|
---|
291 | ],
|
---|
292 | 'pageToken' => [
|
---|
293 | 'location' => 'query',
|
---|
294 | 'type' => 'string',
|
---|
295 | ],
|
---|
296 | ],
|
---|
297 | ],'patch' => [
|
---|
298 | 'path' => 'v1/admin/{+name}',
|
---|
299 | 'httpMethod' => 'PATCH',
|
---|
300 | 'parameters' => [
|
---|
301 | 'name' => [
|
---|
302 | 'location' => 'path',
|
---|
303 | 'type' => 'string',
|
---|
304 | 'required' => true,
|
---|
305 | ],
|
---|
306 | 'updateMask' => [
|
---|
307 | 'location' => 'query',
|
---|
308 | 'type' => 'string',
|
---|
309 | ],
|
---|
310 | ],
|
---|
311 | ],'seek' => [
|
---|
312 | 'path' => 'v1/admin/{+name}:seek',
|
---|
313 | 'httpMethod' => 'POST',
|
---|
314 | 'parameters' => [
|
---|
315 | 'name' => [
|
---|
316 | 'location' => 'path',
|
---|
317 | 'type' => 'string',
|
---|
318 | 'required' => true,
|
---|
319 | ],
|
---|
320 | ],
|
---|
321 | ],
|
---|
322 | ]
|
---|
323 | ]
|
---|
324 | );
|
---|
325 | $this->admin_projects_locations_topics = new PubsubLite\Resource\AdminProjectsLocationsTopics(
|
---|
326 | $this,
|
---|
327 | $this->serviceName,
|
---|
328 | 'topics',
|
---|
329 | [
|
---|
330 | 'methods' => [
|
---|
331 | 'create' => [
|
---|
332 | 'path' => 'v1/admin/{+parent}/topics',
|
---|
333 | 'httpMethod' => 'POST',
|
---|
334 | 'parameters' => [
|
---|
335 | 'parent' => [
|
---|
336 | 'location' => 'path',
|
---|
337 | 'type' => 'string',
|
---|
338 | 'required' => true,
|
---|
339 | ],
|
---|
340 | 'topicId' => [
|
---|
341 | 'location' => 'query',
|
---|
342 | 'type' => 'string',
|
---|
343 | ],
|
---|
344 | ],
|
---|
345 | ],'delete' => [
|
---|
346 | 'path' => 'v1/admin/{+name}',
|
---|
347 | 'httpMethod' => 'DELETE',
|
---|
348 | 'parameters' => [
|
---|
349 | 'name' => [
|
---|
350 | 'location' => 'path',
|
---|
351 | 'type' => 'string',
|
---|
352 | 'required' => true,
|
---|
353 | ],
|
---|
354 | ],
|
---|
355 | ],'get' => [
|
---|
356 | 'path' => 'v1/admin/{+name}',
|
---|
357 | 'httpMethod' => 'GET',
|
---|
358 | 'parameters' => [
|
---|
359 | 'name' => [
|
---|
360 | 'location' => 'path',
|
---|
361 | 'type' => 'string',
|
---|
362 | 'required' => true,
|
---|
363 | ],
|
---|
364 | ],
|
---|
365 | ],'getPartitions' => [
|
---|
366 | 'path' => 'v1/admin/{+name}/partitions',
|
---|
367 | 'httpMethod' => 'GET',
|
---|
368 | 'parameters' => [
|
---|
369 | 'name' => [
|
---|
370 | 'location' => 'path',
|
---|
371 | 'type' => 'string',
|
---|
372 | 'required' => true,
|
---|
373 | ],
|
---|
374 | ],
|
---|
375 | ],'list' => [
|
---|
376 | 'path' => 'v1/admin/{+parent}/topics',
|
---|
377 | 'httpMethod' => 'GET',
|
---|
378 | 'parameters' => [
|
---|
379 | 'parent' => [
|
---|
380 | 'location' => 'path',
|
---|
381 | 'type' => 'string',
|
---|
382 | 'required' => true,
|
---|
383 | ],
|
---|
384 | 'pageSize' => [
|
---|
385 | 'location' => 'query',
|
---|
386 | 'type' => 'integer',
|
---|
387 | ],
|
---|
388 | 'pageToken' => [
|
---|
389 | 'location' => 'query',
|
---|
390 | 'type' => 'string',
|
---|
391 | ],
|
---|
392 | ],
|
---|
393 | ],'patch' => [
|
---|
394 | 'path' => 'v1/admin/{+name}',
|
---|
395 | 'httpMethod' => 'PATCH',
|
---|
396 | 'parameters' => [
|
---|
397 | 'name' => [
|
---|
398 | 'location' => 'path',
|
---|
399 | 'type' => 'string',
|
---|
400 | 'required' => true,
|
---|
401 | ],
|
---|
402 | 'updateMask' => [
|
---|
403 | 'location' => 'query',
|
---|
404 | 'type' => 'string',
|
---|
405 | ],
|
---|
406 | ],
|
---|
407 | ],
|
---|
408 | ]
|
---|
409 | ]
|
---|
410 | );
|
---|
411 | $this->admin_projects_locations_topics_subscriptions = new PubsubLite\Resource\AdminProjectsLocationsTopicsSubscriptions(
|
---|
412 | $this,
|
---|
413 | $this->serviceName,
|
---|
414 | 'subscriptions',
|
---|
415 | [
|
---|
416 | 'methods' => [
|
---|
417 | 'list' => [
|
---|
418 | 'path' => 'v1/admin/{+name}/subscriptions',
|
---|
419 | 'httpMethod' => 'GET',
|
---|
420 | 'parameters' => [
|
---|
421 | 'name' => [
|
---|
422 | 'location' => 'path',
|
---|
423 | 'type' => 'string',
|
---|
424 | 'required' => true,
|
---|
425 | ],
|
---|
426 | 'pageSize' => [
|
---|
427 | 'location' => 'query',
|
---|
428 | 'type' => 'integer',
|
---|
429 | ],
|
---|
430 | 'pageToken' => [
|
---|
431 | 'location' => 'query',
|
---|
432 | 'type' => 'string',
|
---|
433 | ],
|
---|
434 | ],
|
---|
435 | ],
|
---|
436 | ]
|
---|
437 | ]
|
---|
438 | );
|
---|
439 | $this->cursor_projects_locations_subscriptions = new PubsubLite\Resource\CursorProjectsLocationsSubscriptions(
|
---|
440 | $this,
|
---|
441 | $this->serviceName,
|
---|
442 | 'subscriptions',
|
---|
443 | [
|
---|
444 | 'methods' => [
|
---|
445 | 'commitCursor' => [
|
---|
446 | 'path' => 'v1/cursor/{+subscription}:commitCursor',
|
---|
447 | 'httpMethod' => 'POST',
|
---|
448 | 'parameters' => [
|
---|
449 | 'subscription' => [
|
---|
450 | 'location' => 'path',
|
---|
451 | 'type' => 'string',
|
---|
452 | 'required' => true,
|
---|
453 | ],
|
---|
454 | ],
|
---|
455 | ],
|
---|
456 | ]
|
---|
457 | ]
|
---|
458 | );
|
---|
459 | $this->cursor_projects_locations_subscriptions_cursors = new PubsubLite\Resource\CursorProjectsLocationsSubscriptionsCursors(
|
---|
460 | $this,
|
---|
461 | $this->serviceName,
|
---|
462 | 'cursors',
|
---|
463 | [
|
---|
464 | 'methods' => [
|
---|
465 | 'list' => [
|
---|
466 | 'path' => 'v1/cursor/{+parent}/cursors',
|
---|
467 | 'httpMethod' => 'GET',
|
---|
468 | 'parameters' => [
|
---|
469 | 'parent' => [
|
---|
470 | 'location' => 'path',
|
---|
471 | 'type' => 'string',
|
---|
472 | 'required' => true,
|
---|
473 | ],
|
---|
474 | 'pageSize' => [
|
---|
475 | 'location' => 'query',
|
---|
476 | 'type' => 'integer',
|
---|
477 | ],
|
---|
478 | 'pageToken' => [
|
---|
479 | 'location' => 'query',
|
---|
480 | 'type' => 'string',
|
---|
481 | ],
|
---|
482 | ],
|
---|
483 | ],
|
---|
484 | ]
|
---|
485 | ]
|
---|
486 | );
|
---|
487 | $this->topicStats_projects_locations_topics = new PubsubLite\Resource\TopicStatsProjectsLocationsTopics(
|
---|
488 | $this,
|
---|
489 | $this->serviceName,
|
---|
490 | 'topics',
|
---|
491 | [
|
---|
492 | 'methods' => [
|
---|
493 | 'computeHeadCursor' => [
|
---|
494 | 'path' => 'v1/topicStats/{+topic}:computeHeadCursor',
|
---|
495 | 'httpMethod' => 'POST',
|
---|
496 | 'parameters' => [
|
---|
497 | 'topic' => [
|
---|
498 | 'location' => 'path',
|
---|
499 | 'type' => 'string',
|
---|
500 | 'required' => true,
|
---|
501 | ],
|
---|
502 | ],
|
---|
503 | ],'computeMessageStats' => [
|
---|
504 | 'path' => 'v1/topicStats/{+topic}:computeMessageStats',
|
---|
505 | 'httpMethod' => 'POST',
|
---|
506 | 'parameters' => [
|
---|
507 | 'topic' => [
|
---|
508 | 'location' => 'path',
|
---|
509 | 'type' => 'string',
|
---|
510 | 'required' => true,
|
---|
511 | ],
|
---|
512 | ],
|
---|
513 | ],'computeTimeCursor' => [
|
---|
514 | 'path' => 'v1/topicStats/{+topic}:computeTimeCursor',
|
---|
515 | 'httpMethod' => 'POST',
|
---|
516 | 'parameters' => [
|
---|
517 | 'topic' => [
|
---|
518 | 'location' => 'path',
|
---|
519 | 'type' => 'string',
|
---|
520 | 'required' => true,
|
---|
521 | ],
|
---|
522 | ],
|
---|
523 | ],
|
---|
524 | ]
|
---|
525 | ]
|
---|
526 | );
|
---|
527 | }
|
---|
528 | }
|
---|
529 |
|
---|
530 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
531 | class_alias(PubsubLite::class, 'Google_Service_PubsubLite');
|
---|