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 Apigateway (v1). 24 * 25 * <p> 26</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/api-gateway/docs" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class Apigateway 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 41 public $projects_locations; 42 public $projects_locations_apis; 43 public $projects_locations_apis_configs; 44 public $projects_locations_gateways; 45 public $projects_locations_operations; 46 47 /** 48 * Constructs the internal representation of the Apigateway service. 49 * 50 * @param Client|array $clientOrConfig The client used to deliver requests, or a 51 * config array to pass to a new Client instance. 52 * @param string $rootUrl The root URL used for requests to the service. 53 */ 54 public function __construct($clientOrConfig = [], $rootUrl = null) 55 { 56 parent::__construct($clientOrConfig); 57 $this->rootUrl = $rootUrl ?: 'https://apigateway.googleapis.com/'; 58 $this->servicePath = ''; 59 $this->batchPath = 'batch'; 60 $this->version = 'v1'; 61 $this->serviceName = 'apigateway'; 62 63 $this->projects_locations = new Apigateway\Resource\ProjectsLocations( 64 $this, 65 $this->serviceName, 66 'locations', 67 [ 68 'methods' => [ 69 'get' => [ 70 'path' => 'v1/{+name}', 71 'httpMethod' => 'GET', 72 'parameters' => [ 73 'name' => [ 74 'location' => 'path', 75 'type' => 'string', 76 'required' => true, 77 ], 78 ], 79 ],'list' => [ 80 'path' => 'v1/{+name}/locations', 81 'httpMethod' => 'GET', 82 'parameters' => [ 83 'name' => [ 84 'location' => 'path', 85 'type' => 'string', 86 'required' => true, 87 ], 88 'filter' => [ 89 'location' => 'query', 90 'type' => 'string', 91 ], 92 'pageSize' => [ 93 'location' => 'query', 94 'type' => 'integer', 95 ], 96 'pageToken' => [ 97 'location' => 'query', 98 'type' => 'string', 99 ], 100 ], 101 ], 102 ] 103 ] 104 ); 105 $this->projects_locations_apis = new Apigateway\Resource\ProjectsLocationsApis( 106 $this, 107 $this->serviceName, 108 'apis', 109 [ 110 'methods' => [ 111 'create' => [ 112 'path' => 'v1/{+parent}/apis', 113 'httpMethod' => 'POST', 114 'parameters' => [ 115 'parent' => [ 116 'location' => 'path', 117 'type' => 'string', 118 'required' => true, 119 ], 120 'apiId' => [ 121 'location' => 'query', 122 'type' => 'string', 123 ], 124 ], 125 ],'delete' => [ 126 'path' => 'v1/{+name}', 127 'httpMethod' => 'DELETE', 128 'parameters' => [ 129 'name' => [ 130 'location' => 'path', 131 'type' => 'string', 132 'required' => true, 133 ], 134 ], 135 ],'get' => [ 136 'path' => 'v1/{+name}', 137 'httpMethod' => 'GET', 138 'parameters' => [ 139 'name' => [ 140 'location' => 'path', 141 'type' => 'string', 142 'required' => true, 143 ], 144 ], 145 ],'getIamPolicy' => [ 146 'path' => 'v1/{+resource}:getIamPolicy', 147 'httpMethod' => 'GET', 148 'parameters' => [ 149 'resource' => [ 150 'location' => 'path', 151 'type' => 'string', 152 'required' => true, 153 ], 154 'options.requestedPolicyVersion' => [ 155 'location' => 'query', 156 'type' => 'integer', 157 ], 158 ], 159 ],'list' => [ 160 'path' => 'v1/{+parent}/apis', 161 'httpMethod' => 'GET', 162 'parameters' => [ 163 'parent' => [ 164 'location' => 'path', 165 'type' => 'string', 166 'required' => true, 167 ], 168 'filter' => [ 169 'location' => 'query', 170 'type' => 'string', 171 ], 172 'orderBy' => [ 173 'location' => 'query', 174 'type' => 'string', 175 ], 176 'pageSize' => [ 177 'location' => 'query', 178 'type' => 'integer', 179 ], 180 'pageToken' => [ 181 'location' => 'query', 182 'type' => 'string', 183 ], 184 ], 185 ],'patch' => [ 186 'path' => 'v1/{+name}', 187 'httpMethod' => 'PATCH', 188 'parameters' => [ 189 'name' => [ 190 'location' => 'path', 191 'type' => 'string', 192 'required' => true, 193 ], 194 'updateMask' => [ 195 'location' => 'query', 196 'type' => 'string', 197 ], 198 ], 199 ],'setIamPolicy' => [ 200 'path' => 'v1/{+resource}:setIamPolicy', 201 'httpMethod' => 'POST', 202 'parameters' => [ 203 'resource' => [ 204 'location' => 'path', 205 'type' => 'string', 206 'required' => true, 207 ], 208 ], 209 ],'testIamPermissions' => [ 210 'path' => 'v1/{+resource}:testIamPermissions', 211 'httpMethod' => 'POST', 212 'parameters' => [ 213 'resource' => [ 214 'location' => 'path', 215 'type' => 'string', 216 'required' => true, 217 ], 218 ], 219 ], 220 ] 221 ] 222 ); 223 $this->projects_locations_apis_configs = new Apigateway\Resource\ProjectsLocationsApisConfigs( 224 $this, 225 $this->serviceName, 226 'configs', 227 [ 228 'methods' => [ 229 'create' => [ 230 'path' => 'v1/{+parent}/configs', 231 'httpMethod' => 'POST', 232 'parameters' => [ 233 'parent' => [ 234 'location' => 'path', 235 'type' => 'string', 236 'required' => true, 237 ], 238 'apiConfigId' => [ 239 'location' => 'query', 240 'type' => 'string', 241 ], 242 ], 243 ],'delete' => [ 244 'path' => 'v1/{+name}', 245 'httpMethod' => 'DELETE', 246 'parameters' => [ 247 'name' => [ 248 'location' => 'path', 249 'type' => 'string', 250 'required' => true, 251 ], 252 ], 253 ],'get' => [ 254 'path' => 'v1/{+name}', 255 'httpMethod' => 'GET', 256 'parameters' => [ 257 'name' => [ 258 'location' => 'path', 259 'type' => 'string', 260 'required' => true, 261 ], 262 'view' => [ 263 'location' => 'query', 264 'type' => 'string', 265 ], 266 ], 267 ],'getIamPolicy' => [ 268 'path' => 'v1/{+resource}:getIamPolicy', 269 'httpMethod' => 'GET', 270 'parameters' => [ 271 'resource' => [ 272 'location' => 'path', 273 'type' => 'string', 274 'required' => true, 275 ], 276 'options.requestedPolicyVersion' => [ 277 'location' => 'query', 278 'type' => 'integer', 279 ], 280 ], 281 ],'list' => [ 282 'path' => 'v1/{+parent}/configs', 283 'httpMethod' => 'GET', 284 'parameters' => [ 285 'parent' => [ 286 'location' => 'path', 287 'type' => 'string', 288 'required' => true, 289 ], 290 'filter' => [ 291 'location' => 'query', 292 'type' => 'string', 293 ], 294 'orderBy' => [ 295 'location' => 'query', 296 'type' => 'string', 297 ], 298 'pageSize' => [ 299 'location' => 'query', 300 'type' => 'integer', 301 ], 302 'pageToken' => [ 303 'location' => 'query', 304 'type' => 'string', 305 ], 306 ], 307 ],'patch' => [ 308 'path' => 'v1/{+name}', 309 'httpMethod' => 'PATCH', 310 'parameters' => [ 311 'name' => [ 312 'location' => 'path', 313 'type' => 'string', 314 'required' => true, 315 ], 316 'updateMask' => [ 317 'location' => 'query', 318 'type' => 'string', 319 ], 320 ], 321 ],'setIamPolicy' => [ 322 'path' => 'v1/{+resource}:setIamPolicy', 323 'httpMethod' => 'POST', 324 'parameters' => [ 325 'resource' => [ 326 'location' => 'path', 327 'type' => 'string', 328 'required' => true, 329 ], 330 ], 331 ],'testIamPermissions' => [ 332 'path' => 'v1/{+resource}:testIamPermissions', 333 'httpMethod' => 'POST', 334 'parameters' => [ 335 'resource' => [ 336 'location' => 'path', 337 'type' => 'string', 338 'required' => true, 339 ], 340 ], 341 ], 342 ] 343 ] 344 ); 345 $this->projects_locations_gateways = new Apigateway\Resource\ProjectsLocationsGateways( 346 $this, 347 $this->serviceName, 348 'gateways', 349 [ 350 'methods' => [ 351 'create' => [ 352 'path' => 'v1/{+parent}/gateways', 353 'httpMethod' => 'POST', 354 'parameters' => [ 355 'parent' => [ 356 'location' => 'path', 357 'type' => 'string', 358 'required' => true, 359 ], 360 'gatewayId' => [ 361 'location' => 'query', 362 'type' => 'string', 363 ], 364 ], 365 ],'delete' => [ 366 'path' => 'v1/{+name}', 367 'httpMethod' => 'DELETE', 368 'parameters' => [ 369 'name' => [ 370 'location' => 'path', 371 'type' => 'string', 372 'required' => true, 373 ], 374 ], 375 ],'get' => [ 376 'path' => 'v1/{+name}', 377 'httpMethod' => 'GET', 378 'parameters' => [ 379 'name' => [ 380 'location' => 'path', 381 'type' => 'string', 382 'required' => true, 383 ], 384 ], 385 ],'getIamPolicy' => [ 386 'path' => 'v1/{+resource}:getIamPolicy', 387 'httpMethod' => 'GET', 388 'parameters' => [ 389 'resource' => [ 390 'location' => 'path', 391 'type' => 'string', 392 'required' => true, 393 ], 394 'options.requestedPolicyVersion' => [ 395 'location' => 'query', 396 'type' => 'integer', 397 ], 398 ], 399 ],'list' => [ 400 'path' => 'v1/{+parent}/gateways', 401 'httpMethod' => 'GET', 402 'parameters' => [ 403 'parent' => [ 404 'location' => 'path', 405 'type' => 'string', 406 'required' => true, 407 ], 408 'filter' => [ 409 'location' => 'query', 410 'type' => 'string', 411 ], 412 'orderBy' => [ 413 'location' => 'query', 414 'type' => 'string', 415 ], 416 'pageSize' => [ 417 'location' => 'query', 418 'type' => 'integer', 419 ], 420 'pageToken' => [ 421 'location' => 'query', 422 'type' => 'string', 423 ], 424 ], 425 ],'patch' => [ 426 'path' => 'v1/{+name}', 427 'httpMethod' => 'PATCH', 428 'parameters' => [ 429 'name' => [ 430 'location' => 'path', 431 'type' => 'string', 432 'required' => true, 433 ], 434 'updateMask' => [ 435 'location' => 'query', 436 'type' => 'string', 437 ], 438 ], 439 ],'setIamPolicy' => [ 440 'path' => 'v1/{+resource}:setIamPolicy', 441 'httpMethod' => 'POST', 442 'parameters' => [ 443 'resource' => [ 444 'location' => 'path', 445 'type' => 'string', 446 'required' => true, 447 ], 448 ], 449 ],'testIamPermissions' => [ 450 'path' => 'v1/{+resource}:testIamPermissions', 451 'httpMethod' => 'POST', 452 'parameters' => [ 453 'resource' => [ 454 'location' => 'path', 455 'type' => 'string', 456 'required' => true, 457 ], 458 ], 459 ], 460 ] 461 ] 462 ); 463 $this->projects_locations_operations = new Apigateway\Resource\ProjectsLocationsOperations( 464 $this, 465 $this->serviceName, 466 'operations', 467 [ 468 'methods' => [ 469 'cancel' => [ 470 'path' => 'v1/{+name}:cancel', 471 'httpMethod' => 'POST', 472 'parameters' => [ 473 'name' => [ 474 'location' => 'path', 475 'type' => 'string', 476 'required' => true, 477 ], 478 ], 479 ],'delete' => [ 480 'path' => 'v1/{+name}', 481 'httpMethod' => 'DELETE', 482 'parameters' => [ 483 'name' => [ 484 'location' => 'path', 485 'type' => 'string', 486 'required' => true, 487 ], 488 ], 489 ],'get' => [ 490 'path' => 'v1/{+name}', 491 'httpMethod' => 'GET', 492 'parameters' => [ 493 'name' => [ 494 'location' => 'path', 495 'type' => 'string', 496 'required' => true, 497 ], 498 ], 499 ],'list' => [ 500 'path' => 'v1/{+name}/operations', 501 'httpMethod' => 'GET', 502 'parameters' => [ 503 'name' => [ 504 'location' => 'path', 505 'type' => 'string', 506 'required' => true, 507 ], 508 'filter' => [ 509 'location' => 'query', 510 'type' => 'string', 511 ], 512 'pageSize' => [ 513 'location' => 'query', 514 'type' => 'integer', 515 ], 516 'pageToken' => [ 517 'location' => 'query', 518 'type' => 'string', 519 ], 520 ], 521 ], 522 ] 523 ] 524 ); 525 } 526} 527 528// Adding a class alias for backwards compatibility with the previous class name. 529class_alias(Apigateway::class, 'Google_Service_Apigateway'); 530