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 |
|
---|
18 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use 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 | */
|
---|
36 | class 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 | public $rootUrlTemplate;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Constructs the internal representation of the CloudShell 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://cloudshell.googleapis.com/';
|
---|
57 | $this->rootUrlTemplate = $rootUrl ?: 'https://cloudshell.UNIVERSE_DOMAIN/';
|
---|
58 | $this->servicePath = '';
|
---|
59 | $this->batchPath = 'batch';
|
---|
60 | $this->version = 'v1';
|
---|
61 | $this->serviceName = 'cloudshell';
|
---|
62 |
|
---|
63 | $this->operations = new CloudShell\Resource\Operations(
|
---|
64 | $this,
|
---|
65 | $this->serviceName,
|
---|
66 | 'operations',
|
---|
67 | [
|
---|
68 | 'methods' => [
|
---|
69 | 'cancel' => [
|
---|
70 | 'path' => 'v1/{+name}:cancel',
|
---|
71 | 'httpMethod' => 'POST',
|
---|
72 | 'parameters' => [
|
---|
73 | 'name' => [
|
---|
74 | 'location' => 'path',
|
---|
75 | 'type' => 'string',
|
---|
76 | 'required' => true,
|
---|
77 | ],
|
---|
78 | ],
|
---|
79 | ],'delete' => [
|
---|
80 | 'path' => 'v1/{+name}',
|
---|
81 | 'httpMethod' => 'DELETE',
|
---|
82 | 'parameters' => [
|
---|
83 | 'name' => [
|
---|
84 | 'location' => 'path',
|
---|
85 | 'type' => 'string',
|
---|
86 | 'required' => true,
|
---|
87 | ],
|
---|
88 | ],
|
---|
89 | ],'get' => [
|
---|
90 | 'path' => 'v1/{+name}',
|
---|
91 | 'httpMethod' => 'GET',
|
---|
92 | 'parameters' => [
|
---|
93 | 'name' => [
|
---|
94 | 'location' => 'path',
|
---|
95 | 'type' => 'string',
|
---|
96 | 'required' => true,
|
---|
97 | ],
|
---|
98 | ],
|
---|
99 | ],'list' => [
|
---|
100 | 'path' => 'v1/{+name}',
|
---|
101 | 'httpMethod' => 'GET',
|
---|
102 | 'parameters' => [
|
---|
103 | 'name' => [
|
---|
104 | 'location' => 'path',
|
---|
105 | 'type' => 'string',
|
---|
106 | 'required' => true,
|
---|
107 | ],
|
---|
108 | 'filter' => [
|
---|
109 | 'location' => 'query',
|
---|
110 | 'type' => 'string',
|
---|
111 | ],
|
---|
112 | 'pageSize' => [
|
---|
113 | 'location' => 'query',
|
---|
114 | 'type' => 'integer',
|
---|
115 | ],
|
---|
116 | 'pageToken' => [
|
---|
117 | 'location' => 'query',
|
---|
118 | 'type' => 'string',
|
---|
119 | ],
|
---|
120 | ],
|
---|
121 | ],
|
---|
122 | ]
|
---|
123 | ]
|
---|
124 | );
|
---|
125 | $this->users_environments = new CloudShell\Resource\UsersEnvironments(
|
---|
126 | $this,
|
---|
127 | $this->serviceName,
|
---|
128 | 'environments',
|
---|
129 | [
|
---|
130 | 'methods' => [
|
---|
131 | 'addPublicKey' => [
|
---|
132 | 'path' => 'v1/{+environment}:addPublicKey',
|
---|
133 | 'httpMethod' => 'POST',
|
---|
134 | 'parameters' => [
|
---|
135 | 'environment' => [
|
---|
136 | 'location' => 'path',
|
---|
137 | 'type' => 'string',
|
---|
138 | 'required' => true,
|
---|
139 | ],
|
---|
140 | ],
|
---|
141 | ],'authorize' => [
|
---|
142 | 'path' => 'v1/{+name}:authorize',
|
---|
143 | 'httpMethod' => 'POST',
|
---|
144 | 'parameters' => [
|
---|
145 | 'name' => [
|
---|
146 | 'location' => 'path',
|
---|
147 | 'type' => 'string',
|
---|
148 | 'required' => true,
|
---|
149 | ],
|
---|
150 | ],
|
---|
151 | ],'get' => [
|
---|
152 | 'path' => 'v1/{+name}',
|
---|
153 | 'httpMethod' => 'GET',
|
---|
154 | 'parameters' => [
|
---|
155 | 'name' => [
|
---|
156 | 'location' => 'path',
|
---|
157 | 'type' => 'string',
|
---|
158 | 'required' => true,
|
---|
159 | ],
|
---|
160 | ],
|
---|
161 | ],'removePublicKey' => [
|
---|
162 | 'path' => 'v1/{+environment}:removePublicKey',
|
---|
163 | 'httpMethod' => 'POST',
|
---|
164 | 'parameters' => [
|
---|
165 | 'environment' => [
|
---|
166 | 'location' => 'path',
|
---|
167 | 'type' => 'string',
|
---|
168 | 'required' => true,
|
---|
169 | ],
|
---|
170 | ],
|
---|
171 | ],'start' => [
|
---|
172 | 'path' => 'v1/{+name}:start',
|
---|
173 | 'httpMethod' => 'POST',
|
---|
174 | 'parameters' => [
|
---|
175 | 'name' => [
|
---|
176 | 'location' => 'path',
|
---|
177 | 'type' => 'string',
|
---|
178 | 'required' => true,
|
---|
179 | ],
|
---|
180 | ],
|
---|
181 | ],
|
---|
182 | ]
|
---|
183 | ]
|
---|
184 | );
|
---|
185 | }
|
---|
186 | }
|
---|
187 |
|
---|
188 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
189 | class_alias(CloudShell::class, 'Google_Service_CloudShell');
|
---|