source: vendor/google/apiclient-services/src/Firestore.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: 26.0 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 Firestore (v1).
24 *
25 * <p>
26 * Accesses the NoSQL document database built for automatic scaling, high
27 * performance, and ease of application development.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/firestore" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Firestore extends \Google\Service
37{
38 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39 const CLOUD_PLATFORM =
40 "https://www.googleapis.com/auth/cloud-platform";
41 /** View and manage your Google Cloud Datastore data. */
42 const DATASTORE =
43 "https://www.googleapis.com/auth/datastore";
44
45 public $projects_databases;
46 public $projects_databases_backupSchedules;
47 public $projects_databases_collectionGroups_fields;
48 public $projects_databases_collectionGroups_indexes;
49 public $projects_databases_documents;
50 public $projects_databases_operations;
51 public $projects_locations;
52 public $projects_locations_backups;
53 public $rootUrlTemplate;
54
55 /**
56 * Constructs the internal representation of the Firestore service.
57 *
58 * @param Client|array $clientOrConfig The client used to deliver requests, or a
59 * config array to pass to a new Client instance.
60 * @param string $rootUrl The root URL used for requests to the service.
61 */
62 public function __construct($clientOrConfig = [], $rootUrl = null)
63 {
64 parent::__construct($clientOrConfig);
65 $this->rootUrl = $rootUrl ?: 'https://firestore.googleapis.com/';
66 $this->rootUrlTemplate = $rootUrl ?: 'https://firestore.UNIVERSE_DOMAIN/';
67 $this->servicePath = '';
68 $this->batchPath = 'batch';
69 $this->version = 'v1';
70 $this->serviceName = 'firestore';
71
72 $this->projects_databases = new Firestore\Resource\ProjectsDatabases(
73 $this,
74 $this->serviceName,
75 'databases',
76 [
77 'methods' => [
78 'bulkDeleteDocuments' => [
79 'path' => 'v1/{+name}:bulkDeleteDocuments',
80 'httpMethod' => 'POST',
81 'parameters' => [
82 'name' => [
83 'location' => 'path',
84 'type' => 'string',
85 'required' => true,
86 ],
87 ],
88 ],'create' => [
89 'path' => 'v1/{+parent}/databases',
90 'httpMethod' => 'POST',
91 'parameters' => [
92 'parent' => [
93 'location' => 'path',
94 'type' => 'string',
95 'required' => true,
96 ],
97 'databaseId' => [
98 'location' => 'query',
99 'type' => 'string',
100 ],
101 ],
102 ],'delete' => [
103 'path' => 'v1/{+name}',
104 'httpMethod' => 'DELETE',
105 'parameters' => [
106 'name' => [
107 'location' => 'path',
108 'type' => 'string',
109 'required' => true,
110 ],
111 'etag' => [
112 'location' => 'query',
113 'type' => 'string',
114 ],
115 ],
116 ],'exportDocuments' => [
117 'path' => 'v1/{+name}:exportDocuments',
118 'httpMethod' => 'POST',
119 'parameters' => [
120 'name' => [
121 'location' => 'path',
122 'type' => 'string',
123 'required' => true,
124 ],
125 ],
126 ],'get' => [
127 'path' => 'v1/{+name}',
128 'httpMethod' => 'GET',
129 'parameters' => [
130 'name' => [
131 'location' => 'path',
132 'type' => 'string',
133 'required' => true,
134 ],
135 ],
136 ],'importDocuments' => [
137 'path' => 'v1/{+name}:importDocuments',
138 'httpMethod' => 'POST',
139 'parameters' => [
140 'name' => [
141 'location' => 'path',
142 'type' => 'string',
143 'required' => true,
144 ],
145 ],
146 ],'list' => [
147 'path' => 'v1/{+parent}/databases',
148 'httpMethod' => 'GET',
149 'parameters' => [
150 'parent' => [
151 'location' => 'path',
152 'type' => 'string',
153 'required' => true,
154 ],
155 'showDeleted' => [
156 'location' => 'query',
157 'type' => 'boolean',
158 ],
159 ],
160 ],'patch' => [
161 'path' => 'v1/{+name}',
162 'httpMethod' => 'PATCH',
163 'parameters' => [
164 'name' => [
165 'location' => 'path',
166 'type' => 'string',
167 'required' => true,
168 ],
169 'updateMask' => [
170 'location' => 'query',
171 'type' => 'string',
172 ],
173 ],
174 ],'restore' => [
175 'path' => 'v1/{+parent}/databases:restore',
176 'httpMethod' => 'POST',
177 'parameters' => [
178 'parent' => [
179 'location' => 'path',
180 'type' => 'string',
181 'required' => true,
182 ],
183 ],
184 ],
185 ]
186 ]
187 );
188 $this->projects_databases_backupSchedules = new Firestore\Resource\ProjectsDatabasesBackupSchedules(
189 $this,
190 $this->serviceName,
191 'backupSchedules',
192 [
193 'methods' => [
194 'create' => [
195 'path' => 'v1/{+parent}/backupSchedules',
196 'httpMethod' => 'POST',
197 'parameters' => [
198 'parent' => [
199 'location' => 'path',
200 'type' => 'string',
201 'required' => true,
202 ],
203 ],
204 ],'delete' => [
205 'path' => 'v1/{+name}',
206 'httpMethod' => 'DELETE',
207 'parameters' => [
208 'name' => [
209 'location' => 'path',
210 'type' => 'string',
211 'required' => true,
212 ],
213 ],
214 ],'get' => [
215 'path' => 'v1/{+name}',
216 'httpMethod' => 'GET',
217 'parameters' => [
218 'name' => [
219 'location' => 'path',
220 'type' => 'string',
221 'required' => true,
222 ],
223 ],
224 ],'list' => [
225 'path' => 'v1/{+parent}/backupSchedules',
226 'httpMethod' => 'GET',
227 'parameters' => [
228 'parent' => [
229 'location' => 'path',
230 'type' => 'string',
231 'required' => true,
232 ],
233 ],
234 ],'patch' => [
235 'path' => 'v1/{+name}',
236 'httpMethod' => 'PATCH',
237 'parameters' => [
238 'name' => [
239 'location' => 'path',
240 'type' => 'string',
241 'required' => true,
242 ],
243 'updateMask' => [
244 'location' => 'query',
245 'type' => 'string',
246 ],
247 ],
248 ],
249 ]
250 ]
251 );
252 $this->projects_databases_collectionGroups_fields = new Firestore\Resource\ProjectsDatabasesCollectionGroupsFields(
253 $this,
254 $this->serviceName,
255 'fields',
256 [
257 'methods' => [
258 'get' => [
259 'path' => 'v1/{+name}',
260 'httpMethod' => 'GET',
261 'parameters' => [
262 'name' => [
263 'location' => 'path',
264 'type' => 'string',
265 'required' => true,
266 ],
267 ],
268 ],'list' => [
269 'path' => 'v1/{+parent}/fields',
270 'httpMethod' => 'GET',
271 'parameters' => [
272 'parent' => [
273 'location' => 'path',
274 'type' => 'string',
275 'required' => true,
276 ],
277 'filter' => [
278 'location' => 'query',
279 'type' => 'string',
280 ],
281 'pageSize' => [
282 'location' => 'query',
283 'type' => 'integer',
284 ],
285 'pageToken' => [
286 'location' => 'query',
287 'type' => 'string',
288 ],
289 ],
290 ],'patch' => [
291 'path' => 'v1/{+name}',
292 'httpMethod' => 'PATCH',
293 'parameters' => [
294 'name' => [
295 'location' => 'path',
296 'type' => 'string',
297 'required' => true,
298 ],
299 'updateMask' => [
300 'location' => 'query',
301 'type' => 'string',
302 ],
303 ],
304 ],
305 ]
306 ]
307 );
308 $this->projects_databases_collectionGroups_indexes = new Firestore\Resource\ProjectsDatabasesCollectionGroupsIndexes(
309 $this,
310 $this->serviceName,
311 'indexes',
312 [
313 'methods' => [
314 'create' => [
315 'path' => 'v1/{+parent}/indexes',
316 'httpMethod' => 'POST',
317 'parameters' => [
318 'parent' => [
319 'location' => 'path',
320 'type' => 'string',
321 'required' => true,
322 ],
323 ],
324 ],'delete' => [
325 'path' => 'v1/{+name}',
326 'httpMethod' => 'DELETE',
327 'parameters' => [
328 'name' => [
329 'location' => 'path',
330 'type' => 'string',
331 'required' => true,
332 ],
333 ],
334 ],'get' => [
335 'path' => 'v1/{+name}',
336 'httpMethod' => 'GET',
337 'parameters' => [
338 'name' => [
339 'location' => 'path',
340 'type' => 'string',
341 'required' => true,
342 ],
343 ],
344 ],'list' => [
345 'path' => 'v1/{+parent}/indexes',
346 'httpMethod' => 'GET',
347 'parameters' => [
348 'parent' => [
349 'location' => 'path',
350 'type' => 'string',
351 'required' => true,
352 ],
353 'filter' => [
354 'location' => 'query',
355 'type' => 'string',
356 ],
357 'pageSize' => [
358 'location' => 'query',
359 'type' => 'integer',
360 ],
361 'pageToken' => [
362 'location' => 'query',
363 'type' => 'string',
364 ],
365 ],
366 ],
367 ]
368 ]
369 );
370 $this->projects_databases_documents = new Firestore\Resource\ProjectsDatabasesDocuments(
371 $this,
372 $this->serviceName,
373 'documents',
374 [
375 'methods' => [
376 'batchGet' => [
377 'path' => 'v1/{+database}/documents:batchGet',
378 'httpMethod' => 'POST',
379 'parameters' => [
380 'database' => [
381 'location' => 'path',
382 'type' => 'string',
383 'required' => true,
384 ],
385 ],
386 ],'batchWrite' => [
387 'path' => 'v1/{+database}/documents:batchWrite',
388 'httpMethod' => 'POST',
389 'parameters' => [
390 'database' => [
391 'location' => 'path',
392 'type' => 'string',
393 'required' => true,
394 ],
395 ],
396 ],'beginTransaction' => [
397 'path' => 'v1/{+database}/documents:beginTransaction',
398 'httpMethod' => 'POST',
399 'parameters' => [
400 'database' => [
401 'location' => 'path',
402 'type' => 'string',
403 'required' => true,
404 ],
405 ],
406 ],'commit' => [
407 'path' => 'v1/{+database}/documents:commit',
408 'httpMethod' => 'POST',
409 'parameters' => [
410 'database' => [
411 'location' => 'path',
412 'type' => 'string',
413 'required' => true,
414 ],
415 ],
416 ],'createDocument' => [
417 'path' => 'v1/{+parent}/{collectionId}',
418 'httpMethod' => 'POST',
419 'parameters' => [
420 'parent' => [
421 'location' => 'path',
422 'type' => 'string',
423 'required' => true,
424 ],
425 'collectionId' => [
426 'location' => 'path',
427 'type' => 'string',
428 'required' => true,
429 ],
430 'documentId' => [
431 'location' => 'query',
432 'type' => 'string',
433 ],
434 'mask.fieldPaths' => [
435 'location' => 'query',
436 'type' => 'string',
437 'repeated' => true,
438 ],
439 ],
440 ],'delete' => [
441 'path' => 'v1/{+name}',
442 'httpMethod' => 'DELETE',
443 'parameters' => [
444 'name' => [
445 'location' => 'path',
446 'type' => 'string',
447 'required' => true,
448 ],
449 'currentDocument.exists' => [
450 'location' => 'query',
451 'type' => 'boolean',
452 ],
453 'currentDocument.updateTime' => [
454 'location' => 'query',
455 'type' => 'string',
456 ],
457 ],
458 ],'get' => [
459 'path' => 'v1/{+name}',
460 'httpMethod' => 'GET',
461 'parameters' => [
462 'name' => [
463 'location' => 'path',
464 'type' => 'string',
465 'required' => true,
466 ],
467 'mask.fieldPaths' => [
468 'location' => 'query',
469 'type' => 'string',
470 'repeated' => true,
471 ],
472 'readTime' => [
473 'location' => 'query',
474 'type' => 'string',
475 ],
476 'transaction' => [
477 'location' => 'query',
478 'type' => 'string',
479 ],
480 ],
481 ],'list' => [
482 'path' => 'v1/{+parent}/{collectionId}',
483 'httpMethod' => 'GET',
484 'parameters' => [
485 'parent' => [
486 'location' => 'path',
487 'type' => 'string',
488 'required' => true,
489 ],
490 'collectionId' => [
491 'location' => 'path',
492 'type' => 'string',
493 'required' => true,
494 ],
495 'mask.fieldPaths' => [
496 'location' => 'query',
497 'type' => 'string',
498 'repeated' => true,
499 ],
500 'orderBy' => [
501 'location' => 'query',
502 'type' => 'string',
503 ],
504 'pageSize' => [
505 'location' => 'query',
506 'type' => 'integer',
507 ],
508 'pageToken' => [
509 'location' => 'query',
510 'type' => 'string',
511 ],
512 'readTime' => [
513 'location' => 'query',
514 'type' => 'string',
515 ],
516 'showMissing' => [
517 'location' => 'query',
518 'type' => 'boolean',
519 ],
520 'transaction' => [
521 'location' => 'query',
522 'type' => 'string',
523 ],
524 ],
525 ],'listCollectionIds' => [
526 'path' => 'v1/{+parent}:listCollectionIds',
527 'httpMethod' => 'POST',
528 'parameters' => [
529 'parent' => [
530 'location' => 'path',
531 'type' => 'string',
532 'required' => true,
533 ],
534 ],
535 ],'listDocuments' => [
536 'path' => 'v1/{+parent}/{collectionId}',
537 'httpMethod' => 'GET',
538 'parameters' => [
539 'parent' => [
540 'location' => 'path',
541 'type' => 'string',
542 'required' => true,
543 ],
544 'collectionId' => [
545 'location' => 'path',
546 'type' => 'string',
547 'required' => true,
548 ],
549 'mask.fieldPaths' => [
550 'location' => 'query',
551 'type' => 'string',
552 'repeated' => true,
553 ],
554 'orderBy' => [
555 'location' => 'query',
556 'type' => 'string',
557 ],
558 'pageSize' => [
559 'location' => 'query',
560 'type' => 'integer',
561 ],
562 'pageToken' => [
563 'location' => 'query',
564 'type' => 'string',
565 ],
566 'readTime' => [
567 'location' => 'query',
568 'type' => 'string',
569 ],
570 'showMissing' => [
571 'location' => 'query',
572 'type' => 'boolean',
573 ],
574 'transaction' => [
575 'location' => 'query',
576 'type' => 'string',
577 ],
578 ],
579 ],'listen' => [
580 'path' => 'v1/{+database}/documents:listen',
581 'httpMethod' => 'POST',
582 'parameters' => [
583 'database' => [
584 'location' => 'path',
585 'type' => 'string',
586 'required' => true,
587 ],
588 ],
589 ],'partitionQuery' => [
590 'path' => 'v1/{+parent}:partitionQuery',
591 'httpMethod' => 'POST',
592 'parameters' => [
593 'parent' => [
594 'location' => 'path',
595 'type' => 'string',
596 'required' => true,
597 ],
598 ],
599 ],'patch' => [
600 'path' => 'v1/{+name}',
601 'httpMethod' => 'PATCH',
602 'parameters' => [
603 'name' => [
604 'location' => 'path',
605 'type' => 'string',
606 'required' => true,
607 ],
608 'currentDocument.exists' => [
609 'location' => 'query',
610 'type' => 'boolean',
611 ],
612 'currentDocument.updateTime' => [
613 'location' => 'query',
614 'type' => 'string',
615 ],
616 'mask.fieldPaths' => [
617 'location' => 'query',
618 'type' => 'string',
619 'repeated' => true,
620 ],
621 'updateMask.fieldPaths' => [
622 'location' => 'query',
623 'type' => 'string',
624 'repeated' => true,
625 ],
626 ],
627 ],'rollback' => [
628 'path' => 'v1/{+database}/documents:rollback',
629 'httpMethod' => 'POST',
630 'parameters' => [
631 'database' => [
632 'location' => 'path',
633 'type' => 'string',
634 'required' => true,
635 ],
636 ],
637 ],'runAggregationQuery' => [
638 'path' => 'v1/{+parent}:runAggregationQuery',
639 'httpMethod' => 'POST',
640 'parameters' => [
641 'parent' => [
642 'location' => 'path',
643 'type' => 'string',
644 'required' => true,
645 ],
646 ],
647 ],'runQuery' => [
648 'path' => 'v1/{+parent}:runQuery',
649 'httpMethod' => 'POST',
650 'parameters' => [
651 'parent' => [
652 'location' => 'path',
653 'type' => 'string',
654 'required' => true,
655 ],
656 ],
657 ],'write' => [
658 'path' => 'v1/{+database}/documents:write',
659 'httpMethod' => 'POST',
660 'parameters' => [
661 'database' => [
662 'location' => 'path',
663 'type' => 'string',
664 'required' => true,
665 ],
666 ],
667 ],
668 ]
669 ]
670 );
671 $this->projects_databases_operations = new Firestore\Resource\ProjectsDatabasesOperations(
672 $this,
673 $this->serviceName,
674 'operations',
675 [
676 'methods' => [
677 'cancel' => [
678 'path' => 'v1/{+name}:cancel',
679 'httpMethod' => 'POST',
680 'parameters' => [
681 'name' => [
682 'location' => 'path',
683 'type' => 'string',
684 'required' => true,
685 ],
686 ],
687 ],'delete' => [
688 'path' => 'v1/{+name}',
689 'httpMethod' => 'DELETE',
690 'parameters' => [
691 'name' => [
692 'location' => 'path',
693 'type' => 'string',
694 'required' => true,
695 ],
696 ],
697 ],'get' => [
698 'path' => 'v1/{+name}',
699 'httpMethod' => 'GET',
700 'parameters' => [
701 'name' => [
702 'location' => 'path',
703 'type' => 'string',
704 'required' => true,
705 ],
706 ],
707 ],'list' => [
708 'path' => 'v1/{+name}/operations',
709 'httpMethod' => 'GET',
710 'parameters' => [
711 'name' => [
712 'location' => 'path',
713 'type' => 'string',
714 'required' => true,
715 ],
716 'filter' => [
717 'location' => 'query',
718 'type' => 'string',
719 ],
720 'pageSize' => [
721 'location' => 'query',
722 'type' => 'integer',
723 ],
724 'pageToken' => [
725 'location' => 'query',
726 'type' => 'string',
727 ],
728 ],
729 ],
730 ]
731 ]
732 );
733 $this->projects_locations = new Firestore\Resource\ProjectsLocations(
734 $this,
735 $this->serviceName,
736 'locations',
737 [
738 'methods' => [
739 'get' => [
740 'path' => 'v1/{+name}',
741 'httpMethod' => 'GET',
742 'parameters' => [
743 'name' => [
744 'location' => 'path',
745 'type' => 'string',
746 'required' => true,
747 ],
748 ],
749 ],'list' => [
750 'path' => 'v1/{+name}/locations',
751 'httpMethod' => 'GET',
752 'parameters' => [
753 'name' => [
754 'location' => 'path',
755 'type' => 'string',
756 'required' => true,
757 ],
758 'filter' => [
759 'location' => 'query',
760 'type' => 'string',
761 ],
762 'pageSize' => [
763 'location' => 'query',
764 'type' => 'integer',
765 ],
766 'pageToken' => [
767 'location' => 'query',
768 'type' => 'string',
769 ],
770 ],
771 ],
772 ]
773 ]
774 );
775 $this->projects_locations_backups = new Firestore\Resource\ProjectsLocationsBackups(
776 $this,
777 $this->serviceName,
778 'backups',
779 [
780 'methods' => [
781 'delete' => [
782 'path' => 'v1/{+name}',
783 'httpMethod' => 'DELETE',
784 'parameters' => [
785 'name' => [
786 'location' => 'path',
787 'type' => 'string',
788 'required' => true,
789 ],
790 ],
791 ],'get' => [
792 'path' => 'v1/{+name}',
793 'httpMethod' => 'GET',
794 'parameters' => [
795 'name' => [
796 'location' => 'path',
797 'type' => 'string',
798 'required' => true,
799 ],
800 ],
801 ],'list' => [
802 'path' => 'v1/{+parent}/backups',
803 'httpMethod' => 'GET',
804 'parameters' => [
805 'parent' => [
806 'location' => 'path',
807 'type' => 'string',
808 'required' => true,
809 ],
810 'filter' => [
811 'location' => 'query',
812 'type' => 'string',
813 ],
814 ],
815 ],
816 ]
817 ]
818 );
819 }
820}
821
822// Adding a class alias for backwards compatibility with the previous class name.
823class_alias(Firestore::class, 'Google_Service_Firestore');
Note: See TracBrowser for help on using the repository browser.