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 CloudOSLogin (v1). 24 * 25 * <p> 26 * You can use OS Login to manage access to your VM instances using IAM roles.</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/compute/docs/oslogin/" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class CloudOSLogin 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 /** View your data across Google Cloud services and see the email address of your Google Account. */ 41 const CLOUD_PLATFORM_READ_ONLY = 42 "https://www.googleapis.com/auth/cloud-platform.read-only"; 43 /** View and manage your Google Compute Engine resources. */ 44 const COMPUTE = 45 "https://www.googleapis.com/auth/compute"; 46 /** View your Google Compute Engine resources. */ 47 const COMPUTE_READONLY = 48 "https://www.googleapis.com/auth/compute.readonly"; 49 50 public $users; 51 public $users_projects; 52 public $users_sshPublicKeys; 53 54 /** 55 * Constructs the internal representation of the CloudOSLogin service. 56 * 57 * @param Client|array $clientOrConfig The client used to deliver requests, or a 58 * config array to pass to a new Client instance. 59 * @param string $rootUrl The root URL used for requests to the service. 60 */ 61 public function __construct($clientOrConfig = [], $rootUrl = null) 62 { 63 parent::__construct($clientOrConfig); 64 $this->rootUrl = $rootUrl ?: 'https://oslogin.googleapis.com/'; 65 $this->servicePath = ''; 66 $this->batchPath = 'batch'; 67 $this->version = 'v1'; 68 $this->serviceName = 'oslogin'; 69 70 $this->users = new CloudOSLogin\Resource\Users( 71 $this, 72 $this->serviceName, 73 'users', 74 [ 75 'methods' => [ 76 'getLoginProfile' => [ 77 'path' => 'v1/{+name}/loginProfile', 78 'httpMethod' => 'GET', 79 'parameters' => [ 80 'name' => [ 81 'location' => 'path', 82 'type' => 'string', 83 'required' => true, 84 ], 85 'projectId' => [ 86 'location' => 'query', 87 'type' => 'string', 88 ], 89 'systemId' => [ 90 'location' => 'query', 91 'type' => 'string', 92 ], 93 ], 94 ],'importSshPublicKey' => [ 95 'path' => 'v1/{+parent}:importSshPublicKey', 96 'httpMethod' => 'POST', 97 'parameters' => [ 98 'parent' => [ 99 'location' => 'path', 100 'type' => 'string', 101 'required' => true, 102 ], 103 'projectId' => [ 104 'location' => 'query', 105 'type' => 'string', 106 ], 107 ], 108 ], 109 ] 110 ] 111 ); 112 $this->users_projects = new CloudOSLogin\Resource\UsersProjects( 113 $this, 114 $this->serviceName, 115 'projects', 116 [ 117 'methods' => [ 118 'delete' => [ 119 'path' => 'v1/{+name}', 120 'httpMethod' => 'DELETE', 121 'parameters' => [ 122 'name' => [ 123 'location' => 'path', 124 'type' => 'string', 125 'required' => true, 126 ], 127 ], 128 ], 129 ] 130 ] 131 ); 132 $this->users_sshPublicKeys = new CloudOSLogin\Resource\UsersSshPublicKeys( 133 $this, 134 $this->serviceName, 135 'sshPublicKeys', 136 [ 137 'methods' => [ 138 'create' => [ 139 'path' => 'v1/{+parent}/sshPublicKeys', 140 'httpMethod' => 'POST', 141 'parameters' => [ 142 'parent' => [ 143 'location' => 'path', 144 'type' => 'string', 145 'required' => true, 146 ], 147 ], 148 ],'delete' => [ 149 'path' => 'v1/{+name}', 150 'httpMethod' => 'DELETE', 151 'parameters' => [ 152 'name' => [ 153 'location' => 'path', 154 'type' => 'string', 155 'required' => true, 156 ], 157 ], 158 ],'get' => [ 159 'path' => 'v1/{+name}', 160 'httpMethod' => 'GET', 161 'parameters' => [ 162 'name' => [ 163 'location' => 'path', 164 'type' => 'string', 165 'required' => true, 166 ], 167 ], 168 ],'patch' => [ 169 'path' => 'v1/{+name}', 170 'httpMethod' => 'PATCH', 171 'parameters' => [ 172 'name' => [ 173 'location' => 'path', 174 'type' => 'string', 175 'required' => true, 176 ], 177 'updateMask' => [ 178 'location' => 'query', 179 'type' => 'string', 180 ], 181 ], 182 ], 183 ] 184 ] 185 ); 186 } 187} 188 189// Adding a class alias for backwards compatibility with the previous class name. 190class_alias(CloudOSLogin::class, 'Google_Service_CloudOSLogin'); 191