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