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