ServerlessVPCAccess.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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 ServerlessVPCAccess (v1).
  21. *
  22. * <p>
  23. * API for managing VPC access connectors.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/vpc/docs/configure-serverless-vpc-access" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class ServerlessVPCAccess 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_connectors;
  39. public $projects_locations_operations;
  40. public $rootUrlTemplate;
  41. /**
  42. * Constructs the internal representation of the ServerlessVPCAccess service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://vpcaccess.googleapis.com/';
  52. $this->rootUrlTemplate = $rootUrl ?: 'https://vpcaccess.UNIVERSE_DOMAIN/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1';
  56. $this->serviceName = 'vpcaccess';
  57. $this->projects_locations = new ServerlessVPCAccess\Resource\ProjectsLocations(
  58. $this,
  59. $this->serviceName,
  60. 'locations',
  61. [
  62. 'methods' => [
  63. 'list' => [
  64. 'path' => 'v1/{+name}/locations',
  65. 'httpMethod' => 'GET',
  66. 'parameters' => [
  67. 'name' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. 'extraLocationTypes' => [
  73. 'location' => 'query',
  74. 'type' => 'string',
  75. 'repeated' => true,
  76. ],
  77. 'filter' => [
  78. 'location' => 'query',
  79. 'type' => 'string',
  80. ],
  81. 'pageSize' => [
  82. 'location' => 'query',
  83. 'type' => 'integer',
  84. ],
  85. 'pageToken' => [
  86. 'location' => 'query',
  87. 'type' => 'string',
  88. ],
  89. ],
  90. ],
  91. ]
  92. ]
  93. );
  94. $this->projects_locations_connectors = new ServerlessVPCAccess\Resource\ProjectsLocationsConnectors(
  95. $this,
  96. $this->serviceName,
  97. 'connectors',
  98. [
  99. 'methods' => [
  100. 'create' => [
  101. 'path' => 'v1/{+parent}/connectors',
  102. 'httpMethod' => 'POST',
  103. 'parameters' => [
  104. 'parent' => [
  105. 'location' => 'path',
  106. 'type' => 'string',
  107. 'required' => true,
  108. ],
  109. 'connectorId' => [
  110. 'location' => 'query',
  111. 'type' => 'string',
  112. ],
  113. ],
  114. ],'delete' => [
  115. 'path' => 'v1/{+name}',
  116. 'httpMethod' => 'DELETE',
  117. 'parameters' => [
  118. 'name' => [
  119. 'location' => 'path',
  120. 'type' => 'string',
  121. 'required' => true,
  122. ],
  123. ],
  124. ],'get' => [
  125. 'path' => 'v1/{+name}',
  126. 'httpMethod' => 'GET',
  127. 'parameters' => [
  128. 'name' => [
  129. 'location' => 'path',
  130. 'type' => 'string',
  131. 'required' => true,
  132. ],
  133. ],
  134. ],'list' => [
  135. 'path' => 'v1/{+parent}/connectors',
  136. 'httpMethod' => 'GET',
  137. 'parameters' => [
  138. 'parent' => [
  139. 'location' => 'path',
  140. 'type' => 'string',
  141. 'required' => true,
  142. ],
  143. 'pageSize' => [
  144. 'location' => 'query',
  145. 'type' => 'integer',
  146. ],
  147. 'pageToken' => [
  148. 'location' => 'query',
  149. 'type' => 'string',
  150. ],
  151. ],
  152. ],'patch' => [
  153. 'path' => 'v1/{+name}',
  154. 'httpMethod' => 'PATCH',
  155. 'parameters' => [
  156. 'name' => [
  157. 'location' => 'path',
  158. 'type' => 'string',
  159. 'required' => true,
  160. ],
  161. 'updateMask' => [
  162. 'location' => 'query',
  163. 'type' => 'string',
  164. ],
  165. ],
  166. ],
  167. ]
  168. ]
  169. );
  170. $this->projects_locations_operations = new ServerlessVPCAccess\Resource\ProjectsLocationsOperations(
  171. $this,
  172. $this->serviceName,
  173. 'operations',
  174. [
  175. 'methods' => [
  176. 'get' => [
  177. 'path' => 'v1/{+name}',
  178. 'httpMethod' => 'GET',
  179. 'parameters' => [
  180. 'name' => [
  181. 'location' => 'path',
  182. 'type' => 'string',
  183. 'required' => true,
  184. ],
  185. ],
  186. ],'list' => [
  187. 'path' => 'v1/{+name}/operations',
  188. 'httpMethod' => 'GET',
  189. 'parameters' => [
  190. 'name' => [
  191. 'location' => 'path',
  192. 'type' => 'string',
  193. 'required' => true,
  194. ],
  195. 'filter' => [
  196. 'location' => 'query',
  197. 'type' => 'string',
  198. ],
  199. 'pageSize' => [
  200. 'location' => 'query',
  201. 'type' => 'integer',
  202. ],
  203. 'pageToken' => [
  204. 'location' => 'query',
  205. 'type' => 'string',
  206. ],
  207. 'returnPartialSuccess' => [
  208. 'location' => 'query',
  209. 'type' => 'boolean',
  210. ],
  211. ],
  212. ],
  213. ]
  214. ]
  215. );
  216. }
  217. }
  218. // Adding a class alias for backwards compatibility with the previous class name.
  219. class_alias(ServerlessVPCAccess::class, 'Google_Service_ServerlessVPCAccess');