| 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 ServiceManagement (v1).
|
|---|
| 24 | *
|
|---|
| 25 | * <p>
|
|---|
| 26 | * Google Service Management allows service producers to publish their services
|
|---|
| 27 | * on Google Cloud Platform so that they can be discovered and used by service
|
|---|
| 28 | * consumers.</p>
|
|---|
| 29 | *
|
|---|
| 30 | * <p>
|
|---|
| 31 | * For more information about this service, see the API
|
|---|
| 32 | * <a href="https://cloud.google.com/service-management/" target="_blank">Documentation</a>
|
|---|
| 33 | * </p>
|
|---|
| 34 | *
|
|---|
| 35 | * @author Google, Inc.
|
|---|
| 36 | */
|
|---|
| 37 | class ServiceManagement extends \Google\Service
|
|---|
| 38 | {
|
|---|
| 39 | /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
|
|---|
| 40 | const CLOUD_PLATFORM =
|
|---|
| 41 | "https://www.googleapis.com/auth/cloud-platform";
|
|---|
| 42 | /** View your data across Google Cloud services and see the email address of your Google Account. */
|
|---|
| 43 | const CLOUD_PLATFORM_READ_ONLY =
|
|---|
| 44 | "https://www.googleapis.com/auth/cloud-platform.read-only";
|
|---|
| 45 | /** Manage your Google API service configuration. */
|
|---|
| 46 | const SERVICE_MANAGEMENT =
|
|---|
| 47 | "https://www.googleapis.com/auth/service.management";
|
|---|
| 48 | /** View your Google API service configuration. */
|
|---|
| 49 | const SERVICE_MANAGEMENT_READONLY =
|
|---|
| 50 | "https://www.googleapis.com/auth/service.management.readonly";
|
|---|
| 51 |
|
|---|
| 52 | public $operations;
|
|---|
| 53 | public $services;
|
|---|
| 54 | public $services_configs;
|
|---|
| 55 | public $services_consumers;
|
|---|
| 56 | public $services_rollouts;
|
|---|
| 57 | public $rootUrlTemplate;
|
|---|
| 58 |
|
|---|
| 59 | /**
|
|---|
| 60 | * Constructs the internal representation of the ServiceManagement service.
|
|---|
| 61 | *
|
|---|
| 62 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
|---|
| 63 | * config array to pass to a new Client instance.
|
|---|
| 64 | * @param string $rootUrl The root URL used for requests to the service.
|
|---|
| 65 | */
|
|---|
| 66 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
|---|
| 67 | {
|
|---|
| 68 | parent::__construct($clientOrConfig);
|
|---|
| 69 | $this->rootUrl = $rootUrl ?: 'https://servicemanagement.googleapis.com/';
|
|---|
| 70 | $this->rootUrlTemplate = $rootUrl ?: 'https://servicemanagement.UNIVERSE_DOMAIN/';
|
|---|
| 71 | $this->servicePath = '';
|
|---|
| 72 | $this->batchPath = 'batch';
|
|---|
| 73 | $this->version = 'v1';
|
|---|
| 74 | $this->serviceName = 'servicemanagement';
|
|---|
| 75 |
|
|---|
| 76 | $this->operations = new ServiceManagement\Resource\Operations(
|
|---|
| 77 | $this,
|
|---|
| 78 | $this->serviceName,
|
|---|
| 79 | 'operations',
|
|---|
| 80 | [
|
|---|
| 81 | 'methods' => [
|
|---|
| 82 | 'get' => [
|
|---|
| 83 | 'path' => 'v1/{+name}',
|
|---|
| 84 | 'httpMethod' => 'GET',
|
|---|
| 85 | 'parameters' => [
|
|---|
| 86 | 'name' => [
|
|---|
| 87 | 'location' => 'path',
|
|---|
| 88 | 'type' => 'string',
|
|---|
| 89 | 'required' => true,
|
|---|
| 90 | ],
|
|---|
| 91 | ],
|
|---|
| 92 | ],'list' => [
|
|---|
| 93 | 'path' => 'v1/operations',
|
|---|
| 94 | 'httpMethod' => 'GET',
|
|---|
| 95 | 'parameters' => [
|
|---|
| 96 | 'filter' => [
|
|---|
| 97 | 'location' => 'query',
|
|---|
| 98 | 'type' => 'string',
|
|---|
| 99 | ],
|
|---|
| 100 | 'name' => [
|
|---|
| 101 | 'location' => 'query',
|
|---|
| 102 | 'type' => 'string',
|
|---|
| 103 | ],
|
|---|
| 104 | 'pageSize' => [
|
|---|
| 105 | 'location' => 'query',
|
|---|
| 106 | 'type' => 'integer',
|
|---|
| 107 | ],
|
|---|
| 108 | 'pageToken' => [
|
|---|
| 109 | 'location' => 'query',
|
|---|
| 110 | 'type' => 'string',
|
|---|
| 111 | ],
|
|---|
| 112 | ],
|
|---|
| 113 | ],
|
|---|
| 114 | ]
|
|---|
| 115 | ]
|
|---|
| 116 | );
|
|---|
| 117 | $this->services = new ServiceManagement\Resource\Services(
|
|---|
| 118 | $this,
|
|---|
| 119 | $this->serviceName,
|
|---|
| 120 | 'services',
|
|---|
| 121 | [
|
|---|
| 122 | 'methods' => [
|
|---|
| 123 | 'create' => [
|
|---|
| 124 | 'path' => 'v1/services',
|
|---|
| 125 | 'httpMethod' => 'POST',
|
|---|
| 126 | 'parameters' => [],
|
|---|
| 127 | ],'delete' => [
|
|---|
| 128 | 'path' => 'v1/services/{serviceName}',
|
|---|
| 129 | 'httpMethod' => 'DELETE',
|
|---|
| 130 | 'parameters' => [
|
|---|
| 131 | 'serviceName' => [
|
|---|
| 132 | 'location' => 'path',
|
|---|
| 133 | 'type' => 'string',
|
|---|
| 134 | 'required' => true,
|
|---|
| 135 | ],
|
|---|
| 136 | ],
|
|---|
| 137 | ],'generateConfigReport' => [
|
|---|
| 138 | 'path' => 'v1/services:generateConfigReport',
|
|---|
| 139 | 'httpMethod' => 'POST',
|
|---|
| 140 | 'parameters' => [],
|
|---|
| 141 | ],'get' => [
|
|---|
| 142 | 'path' => 'v1/services/{serviceName}',
|
|---|
| 143 | 'httpMethod' => 'GET',
|
|---|
| 144 | 'parameters' => [
|
|---|
| 145 | 'serviceName' => [
|
|---|
| 146 | 'location' => 'path',
|
|---|
| 147 | 'type' => 'string',
|
|---|
| 148 | 'required' => true,
|
|---|
| 149 | ],
|
|---|
| 150 | ],
|
|---|
| 151 | ],'getConfig' => [
|
|---|
| 152 | 'path' => 'v1/services/{serviceName}/config',
|
|---|
| 153 | 'httpMethod' => 'GET',
|
|---|
| 154 | 'parameters' => [
|
|---|
| 155 | 'serviceName' => [
|
|---|
| 156 | 'location' => 'path',
|
|---|
| 157 | 'type' => 'string',
|
|---|
| 158 | 'required' => true,
|
|---|
| 159 | ],
|
|---|
| 160 | 'configId' => [
|
|---|
| 161 | 'location' => 'query',
|
|---|
| 162 | 'type' => 'string',
|
|---|
| 163 | ],
|
|---|
| 164 | 'view' => [
|
|---|
| 165 | 'location' => 'query',
|
|---|
| 166 | 'type' => 'string',
|
|---|
| 167 | ],
|
|---|
| 168 | ],
|
|---|
| 169 | ],'getIamPolicy' => [
|
|---|
| 170 | 'path' => 'v1/{+resource}:getIamPolicy',
|
|---|
| 171 | 'httpMethod' => 'POST',
|
|---|
| 172 | 'parameters' => [
|
|---|
| 173 | 'resource' => [
|
|---|
| 174 | 'location' => 'path',
|
|---|
| 175 | 'type' => 'string',
|
|---|
| 176 | 'required' => true,
|
|---|
| 177 | ],
|
|---|
| 178 | ],
|
|---|
| 179 | ],'list' => [
|
|---|
| 180 | 'path' => 'v1/services',
|
|---|
| 181 | 'httpMethod' => 'GET',
|
|---|
| 182 | 'parameters' => [
|
|---|
| 183 | 'consumerId' => [
|
|---|
| 184 | 'location' => 'query',
|
|---|
| 185 | 'type' => 'string',
|
|---|
| 186 | ],
|
|---|
| 187 | 'pageSize' => [
|
|---|
| 188 | 'location' => 'query',
|
|---|
| 189 | 'type' => 'integer',
|
|---|
| 190 | ],
|
|---|
| 191 | 'pageToken' => [
|
|---|
| 192 | 'location' => 'query',
|
|---|
| 193 | 'type' => 'string',
|
|---|
| 194 | ],
|
|---|
| 195 | 'producerProjectId' => [
|
|---|
| 196 | 'location' => 'query',
|
|---|
| 197 | 'type' => 'string',
|
|---|
| 198 | ],
|
|---|
| 199 | ],
|
|---|
| 200 | ],'setIamPolicy' => [
|
|---|
| 201 | 'path' => 'v1/{+resource}:setIamPolicy',
|
|---|
| 202 | 'httpMethod' => 'POST',
|
|---|
| 203 | 'parameters' => [
|
|---|
| 204 | 'resource' => [
|
|---|
| 205 | 'location' => 'path',
|
|---|
| 206 | 'type' => 'string',
|
|---|
| 207 | 'required' => true,
|
|---|
| 208 | ],
|
|---|
| 209 | ],
|
|---|
| 210 | ],'testIamPermissions' => [
|
|---|
| 211 | 'path' => 'v1/{+resource}:testIamPermissions',
|
|---|
| 212 | 'httpMethod' => 'POST',
|
|---|
| 213 | 'parameters' => [
|
|---|
| 214 | 'resource' => [
|
|---|
| 215 | 'location' => 'path',
|
|---|
| 216 | 'type' => 'string',
|
|---|
| 217 | 'required' => true,
|
|---|
| 218 | ],
|
|---|
| 219 | ],
|
|---|
| 220 | ],'undelete' => [
|
|---|
| 221 | 'path' => 'v1/services/{serviceName}:undelete',
|
|---|
| 222 | 'httpMethod' => 'POST',
|
|---|
| 223 | 'parameters' => [
|
|---|
| 224 | 'serviceName' => [
|
|---|
| 225 | 'location' => 'path',
|
|---|
| 226 | 'type' => 'string',
|
|---|
| 227 | 'required' => true,
|
|---|
| 228 | ],
|
|---|
| 229 | ],
|
|---|
| 230 | ],
|
|---|
| 231 | ]
|
|---|
| 232 | ]
|
|---|
| 233 | );
|
|---|
| 234 | $this->services_configs = new ServiceManagement\Resource\ServicesConfigs(
|
|---|
| 235 | $this,
|
|---|
| 236 | $this->serviceName,
|
|---|
| 237 | 'configs',
|
|---|
| 238 | [
|
|---|
| 239 | 'methods' => [
|
|---|
| 240 | 'create' => [
|
|---|
| 241 | 'path' => 'v1/services/{serviceName}/configs',
|
|---|
| 242 | 'httpMethod' => 'POST',
|
|---|
| 243 | 'parameters' => [
|
|---|
| 244 | 'serviceName' => [
|
|---|
| 245 | 'location' => 'path',
|
|---|
| 246 | 'type' => 'string',
|
|---|
| 247 | 'required' => true,
|
|---|
| 248 | ],
|
|---|
| 249 | ],
|
|---|
| 250 | ],'get' => [
|
|---|
| 251 | 'path' => 'v1/services/{serviceName}/configs/{configId}',
|
|---|
| 252 | 'httpMethod' => 'GET',
|
|---|
| 253 | 'parameters' => [
|
|---|
| 254 | 'serviceName' => [
|
|---|
| 255 | 'location' => 'path',
|
|---|
| 256 | 'type' => 'string',
|
|---|
| 257 | 'required' => true,
|
|---|
| 258 | ],
|
|---|
| 259 | 'configId' => [
|
|---|
| 260 | 'location' => 'path',
|
|---|
| 261 | 'type' => 'string',
|
|---|
| 262 | 'required' => true,
|
|---|
| 263 | ],
|
|---|
| 264 | 'view' => [
|
|---|
| 265 | 'location' => 'query',
|
|---|
| 266 | 'type' => 'string',
|
|---|
| 267 | ],
|
|---|
| 268 | ],
|
|---|
| 269 | ],'list' => [
|
|---|
| 270 | 'path' => 'v1/services/{serviceName}/configs',
|
|---|
| 271 | 'httpMethod' => 'GET',
|
|---|
| 272 | 'parameters' => [
|
|---|
| 273 | 'serviceName' => [
|
|---|
| 274 | 'location' => 'path',
|
|---|
| 275 | 'type' => 'string',
|
|---|
| 276 | 'required' => true,
|
|---|
| 277 | ],
|
|---|
| 278 | 'pageSize' => [
|
|---|
| 279 | 'location' => 'query',
|
|---|
| 280 | 'type' => 'integer',
|
|---|
| 281 | ],
|
|---|
| 282 | 'pageToken' => [
|
|---|
| 283 | 'location' => 'query',
|
|---|
| 284 | 'type' => 'string',
|
|---|
| 285 | ],
|
|---|
| 286 | ],
|
|---|
| 287 | ],'submit' => [
|
|---|
| 288 | 'path' => 'v1/services/{serviceName}/configs:submit',
|
|---|
| 289 | 'httpMethod' => 'POST',
|
|---|
| 290 | 'parameters' => [
|
|---|
| 291 | 'serviceName' => [
|
|---|
| 292 | 'location' => 'path',
|
|---|
| 293 | 'type' => 'string',
|
|---|
| 294 | 'required' => true,
|
|---|
| 295 | ],
|
|---|
| 296 | ],
|
|---|
| 297 | ],
|
|---|
| 298 | ]
|
|---|
| 299 | ]
|
|---|
| 300 | );
|
|---|
| 301 | $this->services_consumers = new ServiceManagement\Resource\ServicesConsumers(
|
|---|
| 302 | $this,
|
|---|
| 303 | $this->serviceName,
|
|---|
| 304 | 'consumers',
|
|---|
| 305 | [
|
|---|
| 306 | 'methods' => [
|
|---|
| 307 | 'getIamPolicy' => [
|
|---|
| 308 | 'path' => 'v1/{+resource}:getIamPolicy',
|
|---|
| 309 | 'httpMethod' => 'POST',
|
|---|
| 310 | 'parameters' => [
|
|---|
| 311 | 'resource' => [
|
|---|
| 312 | 'location' => 'path',
|
|---|
| 313 | 'type' => 'string',
|
|---|
| 314 | 'required' => true,
|
|---|
| 315 | ],
|
|---|
| 316 | ],
|
|---|
| 317 | ],'setIamPolicy' => [
|
|---|
| 318 | 'path' => 'v1/{+resource}:setIamPolicy',
|
|---|
| 319 | 'httpMethod' => 'POST',
|
|---|
| 320 | 'parameters' => [
|
|---|
| 321 | 'resource' => [
|
|---|
| 322 | 'location' => 'path',
|
|---|
| 323 | 'type' => 'string',
|
|---|
| 324 | 'required' => true,
|
|---|
| 325 | ],
|
|---|
| 326 | ],
|
|---|
| 327 | ],'testIamPermissions' => [
|
|---|
| 328 | 'path' => 'v1/{+resource}:testIamPermissions',
|
|---|
| 329 | 'httpMethod' => 'POST',
|
|---|
| 330 | 'parameters' => [
|
|---|
| 331 | 'resource' => [
|
|---|
| 332 | 'location' => 'path',
|
|---|
| 333 | 'type' => 'string',
|
|---|
| 334 | 'required' => true,
|
|---|
| 335 | ],
|
|---|
| 336 | ],
|
|---|
| 337 | ],
|
|---|
| 338 | ]
|
|---|
| 339 | ]
|
|---|
| 340 | );
|
|---|
| 341 | $this->services_rollouts = new ServiceManagement\Resource\ServicesRollouts(
|
|---|
| 342 | $this,
|
|---|
| 343 | $this->serviceName,
|
|---|
| 344 | 'rollouts',
|
|---|
| 345 | [
|
|---|
| 346 | 'methods' => [
|
|---|
| 347 | 'create' => [
|
|---|
| 348 | 'path' => 'v1/services/{serviceName}/rollouts',
|
|---|
| 349 | 'httpMethod' => 'POST',
|
|---|
| 350 | 'parameters' => [
|
|---|
| 351 | 'serviceName' => [
|
|---|
| 352 | 'location' => 'path',
|
|---|
| 353 | 'type' => 'string',
|
|---|
| 354 | 'required' => true,
|
|---|
| 355 | ],
|
|---|
| 356 | ],
|
|---|
| 357 | ],'get' => [
|
|---|
| 358 | 'path' => 'v1/services/{serviceName}/rollouts/{rolloutId}',
|
|---|
| 359 | 'httpMethod' => 'GET',
|
|---|
| 360 | 'parameters' => [
|
|---|
| 361 | 'serviceName' => [
|
|---|
| 362 | 'location' => 'path',
|
|---|
| 363 | 'type' => 'string',
|
|---|
| 364 | 'required' => true,
|
|---|
| 365 | ],
|
|---|
| 366 | 'rolloutId' => [
|
|---|
| 367 | 'location' => 'path',
|
|---|
| 368 | 'type' => 'string',
|
|---|
| 369 | 'required' => true,
|
|---|
| 370 | ],
|
|---|
| 371 | ],
|
|---|
| 372 | ],'list' => [
|
|---|
| 373 | 'path' => 'v1/services/{serviceName}/rollouts',
|
|---|
| 374 | 'httpMethod' => 'GET',
|
|---|
| 375 | 'parameters' => [
|
|---|
| 376 | 'serviceName' => [
|
|---|
| 377 | 'location' => 'path',
|
|---|
| 378 | 'type' => 'string',
|
|---|
| 379 | 'required' => true,
|
|---|
| 380 | ],
|
|---|
| 381 | 'filter' => [
|
|---|
| 382 | 'location' => 'query',
|
|---|
| 383 | 'type' => 'string',
|
|---|
| 384 | ],
|
|---|
| 385 | 'pageSize' => [
|
|---|
| 386 | 'location' => 'query',
|
|---|
| 387 | 'type' => 'integer',
|
|---|
| 388 | ],
|
|---|
| 389 | 'pageToken' => [
|
|---|
| 390 | 'location' => 'query',
|
|---|
| 391 | 'type' => 'string',
|
|---|
| 392 | ],
|
|---|
| 393 | ],
|
|---|
| 394 | ],
|
|---|
| 395 | ]
|
|---|
| 396 | ]
|
|---|
| 397 | );
|
|---|
| 398 | }
|
|---|
| 399 | }
|
|---|
| 400 |
|
|---|
| 401 | // Adding a class alias for backwards compatibility with the previous class name.
|
|---|
| 402 | class_alias(ServiceManagement::class, 'Google_Service_ServiceManagement');
|
|---|