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 CloudShell (v1).
24 *
25 * <p>
26 * Allows users to start, configure, and connect to interactive shell sessions
27 * running in the cloud.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/shell/docs/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class CloudShell 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 $operations;
43  public $users_environments;
44
45  /**
46   * Constructs the internal representation of the CloudShell service.
47   *
48   * @param Client|array $clientOrConfig The client used to deliver requests, or a
49   *                                     config array to pass to a new Client instance.
50   * @param string $rootUrl The root URL used for requests to the service.
51   */
52  public function __construct($clientOrConfig = [], $rootUrl = null)
53  {
54    parent::__construct($clientOrConfig);
55    $this->rootUrl = $rootUrl ?: 'https://cloudshell.googleapis.com/';
56    $this->servicePath = '';
57    $this->batchPath = 'batch';
58    $this->version = 'v1';
59    $this->serviceName = 'cloudshell';
60
61    $this->operations = new CloudShell\Resource\Operations(
62        $this,
63        $this->serviceName,
64        'operations',
65        [
66          'methods' => [
67            'cancel' => [
68              'path' => 'v1/{+name}:cancel',
69              'httpMethod' => 'POST',
70              'parameters' => [
71                'name' => [
72                  'location' => 'path',
73                  'type' => 'string',
74                  'required' => true,
75                ],
76              ],
77            ],'delete' => [
78              'path' => 'v1/{+name}',
79              'httpMethod' => 'DELETE',
80              'parameters' => [
81                'name' => [
82                  'location' => 'path',
83                  'type' => 'string',
84                  'required' => true,
85                ],
86              ],
87            ],'get' => [
88              'path' => 'v1/{+name}',
89              'httpMethod' => 'GET',
90              'parameters' => [
91                'name' => [
92                  'location' => 'path',
93                  'type' => 'string',
94                  'required' => true,
95                ],
96              ],
97            ],'list' => [
98              'path' => 'v1/{+name}',
99              'httpMethod' => 'GET',
100              'parameters' => [
101                'name' => [
102                  'location' => 'path',
103                  'type' => 'string',
104                  'required' => true,
105                ],
106                'filter' => [
107                  'location' => 'query',
108                  'type' => 'string',
109                ],
110                'pageSize' => [
111                  'location' => 'query',
112                  'type' => 'integer',
113                ],
114                'pageToken' => [
115                  'location' => 'query',
116                  'type' => 'string',
117                ],
118              ],
119            ],
120          ]
121        ]
122    );
123    $this->users_environments = new CloudShell\Resource\UsersEnvironments(
124        $this,
125        $this->serviceName,
126        'environments',
127        [
128          'methods' => [
129            'addPublicKey' => [
130              'path' => 'v1/{+environment}:addPublicKey',
131              'httpMethod' => 'POST',
132              'parameters' => [
133                'environment' => [
134                  'location' => 'path',
135                  'type' => 'string',
136                  'required' => true,
137                ],
138              ],
139            ],'authorize' => [
140              'path' => 'v1/{+name}:authorize',
141              'httpMethod' => 'POST',
142              'parameters' => [
143                'name' => [
144                  'location' => 'path',
145                  'type' => 'string',
146                  'required' => true,
147                ],
148              ],
149            ],'get' => [
150              'path' => 'v1/{+name}',
151              'httpMethod' => 'GET',
152              'parameters' => [
153                'name' => [
154                  'location' => 'path',
155                  'type' => 'string',
156                  'required' => true,
157                ],
158              ],
159            ],'removePublicKey' => [
160              'path' => 'v1/{+environment}:removePublicKey',
161              'httpMethod' => 'POST',
162              'parameters' => [
163                'environment' => [
164                  'location' => 'path',
165                  'type' => 'string',
166                  'required' => true,
167                ],
168              ],
169            ],'start' => [
170              'path' => 'v1/{+name}:start',
171              'httpMethod' => 'POST',
172              'parameters' => [
173                'name' => [
174                  'location' => 'path',
175                  'type' => 'string',
176                  'required' => true,
177                ],
178              ],
179            ],
180          ]
181        ]
182    );
183  }
184}
185
186// Adding a class alias for backwards compatibility with the previous class name.
187class_alias(CloudShell::class, 'Google_Service_CloudShell');
188