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/**
19 * Service definition for CloudUserAccounts (vm_alpha).
20 *
21 * <p>
22 * Creates and manages users and groups for accessing Google Compute Engine
23 * virtual machines.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/compute/docs/access/user-accounts/api/latest/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_CloudUserAccounts extends Google_Service
33{
34  /** View and manage your data across Google Cloud Platform services. */
35  const CLOUD_PLATFORM =
36      "https://www.googleapis.com/auth/cloud-platform";
37  /** View your data across Google Cloud Platform services. */
38  const CLOUD_PLATFORM_READ_ONLY =
39      "https://www.googleapis.com/auth/cloud-platform.read-only";
40  /** Manage your Google Cloud User Accounts. */
41  const CLOUD_USERACCOUNTS =
42      "https://www.googleapis.com/auth/cloud.useraccounts";
43  /** View your Google Cloud User Accounts. */
44  const CLOUD_USERACCOUNTS_READONLY =
45      "https://www.googleapis.com/auth/cloud.useraccounts.readonly";
46
47  public $globalAccountsOperations;
48  public $groups;
49  public $linux;
50  public $users;
51
52  /**
53   * Constructs the internal representation of the CloudUserAccounts service.
54   *
55   * @param Google_Client $client
56   */
57  public function __construct(Google_Client $client)
58  {
59    parent::__construct($client);
60    $this->rootUrl = 'https://www.googleapis.com/';
61    $this->servicePath = 'clouduseraccounts/vm_alpha/projects/';
62    $this->version = 'vm_alpha';
63    $this->serviceName = 'clouduseraccounts';
64
65    $this->globalAccountsOperations = new Google_Service_CloudUserAccounts_Resource_GlobalAccountsOperations(
66        $this,
67        $this->serviceName,
68        'globalAccountsOperations',
69        array(
70          'methods' => array(
71            'delete' => array(
72              'path' => '{project}/global/operations/{operation}',
73              'httpMethod' => 'DELETE',
74              'parameters' => array(
75                'project' => array(
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ),
80                'operation' => array(
81                  'location' => 'path',
82                  'type' => 'string',
83                  'required' => true,
84                ),
85              ),
86            ),'get' => array(
87              'path' => '{project}/global/operations/{operation}',
88              'httpMethod' => 'GET',
89              'parameters' => array(
90                'project' => array(
91                  'location' => 'path',
92                  'type' => 'string',
93                  'required' => true,
94                ),
95                'operation' => array(
96                  'location' => 'path',
97                  'type' => 'string',
98                  'required' => true,
99                ),
100              ),
101            ),'list' => array(
102              'path' => '{project}/global/operations',
103              'httpMethod' => 'GET',
104              'parameters' => array(
105                'project' => array(
106                  'location' => 'path',
107                  'type' => 'string',
108                  'required' => true,
109                ),
110                'filter' => array(
111                  'location' => 'query',
112                  'type' => 'string',
113                ),
114                'maxResults' => array(
115                  'location' => 'query',
116                  'type' => 'integer',
117                ),
118                'orderBy' => array(
119                  'location' => 'query',
120                  'type' => 'string',
121                ),
122                'pageToken' => array(
123                  'location' => 'query',
124                  'type' => 'string',
125                ),
126              ),
127            ),
128          )
129        )
130    );
131    $this->groups = new Google_Service_CloudUserAccounts_Resource_Groups(
132        $this,
133        $this->serviceName,
134        'groups',
135        array(
136          'methods' => array(
137            'addMember' => array(
138              'path' => '{project}/global/groups/{groupName}/addMember',
139              'httpMethod' => 'POST',
140              'parameters' => array(
141                'project' => array(
142                  'location' => 'path',
143                  'type' => 'string',
144                  'required' => true,
145                ),
146                'groupName' => array(
147                  'location' => 'path',
148                  'type' => 'string',
149                  'required' => true,
150                ),
151              ),
152            ),'delete' => array(
153              'path' => '{project}/global/groups/{groupName}',
154              'httpMethod' => 'DELETE',
155              'parameters' => array(
156                'project' => array(
157                  'location' => 'path',
158                  'type' => 'string',
159                  'required' => true,
160                ),
161                'groupName' => array(
162                  'location' => 'path',
163                  'type' => 'string',
164                  'required' => true,
165                ),
166              ),
167            ),'get' => array(
168              'path' => '{project}/global/groups/{groupName}',
169              'httpMethod' => 'GET',
170              'parameters' => array(
171                'project' => array(
172                  'location' => 'path',
173                  'type' => 'string',
174                  'required' => true,
175                ),
176                'groupName' => array(
177                  'location' => 'path',
178                  'type' => 'string',
179                  'required' => true,
180                ),
181              ),
182            ),'getIamPolicy' => array(
183              'path' => '{project}/global/groups/{resource}/getIamPolicy',
184              'httpMethod' => 'GET',
185              'parameters' => array(
186                'project' => array(
187                  'location' => 'path',
188                  'type' => 'string',
189                  'required' => true,
190                ),
191                'resource' => array(
192                  'location' => 'path',
193                  'type' => 'string',
194                  'required' => true,
195                ),
196              ),
197            ),'insert' => array(
198              'path' => '{project}/global/groups',
199              'httpMethod' => 'POST',
200              'parameters' => array(
201                'project' => array(
202                  'location' => 'path',
203                  'type' => 'string',
204                  'required' => true,
205                ),
206              ),
207            ),'list' => array(
208              'path' => '{project}/global/groups',
209              'httpMethod' => 'GET',
210              'parameters' => array(
211                'project' => array(
212                  'location' => 'path',
213                  'type' => 'string',
214                  'required' => true,
215                ),
216                'filter' => array(
217                  'location' => 'query',
218                  'type' => 'string',
219                ),
220                'maxResults' => array(
221                  'location' => 'query',
222                  'type' => 'integer',
223                ),
224                'orderBy' => array(
225                  'location' => 'query',
226                  'type' => 'string',
227                ),
228                'pageToken' => array(
229                  'location' => 'query',
230                  'type' => 'string',
231                ),
232              ),
233            ),'removeMember' => array(
234              'path' => '{project}/global/groups/{groupName}/removeMember',
235              'httpMethod' => 'POST',
236              'parameters' => array(
237                'project' => array(
238                  'location' => 'path',
239                  'type' => 'string',
240                  'required' => true,
241                ),
242                'groupName' => array(
243                  'location' => 'path',
244                  'type' => 'string',
245                  'required' => true,
246                ),
247              ),
248            ),'setIamPolicy' => array(
249              'path' => '{project}/global/groups/{resource}/setIamPolicy',
250              'httpMethod' => 'POST',
251              'parameters' => array(
252                'project' => array(
253                  'location' => 'path',
254                  'type' => 'string',
255                  'required' => true,
256                ),
257                'resource' => array(
258                  'location' => 'path',
259                  'type' => 'string',
260                  'required' => true,
261                ),
262              ),
263            ),'testIamPermissions' => array(
264              'path' => '{project}/global/groups/{resource}/testIamPermissions',
265              'httpMethod' => 'POST',
266              'parameters' => array(
267                'project' => array(
268                  'location' => 'path',
269                  'type' => 'string',
270                  'required' => true,
271                ),
272                'resource' => array(
273                  'location' => 'path',
274                  'type' => 'string',
275                  'required' => true,
276                ),
277              ),
278            ),
279          )
280        )
281    );
282    $this->linux = new Google_Service_CloudUserAccounts_Resource_Linux(
283        $this,
284        $this->serviceName,
285        'linux',
286        array(
287          'methods' => array(
288            'getAuthorizedKeysView' => array(
289              'path' => '{project}/zones/{zone}/authorizedKeysView/{user}',
290              'httpMethod' => 'POST',
291              'parameters' => array(
292                'project' => array(
293                  'location' => 'path',
294                  'type' => 'string',
295                  'required' => true,
296                ),
297                'zone' => array(
298                  'location' => 'path',
299                  'type' => 'string',
300                  'required' => true,
301                ),
302                'user' => array(
303                  'location' => 'path',
304                  'type' => 'string',
305                  'required' => true,
306                ),
307                'instance' => array(
308                  'location' => 'query',
309                  'type' => 'string',
310                  'required' => true,
311                ),
312                'login' => array(
313                  'location' => 'query',
314                  'type' => 'boolean',
315                ),
316              ),
317            ),'getLinuxAccountViews' => array(
318              'path' => '{project}/zones/{zone}/linuxAccountViews',
319              'httpMethod' => 'POST',
320              'parameters' => array(
321                'project' => array(
322                  'location' => 'path',
323                  'type' => 'string',
324                  'required' => true,
325                ),
326                'zone' => array(
327                  'location' => 'path',
328                  'type' => 'string',
329                  'required' => true,
330                ),
331                'instance' => array(
332                  'location' => 'query',
333                  'type' => 'string',
334                  'required' => true,
335                ),
336                'filter' => array(
337                  'location' => 'query',
338                  'type' => 'string',
339                ),
340                'maxResults' => array(
341                  'location' => 'query',
342                  'type' => 'integer',
343                ),
344                'orderBy' => array(
345                  'location' => 'query',
346                  'type' => 'string',
347                ),
348                'pageToken' => array(
349                  'location' => 'query',
350                  'type' => 'string',
351                ),
352              ),
353            ),
354          )
355        )
356    );
357    $this->users = new Google_Service_CloudUserAccounts_Resource_Users(
358        $this,
359        $this->serviceName,
360        'users',
361        array(
362          'methods' => array(
363            'addPublicKey' => array(
364              'path' => '{project}/global/users/{user}/addPublicKey',
365              'httpMethod' => 'POST',
366              'parameters' => array(
367                'project' => array(
368                  'location' => 'path',
369                  'type' => 'string',
370                  'required' => true,
371                ),
372                'user' => array(
373                  'location' => 'path',
374                  'type' => 'string',
375                  'required' => true,
376                ),
377              ),
378            ),'delete' => array(
379              'path' => '{project}/global/users/{user}',
380              'httpMethod' => 'DELETE',
381              'parameters' => array(
382                'project' => array(
383                  'location' => 'path',
384                  'type' => 'string',
385                  'required' => true,
386                ),
387                'user' => array(
388                  'location' => 'path',
389                  'type' => 'string',
390                  'required' => true,
391                ),
392              ),
393            ),'get' => array(
394              'path' => '{project}/global/users/{user}',
395              'httpMethod' => 'GET',
396              'parameters' => array(
397                'project' => array(
398                  'location' => 'path',
399                  'type' => 'string',
400                  'required' => true,
401                ),
402                'user' => array(
403                  'location' => 'path',
404                  'type' => 'string',
405                  'required' => true,
406                ),
407              ),
408            ),'getIamPolicy' => array(
409              'path' => '{project}/global/users/{resource}/getIamPolicy',
410              'httpMethod' => 'GET',
411              'parameters' => array(
412                'project' => array(
413                  'location' => 'path',
414                  'type' => 'string',
415                  'required' => true,
416                ),
417                'resource' => array(
418                  'location' => 'path',
419                  'type' => 'string',
420                  'required' => true,
421                ),
422              ),
423            ),'insert' => array(
424              'path' => '{project}/global/users',
425              'httpMethod' => 'POST',
426              'parameters' => array(
427                'project' => array(
428                  'location' => 'path',
429                  'type' => 'string',
430                  'required' => true,
431                ),
432              ),
433            ),'list' => array(
434              'path' => '{project}/global/users',
435              'httpMethod' => 'GET',
436              'parameters' => array(
437                'project' => array(
438                  'location' => 'path',
439                  'type' => 'string',
440                  'required' => true,
441                ),
442                'filter' => array(
443                  'location' => 'query',
444                  'type' => 'string',
445                ),
446                'maxResults' => array(
447                  'location' => 'query',
448                  'type' => 'integer',
449                ),
450                'orderBy' => array(
451                  'location' => 'query',
452                  'type' => 'string',
453                ),
454                'pageToken' => array(
455                  'location' => 'query',
456                  'type' => 'string',
457                ),
458              ),
459            ),'removePublicKey' => array(
460              'path' => '{project}/global/users/{user}/removePublicKey',
461              'httpMethod' => 'POST',
462              'parameters' => array(
463                'project' => array(
464                  'location' => 'path',
465                  'type' => 'string',
466                  'required' => true,
467                ),
468                'user' => array(
469                  'location' => 'path',
470                  'type' => 'string',
471                  'required' => true,
472                ),
473                'fingerprint' => array(
474                  'location' => 'query',
475                  'type' => 'string',
476                  'required' => true,
477                ),
478              ),
479            ),'setIamPolicy' => array(
480              'path' => '{project}/global/users/{resource}/setIamPolicy',
481              'httpMethod' => 'POST',
482              'parameters' => array(
483                'project' => array(
484                  'location' => 'path',
485                  'type' => 'string',
486                  'required' => true,
487                ),
488                'resource' => array(
489                  'location' => 'path',
490                  'type' => 'string',
491                  'required' => true,
492                ),
493              ),
494            ),'testIamPermissions' => array(
495              'path' => '{project}/global/users/{resource}/testIamPermissions',
496              'httpMethod' => 'POST',
497              'parameters' => array(
498                'project' => array(
499                  'location' => 'path',
500                  'type' => 'string',
501                  'required' => true,
502                ),
503                'resource' => array(
504                  'location' => 'path',
505                  'type' => 'string',
506                  'required' => true,
507                ),
508              ),
509            ),
510          )
511        )
512    );
513  }
514}
515