Apigateway.php 16 KB

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