CloudFilestore.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 CloudFilestore (v1).
  21. *
  22. * <p>
  23. * The Cloud Filestore API is used for creating and managing cloud file servers.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/filestore/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class CloudFilestore 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_backups;
  39. public $projects_locations_instances;
  40. public $projects_locations_instances_snapshots;
  41. public $projects_locations_operations;
  42. /**
  43. * Constructs the internal representation of the CloudFilestore 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://file.googleapis.com/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1';
  56. $this->serviceName = 'file';
  57. $this->projects_locations = new CloudFilestore\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. 'includeUnrevealedLocations' => [
  87. 'location' => 'query',
  88. 'type' => 'boolean',
  89. ],
  90. 'pageSize' => [
  91. 'location' => 'query',
  92. 'type' => 'integer',
  93. ],
  94. 'pageToken' => [
  95. 'location' => 'query',
  96. 'type' => 'string',
  97. ],
  98. ],
  99. ],
  100. ]
  101. ]
  102. );
  103. $this->projects_locations_backups = new CloudFilestore\Resource\ProjectsLocationsBackups(
  104. $this,
  105. $this->serviceName,
  106. 'backups',
  107. [
  108. 'methods' => [
  109. 'create' => [
  110. 'path' => 'v1/{+parent}/backups',
  111. 'httpMethod' => 'POST',
  112. 'parameters' => [
  113. 'parent' => [
  114. 'location' => 'path',
  115. 'type' => 'string',
  116. 'required' => true,
  117. ],
  118. 'backupId' => [
  119. 'location' => 'query',
  120. 'type' => 'string',
  121. ],
  122. ],
  123. ],'delete' => [
  124. 'path' => 'v1/{+name}',
  125. 'httpMethod' => 'DELETE',
  126. 'parameters' => [
  127. 'name' => [
  128. 'location' => 'path',
  129. 'type' => 'string',
  130. 'required' => true,
  131. ],
  132. ],
  133. ],'get' => [
  134. 'path' => 'v1/{+name}',
  135. 'httpMethod' => 'GET',
  136. 'parameters' => [
  137. 'name' => [
  138. 'location' => 'path',
  139. 'type' => 'string',
  140. 'required' => true,
  141. ],
  142. ],
  143. ],'list' => [
  144. 'path' => 'v1/{+parent}/backups',
  145. 'httpMethod' => 'GET',
  146. 'parameters' => [
  147. 'parent' => [
  148. 'location' => 'path',
  149. 'type' => 'string',
  150. 'required' => true,
  151. ],
  152. 'filter' => [
  153. 'location' => 'query',
  154. 'type' => 'string',
  155. ],
  156. 'orderBy' => [
  157. 'location' => 'query',
  158. 'type' => 'string',
  159. ],
  160. 'pageSize' => [
  161. 'location' => 'query',
  162. 'type' => 'integer',
  163. ],
  164. 'pageToken' => [
  165. 'location' => 'query',
  166. 'type' => 'string',
  167. ],
  168. ],
  169. ],'patch' => [
  170. 'path' => 'v1/{+name}',
  171. 'httpMethod' => 'PATCH',
  172. 'parameters' => [
  173. 'name' => [
  174. 'location' => 'path',
  175. 'type' => 'string',
  176. 'required' => true,
  177. ],
  178. 'updateMask' => [
  179. 'location' => 'query',
  180. 'type' => 'string',
  181. ],
  182. ],
  183. ],
  184. ]
  185. ]
  186. );
  187. $this->projects_locations_instances = new CloudFilestore\Resource\ProjectsLocationsInstances(
  188. $this,
  189. $this->serviceName,
  190. 'instances',
  191. [
  192. 'methods' => [
  193. 'create' => [
  194. 'path' => 'v1/{+parent}/instances',
  195. 'httpMethod' => 'POST',
  196. 'parameters' => [
  197. 'parent' => [
  198. 'location' => 'path',
  199. 'type' => 'string',
  200. 'required' => true,
  201. ],
  202. 'instanceId' => [
  203. 'location' => 'query',
  204. 'type' => 'string',
  205. ],
  206. ],
  207. ],'delete' => [
  208. 'path' => 'v1/{+name}',
  209. 'httpMethod' => 'DELETE',
  210. 'parameters' => [
  211. 'name' => [
  212. 'location' => 'path',
  213. 'type' => 'string',
  214. 'required' => true,
  215. ],
  216. 'force' => [
  217. 'location' => 'query',
  218. 'type' => 'boolean',
  219. ],
  220. ],
  221. ],'get' => [
  222. 'path' => 'v1/{+name}',
  223. 'httpMethod' => 'GET',
  224. 'parameters' => [
  225. 'name' => [
  226. 'location' => 'path',
  227. 'type' => 'string',
  228. 'required' => true,
  229. ],
  230. ],
  231. ],'list' => [
  232. 'path' => 'v1/{+parent}/instances',
  233. 'httpMethod' => 'GET',
  234. 'parameters' => [
  235. 'parent' => [
  236. 'location' => 'path',
  237. 'type' => 'string',
  238. 'required' => true,
  239. ],
  240. 'filter' => [
  241. 'location' => 'query',
  242. 'type' => 'string',
  243. ],
  244. 'orderBy' => [
  245. 'location' => 'query',
  246. 'type' => 'string',
  247. ],
  248. 'pageSize' => [
  249. 'location' => 'query',
  250. 'type' => 'integer',
  251. ],
  252. 'pageToken' => [
  253. 'location' => 'query',
  254. 'type' => 'string',
  255. ],
  256. ],
  257. ],'patch' => [
  258. 'path' => 'v1/{+name}',
  259. 'httpMethod' => 'PATCH',
  260. 'parameters' => [
  261. 'name' => [
  262. 'location' => 'path',
  263. 'type' => 'string',
  264. 'required' => true,
  265. ],
  266. 'updateMask' => [
  267. 'location' => 'query',
  268. 'type' => 'string',
  269. ],
  270. ],
  271. ],'restore' => [
  272. 'path' => 'v1/{+name}:restore',
  273. 'httpMethod' => 'POST',
  274. 'parameters' => [
  275. 'name' => [
  276. 'location' => 'path',
  277. 'type' => 'string',
  278. 'required' => true,
  279. ],
  280. ],
  281. ],
  282. ]
  283. ]
  284. );
  285. $this->projects_locations_instances_snapshots = new CloudFilestore\Resource\ProjectsLocationsInstancesSnapshots(
  286. $this,
  287. $this->serviceName,
  288. 'snapshots',
  289. [
  290. 'methods' => [
  291. 'create' => [
  292. 'path' => 'v1/{+parent}/snapshots',
  293. 'httpMethod' => 'POST',
  294. 'parameters' => [
  295. 'parent' => [
  296. 'location' => 'path',
  297. 'type' => 'string',
  298. 'required' => true,
  299. ],
  300. 'snapshotId' => [
  301. 'location' => 'query',
  302. 'type' => 'string',
  303. ],
  304. ],
  305. ],'delete' => [
  306. 'path' => 'v1/{+name}',
  307. 'httpMethod' => 'DELETE',
  308. 'parameters' => [
  309. 'name' => [
  310. 'location' => 'path',
  311. 'type' => 'string',
  312. 'required' => true,
  313. ],
  314. ],
  315. ],'get' => [
  316. 'path' => 'v1/{+name}',
  317. 'httpMethod' => 'GET',
  318. 'parameters' => [
  319. 'name' => [
  320. 'location' => 'path',
  321. 'type' => 'string',
  322. 'required' => true,
  323. ],
  324. ],
  325. ],'list' => [
  326. 'path' => 'v1/{+parent}/snapshots',
  327. 'httpMethod' => 'GET',
  328. 'parameters' => [
  329. 'parent' => [
  330. 'location' => 'path',
  331. 'type' => 'string',
  332. 'required' => true,
  333. ],
  334. 'filter' => [
  335. 'location' => 'query',
  336. 'type' => 'string',
  337. ],
  338. 'orderBy' => [
  339. 'location' => 'query',
  340. 'type' => 'string',
  341. ],
  342. 'pageSize' => [
  343. 'location' => 'query',
  344. 'type' => 'integer',
  345. ],
  346. 'pageToken' => [
  347. 'location' => 'query',
  348. 'type' => 'string',
  349. ],
  350. ],
  351. ],'patch' => [
  352. 'path' => 'v1/{+name}',
  353. 'httpMethod' => 'PATCH',
  354. 'parameters' => [
  355. 'name' => [
  356. 'location' => 'path',
  357. 'type' => 'string',
  358. 'required' => true,
  359. ],
  360. 'updateMask' => [
  361. 'location' => 'query',
  362. 'type' => 'string',
  363. ],
  364. ],
  365. ],
  366. ]
  367. ]
  368. );
  369. $this->projects_locations_operations = new CloudFilestore\Resource\ProjectsLocationsOperations(
  370. $this,
  371. $this->serviceName,
  372. 'operations',
  373. [
  374. 'methods' => [
  375. 'cancel' => [
  376. 'path' => 'v1/{+name}:cancel',
  377. 'httpMethod' => 'POST',
  378. 'parameters' => [
  379. 'name' => [
  380. 'location' => 'path',
  381. 'type' => 'string',
  382. 'required' => true,
  383. ],
  384. ],
  385. ],'delete' => [
  386. 'path' => 'v1/{+name}',
  387. 'httpMethod' => 'DELETE',
  388. 'parameters' => [
  389. 'name' => [
  390. 'location' => 'path',
  391. 'type' => 'string',
  392. 'required' => true,
  393. ],
  394. ],
  395. ],'get' => [
  396. 'path' => 'v1/{+name}',
  397. 'httpMethod' => 'GET',
  398. 'parameters' => [
  399. 'name' => [
  400. 'location' => 'path',
  401. 'type' => 'string',
  402. 'required' => true,
  403. ],
  404. ],
  405. ],'list' => [
  406. 'path' => 'v1/{+name}/operations',
  407. 'httpMethod' => 'GET',
  408. 'parameters' => [
  409. 'name' => [
  410. 'location' => 'path',
  411. 'type' => 'string',
  412. 'required' => true,
  413. ],
  414. 'filter' => [
  415. 'location' => 'query',
  416. 'type' => 'string',
  417. ],
  418. 'pageSize' => [
  419. 'location' => 'query',
  420. 'type' => 'integer',
  421. ],
  422. 'pageToken' => [
  423. 'location' => 'query',
  424. 'type' => 'string',
  425. ],
  426. ],
  427. ],
  428. ]
  429. ]
  430. );
  431. }
  432. }
  433. // Adding a class alias for backwards compatibility with the previous class name.
  434. class_alias(CloudFilestore::class, 'Google_Service_CloudFilestore');