source: vendor/google/apiclient-services/src/Pubsub.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 21.6 KB
Line 
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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for Pubsub (v1).
24 *
25 * <p>
26 * Provides reliable, many-to-many, asynchronous messaging between applications.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/pubsub/docs" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Pubsub 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 /** View and manage Pub/Sub topics and subscriptions. */
41 const PUBSUB =
42 "https://www.googleapis.com/auth/pubsub";
43
44 public $projects_schemas;
45 public $projects_snapshots;
46 public $projects_subscriptions;
47 public $projects_topics;
48 public $projects_topics_snapshots;
49 public $projects_topics_subscriptions;
50 public $rootUrlTemplate;
51
52 /**
53 * Constructs the internal representation of the Pubsub 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://pubsub.googleapis.com/';
63 $this->rootUrlTemplate = $rootUrl ?: 'https://pubsub.UNIVERSE_DOMAIN/';
64 $this->servicePath = '';
65 $this->batchPath = 'batch';
66 $this->version = 'v1';
67 $this->serviceName = 'pubsub';
68
69 $this->projects_schemas = new Pubsub\Resource\ProjectsSchemas(
70 $this,
71 $this->serviceName,
72 'schemas',
73 [
74 'methods' => [
75 'commit' => [
76 'path' => 'v1/{+name}:commit',
77 'httpMethod' => 'POST',
78 'parameters' => [
79 'name' => [
80 'location' => 'path',
81 'type' => 'string',
82 'required' => true,
83 ],
84 ],
85 ],'create' => [
86 'path' => 'v1/{+parent}/schemas',
87 'httpMethod' => 'POST',
88 'parameters' => [
89 'parent' => [
90 'location' => 'path',
91 'type' => 'string',
92 'required' => true,
93 ],
94 'schemaId' => [
95 'location' => 'query',
96 'type' => 'string',
97 ],
98 ],
99 ],'delete' => [
100 'path' => 'v1/{+name}',
101 'httpMethod' => 'DELETE',
102 'parameters' => [
103 'name' => [
104 'location' => 'path',
105 'type' => 'string',
106 'required' => true,
107 ],
108 ],
109 ],'deleteRevision' => [
110 'path' => 'v1/{+name}:deleteRevision',
111 'httpMethod' => 'DELETE',
112 'parameters' => [
113 'name' => [
114 'location' => 'path',
115 'type' => 'string',
116 'required' => true,
117 ],
118 'revisionId' => [
119 'location' => 'query',
120 'type' => 'string',
121 ],
122 ],
123 ],'get' => [
124 'path' => 'v1/{+name}',
125 'httpMethod' => 'GET',
126 'parameters' => [
127 'name' => [
128 'location' => 'path',
129 'type' => 'string',
130 'required' => true,
131 ],
132 'view' => [
133 'location' => 'query',
134 'type' => 'string',
135 ],
136 ],
137 ],'getIamPolicy' => [
138 'path' => 'v1/{+resource}:getIamPolicy',
139 'httpMethod' => 'GET',
140 'parameters' => [
141 'resource' => [
142 'location' => 'path',
143 'type' => 'string',
144 'required' => true,
145 ],
146 'options.requestedPolicyVersion' => [
147 'location' => 'query',
148 'type' => 'integer',
149 ],
150 ],
151 ],'list' => [
152 'path' => 'v1/{+parent}/schemas',
153 'httpMethod' => 'GET',
154 'parameters' => [
155 'parent' => [
156 'location' => 'path',
157 'type' => 'string',
158 'required' => true,
159 ],
160 'pageSize' => [
161 'location' => 'query',
162 'type' => 'integer',
163 ],
164 'pageToken' => [
165 'location' => 'query',
166 'type' => 'string',
167 ],
168 'view' => [
169 'location' => 'query',
170 'type' => 'string',
171 ],
172 ],
173 ],'listRevisions' => [
174 'path' => 'v1/{+name}:listRevisions',
175 'httpMethod' => 'GET',
176 'parameters' => [
177 'name' => [
178 'location' => 'path',
179 'type' => 'string',
180 'required' => true,
181 ],
182 'pageSize' => [
183 'location' => 'query',
184 'type' => 'integer',
185 ],
186 'pageToken' => [
187 'location' => 'query',
188 'type' => 'string',
189 ],
190 'view' => [
191 'location' => 'query',
192 'type' => 'string',
193 ],
194 ],
195 ],'rollback' => [
196 'path' => 'v1/{+name}:rollback',
197 'httpMethod' => 'POST',
198 'parameters' => [
199 'name' => [
200 'location' => 'path',
201 'type' => 'string',
202 'required' => true,
203 ],
204 ],
205 ],'setIamPolicy' => [
206 'path' => 'v1/{+resource}:setIamPolicy',
207 'httpMethod' => 'POST',
208 'parameters' => [
209 'resource' => [
210 'location' => 'path',
211 'type' => 'string',
212 'required' => true,
213 ],
214 ],
215 ],'testIamPermissions' => [
216 'path' => 'v1/{+resource}:testIamPermissions',
217 'httpMethod' => 'POST',
218 'parameters' => [
219 'resource' => [
220 'location' => 'path',
221 'type' => 'string',
222 'required' => true,
223 ],
224 ],
225 ],'validate' => [
226 'path' => 'v1/{+parent}/schemas:validate',
227 'httpMethod' => 'POST',
228 'parameters' => [
229 'parent' => [
230 'location' => 'path',
231 'type' => 'string',
232 'required' => true,
233 ],
234 ],
235 ],'validateMessage' => [
236 'path' => 'v1/{+parent}/schemas:validateMessage',
237 'httpMethod' => 'POST',
238 'parameters' => [
239 'parent' => [
240 'location' => 'path',
241 'type' => 'string',
242 'required' => true,
243 ],
244 ],
245 ],
246 ]
247 ]
248 );
249 $this->projects_snapshots = new Pubsub\Resource\ProjectsSnapshots(
250 $this,
251 $this->serviceName,
252 'snapshots',
253 [
254 'methods' => [
255 'create' => [
256 'path' => 'v1/{+name}',
257 'httpMethod' => 'PUT',
258 'parameters' => [
259 'name' => [
260 'location' => 'path',
261 'type' => 'string',
262 'required' => true,
263 ],
264 ],
265 ],'delete' => [
266 'path' => 'v1/{+snapshot}',
267 'httpMethod' => 'DELETE',
268 'parameters' => [
269 'snapshot' => [
270 'location' => 'path',
271 'type' => 'string',
272 'required' => true,
273 ],
274 ],
275 ],'get' => [
276 'path' => 'v1/{+snapshot}',
277 'httpMethod' => 'GET',
278 'parameters' => [
279 'snapshot' => [
280 'location' => 'path',
281 'type' => 'string',
282 'required' => true,
283 ],
284 ],
285 ],'getIamPolicy' => [
286 'path' => 'v1/{+resource}:getIamPolicy',
287 'httpMethod' => 'GET',
288 'parameters' => [
289 'resource' => [
290 'location' => 'path',
291 'type' => 'string',
292 'required' => true,
293 ],
294 'options.requestedPolicyVersion' => [
295 'location' => 'query',
296 'type' => 'integer',
297 ],
298 ],
299 ],'list' => [
300 'path' => 'v1/{+project}/snapshots',
301 'httpMethod' => 'GET',
302 'parameters' => [
303 'project' => [
304 'location' => 'path',
305 'type' => 'string',
306 'required' => true,
307 ],
308 'pageSize' => [
309 'location' => 'query',
310 'type' => 'integer',
311 ],
312 'pageToken' => [
313 'location' => 'query',
314 'type' => 'string',
315 ],
316 ],
317 ],'patch' => [
318 'path' => 'v1/{+name}',
319 'httpMethod' => 'PATCH',
320 'parameters' => [
321 'name' => [
322 'location' => 'path',
323 'type' => 'string',
324 'required' => true,
325 ],
326 ],
327 ],'setIamPolicy' => [
328 'path' => 'v1/{+resource}:setIamPolicy',
329 'httpMethod' => 'POST',
330 'parameters' => [
331 'resource' => [
332 'location' => 'path',
333 'type' => 'string',
334 'required' => true,
335 ],
336 ],
337 ],'testIamPermissions' => [
338 'path' => 'v1/{+resource}:testIamPermissions',
339 'httpMethod' => 'POST',
340 'parameters' => [
341 'resource' => [
342 'location' => 'path',
343 'type' => 'string',
344 'required' => true,
345 ],
346 ],
347 ],
348 ]
349 ]
350 );
351 $this->projects_subscriptions = new Pubsub\Resource\ProjectsSubscriptions(
352 $this,
353 $this->serviceName,
354 'subscriptions',
355 [
356 'methods' => [
357 'acknowledge' => [
358 'path' => 'v1/{+subscription}:acknowledge',
359 'httpMethod' => 'POST',
360 'parameters' => [
361 'subscription' => [
362 'location' => 'path',
363 'type' => 'string',
364 'required' => true,
365 ],
366 ],
367 ],'create' => [
368 'path' => 'v1/{+name}',
369 'httpMethod' => 'PUT',
370 'parameters' => [
371 'name' => [
372 'location' => 'path',
373 'type' => 'string',
374 'required' => true,
375 ],
376 ],
377 ],'delete' => [
378 'path' => 'v1/{+subscription}',
379 'httpMethod' => 'DELETE',
380 'parameters' => [
381 'subscription' => [
382 'location' => 'path',
383 'type' => 'string',
384 'required' => true,
385 ],
386 ],
387 ],'detach' => [
388 'path' => 'v1/{+subscription}:detach',
389 'httpMethod' => 'POST',
390 'parameters' => [
391 'subscription' => [
392 'location' => 'path',
393 'type' => 'string',
394 'required' => true,
395 ],
396 ],
397 ],'get' => [
398 'path' => 'v1/{+subscription}',
399 'httpMethod' => 'GET',
400 'parameters' => [
401 'subscription' => [
402 'location' => 'path',
403 'type' => 'string',
404 'required' => true,
405 ],
406 ],
407 ],'getIamPolicy' => [
408 'path' => 'v1/{+resource}:getIamPolicy',
409 'httpMethod' => 'GET',
410 'parameters' => [
411 'resource' => [
412 'location' => 'path',
413 'type' => 'string',
414 'required' => true,
415 ],
416 'options.requestedPolicyVersion' => [
417 'location' => 'query',
418 'type' => 'integer',
419 ],
420 ],
421 ],'list' => [
422 'path' => 'v1/{+project}/subscriptions',
423 'httpMethod' => 'GET',
424 'parameters' => [
425 'project' => [
426 'location' => 'path',
427 'type' => 'string',
428 'required' => true,
429 ],
430 'pageSize' => [
431 'location' => 'query',
432 'type' => 'integer',
433 ],
434 'pageToken' => [
435 'location' => 'query',
436 'type' => 'string',
437 ],
438 ],
439 ],'modifyAckDeadline' => [
440 'path' => 'v1/{+subscription}:modifyAckDeadline',
441 'httpMethod' => 'POST',
442 'parameters' => [
443 'subscription' => [
444 'location' => 'path',
445 'type' => 'string',
446 'required' => true,
447 ],
448 ],
449 ],'modifyPushConfig' => [
450 'path' => 'v1/{+subscription}:modifyPushConfig',
451 'httpMethod' => 'POST',
452 'parameters' => [
453 'subscription' => [
454 'location' => 'path',
455 'type' => 'string',
456 'required' => true,
457 ],
458 ],
459 ],'patch' => [
460 'path' => 'v1/{+name}',
461 'httpMethod' => 'PATCH',
462 'parameters' => [
463 'name' => [
464 'location' => 'path',
465 'type' => 'string',
466 'required' => true,
467 ],
468 ],
469 ],'pull' => [
470 'path' => 'v1/{+subscription}:pull',
471 'httpMethod' => 'POST',
472 'parameters' => [
473 'subscription' => [
474 'location' => 'path',
475 'type' => 'string',
476 'required' => true,
477 ],
478 ],
479 ],'seek' => [
480 'path' => 'v1/{+subscription}:seek',
481 'httpMethod' => 'POST',
482 'parameters' => [
483 'subscription' => [
484 'location' => 'path',
485 'type' => 'string',
486 'required' => true,
487 ],
488 ],
489 ],'setIamPolicy' => [
490 'path' => 'v1/{+resource}:setIamPolicy',
491 'httpMethod' => 'POST',
492 'parameters' => [
493 'resource' => [
494 'location' => 'path',
495 'type' => 'string',
496 'required' => true,
497 ],
498 ],
499 ],'testIamPermissions' => [
500 'path' => 'v1/{+resource}:testIamPermissions',
501 'httpMethod' => 'POST',
502 'parameters' => [
503 'resource' => [
504 'location' => 'path',
505 'type' => 'string',
506 'required' => true,
507 ],
508 ],
509 ],
510 ]
511 ]
512 );
513 $this->projects_topics = new Pubsub\Resource\ProjectsTopics(
514 $this,
515 $this->serviceName,
516 'topics',
517 [
518 'methods' => [
519 'create' => [
520 'path' => 'v1/{+name}',
521 'httpMethod' => 'PUT',
522 'parameters' => [
523 'name' => [
524 'location' => 'path',
525 'type' => 'string',
526 'required' => true,
527 ],
528 ],
529 ],'delete' => [
530 'path' => 'v1/{+topic}',
531 'httpMethod' => 'DELETE',
532 'parameters' => [
533 'topic' => [
534 'location' => 'path',
535 'type' => 'string',
536 'required' => true,
537 ],
538 ],
539 ],'get' => [
540 'path' => 'v1/{+topic}',
541 'httpMethod' => 'GET',
542 'parameters' => [
543 'topic' => [
544 'location' => 'path',
545 'type' => 'string',
546 'required' => true,
547 ],
548 ],
549 ],'getIamPolicy' => [
550 'path' => 'v1/{+resource}:getIamPolicy',
551 'httpMethod' => 'GET',
552 'parameters' => [
553 'resource' => [
554 'location' => 'path',
555 'type' => 'string',
556 'required' => true,
557 ],
558 'options.requestedPolicyVersion' => [
559 'location' => 'query',
560 'type' => 'integer',
561 ],
562 ],
563 ],'list' => [
564 'path' => 'v1/{+project}/topics',
565 'httpMethod' => 'GET',
566 'parameters' => [
567 'project' => [
568 'location' => 'path',
569 'type' => 'string',
570 'required' => true,
571 ],
572 'pageSize' => [
573 'location' => 'query',
574 'type' => 'integer',
575 ],
576 'pageToken' => [
577 'location' => 'query',
578 'type' => 'string',
579 ],
580 ],
581 ],'patch' => [
582 'path' => 'v1/{+name}',
583 'httpMethod' => 'PATCH',
584 'parameters' => [
585 'name' => [
586 'location' => 'path',
587 'type' => 'string',
588 'required' => true,
589 ],
590 ],
591 ],'publish' => [
592 'path' => 'v1/{+topic}:publish',
593 'httpMethod' => 'POST',
594 'parameters' => [
595 'topic' => [
596 'location' => 'path',
597 'type' => 'string',
598 'required' => true,
599 ],
600 ],
601 ],'setIamPolicy' => [
602 'path' => 'v1/{+resource}:setIamPolicy',
603 'httpMethod' => 'POST',
604 'parameters' => [
605 'resource' => [
606 'location' => 'path',
607 'type' => 'string',
608 'required' => true,
609 ],
610 ],
611 ],'testIamPermissions' => [
612 'path' => 'v1/{+resource}:testIamPermissions',
613 'httpMethod' => 'POST',
614 'parameters' => [
615 'resource' => [
616 'location' => 'path',
617 'type' => 'string',
618 'required' => true,
619 ],
620 ],
621 ],
622 ]
623 ]
624 );
625 $this->projects_topics_snapshots = new Pubsub\Resource\ProjectsTopicsSnapshots(
626 $this,
627 $this->serviceName,
628 'snapshots',
629 [
630 'methods' => [
631 'list' => [
632 'path' => 'v1/{+topic}/snapshots',
633 'httpMethod' => 'GET',
634 'parameters' => [
635 'topic' => [
636 'location' => 'path',
637 'type' => 'string',
638 'required' => true,
639 ],
640 'pageSize' => [
641 'location' => 'query',
642 'type' => 'integer',
643 ],
644 'pageToken' => [
645 'location' => 'query',
646 'type' => 'string',
647 ],
648 ],
649 ],
650 ]
651 ]
652 );
653 $this->projects_topics_subscriptions = new Pubsub\Resource\ProjectsTopicsSubscriptions(
654 $this,
655 $this->serviceName,
656 'subscriptions',
657 [
658 'methods' => [
659 'list' => [
660 'path' => 'v1/{+topic}/subscriptions',
661 'httpMethod' => 'GET',
662 'parameters' => [
663 'topic' => [
664 'location' => 'path',
665 'type' => 'string',
666 'required' => true,
667 ],
668 'pageSize' => [
669 'location' => 'query',
670 'type' => 'integer',
671 ],
672 'pageToken' => [
673 'location' => 'query',
674 'type' => 'string',
675 ],
676 ],
677 ],
678 ]
679 ]
680 );
681 }
682}
683
684// Adding a class alias for backwards compatibility with the previous class name.
685class_alias(Pubsub::class, 'Google_Service_Pubsub');
Note: See TracBrowser for help on using the repository browser.