NetworkManagement.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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 NetworkManagement (v1).
  21. *
  22. * <p>
  23. * The Network Management API provides a collection of network performance
  24. * monitoring and diagnostic capabilities.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class NetworkManagement extends \Google\Service
  34. {
  35. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  36. const CLOUD_PLATFORM =
  37. "https://www.googleapis.com/auth/cloud-platform";
  38. public $projects_locations;
  39. public $projects_locations_global_connectivityTests;
  40. public $projects_locations_global_operations;
  41. /**
  42. * Constructs the internal representation of the NetworkManagement 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://networkmanagement.googleapis.com/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'networkmanagement';
  56. $this->projects_locations = new NetworkManagement\Resource\ProjectsLocations(
  57. $this,
  58. $this->serviceName,
  59. 'locations',
  60. [
  61. 'methods' => [
  62. 'get' => [
  63. 'path' => 'v1/{+name}',
  64. 'httpMethod' => 'GET',
  65. 'parameters' => [
  66. 'name' => [
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ],
  71. ],
  72. ],'list' => [
  73. 'path' => 'v1/{+name}/locations',
  74. 'httpMethod' => 'GET',
  75. 'parameters' => [
  76. 'name' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. 'filter' => [
  82. 'location' => 'query',
  83. 'type' => 'string',
  84. ],
  85. 'pageSize' => [
  86. 'location' => 'query',
  87. 'type' => 'integer',
  88. ],
  89. 'pageToken' => [
  90. 'location' => 'query',
  91. 'type' => 'string',
  92. ],
  93. ],
  94. ],
  95. ]
  96. ]
  97. );
  98. $this->projects_locations_global_connectivityTests = new NetworkManagement\Resource\ProjectsLocationsNetworkmanagementGlobalConnectivityTests(
  99. $this,
  100. $this->serviceName,
  101. 'connectivityTests',
  102. [
  103. 'methods' => [
  104. 'create' => [
  105. 'path' => 'v1/{+parent}/connectivityTests',
  106. 'httpMethod' => 'POST',
  107. 'parameters' => [
  108. 'parent' => [
  109. 'location' => 'path',
  110. 'type' => 'string',
  111. 'required' => true,
  112. ],
  113. 'testId' => [
  114. 'location' => 'query',
  115. 'type' => 'string',
  116. ],
  117. ],
  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. ],'get' => [
  129. 'path' => 'v1/{+name}',
  130. 'httpMethod' => 'GET',
  131. 'parameters' => [
  132. 'name' => [
  133. 'location' => 'path',
  134. 'type' => 'string',
  135. 'required' => true,
  136. ],
  137. ],
  138. ],'getIamPolicy' => [
  139. 'path' => 'v1/{+resource}:getIamPolicy',
  140. 'httpMethod' => 'GET',
  141. 'parameters' => [
  142. 'resource' => [
  143. 'location' => 'path',
  144. 'type' => 'string',
  145. 'required' => true,
  146. ],
  147. 'options.requestedPolicyVersion' => [
  148. 'location' => 'query',
  149. 'type' => 'integer',
  150. ],
  151. ],
  152. ],'list' => [
  153. 'path' => 'v1/{+parent}/connectivityTests',
  154. 'httpMethod' => 'GET',
  155. 'parameters' => [
  156. 'parent' => [
  157. 'location' => 'path',
  158. 'type' => 'string',
  159. 'required' => true,
  160. ],
  161. 'filter' => [
  162. 'location' => 'query',
  163. 'type' => 'string',
  164. ],
  165. 'orderBy' => [
  166. 'location' => 'query',
  167. 'type' => 'string',
  168. ],
  169. 'pageSize' => [
  170. 'location' => 'query',
  171. 'type' => 'integer',
  172. ],
  173. 'pageToken' => [
  174. 'location' => 'query',
  175. 'type' => 'string',
  176. ],
  177. ],
  178. ],'patch' => [
  179. 'path' => 'v1/{+name}',
  180. 'httpMethod' => 'PATCH',
  181. 'parameters' => [
  182. 'name' => [
  183. 'location' => 'path',
  184. 'type' => 'string',
  185. 'required' => true,
  186. ],
  187. 'updateMask' => [
  188. 'location' => 'query',
  189. 'type' => 'string',
  190. ],
  191. ],
  192. ],'rerun' => [
  193. 'path' => 'v1/{+name}:rerun',
  194. 'httpMethod' => 'POST',
  195. 'parameters' => [
  196. 'name' => [
  197. 'location' => 'path',
  198. 'type' => 'string',
  199. 'required' => true,
  200. ],
  201. ],
  202. ],'setIamPolicy' => [
  203. 'path' => 'v1/{+resource}:setIamPolicy',
  204. 'httpMethod' => 'POST',
  205. 'parameters' => [
  206. 'resource' => [
  207. 'location' => 'path',
  208. 'type' => 'string',
  209. 'required' => true,
  210. ],
  211. ],
  212. ],'testIamPermissions' => [
  213. 'path' => 'v1/{+resource}:testIamPermissions',
  214. 'httpMethod' => 'POST',
  215. 'parameters' => [
  216. 'resource' => [
  217. 'location' => 'path',
  218. 'type' => 'string',
  219. 'required' => true,
  220. ],
  221. ],
  222. ],
  223. ]
  224. ]
  225. );
  226. $this->projects_locations_global_operations = new NetworkManagement\Resource\ProjectsLocationsNetworkmanagementGlobalOperations(
  227. $this,
  228. $this->serviceName,
  229. 'operations',
  230. [
  231. 'methods' => [
  232. 'cancel' => [
  233. 'path' => 'v1/{+name}:cancel',
  234. 'httpMethod' => 'POST',
  235. 'parameters' => [
  236. 'name' => [
  237. 'location' => 'path',
  238. 'type' => 'string',
  239. 'required' => true,
  240. ],
  241. ],
  242. ],'delete' => [
  243. 'path' => 'v1/{+name}',
  244. 'httpMethod' => 'DELETE',
  245. 'parameters' => [
  246. 'name' => [
  247. 'location' => 'path',
  248. 'type' => 'string',
  249. 'required' => true,
  250. ],
  251. ],
  252. ],'get' => [
  253. 'path' => 'v1/{+name}',
  254. 'httpMethod' => 'GET',
  255. 'parameters' => [
  256. 'name' => [
  257. 'location' => 'path',
  258. 'type' => 'string',
  259. 'required' => true,
  260. ],
  261. ],
  262. ],'list' => [
  263. 'path' => 'v1/{+name}/operations',
  264. 'httpMethod' => 'GET',
  265. 'parameters' => [
  266. 'name' => [
  267. 'location' => 'path',
  268. 'type' => 'string',
  269. 'required' => true,
  270. ],
  271. 'filter' => [
  272. 'location' => 'query',
  273. 'type' => 'string',
  274. ],
  275. 'pageSize' => [
  276. 'location' => 'query',
  277. 'type' => 'integer',
  278. ],
  279. 'pageToken' => [
  280. 'location' => 'query',
  281. 'type' => 'string',
  282. ],
  283. ],
  284. ],
  285. ]
  286. ]
  287. );
  288. }
  289. }
  290. // Adding a class alias for backwards compatibility with the previous class name.
  291. class_alias(NetworkManagement::class, 'Google_Service_NetworkManagement');