ServiceDirectory.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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 ServiceDirectory (v1).
  21. *
  22. * <p>
  23. * Service Directory is a platform for discovering, publishing, and connecting
  24. * services.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/service-directory" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class ServiceDirectory 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_namespaces;
  40. public $projects_locations_namespaces_services;
  41. public $projects_locations_namespaces_services_endpoints;
  42. public $rootUrlTemplate;
  43. /**
  44. * Constructs the internal representation of the ServiceDirectory service.
  45. *
  46. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  47. * config array to pass to a new Client instance.
  48. * @param string $rootUrl The root URL used for requests to the service.
  49. */
  50. public function __construct($clientOrConfig = [], $rootUrl = null)
  51. {
  52. parent::__construct($clientOrConfig);
  53. $this->rootUrl = $rootUrl ?: 'https://servicedirectory.googleapis.com/';
  54. $this->rootUrlTemplate = $rootUrl ?: 'https://servicedirectory.UNIVERSE_DOMAIN/';
  55. $this->servicePath = '';
  56. $this->batchPath = 'batch';
  57. $this->version = 'v1';
  58. $this->serviceName = 'servicedirectory';
  59. $this->projects_locations = new ServiceDirectory\Resource\ProjectsLocations(
  60. $this,
  61. $this->serviceName,
  62. 'locations',
  63. [
  64. 'methods' => [
  65. 'get' => [
  66. 'path' => 'v1/{+name}',
  67. 'httpMethod' => 'GET',
  68. 'parameters' => [
  69. 'name' => [
  70. 'location' => 'path',
  71. 'type' => 'string',
  72. 'required' => true,
  73. ],
  74. ],
  75. ],'list' => [
  76. 'path' => 'v1/{+name}/locations',
  77. 'httpMethod' => 'GET',
  78. 'parameters' => [
  79. 'name' => [
  80. 'location' => 'path',
  81. 'type' => 'string',
  82. 'required' => true,
  83. ],
  84. 'extraLocationTypes' => [
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. 'repeated' => true,
  88. ],
  89. 'filter' => [
  90. 'location' => 'query',
  91. 'type' => 'string',
  92. ],
  93. 'pageSize' => [
  94. 'location' => 'query',
  95. 'type' => 'integer',
  96. ],
  97. 'pageToken' => [
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ],
  101. ],
  102. ],
  103. ]
  104. ]
  105. );
  106. $this->projects_locations_namespaces = new ServiceDirectory\Resource\ProjectsLocationsNamespaces(
  107. $this,
  108. $this->serviceName,
  109. 'namespaces',
  110. [
  111. 'methods' => [
  112. 'create' => [
  113. 'path' => 'v1/{+parent}/namespaces',
  114. 'httpMethod' => 'POST',
  115. 'parameters' => [
  116. 'parent' => [
  117. 'location' => 'path',
  118. 'type' => 'string',
  119. 'required' => true,
  120. ],
  121. 'namespaceId' => [
  122. 'location' => 'query',
  123. 'type' => 'string',
  124. ],
  125. ],
  126. ],'delete' => [
  127. 'path' => 'v1/{+name}',
  128. 'httpMethod' => 'DELETE',
  129. 'parameters' => [
  130. 'name' => [
  131. 'location' => 'path',
  132. 'type' => 'string',
  133. 'required' => true,
  134. ],
  135. ],
  136. ],'get' => [
  137. 'path' => 'v1/{+name}',
  138. 'httpMethod' => 'GET',
  139. 'parameters' => [
  140. 'name' => [
  141. 'location' => 'path',
  142. 'type' => 'string',
  143. 'required' => true,
  144. ],
  145. ],
  146. ],'getIamPolicy' => [
  147. 'path' => 'v1/{+resource}:getIamPolicy',
  148. 'httpMethod' => 'POST',
  149. 'parameters' => [
  150. 'resource' => [
  151. 'location' => 'path',
  152. 'type' => 'string',
  153. 'required' => true,
  154. ],
  155. ],
  156. ],'list' => [
  157. 'path' => 'v1/{+parent}/namespaces',
  158. 'httpMethod' => 'GET',
  159. 'parameters' => [
  160. 'parent' => [
  161. 'location' => 'path',
  162. 'type' => 'string',
  163. 'required' => true,
  164. ],
  165. 'filter' => [
  166. 'location' => 'query',
  167. 'type' => 'string',
  168. ],
  169. 'orderBy' => [
  170. 'location' => 'query',
  171. 'type' => 'string',
  172. ],
  173. 'pageSize' => [
  174. 'location' => 'query',
  175. 'type' => 'integer',
  176. ],
  177. 'pageToken' => [
  178. 'location' => 'query',
  179. 'type' => 'string',
  180. ],
  181. ],
  182. ],'patch' => [
  183. 'path' => 'v1/{+name}',
  184. 'httpMethod' => 'PATCH',
  185. 'parameters' => [
  186. 'name' => [
  187. 'location' => 'path',
  188. 'type' => 'string',
  189. 'required' => true,
  190. ],
  191. 'updateMask' => [
  192. 'location' => 'query',
  193. 'type' => 'string',
  194. ],
  195. ],
  196. ],'setIamPolicy' => [
  197. 'path' => 'v1/{+resource}:setIamPolicy',
  198. 'httpMethod' => 'POST',
  199. 'parameters' => [
  200. 'resource' => [
  201. 'location' => 'path',
  202. 'type' => 'string',
  203. 'required' => true,
  204. ],
  205. ],
  206. ],'testIamPermissions' => [
  207. 'path' => 'v1/{+resource}:testIamPermissions',
  208. 'httpMethod' => 'POST',
  209. 'parameters' => [
  210. 'resource' => [
  211. 'location' => 'path',
  212. 'type' => 'string',
  213. 'required' => true,
  214. ],
  215. ],
  216. ],
  217. ]
  218. ]
  219. );
  220. $this->projects_locations_namespaces_services = new ServiceDirectory\Resource\ProjectsLocationsNamespacesServices(
  221. $this,
  222. $this->serviceName,
  223. 'services',
  224. [
  225. 'methods' => [
  226. 'create' => [
  227. 'path' => 'v1/{+parent}/services',
  228. 'httpMethod' => 'POST',
  229. 'parameters' => [
  230. 'parent' => [
  231. 'location' => 'path',
  232. 'type' => 'string',
  233. 'required' => true,
  234. ],
  235. 'serviceId' => [
  236. 'location' => 'query',
  237. 'type' => 'string',
  238. ],
  239. ],
  240. ],'delete' => [
  241. 'path' => 'v1/{+name}',
  242. 'httpMethod' => 'DELETE',
  243. 'parameters' => [
  244. 'name' => [
  245. 'location' => 'path',
  246. 'type' => 'string',
  247. 'required' => true,
  248. ],
  249. ],
  250. ],'get' => [
  251. 'path' => 'v1/{+name}',
  252. 'httpMethod' => 'GET',
  253. 'parameters' => [
  254. 'name' => [
  255. 'location' => 'path',
  256. 'type' => 'string',
  257. 'required' => true,
  258. ],
  259. ],
  260. ],'getIamPolicy' => [
  261. 'path' => 'v1/{+resource}:getIamPolicy',
  262. 'httpMethod' => 'POST',
  263. 'parameters' => [
  264. 'resource' => [
  265. 'location' => 'path',
  266. 'type' => 'string',
  267. 'required' => true,
  268. ],
  269. ],
  270. ],'list' => [
  271. 'path' => 'v1/{+parent}/services',
  272. 'httpMethod' => 'GET',
  273. 'parameters' => [
  274. 'parent' => [
  275. 'location' => 'path',
  276. 'type' => 'string',
  277. 'required' => true,
  278. ],
  279. 'filter' => [
  280. 'location' => 'query',
  281. 'type' => 'string',
  282. ],
  283. 'orderBy' => [
  284. 'location' => 'query',
  285. 'type' => 'string',
  286. ],
  287. 'pageSize' => [
  288. 'location' => 'query',
  289. 'type' => 'integer',
  290. ],
  291. 'pageToken' => [
  292. 'location' => 'query',
  293. 'type' => 'string',
  294. ],
  295. ],
  296. ],'patch' => [
  297. 'path' => 'v1/{+name}',
  298. 'httpMethod' => 'PATCH',
  299. 'parameters' => [
  300. 'name' => [
  301. 'location' => 'path',
  302. 'type' => 'string',
  303. 'required' => true,
  304. ],
  305. 'updateMask' => [
  306. 'location' => 'query',
  307. 'type' => 'string',
  308. ],
  309. ],
  310. ],'resolve' => [
  311. 'path' => 'v1/{+name}:resolve',
  312. 'httpMethod' => 'POST',
  313. 'parameters' => [
  314. 'name' => [
  315. 'location' => 'path',
  316. 'type' => 'string',
  317. 'required' => true,
  318. ],
  319. ],
  320. ],'setIamPolicy' => [
  321. 'path' => 'v1/{+resource}:setIamPolicy',
  322. 'httpMethod' => 'POST',
  323. 'parameters' => [
  324. 'resource' => [
  325. 'location' => 'path',
  326. 'type' => 'string',
  327. 'required' => true,
  328. ],
  329. ],
  330. ],'testIamPermissions' => [
  331. 'path' => 'v1/{+resource}:testIamPermissions',
  332. 'httpMethod' => 'POST',
  333. 'parameters' => [
  334. 'resource' => [
  335. 'location' => 'path',
  336. 'type' => 'string',
  337. 'required' => true,
  338. ],
  339. ],
  340. ],
  341. ]
  342. ]
  343. );
  344. $this->projects_locations_namespaces_services_endpoints = new ServiceDirectory\Resource\ProjectsLocationsNamespacesServicesEndpoints(
  345. $this,
  346. $this->serviceName,
  347. 'endpoints',
  348. [
  349. 'methods' => [
  350. 'create' => [
  351. 'path' => 'v1/{+parent}/endpoints',
  352. 'httpMethod' => 'POST',
  353. 'parameters' => [
  354. 'parent' => [
  355. 'location' => 'path',
  356. 'type' => 'string',
  357. 'required' => true,
  358. ],
  359. 'endpointId' => [
  360. 'location' => 'query',
  361. 'type' => 'string',
  362. ],
  363. ],
  364. ],'delete' => [
  365. 'path' => 'v1/{+name}',
  366. 'httpMethod' => 'DELETE',
  367. 'parameters' => [
  368. 'name' => [
  369. 'location' => 'path',
  370. 'type' => 'string',
  371. 'required' => true,
  372. ],
  373. ],
  374. ],'get' => [
  375. 'path' => 'v1/{+name}',
  376. 'httpMethod' => 'GET',
  377. 'parameters' => [
  378. 'name' => [
  379. 'location' => 'path',
  380. 'type' => 'string',
  381. 'required' => true,
  382. ],
  383. ],
  384. ],'list' => [
  385. 'path' => 'v1/{+parent}/endpoints',
  386. 'httpMethod' => 'GET',
  387. 'parameters' => [
  388. 'parent' => [
  389. 'location' => 'path',
  390. 'type' => 'string',
  391. 'required' => true,
  392. ],
  393. 'filter' => [
  394. 'location' => 'query',
  395. 'type' => 'string',
  396. ],
  397. 'orderBy' => [
  398. 'location' => 'query',
  399. 'type' => 'string',
  400. ],
  401. 'pageSize' => [
  402. 'location' => 'query',
  403. 'type' => 'integer',
  404. ],
  405. 'pageToken' => [
  406. 'location' => 'query',
  407. 'type' => 'string',
  408. ],
  409. ],
  410. ],'patch' => [
  411. 'path' => 'v1/{+name}',
  412. 'httpMethod' => 'PATCH',
  413. 'parameters' => [
  414. 'name' => [
  415. 'location' => 'path',
  416. 'type' => 'string',
  417. 'required' => true,
  418. ],
  419. 'updateMask' => [
  420. 'location' => 'query',
  421. 'type' => 'string',
  422. ],
  423. ],
  424. ],
  425. ]
  426. ]
  427. );
  428. }
  429. }
  430. // Adding a class alias for backwards compatibility with the previous class name.
  431. class_alias(ServiceDirectory::class, 'Google_Service_ServiceDirectory');