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 Firebaseappcheck (v1beta).
24 *
25 * <p>
26 * Firebase App Check works alongside other Firebase services to help protect
27 * your backend resources from abuse, such as billing fraud or phishing.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://firebase.google.com/docs/app-check" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Firebaseappcheck 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 administer all your Firebase data and settings. */
42  const FIREBASE =
43      "https://www.googleapis.com/auth/firebase";
44
45  public $jwks;
46  public $projects_apps;
47  public $projects_apps_appAttestConfig;
48  public $projects_apps_debugTokens;
49  public $projects_apps_deviceCheckConfig;
50  public $projects_apps_recaptchaConfig;
51  public $projects_apps_recaptchaEnterpriseConfig;
52  public $projects_apps_recaptchaV3Config;
53  public $projects_apps_safetyNetConfig;
54  public $projects_services;
55
56  /**
57   * Constructs the internal representation of the Firebaseappcheck service.
58   *
59   * @param Client|array $clientOrConfig The client used to deliver requests, or a
60   *                                     config array to pass to a new Client instance.
61   * @param string $rootUrl The root URL used for requests to the service.
62   */
63  public function __construct($clientOrConfig = [], $rootUrl = null)
64  {
65    parent::__construct($clientOrConfig);
66    $this->rootUrl = $rootUrl ?: 'https://firebaseappcheck.googleapis.com/';
67    $this->servicePath = '';
68    $this->batchPath = 'batch';
69    $this->version = 'v1beta';
70    $this->serviceName = 'firebaseappcheck';
71
72    $this->jwks = new Firebaseappcheck\Resource\Jwks(
73        $this,
74        $this->serviceName,
75        'jwks',
76        [
77          'methods' => [
78            'get' => [
79              'path' => 'v1beta/{+name}',
80              'httpMethod' => 'GET',
81              'parameters' => [
82                'name' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87              ],
88            ],
89          ]
90        ]
91    );
92    $this->projects_apps = new Firebaseappcheck\Resource\ProjectsApps(
93        $this,
94        $this->serviceName,
95        'apps',
96        [
97          'methods' => [
98            'exchangeAppAttestAssertion' => [
99              'path' => 'v1beta/{+app}:exchangeAppAttestAssertion',
100              'httpMethod' => 'POST',
101              'parameters' => [
102                'app' => [
103                  'location' => 'path',
104                  'type' => 'string',
105                  'required' => true,
106                ],
107              ],
108            ],'exchangeAppAttestAttestation' => [
109              'path' => 'v1beta/{+app}:exchangeAppAttestAttestation',
110              'httpMethod' => 'POST',
111              'parameters' => [
112                'app' => [
113                  'location' => 'path',
114                  'type' => 'string',
115                  'required' => true,
116                ],
117              ],
118            ],'exchangeCustomToken' => [
119              'path' => 'v1beta/{+app}:exchangeCustomToken',
120              'httpMethod' => 'POST',
121              'parameters' => [
122                'app' => [
123                  'location' => 'path',
124                  'type' => 'string',
125                  'required' => true,
126                ],
127              ],
128            ],'exchangeDebugToken' => [
129              'path' => 'v1beta/{+app}:exchangeDebugToken',
130              'httpMethod' => 'POST',
131              'parameters' => [
132                'app' => [
133                  'location' => 'path',
134                  'type' => 'string',
135                  'required' => true,
136                ],
137              ],
138            ],'exchangeDeviceCheckToken' => [
139              'path' => 'v1beta/{+app}:exchangeDeviceCheckToken',
140              'httpMethod' => 'POST',
141              'parameters' => [
142                'app' => [
143                  'location' => 'path',
144                  'type' => 'string',
145                  'required' => true,
146                ],
147              ],
148            ],'exchangeRecaptchaEnterpriseToken' => [
149              'path' => 'v1beta/{+app}:exchangeRecaptchaEnterpriseToken',
150              'httpMethod' => 'POST',
151              'parameters' => [
152                'app' => [
153                  'location' => 'path',
154                  'type' => 'string',
155                  'required' => true,
156                ],
157              ],
158            ],'exchangeRecaptchaToken' => [
159              'path' => 'v1beta/{+app}:exchangeRecaptchaToken',
160              'httpMethod' => 'POST',
161              'parameters' => [
162                'app' => [
163                  'location' => 'path',
164                  'type' => 'string',
165                  'required' => true,
166                ],
167              ],
168            ],'exchangeRecaptchaV3Token' => [
169              'path' => 'v1beta/{+app}:exchangeRecaptchaV3Token',
170              'httpMethod' => 'POST',
171              'parameters' => [
172                'app' => [
173                  'location' => 'path',
174                  'type' => 'string',
175                  'required' => true,
176                ],
177              ],
178            ],'exchangeSafetyNetToken' => [
179              'path' => 'v1beta/{+app}:exchangeSafetyNetToken',
180              'httpMethod' => 'POST',
181              'parameters' => [
182                'app' => [
183                  'location' => 'path',
184                  'type' => 'string',
185                  'required' => true,
186                ],
187              ],
188            ],'generateAppAttestChallenge' => [
189              'path' => 'v1beta/{+app}:generateAppAttestChallenge',
190              'httpMethod' => 'POST',
191              'parameters' => [
192                'app' => [
193                  'location' => 'path',
194                  'type' => 'string',
195                  'required' => true,
196                ],
197              ],
198            ],
199          ]
200        ]
201    );
202    $this->projects_apps_appAttestConfig = new Firebaseappcheck\Resource\ProjectsAppsAppAttestConfig(
203        $this,
204        $this->serviceName,
205        'appAttestConfig',
206        [
207          'methods' => [
208            'batchGet' => [
209              'path' => 'v1beta/{+parent}/apps/-/appAttestConfig:batchGet',
210              'httpMethod' => 'GET',
211              'parameters' => [
212                'parent' => [
213                  'location' => 'path',
214                  'type' => 'string',
215                  'required' => true,
216                ],
217                'names' => [
218                  'location' => 'query',
219                  'type' => 'string',
220                  'repeated' => true,
221                ],
222              ],
223            ],'get' => [
224              'path' => 'v1beta/{+name}',
225              'httpMethod' => 'GET',
226              'parameters' => [
227                'name' => [
228                  'location' => 'path',
229                  'type' => 'string',
230                  'required' => true,
231                ],
232              ],
233            ],'patch' => [
234              'path' => 'v1beta/{+name}',
235              'httpMethod' => 'PATCH',
236              'parameters' => [
237                'name' => [
238                  'location' => 'path',
239                  'type' => 'string',
240                  'required' => true,
241                ],
242                'updateMask' => [
243                  'location' => 'query',
244                  'type' => 'string',
245                ],
246              ],
247            ],
248          ]
249        ]
250    );
251    $this->projects_apps_debugTokens = new Firebaseappcheck\Resource\ProjectsAppsDebugTokens(
252        $this,
253        $this->serviceName,
254        'debugTokens',
255        [
256          'methods' => [
257            'create' => [
258              'path' => 'v1beta/{+parent}/debugTokens',
259              'httpMethod' => 'POST',
260              'parameters' => [
261                'parent' => [
262                  'location' => 'path',
263                  'type' => 'string',
264                  'required' => true,
265                ],
266              ],
267            ],'delete' => [
268              'path' => 'v1beta/{+name}',
269              'httpMethod' => 'DELETE',
270              'parameters' => [
271                'name' => [
272                  'location' => 'path',
273                  'type' => 'string',
274                  'required' => true,
275                ],
276              ],
277            ],'get' => [
278              'path' => 'v1beta/{+name}',
279              'httpMethod' => 'GET',
280              'parameters' => [
281                'name' => [
282                  'location' => 'path',
283                  'type' => 'string',
284                  'required' => true,
285                ],
286              ],
287            ],'list' => [
288              'path' => 'v1beta/{+parent}/debugTokens',
289              'httpMethod' => 'GET',
290              'parameters' => [
291                'parent' => [
292                  'location' => 'path',
293                  'type' => 'string',
294                  'required' => true,
295                ],
296                'pageSize' => [
297                  'location' => 'query',
298                  'type' => 'integer',
299                ],
300                'pageToken' => [
301                  'location' => 'query',
302                  'type' => 'string',
303                ],
304              ],
305            ],'patch' => [
306              'path' => 'v1beta/{+name}',
307              'httpMethod' => 'PATCH',
308              'parameters' => [
309                'name' => [
310                  'location' => 'path',
311                  'type' => 'string',
312                  'required' => true,
313                ],
314                'updateMask' => [
315                  'location' => 'query',
316                  'type' => 'string',
317                ],
318              ],
319            ],
320          ]
321        ]
322    );
323    $this->projects_apps_deviceCheckConfig = new Firebaseappcheck\Resource\ProjectsAppsDeviceCheckConfig(
324        $this,
325        $this->serviceName,
326        'deviceCheckConfig',
327        [
328          'methods' => [
329            'batchGet' => [
330              'path' => 'v1beta/{+parent}/apps/-/deviceCheckConfig:batchGet',
331              'httpMethod' => 'GET',
332              'parameters' => [
333                'parent' => [
334                  'location' => 'path',
335                  'type' => 'string',
336                  'required' => true,
337                ],
338                'names' => [
339                  'location' => 'query',
340                  'type' => 'string',
341                  'repeated' => true,
342                ],
343              ],
344            ],'get' => [
345              'path' => 'v1beta/{+name}',
346              'httpMethod' => 'GET',
347              'parameters' => [
348                'name' => [
349                  'location' => 'path',
350                  'type' => 'string',
351                  'required' => true,
352                ],
353              ],
354            ],'patch' => [
355              'path' => 'v1beta/{+name}',
356              'httpMethod' => 'PATCH',
357              'parameters' => [
358                'name' => [
359                  'location' => 'path',
360                  'type' => 'string',
361                  'required' => true,
362                ],
363                'updateMask' => [
364                  'location' => 'query',
365                  'type' => 'string',
366                ],
367              ],
368            ],
369          ]
370        ]
371    );
372    $this->projects_apps_recaptchaConfig = new Firebaseappcheck\Resource\ProjectsAppsRecaptchaConfig(
373        $this,
374        $this->serviceName,
375        'recaptchaConfig',
376        [
377          'methods' => [
378            'batchGet' => [
379              'path' => 'v1beta/{+parent}/apps/-/recaptchaConfig:batchGet',
380              'httpMethod' => 'GET',
381              'parameters' => [
382                'parent' => [
383                  'location' => 'path',
384                  'type' => 'string',
385                  'required' => true,
386                ],
387                'names' => [
388                  'location' => 'query',
389                  'type' => 'string',
390                  'repeated' => true,
391                ],
392              ],
393            ],'get' => [
394              'path' => 'v1beta/{+name}',
395              'httpMethod' => 'GET',
396              'parameters' => [
397                'name' => [
398                  'location' => 'path',
399                  'type' => 'string',
400                  'required' => true,
401                ],
402              ],
403            ],'patch' => [
404              'path' => 'v1beta/{+name}',
405              'httpMethod' => 'PATCH',
406              'parameters' => [
407                'name' => [
408                  'location' => 'path',
409                  'type' => 'string',
410                  'required' => true,
411                ],
412                'updateMask' => [
413                  'location' => 'query',
414                  'type' => 'string',
415                ],
416              ],
417            ],
418          ]
419        ]
420    );
421    $this->projects_apps_recaptchaEnterpriseConfig = new Firebaseappcheck\Resource\ProjectsAppsRecaptchaEnterpriseConfig(
422        $this,
423        $this->serviceName,
424        'recaptchaEnterpriseConfig',
425        [
426          'methods' => [
427            'batchGet' => [
428              'path' => 'v1beta/{+parent}/apps/-/recaptchaEnterpriseConfig:batchGet',
429              'httpMethod' => 'GET',
430              'parameters' => [
431                'parent' => [
432                  'location' => 'path',
433                  'type' => 'string',
434                  'required' => true,
435                ],
436                'names' => [
437                  'location' => 'query',
438                  'type' => 'string',
439                  'repeated' => true,
440                ],
441              ],
442            ],'get' => [
443              'path' => 'v1beta/{+name}',
444              'httpMethod' => 'GET',
445              'parameters' => [
446                'name' => [
447                  'location' => 'path',
448                  'type' => 'string',
449                  'required' => true,
450                ],
451              ],
452            ],'patch' => [
453              'path' => 'v1beta/{+name}',
454              'httpMethod' => 'PATCH',
455              'parameters' => [
456                'name' => [
457                  'location' => 'path',
458                  'type' => 'string',
459                  'required' => true,
460                ],
461                'updateMask' => [
462                  'location' => 'query',
463                  'type' => 'string',
464                ],
465              ],
466            ],
467          ]
468        ]
469    );
470    $this->projects_apps_recaptchaV3Config = new Firebaseappcheck\Resource\ProjectsAppsRecaptchaV3Config(
471        $this,
472        $this->serviceName,
473        'recaptchaV3Config',
474        [
475          'methods' => [
476            'batchGet' => [
477              'path' => 'v1beta/{+parent}/apps/-/recaptchaV3Config:batchGet',
478              'httpMethod' => 'GET',
479              'parameters' => [
480                'parent' => [
481                  'location' => 'path',
482                  'type' => 'string',
483                  'required' => true,
484                ],
485                'names' => [
486                  'location' => 'query',
487                  'type' => 'string',
488                  'repeated' => true,
489                ],
490              ],
491            ],'get' => [
492              'path' => 'v1beta/{+name}',
493              'httpMethod' => 'GET',
494              'parameters' => [
495                'name' => [
496                  'location' => 'path',
497                  'type' => 'string',
498                  'required' => true,
499                ],
500              ],
501            ],'patch' => [
502              'path' => 'v1beta/{+name}',
503              'httpMethod' => 'PATCH',
504              'parameters' => [
505                'name' => [
506                  'location' => 'path',
507                  'type' => 'string',
508                  'required' => true,
509                ],
510                'updateMask' => [
511                  'location' => 'query',
512                  'type' => 'string',
513                ],
514              ],
515            ],
516          ]
517        ]
518    );
519    $this->projects_apps_safetyNetConfig = new Firebaseappcheck\Resource\ProjectsAppsSafetyNetConfig(
520        $this,
521        $this->serviceName,
522        'safetyNetConfig',
523        [
524          'methods' => [
525            'batchGet' => [
526              'path' => 'v1beta/{+parent}/apps/-/safetyNetConfig:batchGet',
527              'httpMethod' => 'GET',
528              'parameters' => [
529                'parent' => [
530                  'location' => 'path',
531                  'type' => 'string',
532                  'required' => true,
533                ],
534                'names' => [
535                  'location' => 'query',
536                  'type' => 'string',
537                  'repeated' => true,
538                ],
539              ],
540            ],'get' => [
541              'path' => 'v1beta/{+name}',
542              'httpMethod' => 'GET',
543              'parameters' => [
544                'name' => [
545                  'location' => 'path',
546                  'type' => 'string',
547                  'required' => true,
548                ],
549              ],
550            ],'patch' => [
551              'path' => 'v1beta/{+name}',
552              'httpMethod' => 'PATCH',
553              'parameters' => [
554                'name' => [
555                  'location' => 'path',
556                  'type' => 'string',
557                  'required' => true,
558                ],
559                'updateMask' => [
560                  'location' => 'query',
561                  'type' => 'string',
562                ],
563              ],
564            ],
565          ]
566        ]
567    );
568    $this->projects_services = new Firebaseappcheck\Resource\ProjectsServices(
569        $this,
570        $this->serviceName,
571        'services',
572        [
573          'methods' => [
574            'batchUpdate' => [
575              'path' => 'v1beta/{+parent}/services:batchUpdate',
576              'httpMethod' => 'POST',
577              'parameters' => [
578                'parent' => [
579                  'location' => 'path',
580                  'type' => 'string',
581                  'required' => true,
582                ],
583              ],
584            ],'get' => [
585              'path' => 'v1beta/{+name}',
586              'httpMethod' => 'GET',
587              'parameters' => [
588                'name' => [
589                  'location' => 'path',
590                  'type' => 'string',
591                  'required' => true,
592                ],
593              ],
594            ],'list' => [
595              'path' => 'v1beta/{+parent}/services',
596              'httpMethod' => 'GET',
597              'parameters' => [
598                'parent' => [
599                  'location' => 'path',
600                  'type' => 'string',
601                  'required' => true,
602                ],
603                'pageSize' => [
604                  'location' => 'query',
605                  'type' => 'integer',
606                ],
607                'pageToken' => [
608                  'location' => 'query',
609                  'type' => 'string',
610                ],
611              ],
612            ],'patch' => [
613              'path' => 'v1beta/{+name}',
614              'httpMethod' => 'PATCH',
615              'parameters' => [
616                'name' => [
617                  'location' => 'path',
618                  'type' => 'string',
619                  'required' => true,
620                ],
621                'updateMask' => [
622                  'location' => 'query',
623                  'type' => 'string',
624                ],
625              ],
626            ],
627          ]
628        ]
629    );
630  }
631}
632
633// Adding a class alias for backwards compatibility with the previous class name.
634class_alias(Firebaseappcheck::class, 'Google_Service_Firebaseappcheck');
635