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