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 GKEHub (v1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class GKEHub 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_features;
43  public $projects_locations_memberships;
44  public $projects_locations_operations;
45
46  /**
47   * Constructs the internal representation of the GKEHub service.
48   *
49   * @param Client|array $clientOrConfig The client used to deliver requests, or a
50   *                                     config array to pass to a new Client instance.
51   * @param string $rootUrl The root URL used for requests to the service.
52   */
53  public function __construct($clientOrConfig = [], $rootUrl = null)
54  {
55    parent::__construct($clientOrConfig);
56    $this->rootUrl = $rootUrl ?: 'https://gkehub.googleapis.com/';
57    $this->servicePath = '';
58    $this->batchPath = 'batch';
59    $this->version = 'v1';
60    $this->serviceName = 'gkehub';
61
62    $this->projects_locations = new GKEHub\Resource\ProjectsLocations(
63        $this,
64        $this->serviceName,
65        'locations',
66        [
67          'methods' => [
68            'get' => [
69              'path' => 'v1/{+name}',
70              'httpMethod' => 'GET',
71              'parameters' => [
72                'name' => [
73                  'location' => 'path',
74                  'type' => 'string',
75                  'required' => true,
76                ],
77              ],
78            ],'list' => [
79              'path' => 'v1/{+name}/locations',
80              'httpMethod' => 'GET',
81              'parameters' => [
82                'name' => [
83                  'location' => 'path',
84                  'type' => 'string',
85                  'required' => true,
86                ],
87                'filter' => [
88                  'location' => 'query',
89                  'type' => 'string',
90                ],
91                'pageSize' => [
92                  'location' => 'query',
93                  'type' => 'integer',
94                ],
95                'pageToken' => [
96                  'location' => 'query',
97                  'type' => 'string',
98                ],
99              ],
100            ],
101          ]
102        ]
103    );
104    $this->projects_locations_features = new GKEHub\Resource\ProjectsLocationsFeatures(
105        $this,
106        $this->serviceName,
107        'features',
108        [
109          'methods' => [
110            'create' => [
111              'path' => 'v1/{+parent}/features',
112              'httpMethod' => 'POST',
113              'parameters' => [
114                'parent' => [
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ],
119                'featureId' => [
120                  'location' => 'query',
121                  'type' => 'string',
122                ],
123                'requestId' => [
124                  'location' => 'query',
125                  'type' => 'string',
126                ],
127              ],
128            ],'delete' => [
129              'path' => 'v1/{+name}',
130              'httpMethod' => 'DELETE',
131              'parameters' => [
132                'name' => [
133                  'location' => 'path',
134                  'type' => 'string',
135                  'required' => true,
136                ],
137                'force' => [
138                  'location' => 'query',
139                  'type' => 'boolean',
140                ],
141                'requestId' => [
142                  'location' => 'query',
143                  'type' => 'string',
144                ],
145              ],
146            ],'get' => [
147              'path' => 'v1/{+name}',
148              'httpMethod' => 'GET',
149              'parameters' => [
150                'name' => [
151                  'location' => 'path',
152                  'type' => 'string',
153                  'required' => true,
154                ],
155              ],
156            ],'getIamPolicy' => [
157              'path' => 'v1/{+resource}:getIamPolicy',
158              'httpMethod' => 'GET',
159              'parameters' => [
160                'resource' => [
161                  'location' => 'path',
162                  'type' => 'string',
163                  'required' => true,
164                ],
165                'options.requestedPolicyVersion' => [
166                  'location' => 'query',
167                  'type' => 'integer',
168                ],
169              ],
170            ],'list' => [
171              'path' => 'v1/{+parent}/features',
172              'httpMethod' => 'GET',
173              'parameters' => [
174                'parent' => [
175                  'location' => 'path',
176                  'type' => 'string',
177                  'required' => true,
178                ],
179                'filter' => [
180                  'location' => 'query',
181                  'type' => 'string',
182                ],
183                'orderBy' => [
184                  'location' => 'query',
185                  'type' => 'string',
186                ],
187                'pageSize' => [
188                  'location' => 'query',
189                  'type' => 'integer',
190                ],
191                'pageToken' => [
192                  'location' => 'query',
193                  'type' => 'string',
194                ],
195              ],
196            ],'patch' => [
197              'path' => 'v1/{+name}',
198              'httpMethod' => 'PATCH',
199              'parameters' => [
200                'name' => [
201                  'location' => 'path',
202                  'type' => 'string',
203                  'required' => true,
204                ],
205                'requestId' => [
206                  'location' => 'query',
207                  'type' => 'string',
208                ],
209                'updateMask' => [
210                  'location' => 'query',
211                  'type' => 'string',
212                ],
213              ],
214            ],'setIamPolicy' => [
215              'path' => 'v1/{+resource}:setIamPolicy',
216              'httpMethod' => 'POST',
217              'parameters' => [
218                'resource' => [
219                  'location' => 'path',
220                  'type' => 'string',
221                  'required' => true,
222                ],
223              ],
224            ],'testIamPermissions' => [
225              'path' => 'v1/{+resource}:testIamPermissions',
226              'httpMethod' => 'POST',
227              'parameters' => [
228                'resource' => [
229                  'location' => 'path',
230                  'type' => 'string',
231                  'required' => true,
232                ],
233              ],
234            ],
235          ]
236        ]
237    );
238    $this->projects_locations_memberships = new GKEHub\Resource\ProjectsLocationsMemberships(
239        $this,
240        $this->serviceName,
241        'memberships',
242        [
243          'methods' => [
244            'create' => [
245              'path' => 'v1/{+parent}/memberships',
246              'httpMethod' => 'POST',
247              'parameters' => [
248                'parent' => [
249                  'location' => 'path',
250                  'type' => 'string',
251                  'required' => true,
252                ],
253                'membershipId' => [
254                  'location' => 'query',
255                  'type' => 'string',
256                ],
257                'requestId' => [
258                  'location' => 'query',
259                  'type' => 'string',
260                ],
261              ],
262            ],'delete' => [
263              'path' => 'v1/{+name}',
264              'httpMethod' => 'DELETE',
265              'parameters' => [
266                'name' => [
267                  'location' => 'path',
268                  'type' => 'string',
269                  'required' => true,
270                ],
271                'requestId' => [
272                  'location' => 'query',
273                  'type' => 'string',
274                ],
275              ],
276            ],'generateConnectManifest' => [
277              'path' => 'v1/{+name}:generateConnectManifest',
278              'httpMethod' => 'GET',
279              'parameters' => [
280                'name' => [
281                  'location' => 'path',
282                  'type' => 'string',
283                  'required' => true,
284                ],
285                'imagePullSecretContent' => [
286                  'location' => 'query',
287                  'type' => 'string',
288                ],
289                'isUpgrade' => [
290                  'location' => 'query',
291                  'type' => 'boolean',
292                ],
293                'namespace' => [
294                  'location' => 'query',
295                  'type' => 'string',
296                ],
297                'proxy' => [
298                  'location' => 'query',
299                  'type' => 'string',
300                ],
301                'registry' => [
302                  'location' => 'query',
303                  'type' => 'string',
304                ],
305                'version' => [
306                  'location' => 'query',
307                  'type' => 'string',
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            ],'getIamPolicy' => [
321              'path' => 'v1/{+resource}:getIamPolicy',
322              'httpMethod' => 'GET',
323              'parameters' => [
324                'resource' => [
325                  'location' => 'path',
326                  'type' => 'string',
327                  'required' => true,
328                ],
329                'options.requestedPolicyVersion' => [
330                  'location' => 'query',
331                  'type' => 'integer',
332                ],
333              ],
334            ],'list' => [
335              'path' => 'v1/{+parent}/memberships',
336              'httpMethod' => 'GET',
337              'parameters' => [
338                'parent' => [
339                  'location' => 'path',
340                  'type' => 'string',
341                  'required' => true,
342                ],
343                'filter' => [
344                  'location' => 'query',
345                  'type' => 'string',
346                ],
347                'orderBy' => [
348                  'location' => 'query',
349                  'type' => 'string',
350                ],
351                'pageSize' => [
352                  'location' => 'query',
353                  'type' => 'integer',
354                ],
355                'pageToken' => [
356                  'location' => 'query',
357                  'type' => 'string',
358                ],
359              ],
360            ],'patch' => [
361              'path' => 'v1/{+name}',
362              'httpMethod' => 'PATCH',
363              'parameters' => [
364                'name' => [
365                  'location' => 'path',
366                  'type' => 'string',
367                  'required' => true,
368                ],
369                'requestId' => [
370                  'location' => 'query',
371                  'type' => 'string',
372                ],
373                'updateMask' => [
374                  'location' => 'query',
375                  'type' => 'string',
376                ],
377              ],
378            ],'setIamPolicy' => [
379              'path' => 'v1/{+resource}:setIamPolicy',
380              'httpMethod' => 'POST',
381              'parameters' => [
382                'resource' => [
383                  'location' => 'path',
384                  'type' => 'string',
385                  'required' => true,
386                ],
387              ],
388            ],'testIamPermissions' => [
389              'path' => 'v1/{+resource}:testIamPermissions',
390              'httpMethod' => 'POST',
391              'parameters' => [
392                'resource' => [
393                  'location' => 'path',
394                  'type' => 'string',
395                  'required' => true,
396                ],
397              ],
398            ],
399          ]
400        ]
401    );
402    $this->projects_locations_operations = new GKEHub\Resource\ProjectsLocationsOperations(
403        $this,
404        $this->serviceName,
405        'operations',
406        [
407          'methods' => [
408            'cancel' => [
409              'path' => 'v1/{+name}:cancel',
410              'httpMethod' => 'POST',
411              'parameters' => [
412                'name' => [
413                  'location' => 'path',
414                  'type' => 'string',
415                  'required' => true,
416                ],
417              ],
418            ],'delete' => [
419              'path' => 'v1/{+name}',
420              'httpMethod' => 'DELETE',
421              'parameters' => [
422                'name' => [
423                  'location' => 'path',
424                  'type' => 'string',
425                  'required' => true,
426                ],
427              ],
428            ],'get' => [
429              'path' => 'v1/{+name}',
430              'httpMethod' => 'GET',
431              'parameters' => [
432                'name' => [
433                  'location' => 'path',
434                  'type' => 'string',
435                  'required' => true,
436                ],
437              ],
438            ],'list' => [
439              'path' => 'v1/{+name}/operations',
440              'httpMethod' => 'GET',
441              'parameters' => [
442                'name' => [
443                  'location' => 'path',
444                  'type' => 'string',
445                  'required' => true,
446                ],
447                'filter' => [
448                  'location' => 'query',
449                  'type' => 'string',
450                ],
451                'pageSize' => [
452                  'location' => 'query',
453                  'type' => 'integer',
454                ],
455                'pageToken' => [
456                  'location' => 'query',
457                  'type' => 'string',
458                ],
459              ],
460            ],
461          ]
462        ]
463    );
464  }
465}
466
467// Adding a class alias for backwards compatibility with the previous class name.
468class_alias(GKEHub::class, 'Google_Service_GKEHub');
469