PageRenderTime 66ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 1ms

/htdocs/xampp/src/contrib/Google_ComputeService.php

https://bitbucket.org/adarshj/convenient_website
PHP | 2629 lines | 2080 code | 72 blank | 477 comment | 74 complexity | fb9b77fb21dcd4b0482bff282a19d890 MD5 | raw file
Possible License(s): Apache-2.0, MPL-2.0-no-copyleft-exception, LGPL-2.1, BSD-2-Clause, GPL-2.0, LGPL-3.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  4. * use this file except in compliance with the License. You may obtain a copy of
  5. * the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. * License for the specific language governing permissions and limitations under
  13. * the License.
  14. */
  15. /**
  16. * The "operations" collection of methods.
  17. * Typical usage is:
  18. * <code>
  19. * $computeService = new Google_ComputeService(...);
  20. * $operations = $computeService->operations;
  21. * </code>
  22. */
  23. class Google_OperationsServiceResource extends Google_ServiceResource {
  24. /**
  25. * Retrieves the specified operation resource. (operations.get)
  26. *
  27. * @param string $project Name of the project scoping this request.
  28. * @param string $operation Name of the operation resource to return.
  29. * @param array $optParams Optional parameters.
  30. * @return Google_Operation
  31. */
  32. public function get($project, $operation, $optParams = array()) {
  33. $params = array('project' => $project, 'operation' => $operation);
  34. $params = array_merge($params, $optParams);
  35. $data = $this->__call('get', array($params));
  36. if ($this->useObjects()) {
  37. return new Google_Operation($data);
  38. } else {
  39. return $data;
  40. }
  41. }
  42. /**
  43. * Retrieves the list of operation resources contained within the specified project.
  44. * (operations.list)
  45. *
  46. * @param string $project Name of the project scoping this request.
  47. * @param array $optParams Optional parameters.
  48. *
  49. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  50. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  51. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  52. * @return Google_OperationList
  53. */
  54. public function listOperations($project, $optParams = array()) {
  55. $params = array('project' => $project);
  56. $params = array_merge($params, $optParams);
  57. $data = $this->__call('list', array($params));
  58. if ($this->useObjects()) {
  59. return new Google_OperationList($data);
  60. } else {
  61. return $data;
  62. }
  63. }
  64. /**
  65. * Deletes the specified operation resource. (operations.delete)
  66. *
  67. * @param string $project Name of the project scoping this request.
  68. * @param string $operation Name of the operation resource to delete.
  69. * @param array $optParams Optional parameters.
  70. */
  71. public function delete($project, $operation, $optParams = array()) {
  72. $params = array('project' => $project, 'operation' => $operation);
  73. $params = array_merge($params, $optParams);
  74. $data = $this->__call('delete', array($params));
  75. return $data;
  76. }
  77. }
  78. /**
  79. * The "kernels" collection of methods.
  80. * Typical usage is:
  81. * <code>
  82. * $computeService = new Google_ComputeService(...);
  83. * $kernels = $computeService->kernels;
  84. * </code>
  85. */
  86. class Google_KernelsServiceResource extends Google_ServiceResource {
  87. /**
  88. * Retrieves the list of kernel resources available to the specified project. (kernels.list)
  89. *
  90. * @param string $project Name of the project scoping this request.
  91. * @param array $optParams Optional parameters.
  92. *
  93. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  94. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  95. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  96. * @return Google_KernelList
  97. */
  98. public function listKernels($project, $optParams = array()) {
  99. $params = array('project' => $project);
  100. $params = array_merge($params, $optParams);
  101. $data = $this->__call('list', array($params));
  102. if ($this->useObjects()) {
  103. return new Google_KernelList($data);
  104. } else {
  105. return $data;
  106. }
  107. }
  108. /**
  109. * Returns the specified kernel resource. (kernels.get)
  110. *
  111. * @param string $project Name of the project scoping this request.
  112. * @param string $kernel Name of the kernel resource to return.
  113. * @param array $optParams Optional parameters.
  114. * @return Google_Kernel
  115. */
  116. public function get($project, $kernel, $optParams = array()) {
  117. $params = array('project' => $project, 'kernel' => $kernel);
  118. $params = array_merge($params, $optParams);
  119. $data = $this->__call('get', array($params));
  120. if ($this->useObjects()) {
  121. return new Google_Kernel($data);
  122. } else {
  123. return $data;
  124. }
  125. }
  126. }
  127. /**
  128. * The "disks" collection of methods.
  129. * Typical usage is:
  130. * <code>
  131. * $computeService = new Google_ComputeService(...);
  132. * $disks = $computeService->disks;
  133. * </code>
  134. */
  135. class Google_DisksServiceResource extends Google_ServiceResource {
  136. /**
  137. * Creates a persistent disk resource in the specified project using the data included in the
  138. * request. (disks.insert)
  139. *
  140. * @param string $project Name of the project scoping this request.
  141. * @param Google_Disk $postBody
  142. * @param array $optParams Optional parameters.
  143. * @return Google_Operation
  144. */
  145. public function insert($project, Google_Disk $postBody, $optParams = array()) {
  146. $params = array('project' => $project, 'postBody' => $postBody);
  147. $params = array_merge($params, $optParams);
  148. $data = $this->__call('insert', array($params));
  149. if ($this->useObjects()) {
  150. return new Google_Operation($data);
  151. } else {
  152. return $data;
  153. }
  154. }
  155. /**
  156. * Returns the specified persistent disk resource. (disks.get)
  157. *
  158. * @param string $project Name of the project scoping this request.
  159. * @param string $disk Name of the persistent disk resource to return.
  160. * @param array $optParams Optional parameters.
  161. * @return Google_Disk
  162. */
  163. public function get($project, $disk, $optParams = array()) {
  164. $params = array('project' => $project, 'disk' => $disk);
  165. $params = array_merge($params, $optParams);
  166. $data = $this->__call('get', array($params));
  167. if ($this->useObjects()) {
  168. return new Google_Disk($data);
  169. } else {
  170. return $data;
  171. }
  172. }
  173. /**
  174. * Retrieves the list of persistent disk resources contained within the specified project.
  175. * (disks.list)
  176. *
  177. * @param string $project Name of the project scoping this request.
  178. * @param array $optParams Optional parameters.
  179. *
  180. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  181. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  182. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  183. * @return Google_DiskList
  184. */
  185. public function listDisks($project, $optParams = array()) {
  186. $params = array('project' => $project);
  187. $params = array_merge($params, $optParams);
  188. $data = $this->__call('list', array($params));
  189. if ($this->useObjects()) {
  190. return new Google_DiskList($data);
  191. } else {
  192. return $data;
  193. }
  194. }
  195. /**
  196. * Deletes the specified persistent disk resource. (disks.delete)
  197. *
  198. * @param string $project Name of the project scoping this request.
  199. * @param string $disk Name of the persistent disk resource to delete.
  200. * @param array $optParams Optional parameters.
  201. * @return Google_Operation
  202. */
  203. public function delete($project, $disk, $optParams = array()) {
  204. $params = array('project' => $project, 'disk' => $disk);
  205. $params = array_merge($params, $optParams);
  206. $data = $this->__call('delete', array($params));
  207. if ($this->useObjects()) {
  208. return new Google_Operation($data);
  209. } else {
  210. return $data;
  211. }
  212. }
  213. }
  214. /**
  215. * The "snapshots" collection of methods.
  216. * Typical usage is:
  217. * <code>
  218. * $computeService = new Google_ComputeService(...);
  219. * $snapshots = $computeService->snapshots;
  220. * </code>
  221. */
  222. class Google_SnapshotsServiceResource extends Google_ServiceResource {
  223. /**
  224. * Creates a persistent disk snapshot resource in the specified project using the data included in
  225. * the request. (snapshots.insert)
  226. *
  227. * @param string $project Name of the project scoping this request.
  228. * @param Google_Snapshot $postBody
  229. * @param array $optParams Optional parameters.
  230. * @return Google_Operation
  231. */
  232. public function insert($project, Google_Snapshot $postBody, $optParams = array()) {
  233. $params = array('project' => $project, 'postBody' => $postBody);
  234. $params = array_merge($params, $optParams);
  235. $data = $this->__call('insert', array($params));
  236. if ($this->useObjects()) {
  237. return new Google_Operation($data);
  238. } else {
  239. return $data;
  240. }
  241. }
  242. /**
  243. * Returns the specified persistent disk snapshot resource. (snapshots.get)
  244. *
  245. * @param string $project Name of the project scoping this request.
  246. * @param string $snapshot Name of the persistent disk snapshot resource to return.
  247. * @param array $optParams Optional parameters.
  248. * @return Google_Snapshot
  249. */
  250. public function get($project, $snapshot, $optParams = array()) {
  251. $params = array('project' => $project, 'snapshot' => $snapshot);
  252. $params = array_merge($params, $optParams);
  253. $data = $this->__call('get', array($params));
  254. if ($this->useObjects()) {
  255. return new Google_Snapshot($data);
  256. } else {
  257. return $data;
  258. }
  259. }
  260. /**
  261. * Retrieves the list of persistent disk snapshot resources contained within the specified project.
  262. * (snapshots.list)
  263. *
  264. * @param string $project Name of the project scoping this request.
  265. * @param array $optParams Optional parameters.
  266. *
  267. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  268. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  269. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  270. * @return Google_SnapshotList
  271. */
  272. public function listSnapshots($project, $optParams = array()) {
  273. $params = array('project' => $project);
  274. $params = array_merge($params, $optParams);
  275. $data = $this->__call('list', array($params));
  276. if ($this->useObjects()) {
  277. return new Google_SnapshotList($data);
  278. } else {
  279. return $data;
  280. }
  281. }
  282. /**
  283. * Deletes the specified persistent disk snapshot resource. (snapshots.delete)
  284. *
  285. * @param string $project Name of the project scoping this request.
  286. * @param string $snapshot Name of the persistent disk snapshot resource to delete.
  287. * @param array $optParams Optional parameters.
  288. * @return Google_Operation
  289. */
  290. public function delete($project, $snapshot, $optParams = array()) {
  291. $params = array('project' => $project, 'snapshot' => $snapshot);
  292. $params = array_merge($params, $optParams);
  293. $data = $this->__call('delete', array($params));
  294. if ($this->useObjects()) {
  295. return new Google_Operation($data);
  296. } else {
  297. return $data;
  298. }
  299. }
  300. }
  301. /**
  302. * The "zones" collection of methods.
  303. * Typical usage is:
  304. * <code>
  305. * $computeService = new Google_ComputeService(...);
  306. * $zones = $computeService->zones;
  307. * </code>
  308. */
  309. class Google_ZonesServiceResource extends Google_ServiceResource {
  310. /**
  311. * Retrieves the list of zone resources available to the specified project. (zones.list)
  312. *
  313. * @param string $project Name of the project scoping this request.
  314. * @param array $optParams Optional parameters.
  315. *
  316. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  317. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  318. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  319. * @return Google_ZoneList
  320. */
  321. public function listZones($project, $optParams = array()) {
  322. $params = array('project' => $project);
  323. $params = array_merge($params, $optParams);
  324. $data = $this->__call('list', array($params));
  325. if ($this->useObjects()) {
  326. return new Google_ZoneList($data);
  327. } else {
  328. return $data;
  329. }
  330. }
  331. /**
  332. * Returns the specified zone resource. (zones.get)
  333. *
  334. * @param string $project Name of the project scoping this request.
  335. * @param string $zone Name of the zone resource to return.
  336. * @param array $optParams Optional parameters.
  337. * @return Google_Zone
  338. */
  339. public function get($project, $zone, $optParams = array()) {
  340. $params = array('project' => $project, 'zone' => $zone);
  341. $params = array_merge($params, $optParams);
  342. $data = $this->__call('get', array($params));
  343. if ($this->useObjects()) {
  344. return new Google_Zone($data);
  345. } else {
  346. return $data;
  347. }
  348. }
  349. }
  350. /**
  351. * The "instances" collection of methods.
  352. * Typical usage is:
  353. * <code>
  354. * $computeService = new Google_ComputeService(...);
  355. * $instances = $computeService->instances;
  356. * </code>
  357. */
  358. class Google_InstancesServiceResource extends Google_ServiceResource {
  359. /**
  360. * Creates an instance resource in the specified project using the data included in the request.
  361. * (instances.insert)
  362. *
  363. * @param string $project Name of the project scoping this request.
  364. * @param Google_Instance $postBody
  365. * @param array $optParams Optional parameters.
  366. * @return Google_Operation
  367. */
  368. public function insert($project, Google_Instance $postBody, $optParams = array()) {
  369. $params = array('project' => $project, 'postBody' => $postBody);
  370. $params = array_merge($params, $optParams);
  371. $data = $this->__call('insert', array($params));
  372. if ($this->useObjects()) {
  373. return new Google_Operation($data);
  374. } else {
  375. return $data;
  376. }
  377. }
  378. /**
  379. * Deletes an access config from an instance's network interface. (instances.deleteAccessConfig)
  380. *
  381. * @param string $project Project name.
  382. * @param string $instance Instance name.
  383. * @param string $access_config Access config name.
  384. * @param string $network_interface Network interface name.
  385. * @param array $optParams Optional parameters.
  386. * @return Google_Operation
  387. */
  388. public function deleteAccessConfig($project, $instance, $access_config, $network_interface, $optParams = array()) {
  389. $params = array('project' => $project, 'instance' => $instance, 'access_config' => $access_config, 'network_interface' => $network_interface);
  390. $params = array_merge($params, $optParams);
  391. $data = $this->__call('deleteAccessConfig', array($params));
  392. if ($this->useObjects()) {
  393. return new Google_Operation($data);
  394. } else {
  395. return $data;
  396. }
  397. }
  398. /**
  399. * Returns the specified instance resource. (instances.get)
  400. *
  401. * @param string $project Name of the project scoping this request.
  402. * @param string $instance Name of the instance resource to return.
  403. * @param array $optParams Optional parameters.
  404. * @return Google_Instance
  405. */
  406. public function get($project, $instance, $optParams = array()) {
  407. $params = array('project' => $project, 'instance' => $instance);
  408. $params = array_merge($params, $optParams);
  409. $data = $this->__call('get', array($params));
  410. if ($this->useObjects()) {
  411. return new Google_Instance($data);
  412. } else {
  413. return $data;
  414. }
  415. }
  416. /**
  417. * Retrieves the list of instance resources contained within the specified project. (instances.list)
  418. *
  419. * @param string $project Name of the project scoping this request.
  420. * @param array $optParams Optional parameters.
  421. *
  422. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  423. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  424. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  425. * @return Google_InstanceList
  426. */
  427. public function listInstances($project, $optParams = array()) {
  428. $params = array('project' => $project);
  429. $params = array_merge($params, $optParams);
  430. $data = $this->__call('list', array($params));
  431. if ($this->useObjects()) {
  432. return new Google_InstanceList($data);
  433. } else {
  434. return $data;
  435. }
  436. }
  437. /**
  438. * Adds an access config to an instance's network interface. (instances.addAccessConfig)
  439. *
  440. * @param string $project Project name.
  441. * @param string $instance Instance name.
  442. * @param string $network_interface Network interface name.
  443. * @param Google_AccessConfig $postBody
  444. * @param array $optParams Optional parameters.
  445. * @return Google_Operation
  446. */
  447. public function addAccessConfig($project, $instance, $network_interface, Google_AccessConfig $postBody, $optParams = array()) {
  448. $params = array('project' => $project, 'instance' => $instance, 'network_interface' => $network_interface, 'postBody' => $postBody);
  449. $params = array_merge($params, $optParams);
  450. $data = $this->__call('addAccessConfig', array($params));
  451. if ($this->useObjects()) {
  452. return new Google_Operation($data);
  453. } else {
  454. return $data;
  455. }
  456. }
  457. /**
  458. * Deletes the specified instance resource. (instances.delete)
  459. *
  460. * @param string $project Name of the project scoping this request.
  461. * @param string $instance Name of the instance resource to delete.
  462. * @param array $optParams Optional parameters.
  463. * @return Google_Operation
  464. */
  465. public function delete($project, $instance, $optParams = array()) {
  466. $params = array('project' => $project, 'instance' => $instance);
  467. $params = array_merge($params, $optParams);
  468. $data = $this->__call('delete', array($params));
  469. if ($this->useObjects()) {
  470. return new Google_Operation($data);
  471. } else {
  472. return $data;
  473. }
  474. }
  475. }
  476. /**
  477. * The "machineTypes" collection of methods.
  478. * Typical usage is:
  479. * <code>
  480. * $computeService = new Google_ComputeService(...);
  481. * $machineTypes = $computeService->machineTypes;
  482. * </code>
  483. */
  484. class Google_MachineTypesServiceResource extends Google_ServiceResource {
  485. /**
  486. * Retrieves the list of machine type resources available to the specified project.
  487. * (machineTypes.list)
  488. *
  489. * @param string $project Name of the project scoping this request.
  490. * @param array $optParams Optional parameters.
  491. *
  492. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  493. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  494. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  495. * @return Google_MachineTypeList
  496. */
  497. public function listMachineTypes($project, $optParams = array()) {
  498. $params = array('project' => $project);
  499. $params = array_merge($params, $optParams);
  500. $data = $this->__call('list', array($params));
  501. if ($this->useObjects()) {
  502. return new Google_MachineTypeList($data);
  503. } else {
  504. return $data;
  505. }
  506. }
  507. /**
  508. * Returns the specified machine type resource. (machineTypes.get)
  509. *
  510. * @param string $project Name of the project scoping this request.
  511. * @param string $machineType Name of the machine type resource to return.
  512. * @param array $optParams Optional parameters.
  513. * @return Google_MachineType
  514. */
  515. public function get($project, $machineType, $optParams = array()) {
  516. $params = array('project' => $project, 'machineType' => $machineType);
  517. $params = array_merge($params, $optParams);
  518. $data = $this->__call('get', array($params));
  519. if ($this->useObjects()) {
  520. return new Google_MachineType($data);
  521. } else {
  522. return $data;
  523. }
  524. }
  525. }
  526. /**
  527. * The "images" collection of methods.
  528. * Typical usage is:
  529. * <code>
  530. * $computeService = new Google_ComputeService(...);
  531. * $images = $computeService->images;
  532. * </code>
  533. */
  534. class Google_ImagesServiceResource extends Google_ServiceResource {
  535. /**
  536. * Creates an image resource in the specified project using the data included in the request.
  537. * (images.insert)
  538. *
  539. * @param string $project Name of the project scoping this request.
  540. * @param Google_Image $postBody
  541. * @param array $optParams Optional parameters.
  542. * @return Google_Operation
  543. */
  544. public function insert($project, Google_Image $postBody, $optParams = array()) {
  545. $params = array('project' => $project, 'postBody' => $postBody);
  546. $params = array_merge($params, $optParams);
  547. $data = $this->__call('insert', array($params));
  548. if ($this->useObjects()) {
  549. return new Google_Operation($data);
  550. } else {
  551. return $data;
  552. }
  553. }
  554. /**
  555. * Returns the specified image resource. (images.get)
  556. *
  557. * @param string $project Name of the project scoping this request.
  558. * @param string $image Name of the image resource to return.
  559. * @param array $optParams Optional parameters.
  560. * @return Google_Image
  561. */
  562. public function get($project, $image, $optParams = array()) {
  563. $params = array('project' => $project, 'image' => $image);
  564. $params = array_merge($params, $optParams);
  565. $data = $this->__call('get', array($params));
  566. if ($this->useObjects()) {
  567. return new Google_Image($data);
  568. } else {
  569. return $data;
  570. }
  571. }
  572. /**
  573. * Retrieves the list of image resources available to the specified project. (images.list)
  574. *
  575. * @param string $project Name of the project scoping this request.
  576. * @param array $optParams Optional parameters.
  577. *
  578. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  579. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  580. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  581. * @return Google_ImageList
  582. */
  583. public function listImages($project, $optParams = array()) {
  584. $params = array('project' => $project);
  585. $params = array_merge($params, $optParams);
  586. $data = $this->__call('list', array($params));
  587. if ($this->useObjects()) {
  588. return new Google_ImageList($data);
  589. } else {
  590. return $data;
  591. }
  592. }
  593. /**
  594. * Deletes the specified image resource. (images.delete)
  595. *
  596. * @param string $project Name of the project scoping this request.
  597. * @param string $image Name of the image resource to delete.
  598. * @param array $optParams Optional parameters.
  599. * @return Google_Operation
  600. */
  601. public function delete($project, $image, $optParams = array()) {
  602. $params = array('project' => $project, 'image' => $image);
  603. $params = array_merge($params, $optParams);
  604. $data = $this->__call('delete', array($params));
  605. if ($this->useObjects()) {
  606. return new Google_Operation($data);
  607. } else {
  608. return $data;
  609. }
  610. }
  611. }
  612. /**
  613. * The "firewalls" collection of methods.
  614. * Typical usage is:
  615. * <code>
  616. * $computeService = new Google_ComputeService(...);
  617. * $firewalls = $computeService->firewalls;
  618. * </code>
  619. */
  620. class Google_FirewallsServiceResource extends Google_ServiceResource {
  621. /**
  622. * Creates a firewall resource in the specified project using the data included in the request.
  623. * (firewalls.insert)
  624. *
  625. * @param string $project Name of the project scoping this request.
  626. * @param Google_Firewall $postBody
  627. * @param array $optParams Optional parameters.
  628. * @return Google_Operation
  629. */
  630. public function insert($project, Google_Firewall $postBody, $optParams = array()) {
  631. $params = array('project' => $project, 'postBody' => $postBody);
  632. $params = array_merge($params, $optParams);
  633. $data = $this->__call('insert', array($params));
  634. if ($this->useObjects()) {
  635. return new Google_Operation($data);
  636. } else {
  637. return $data;
  638. }
  639. }
  640. /**
  641. * Returns the specified firewall resource. (firewalls.get)
  642. *
  643. * @param string $project Name of the project scoping this request.
  644. * @param string $firewall Name of the firewall resource to return.
  645. * @param array $optParams Optional parameters.
  646. * @return Google_Firewall
  647. */
  648. public function get($project, $firewall, $optParams = array()) {
  649. $params = array('project' => $project, 'firewall' => $firewall);
  650. $params = array_merge($params, $optParams);
  651. $data = $this->__call('get', array($params));
  652. if ($this->useObjects()) {
  653. return new Google_Firewall($data);
  654. } else {
  655. return $data;
  656. }
  657. }
  658. /**
  659. * Retrieves the list of firewall resources available to the specified project. (firewalls.list)
  660. *
  661. * @param string $project Name of the project scoping this request.
  662. * @param array $optParams Optional parameters.
  663. *
  664. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  665. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  666. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  667. * @return Google_FirewallList
  668. */
  669. public function listFirewalls($project, $optParams = array()) {
  670. $params = array('project' => $project);
  671. $params = array_merge($params, $optParams);
  672. $data = $this->__call('list', array($params));
  673. if ($this->useObjects()) {
  674. return new Google_FirewallList($data);
  675. } else {
  676. return $data;
  677. }
  678. }
  679. /**
  680. * Updates the specified firewall resource with the data included in the request. (firewalls.update)
  681. *
  682. * @param string $project Name of the project scoping this request.
  683. * @param string $firewall Name of the firewall resource to update.
  684. * @param Google_Firewall $postBody
  685. * @param array $optParams Optional parameters.
  686. * @return Google_Operation
  687. */
  688. public function update($project, $firewall, Google_Firewall $postBody, $optParams = array()) {
  689. $params = array('project' => $project, 'firewall' => $firewall, 'postBody' => $postBody);
  690. $params = array_merge($params, $optParams);
  691. $data = $this->__call('update', array($params));
  692. if ($this->useObjects()) {
  693. return new Google_Operation($data);
  694. } else {
  695. return $data;
  696. }
  697. }
  698. /**
  699. * Updates the specified firewall resource with the data included in the request. This method
  700. * supports patch semantics. (firewalls.patch)
  701. *
  702. * @param string $project Name of the project scoping this request.
  703. * @param string $firewall Name of the firewall resource to update.
  704. * @param Google_Firewall $postBody
  705. * @param array $optParams Optional parameters.
  706. * @return Google_Operation
  707. */
  708. public function patch($project, $firewall, Google_Firewall $postBody, $optParams = array()) {
  709. $params = array('project' => $project, 'firewall' => $firewall, 'postBody' => $postBody);
  710. $params = array_merge($params, $optParams);
  711. $data = $this->__call('patch', array($params));
  712. if ($this->useObjects()) {
  713. return new Google_Operation($data);
  714. } else {
  715. return $data;
  716. }
  717. }
  718. /**
  719. * Deletes the specified firewall resource. (firewalls.delete)
  720. *
  721. * @param string $project Name of the project scoping this request.
  722. * @param string $firewall Name of the firewall resource to delete.
  723. * @param array $optParams Optional parameters.
  724. * @return Google_Operation
  725. */
  726. public function delete($project, $firewall, $optParams = array()) {
  727. $params = array('project' => $project, 'firewall' => $firewall);
  728. $params = array_merge($params, $optParams);
  729. $data = $this->__call('delete', array($params));
  730. if ($this->useObjects()) {
  731. return new Google_Operation($data);
  732. } else {
  733. return $data;
  734. }
  735. }
  736. }
  737. /**
  738. * The "networks" collection of methods.
  739. * Typical usage is:
  740. * <code>
  741. * $computeService = new Google_ComputeService(...);
  742. * $networks = $computeService->networks;
  743. * </code>
  744. */
  745. class Google_NetworksServiceResource extends Google_ServiceResource {
  746. /**
  747. * Creates a network resource in the specified project using the data included in the request.
  748. * (networks.insert)
  749. *
  750. * @param string $project Name of the project scoping this request.
  751. * @param Google_Network $postBody
  752. * @param array $optParams Optional parameters.
  753. * @return Google_Operation
  754. */
  755. public function insert($project, Google_Network $postBody, $optParams = array()) {
  756. $params = array('project' => $project, 'postBody' => $postBody);
  757. $params = array_merge($params, $optParams);
  758. $data = $this->__call('insert', array($params));
  759. if ($this->useObjects()) {
  760. return new Google_Operation($data);
  761. } else {
  762. return $data;
  763. }
  764. }
  765. /**
  766. * Returns the specified network resource. (networks.get)
  767. *
  768. * @param string $project Name of the project scoping this request.
  769. * @param string $network Name of the network resource to return.
  770. * @param array $optParams Optional parameters.
  771. * @return Google_Network
  772. */
  773. public function get($project, $network, $optParams = array()) {
  774. $params = array('project' => $project, 'network' => $network);
  775. $params = array_merge($params, $optParams);
  776. $data = $this->__call('get', array($params));
  777. if ($this->useObjects()) {
  778. return new Google_Network($data);
  779. } else {
  780. return $data;
  781. }
  782. }
  783. /**
  784. * Retrieves the list of network resources available to the specified project. (networks.list)
  785. *
  786. * @param string $project Name of the project scoping this request.
  787. * @param array $optParams Optional parameters.
  788. *
  789. * @opt_param string filter Optional. Filter expression for filtering listed resources.
  790. * @opt_param string pageToken Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
  791. * @opt_param string maxResults Optional. Maximum count of results to be returned. Maximum and default value is 100.
  792. * @return Google_NetworkList
  793. */
  794. public function listNetworks($project, $optParams = array()) {
  795. $params = array('project' => $project);
  796. $params = array_merge($params, $optParams);
  797. $data = $this->__call('list', array($params));
  798. if ($this->useObjects()) {
  799. return new Google_NetworkList($data);
  800. } else {
  801. return $data;
  802. }
  803. }
  804. /**
  805. * Deletes the specified network resource. (networks.delete)
  806. *
  807. * @param string $project Name of the project scoping this request.
  808. * @param string $network Name of the network resource to delete.
  809. * @param array $optParams Optional parameters.
  810. * @return Google_Operation
  811. */
  812. public function delete($project, $network, $optParams = array()) {
  813. $params = array('project' => $project, 'network' => $network);
  814. $params = array_merge($params, $optParams);
  815. $data = $this->__call('delete', array($params));
  816. if ($this->useObjects()) {
  817. return new Google_Operation($data);
  818. } else {
  819. return $data;
  820. }
  821. }
  822. }
  823. /**
  824. * The "projects" collection of methods.
  825. * Typical usage is:
  826. * <code>
  827. * $computeService = new Google_ComputeService(...);
  828. * $projects = $computeService->projects;
  829. * </code>
  830. */
  831. class Google_ProjectsServiceResource extends Google_ServiceResource {
  832. /**
  833. * Sets metadata common to all instances within the specified project using the data included in the
  834. * request. (projects.setCommonInstanceMetadata)
  835. *
  836. * @param string $project Name of the project scoping this request.
  837. * @param Google_Metadata $postBody
  838. * @param array $optParams Optional parameters.
  839. */
  840. public function setCommonInstanceMetadata($project, Google_Metadata $postBody, $optParams = array()) {
  841. $params = array('project' => $project, 'postBody' => $postBody);
  842. $params = array_merge($params, $optParams);
  843. $data = $this->__call('setCommonInstanceMetadata', array($params));
  844. return $data;
  845. }
  846. /**
  847. * Returns the specified project resource. (projects.get)
  848. *
  849. * @param string $project Name of the project resource to retrieve.
  850. * @param array $optParams Optional parameters.
  851. * @return Google_Project
  852. */
  853. public function get($project, $optParams = array()) {
  854. $params = array('project' => $project);
  855. $params = array_merge($params, $optParams);
  856. $data = $this->__call('get', array($params));
  857. if ($this->useObjects()) {
  858. return new Google_Project($data);
  859. } else {
  860. return $data;
  861. }
  862. }
  863. }
  864. /**
  865. * Service definition for Google_Compute (v1beta12).
  866. *
  867. * <p>
  868. * API for the Google Compute Engine service.
  869. * </p>
  870. *
  871. * <p>
  872. * For more information about this service, see the
  873. * <a href="https://developers.google.com/compute/docs/reference/v1beta12" target="_blank">API Documentation</a>
  874. * </p>
  875. *
  876. * @author Google, Inc.
  877. */
  878. class Google_ComputeService extends Google_Service {
  879. public $operations;
  880. public $kernels;
  881. public $disks;
  882. public $snapshots;
  883. public $zones;
  884. public $instances;
  885. public $machineTypes;
  886. public $images;
  887. public $firewalls;
  888. public $networks;
  889. public $projects;
  890. /**
  891. * Constructs the internal representation of the Compute service.
  892. *
  893. * @param Google_Client $client
  894. */
  895. public function __construct(Google_Client $client) {
  896. $this->servicePath = 'compute/v1beta12/projects/';
  897. $this->version = 'v1beta12';
  898. $this->serviceName = 'compute';
  899. $client->addService($this->serviceName, $this->version);
  900. $this->operations = new Google_OperationsServiceResource($this, $this->serviceName, 'operations', json_decode('{"methods": {"get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "operation": {"required": true, "type": "string", "location": "path"}}, "id": "compute.operations.get", "httpMethod": "GET", "path": "{project}/operations/{operation}", "response": {"$ref": "Operation"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.operations.list", "httpMethod": "GET", "path": "{project}/operations", "response": {"$ref": "OperationList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "path": "{project}/operations/{operation}", "id": "compute.operations.delete", "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "operation": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
  901. $this->kernels = new Google_KernelsServiceResource($this, $this->serviceName, 'kernels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.kernels.list", "httpMethod": "GET", "path": "{project}/kernels", "response": {"$ref": "KernelList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "kernel": {"required": true, "type": "string", "location": "path"}}, "id": "compute.kernels.get", "httpMethod": "GET", "path": "{project}/kernels/{kernel}", "response": {"$ref": "Kernel"}}}}', true));
  902. $this->disks = new Google_DisksServiceResource($this, $this->serviceName, 'disks', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Disk"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/disks", "id": "compute.disks.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "disk": {"required": true, "type": "string", "location": "path"}}, "id": "compute.disks.get", "httpMethod": "GET", "path": "{project}/disks/{disk}", "response": {"$ref": "Disk"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.disks.list", "httpMethod": "GET", "path": "{project}/disks", "response": {"$ref": "DiskList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "disk": {"required": true, "type": "string", "location": "path"}}, "id": "compute.disks.delete", "httpMethod": "DELETE", "path": "{project}/disks/{disk}", "response": {"$ref": "Operation"}}}}', true));
  903. $this->snapshots = new Google_SnapshotsServiceResource($this, $this->serviceName, 'snapshots', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Snapshot"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/snapshots", "id": "compute.snapshots.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "snapshot": {"required": true, "type": "string", "location": "path"}}, "id": "compute.snapshots.get", "httpMethod": "GET", "path": "{project}/snapshots/{snapshot}", "response": {"$ref": "Snapshot"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.snapshots.list", "httpMethod": "GET", "path": "{project}/snapshots", "response": {"$ref": "SnapshotList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "snapshot": {"required": true, "type": "string", "location": "path"}}, "id": "compute.snapshots.delete", "httpMethod": "DELETE", "path": "{project}/snapshots/{snapshot}", "response": {"$ref": "Operation"}}}}', true));
  904. $this->zones = new Google_ZonesServiceResource($this, $this->serviceName, 'zones', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.zones.list", "httpMethod": "GET", "path": "{project}/zones", "response": {"$ref": "ZoneList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "zone": {"required": true, "type": "string", "location": "path"}}, "id": "compute.zones.get", "httpMethod": "GET", "path": "{project}/zones/{zone}", "response": {"$ref": "Zone"}}}}', true));
  905. $this->instances = new Google_InstancesServiceResource($this, $this->serviceName, 'instances', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Instance"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/instances", "id": "compute.instances.insert"}, "deleteAccessConfig": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "instance": {"required": true, "type": "string", "location": "path"}, "access_config": {"required": true, "type": "string", "location": "query"}, "network_interface": {"required": true, "type": "string", "location": "query"}}, "id": "compute.instances.deleteAccessConfig", "httpMethod": "POST", "path": "{project}/instances/{instance}/delete-access-config", "response": {"$ref": "Operation"}}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "instance": {"required": true, "type": "string", "location": "path"}}, "id": "compute.instances.get", "httpMethod": "GET", "path": "{project}/instances/{instance}", "response": {"$ref": "Instance"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.instances.list", "httpMethod": "GET", "path": "{project}/instances", "response": {"$ref": "InstanceList"}}, "addAccessConfig": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "instance": {"required": true, "type": "string", "location": "path"}, "network_interface": {"required": true, "type": "string", "location": "query"}}, "request": {"$ref": "AccessConfig"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/instances/{instance}/add-access-config", "id": "compute.instances.addAccessConfig"}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "instance": {"required": true, "type": "string", "location": "path"}}, "id": "compute.instances.delete", "httpMethod": "DELETE", "path": "{project}/instances/{instance}", "response": {"$ref": "Operation"}}}}', true));
  906. $this->machineTypes = new Google_MachineTypesServiceResource($this, $this->serviceName, 'machineTypes', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.machineTypes.list", "httpMethod": "GET", "path": "{project}/machine-types", "response": {"$ref": "MachineTypeList"}}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "machineType": {"required": true, "type": "string", "location": "path"}}, "id": "compute.machineTypes.get", "httpMethod": "GET", "path": "{project}/machine-types/{machineType}", "response": {"$ref": "MachineType"}}}}', true));
  907. $this->images = new Google_ImagesServiceResource($this, $this->serviceName, 'images', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/devstorage.read_only"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Image"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/images", "id": "compute.images.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "image": {"required": true, "type": "string", "location": "path"}}, "id": "compute.images.get", "httpMethod": "GET", "path": "{project}/images/{image}", "response": {"$ref": "Image"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.images.list", "httpMethod": "GET", "path": "{project}/images", "response": {"$ref": "ImageList"}}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}, "image": {"required": true, "type": "string", "location": "path"}}, "id": "compute.images.delete", "httpMethod": "DELETE", "path": "{project}/images/{image}", "response": {"$ref": "Operation"}}}}', true));
  908. $this->firewalls = new Google_FirewallsServiceResource($this, $this->serviceName, 'firewalls', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Firewall"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/firewalls", "id": "compute.firewalls.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"firewall": {"required": true, "type": "string", "location": "path"}, "project": {"required": true, "type": "string", "location": "path"}}, "id": "compute.firewalls.get", "httpMethod": "GET", "path": "{project}/firewalls/{firewall}", "response": {"$ref": "Firewall"}}, "list": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"filter": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "project": {"required": true, "type": "string", "location": "path"}, "maxResults": {"type": "integer", "location": "query", "format": "uint32"}}, "id": "compute.firewalls.list", "httpMethod": "GET", "path": "{project}/firewalls", "response": {"$ref": "FirewallList"}}, "update": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"firewall": {"required": true, "type": "string", "location": "path"}, "project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Firewall"}, "response": {"$ref": "Operation"}, "httpMethod": "PUT", "path": "{project}/firewalls/{firewall}", "id": "compute.firewalls.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"firewall": {"required": true, "type": "string", "location": "path"}, "project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Firewall"}, "response": {"$ref": "Operation"}, "httpMethod": "PATCH", "path": "{project}/firewalls/{firewall}", "id": "compute.firewalls.patch"}, "delete": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"firewall": {"required": true, "type": "string", "location": "path"}, "project": {"required": true, "type": "string", "location": "path"}}, "id": "compute.firewalls.delete", "httpMethod": "DELETE", "path": "{project}/firewalls/{firewall}", "response": {"$ref": "Operation"}}}}', true));
  909. $this->networks = new Google_NetworksServiceResource($this, $this->serviceName, 'networks', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/compute"], "parameters": {"project": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "Network"}, "response": {"$ref": "Operation"}, "httpMethod": "POST", "path": "{project}/networks", "id": "compute.networks.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/compute.readonly"], "parameters": {"project": {"required": true, "type": "st…

Large files files are truncated, but you can click here to view the full file