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