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 CloudOSLogin (v1).
20 *
21 * <p>
22 * You can use OS Login to manage access to your VM instances using IAM roles.
23 * For more information, read [OS Login](/compute/docs/oslogin/).</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://cloud.google.com/compute/docs/oslogin/" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_CloudOSLogin 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 and manage your Google Compute Engine resources. */
38  const COMPUTE =
39      "https://www.googleapis.com/auth/compute";
40
41  public $users;
42  public $users_projects;
43  public $users_sshPublicKeys;
44
45  /**
46   * Constructs the internal representation of the CloudOSLogin service.
47   *
48   * @param Google_Client $client
49   */
50  public function __construct(Google_Client $client)
51  {
52    parent::__construct($client);
53    $this->rootUrl = 'https://oslogin.googleapis.com/';
54    $this->servicePath = '';
55    $this->batchPath = 'batch';
56    $this->version = 'v1';
57    $this->serviceName = 'oslogin';
58
59    $this->users = new Google_Service_CloudOSLogin_Resource_Users(
60        $this,
61        $this->serviceName,
62        'users',
63        array(
64          'methods' => array(
65            'getLoginProfile' => array(
66              'path' => 'v1/{+name}/loginProfile',
67              'httpMethod' => 'GET',
68              'parameters' => array(
69                'name' => array(
70                  'location' => 'path',
71                  'type' => 'string',
72                  'required' => true,
73                ),
74                'projectId' => array(
75                  'location' => 'query',
76                  'type' => 'string',
77                ),
78                'systemId' => array(
79                  'location' => 'query',
80                  'type' => 'string',
81                ),
82              ),
83            ),'importSshPublicKey' => array(
84              'path' => 'v1/{+parent}:importSshPublicKey',
85              'httpMethod' => 'POST',
86              'parameters' => array(
87                'parent' => array(
88                  'location' => 'path',
89                  'type' => 'string',
90                  'required' => true,
91                ),
92                'projectId' => array(
93                  'location' => 'query',
94                  'type' => 'string',
95                ),
96              ),
97            ),
98          )
99        )
100    );
101    $this->users_projects = new Google_Service_CloudOSLogin_Resource_UsersProjects(
102        $this,
103        $this->serviceName,
104        'projects',
105        array(
106          'methods' => array(
107            'delete' => array(
108              'path' => 'v1/{+name}',
109              'httpMethod' => 'DELETE',
110              'parameters' => array(
111                'name' => array(
112                  'location' => 'path',
113                  'type' => 'string',
114                  'required' => true,
115                ),
116              ),
117            ),
118          )
119        )
120    );
121    $this->users_sshPublicKeys = new Google_Service_CloudOSLogin_Resource_UsersSshPublicKeys(
122        $this,
123        $this->serviceName,
124        'sshPublicKeys',
125        array(
126          'methods' => array(
127            'delete' => array(
128              'path' => 'v1/{+name}',
129              'httpMethod' => 'DELETE',
130              'parameters' => array(
131                'name' => array(
132                  'location' => 'path',
133                  'type' => 'string',
134                  'required' => true,
135                ),
136              ),
137            ),'get' => array(
138              'path' => 'v1/{+name}',
139              'httpMethod' => 'GET',
140              'parameters' => array(
141                'name' => array(
142                  'location' => 'path',
143                  'type' => 'string',
144                  'required' => true,
145                ),
146              ),
147            ),'patch' => array(
148              'path' => 'v1/{+name}',
149              'httpMethod' => 'PATCH',
150              'parameters' => array(
151                'name' => array(
152                  'location' => 'path',
153                  'type' => 'string',
154                  'required' => true,
155                ),
156                'updateMask' => array(
157                  'location' => 'query',
158                  'type' => 'string',
159                ),
160              ),
161            ),
162          )
163        )
164    );
165  }
166}
167