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