Spanner.php 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  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 Spanner (v1).
  21. *
  22. * <p>
  23. * Cloud Spanner is a managed, mission-critical, globally consistent and
  24. * scalable relational database service.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/spanner/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Spanner 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. /** Administer your Spanner databases. */
  39. const SPANNER_ADMIN =
  40. "https://www.googleapis.com/auth/spanner.admin";
  41. /** View and manage the contents of your Spanner databases. */
  42. const SPANNER_DATA =
  43. "https://www.googleapis.com/auth/spanner.data";
  44. public $projects_instanceConfigs;
  45. public $projects_instanceConfigs_operations;
  46. public $projects_instances;
  47. public $projects_instances_backupOperations;
  48. public $projects_instances_backups;
  49. public $projects_instances_backups_operations;
  50. public $projects_instances_databaseOperations;
  51. public $projects_instances_databases;
  52. public $projects_instances_databases_databaseRoles;
  53. public $projects_instances_databases_operations;
  54. public $projects_instances_databases_sessions;
  55. public $projects_instances_operations;
  56. public $scans;
  57. /**
  58. * Constructs the internal representation of the Spanner service.
  59. *
  60. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  61. * config array to pass to a new Client instance.
  62. * @param string $rootUrl The root URL used for requests to the service.
  63. */
  64. public function __construct($clientOrConfig = [], $rootUrl = null)
  65. {
  66. parent::__construct($clientOrConfig);
  67. $this->rootUrl = $rootUrl ?: 'https://spanner.googleapis.com/';
  68. $this->servicePath = '';
  69. $this->batchPath = 'batch';
  70. $this->version = 'v1';
  71. $this->serviceName = 'spanner';
  72. $this->projects_instanceConfigs = new Spanner\Resource\ProjectsInstanceConfigs(
  73. $this,
  74. $this->serviceName,
  75. 'instanceConfigs',
  76. [
  77. 'methods' => [
  78. 'get' => [
  79. 'path' => 'v1/{+name}',
  80. 'httpMethod' => 'GET',
  81. 'parameters' => [
  82. 'name' => [
  83. 'location' => 'path',
  84. 'type' => 'string',
  85. 'required' => true,
  86. ],
  87. ],
  88. ],'list' => [
  89. 'path' => 'v1/{+parent}/instanceConfigs',
  90. 'httpMethod' => 'GET',
  91. 'parameters' => [
  92. 'parent' => [
  93. 'location' => 'path',
  94. 'type' => 'string',
  95. 'required' => true,
  96. ],
  97. 'pageSize' => [
  98. 'location' => 'query',
  99. 'type' => 'integer',
  100. ],
  101. 'pageToken' => [
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. ],
  105. ],
  106. ],
  107. ]
  108. ]
  109. );
  110. $this->projects_instanceConfigs_operations = new Spanner\Resource\ProjectsInstanceConfigsOperations(
  111. $this,
  112. $this->serviceName,
  113. 'operations',
  114. [
  115. 'methods' => [
  116. 'cancel' => [
  117. 'path' => 'v1/{+name}:cancel',
  118. 'httpMethod' => 'POST',
  119. 'parameters' => [
  120. 'name' => [
  121. 'location' => 'path',
  122. 'type' => 'string',
  123. 'required' => true,
  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. ],'list' => [
  147. 'path' => 'v1/{+name}',
  148. 'httpMethod' => 'GET',
  149. 'parameters' => [
  150. 'name' => [
  151. 'location' => 'path',
  152. 'type' => 'string',
  153. 'required' => true,
  154. ],
  155. 'filter' => [
  156. 'location' => 'query',
  157. 'type' => 'string',
  158. ],
  159. 'pageSize' => [
  160. 'location' => 'query',
  161. 'type' => 'integer',
  162. ],
  163. 'pageToken' => [
  164. 'location' => 'query',
  165. 'type' => 'string',
  166. ],
  167. ],
  168. ],
  169. ]
  170. ]
  171. );
  172. $this->projects_instances = new Spanner\Resource\ProjectsInstances(
  173. $this,
  174. $this->serviceName,
  175. 'instances',
  176. [
  177. 'methods' => [
  178. 'create' => [
  179. 'path' => 'v1/{+parent}/instances',
  180. 'httpMethod' => 'POST',
  181. 'parameters' => [
  182. 'parent' => [
  183. 'location' => 'path',
  184. 'type' => 'string',
  185. 'required' => true,
  186. ],
  187. ],
  188. ],'delete' => [
  189. 'path' => 'v1/{+name}',
  190. 'httpMethod' => 'DELETE',
  191. 'parameters' => [
  192. 'name' => [
  193. 'location' => 'path',
  194. 'type' => 'string',
  195. 'required' => true,
  196. ],
  197. ],
  198. ],'get' => [
  199. 'path' => 'v1/{+name}',
  200. 'httpMethod' => 'GET',
  201. 'parameters' => [
  202. 'name' => [
  203. 'location' => 'path',
  204. 'type' => 'string',
  205. 'required' => true,
  206. ],
  207. 'fieldMask' => [
  208. 'location' => 'query',
  209. 'type' => 'string',
  210. ],
  211. ],
  212. ],'getIamPolicy' => [
  213. 'path' => 'v1/{+resource}:getIamPolicy',
  214. 'httpMethod' => 'POST',
  215. 'parameters' => [
  216. 'resource' => [
  217. 'location' => 'path',
  218. 'type' => 'string',
  219. 'required' => true,
  220. ],
  221. ],
  222. ],'list' => [
  223. 'path' => 'v1/{+parent}/instances',
  224. 'httpMethod' => 'GET',
  225. 'parameters' => [
  226. 'parent' => [
  227. 'location' => 'path',
  228. 'type' => 'string',
  229. 'required' => true,
  230. ],
  231. 'filter' => [
  232. 'location' => 'query',
  233. 'type' => 'string',
  234. ],
  235. 'instanceDeadline' => [
  236. 'location' => 'query',
  237. 'type' => 'string',
  238. ],
  239. 'pageSize' => [
  240. 'location' => 'query',
  241. 'type' => 'integer',
  242. ],
  243. 'pageToken' => [
  244. 'location' => 'query',
  245. 'type' => 'string',
  246. ],
  247. ],
  248. ],'patch' => [
  249. 'path' => 'v1/{+name}',
  250. 'httpMethod' => 'PATCH',
  251. 'parameters' => [
  252. 'name' => [
  253. 'location' => 'path',
  254. 'type' => 'string',
  255. 'required' => true,
  256. ],
  257. ],
  258. ],'setIamPolicy' => [
  259. 'path' => 'v1/{+resource}:setIamPolicy',
  260. 'httpMethod' => 'POST',
  261. 'parameters' => [
  262. 'resource' => [
  263. 'location' => 'path',
  264. 'type' => 'string',
  265. 'required' => true,
  266. ],
  267. ],
  268. ],'testIamPermissions' => [
  269. 'path' => 'v1/{+resource}:testIamPermissions',
  270. 'httpMethod' => 'POST',
  271. 'parameters' => [
  272. 'resource' => [
  273. 'location' => 'path',
  274. 'type' => 'string',
  275. 'required' => true,
  276. ],
  277. ],
  278. ],
  279. ]
  280. ]
  281. );
  282. $this->projects_instances_backupOperations = new Spanner\Resource\ProjectsInstancesBackupOperations(
  283. $this,
  284. $this->serviceName,
  285. 'backupOperations',
  286. [
  287. 'methods' => [
  288. 'list' => [
  289. 'path' => 'v1/{+parent}/backupOperations',
  290. 'httpMethod' => 'GET',
  291. 'parameters' => [
  292. 'parent' => [
  293. 'location' => 'path',
  294. 'type' => 'string',
  295. 'required' => true,
  296. ],
  297. 'filter' => [
  298. 'location' => 'query',
  299. 'type' => 'string',
  300. ],
  301. 'pageSize' => [
  302. 'location' => 'query',
  303. 'type' => 'integer',
  304. ],
  305. 'pageToken' => [
  306. 'location' => 'query',
  307. 'type' => 'string',
  308. ],
  309. ],
  310. ],
  311. ]
  312. ]
  313. );
  314. $this->projects_instances_backups = new Spanner\Resource\ProjectsInstancesBackups(
  315. $this,
  316. $this->serviceName,
  317. 'backups',
  318. [
  319. 'methods' => [
  320. 'copy' => [
  321. 'path' => 'v1/{+parent}/backups:copy',
  322. 'httpMethod' => 'POST',
  323. 'parameters' => [
  324. 'parent' => [
  325. 'location' => 'path',
  326. 'type' => 'string',
  327. 'required' => true,
  328. ],
  329. ],
  330. ],'create' => [
  331. 'path' => 'v1/{+parent}/backups',
  332. 'httpMethod' => 'POST',
  333. 'parameters' => [
  334. 'parent' => [
  335. 'location' => 'path',
  336. 'type' => 'string',
  337. 'required' => true,
  338. ],
  339. 'backupId' => [
  340. 'location' => 'query',
  341. 'type' => 'string',
  342. ],
  343. 'encryptionConfig.encryptionType' => [
  344. 'location' => 'query',
  345. 'type' => 'string',
  346. ],
  347. 'encryptionConfig.kmsKeyName' => [
  348. 'location' => 'query',
  349. 'type' => 'string',
  350. ],
  351. ],
  352. ],'delete' => [
  353. 'path' => 'v1/{+name}',
  354. 'httpMethod' => 'DELETE',
  355. 'parameters' => [
  356. 'name' => [
  357. 'location' => 'path',
  358. 'type' => 'string',
  359. 'required' => true,
  360. ],
  361. ],
  362. ],'get' => [
  363. 'path' => 'v1/{+name}',
  364. 'httpMethod' => 'GET',
  365. 'parameters' => [
  366. 'name' => [
  367. 'location' => 'path',
  368. 'type' => 'string',
  369. 'required' => true,
  370. ],
  371. ],
  372. ],'getIamPolicy' => [
  373. 'path' => 'v1/{+resource}:getIamPolicy',
  374. 'httpMethod' => 'POST',
  375. 'parameters' => [
  376. 'resource' => [
  377. 'location' => 'path',
  378. 'type' => 'string',
  379. 'required' => true,
  380. ],
  381. ],
  382. ],'list' => [
  383. 'path' => 'v1/{+parent}/backups',
  384. 'httpMethod' => 'GET',
  385. 'parameters' => [
  386. 'parent' => [
  387. 'location' => 'path',
  388. 'type' => 'string',
  389. 'required' => true,
  390. ],
  391. 'filter' => [
  392. 'location' => 'query',
  393. 'type' => 'string',
  394. ],
  395. 'pageSize' => [
  396. 'location' => 'query',
  397. 'type' => 'integer',
  398. ],
  399. 'pageToken' => [
  400. 'location' => 'query',
  401. 'type' => 'string',
  402. ],
  403. ],
  404. ],'patch' => [
  405. 'path' => 'v1/{+name}',
  406. 'httpMethod' => 'PATCH',
  407. 'parameters' => [
  408. 'name' => [
  409. 'location' => 'path',
  410. 'type' => 'string',
  411. 'required' => true,
  412. ],
  413. 'updateMask' => [
  414. 'location' => 'query',
  415. 'type' => 'string',
  416. ],
  417. ],
  418. ],'setIamPolicy' => [
  419. 'path' => 'v1/{+resource}:setIamPolicy',
  420. 'httpMethod' => 'POST',
  421. 'parameters' => [
  422. 'resource' => [
  423. 'location' => 'path',
  424. 'type' => 'string',
  425. 'required' => true,
  426. ],
  427. ],
  428. ],'testIamPermissions' => [
  429. 'path' => 'v1/{+resource}:testIamPermissions',
  430. 'httpMethod' => 'POST',
  431. 'parameters' => [
  432. 'resource' => [
  433. 'location' => 'path',
  434. 'type' => 'string',
  435. 'required' => true,
  436. ],
  437. ],
  438. ],
  439. ]
  440. ]
  441. );
  442. $this->projects_instances_backups_operations = new Spanner\Resource\ProjectsInstancesBackupsOperations(
  443. $this,
  444. $this->serviceName,
  445. 'operations',
  446. [
  447. 'methods' => [
  448. 'cancel' => [
  449. 'path' => 'v1/{+name}:cancel',
  450. 'httpMethod' => 'POST',
  451. 'parameters' => [
  452. 'name' => [
  453. 'location' => 'path',
  454. 'type' => 'string',
  455. 'required' => true,
  456. ],
  457. ],
  458. ],'delete' => [
  459. 'path' => 'v1/{+name}',
  460. 'httpMethod' => 'DELETE',
  461. 'parameters' => [
  462. 'name' => [
  463. 'location' => 'path',
  464. 'type' => 'string',
  465. 'required' => true,
  466. ],
  467. ],
  468. ],'get' => [
  469. 'path' => 'v1/{+name}',
  470. 'httpMethod' => 'GET',
  471. 'parameters' => [
  472. 'name' => [
  473. 'location' => 'path',
  474. 'type' => 'string',
  475. 'required' => true,
  476. ],
  477. ],
  478. ],'list' => [
  479. 'path' => 'v1/{+name}',
  480. 'httpMethod' => 'GET',
  481. 'parameters' => [
  482. 'name' => [
  483. 'location' => 'path',
  484. 'type' => 'string',
  485. 'required' => true,
  486. ],
  487. 'filter' => [
  488. 'location' => 'query',
  489. 'type' => 'string',
  490. ],
  491. 'pageSize' => [
  492. 'location' => 'query',
  493. 'type' => 'integer',
  494. ],
  495. 'pageToken' => [
  496. 'location' => 'query',
  497. 'type' => 'string',
  498. ],
  499. ],
  500. ],
  501. ]
  502. ]
  503. );
  504. $this->projects_instances_databaseOperations = new Spanner\Resource\ProjectsInstancesDatabaseOperations(
  505. $this,
  506. $this->serviceName,
  507. 'databaseOperations',
  508. [
  509. 'methods' => [
  510. 'list' => [
  511. 'path' => 'v1/{+parent}/databaseOperations',
  512. 'httpMethod' => 'GET',
  513. 'parameters' => [
  514. 'parent' => [
  515. 'location' => 'path',
  516. 'type' => 'string',
  517. 'required' => true,
  518. ],
  519. 'filter' => [
  520. 'location' => 'query',
  521. 'type' => 'string',
  522. ],
  523. 'pageSize' => [
  524. 'location' => 'query',
  525. 'type' => 'integer',
  526. ],
  527. 'pageToken' => [
  528. 'location' => 'query',
  529. 'type' => 'string',
  530. ],
  531. ],
  532. ],
  533. ]
  534. ]
  535. );
  536. $this->projects_instances_databases = new Spanner\Resource\ProjectsInstancesDatabases(
  537. $this,
  538. $this->serviceName,
  539. 'databases',
  540. [
  541. 'methods' => [
  542. 'create' => [
  543. 'path' => 'v1/{+parent}/databases',
  544. 'httpMethod' => 'POST',
  545. 'parameters' => [
  546. 'parent' => [
  547. 'location' => 'path',
  548. 'type' => 'string',
  549. 'required' => true,
  550. ],
  551. ],
  552. ],'dropDatabase' => [
  553. 'path' => 'v1/{+database}',
  554. 'httpMethod' => 'DELETE',
  555. 'parameters' => [
  556. 'database' => [
  557. 'location' => 'path',
  558. 'type' => 'string',
  559. 'required' => true,
  560. ],
  561. ],
  562. ],'get' => [
  563. 'path' => 'v1/{+name}',
  564. 'httpMethod' => 'GET',
  565. 'parameters' => [
  566. 'name' => [
  567. 'location' => 'path',
  568. 'type' => 'string',
  569. 'required' => true,
  570. ],
  571. ],
  572. ],'getDdl' => [
  573. 'path' => 'v1/{+database}/ddl',
  574. 'httpMethod' => 'GET',
  575. 'parameters' => [
  576. 'database' => [
  577. 'location' => 'path',
  578. 'type' => 'string',
  579. 'required' => true,
  580. ],
  581. ],
  582. ],'getIamPolicy' => [
  583. 'path' => 'v1/{+resource}:getIamPolicy',
  584. 'httpMethod' => 'POST',
  585. 'parameters' => [
  586. 'resource' => [
  587. 'location' => 'path',
  588. 'type' => 'string',
  589. 'required' => true,
  590. ],
  591. ],
  592. ],'getScans' => [
  593. 'path' => 'v1/{+name}/scans',
  594. 'httpMethod' => 'GET',
  595. 'parameters' => [
  596. 'name' => [
  597. 'location' => 'path',
  598. 'type' => 'string',
  599. 'required' => true,
  600. ],
  601. 'endTime' => [
  602. 'location' => 'query',
  603. 'type' => 'string',
  604. ],
  605. 'startTime' => [
  606. 'location' => 'query',
  607. 'type' => 'string',
  608. ],
  609. 'view' => [
  610. 'location' => 'query',
  611. 'type' => 'string',
  612. ],
  613. ],
  614. ],'list' => [
  615. 'path' => 'v1/{+parent}/databases',
  616. 'httpMethod' => 'GET',
  617. 'parameters' => [
  618. 'parent' => [
  619. 'location' => 'path',
  620. 'type' => 'string',
  621. 'required' => true,
  622. ],
  623. 'pageSize' => [
  624. 'location' => 'query',
  625. 'type' => 'integer',
  626. ],
  627. 'pageToken' => [
  628. 'location' => 'query',
  629. 'type' => 'string',
  630. ],
  631. ],
  632. ],'restore' => [
  633. 'path' => 'v1/{+parent}/databases:restore',
  634. 'httpMethod' => 'POST',
  635. 'parameters' => [
  636. 'parent' => [
  637. 'location' => 'path',
  638. 'type' => 'string',
  639. 'required' => true,
  640. ],
  641. ],
  642. ],'setIamPolicy' => [
  643. 'path' => 'v1/{+resource}:setIamPolicy',
  644. 'httpMethod' => 'POST',
  645. 'parameters' => [
  646. 'resource' => [
  647. 'location' => 'path',
  648. 'type' => 'string',
  649. 'required' => true,
  650. ],
  651. ],
  652. ],'testIamPermissions' => [
  653. 'path' => 'v1/{+resource}:testIamPermissions',
  654. 'httpMethod' => 'POST',
  655. 'parameters' => [
  656. 'resource' => [
  657. 'location' => 'path',
  658. 'type' => 'string',
  659. 'required' => true,
  660. ],
  661. ],
  662. ],'updateDdl' => [
  663. 'path' => 'v1/{+database}/ddl',
  664. 'httpMethod' => 'PATCH',
  665. 'parameters' => [
  666. 'database' => [
  667. 'location' => 'path',
  668. 'type' => 'string',
  669. 'required' => true,
  670. ],
  671. ],
  672. ],
  673. ]
  674. ]
  675. );
  676. $this->projects_instances_databases_databaseRoles = new Spanner\Resource\ProjectsInstancesDatabasesDatabaseRoles(
  677. $this,
  678. $this->serviceName,
  679. 'databaseRoles',
  680. [
  681. 'methods' => [
  682. 'list' => [
  683. 'path' => 'v1/{+parent}/databaseRoles',
  684. 'httpMethod' => 'GET',
  685. 'parameters' => [
  686. 'parent' => [
  687. 'location' => 'path',
  688. 'type' => 'string',
  689. 'required' => true,
  690. ],
  691. 'pageSize' => [
  692. 'location' => 'query',
  693. 'type' => 'integer',
  694. ],
  695. 'pageToken' => [
  696. 'location' => 'query',
  697. 'type' => 'string',
  698. ],
  699. ],
  700. ],
  701. ]
  702. ]
  703. );
  704. $this->projects_instances_databases_operations = new Spanner\Resource\ProjectsInstancesDatabasesOperations(
  705. $this,
  706. $this->serviceName,
  707. 'operations',
  708. [
  709. 'methods' => [
  710. 'cancel' => [
  711. 'path' => 'v1/{+name}:cancel',
  712. 'httpMethod' => 'POST',
  713. 'parameters' => [
  714. 'name' => [
  715. 'location' => 'path',
  716. 'type' => 'string',
  717. 'required' => true,
  718. ],
  719. ],
  720. ],'delete' => [
  721. 'path' => 'v1/{+name}',
  722. 'httpMethod' => 'DELETE',
  723. 'parameters' => [
  724. 'name' => [
  725. 'location' => 'path',
  726. 'type' => 'string',
  727. 'required' => true,
  728. ],
  729. ],
  730. ],'get' => [
  731. 'path' => 'v1/{+name}',
  732. 'httpMethod' => 'GET',
  733. 'parameters' => [
  734. 'name' => [
  735. 'location' => 'path',
  736. 'type' => 'string',
  737. 'required' => true,
  738. ],
  739. ],
  740. ],'list' => [
  741. 'path' => 'v1/{+name}',
  742. 'httpMethod' => 'GET',
  743. 'parameters' => [
  744. 'name' => [
  745. 'location' => 'path',
  746. 'type' => 'string',
  747. 'required' => true,
  748. ],
  749. 'filter' => [
  750. 'location' => 'query',
  751. 'type' => 'string',
  752. ],
  753. 'pageSize' => [
  754. 'location' => 'query',
  755. 'type' => 'integer',
  756. ],
  757. 'pageToken' => [
  758. 'location' => 'query',
  759. 'type' => 'string',
  760. ],
  761. ],
  762. ],
  763. ]
  764. ]
  765. );
  766. $this->projects_instances_databases_sessions = new Spanner\Resource\ProjectsInstancesDatabasesSessions(
  767. $this,
  768. $this->serviceName,
  769. 'sessions',
  770. [
  771. 'methods' => [
  772. 'batchCreate' => [
  773. 'path' => 'v1/{+database}/sessions:batchCreate',
  774. 'httpMethod' => 'POST',
  775. 'parameters' => [
  776. 'database' => [
  777. 'location' => 'path',
  778. 'type' => 'string',
  779. 'required' => true,
  780. ],
  781. ],
  782. ],'beginTransaction' => [
  783. 'path' => 'v1/{+session}:beginTransaction',
  784. 'httpMethod' => 'POST',
  785. 'parameters' => [
  786. 'session' => [
  787. 'location' => 'path',
  788. 'type' => 'string',
  789. 'required' => true,
  790. ],
  791. ],
  792. ],'commit' => [
  793. 'path' => 'v1/{+session}:commit',
  794. 'httpMethod' => 'POST',
  795. 'parameters' => [
  796. 'session' => [
  797. 'location' => 'path',
  798. 'type' => 'string',
  799. 'required' => true,
  800. ],
  801. ],
  802. ],'create' => [
  803. 'path' => 'v1/{+database}/sessions',
  804. 'httpMethod' => 'POST',
  805. 'parameters' => [
  806. 'database' => [
  807. 'location' => 'path',
  808. 'type' => 'string',
  809. 'required' => true,
  810. ],
  811. ],
  812. ],'delete' => [
  813. 'path' => 'v1/{+name}',
  814. 'httpMethod' => 'DELETE',
  815. 'parameters' => [
  816. 'name' => [
  817. 'location' => 'path',
  818. 'type' => 'string',
  819. 'required' => true,
  820. ],
  821. ],
  822. ],'executeBatchDml' => [
  823. 'path' => 'v1/{+session}:executeBatchDml',
  824. 'httpMethod' => 'POST',
  825. 'parameters' => [
  826. 'session' => [
  827. 'location' => 'path',
  828. 'type' => 'string',
  829. 'required' => true,
  830. ],
  831. ],
  832. ],'executeSql' => [
  833. 'path' => 'v1/{+session}:executeSql',
  834. 'httpMethod' => 'POST',
  835. 'parameters' => [
  836. 'session' => [
  837. 'location' => 'path',
  838. 'type' => 'string',
  839. 'required' => true,
  840. ],
  841. ],
  842. ],'executeStreamingSql' => [
  843. 'path' => 'v1/{+session}:executeStreamingSql',
  844. 'httpMethod' => 'POST',
  845. 'parameters' => [
  846. 'session' => [
  847. 'location' => 'path',
  848. 'type' => 'string',
  849. 'required' => true,
  850. ],
  851. ],
  852. ],'get' => [
  853. 'path' => 'v1/{+name}',
  854. 'httpMethod' => 'GET',
  855. 'parameters' => [
  856. 'name' => [
  857. 'location' => 'path',
  858. 'type' => 'string',
  859. 'required' => true,
  860. ],
  861. ],
  862. ],'list' => [
  863. 'path' => 'v1/{+database}/sessions',
  864. 'httpMethod' => 'GET',
  865. 'parameters' => [
  866. 'database' => [
  867. 'location' => 'path',
  868. 'type' => 'string',
  869. 'required' => true,
  870. ],
  871. 'filter' => [
  872. 'location' => 'query',
  873. 'type' => 'string',
  874. ],
  875. 'pageSize' => [
  876. 'location' => 'query',
  877. 'type' => 'integer',
  878. ],
  879. 'pageToken' => [
  880. 'location' => 'query',
  881. 'type' => 'string',
  882. ],
  883. ],
  884. ],'partitionQuery' => [
  885. 'path' => 'v1/{+session}:partitionQuery',
  886. 'httpMethod' => 'POST',
  887. 'parameters' => [
  888. 'session' => [
  889. 'location' => 'path',
  890. 'type' => 'string',
  891. 'required' => true,
  892. ],
  893. ],
  894. ],'partitionRead' => [
  895. 'path' => 'v1/{+session}:partitionRead',
  896. 'httpMethod' => 'POST',
  897. 'parameters' => [
  898. 'session' => [
  899. 'location' => 'path',
  900. 'type' => 'string',
  901. 'required' => true,
  902. ],
  903. ],
  904. ],'read' => [
  905. 'path' => 'v1/{+session}:read',
  906. 'httpMethod' => 'POST',
  907. 'parameters' => [
  908. 'session' => [
  909. 'location' => 'path',
  910. 'type' => 'string',
  911. 'required' => true,
  912. ],
  913. ],
  914. ],'rollback' => [
  915. 'path' => 'v1/{+session}:rollback',
  916. 'httpMethod' => 'POST',
  917. 'parameters' => [
  918. 'session' => [
  919. 'location' => 'path',
  920. 'type' => 'string',
  921. 'required' => true,
  922. ],
  923. ],
  924. ],'streamingRead' => [
  925. 'path' => 'v1/{+session}:streamingRead',
  926. 'httpMethod' => 'POST',
  927. 'parameters' => [
  928. 'session' => [
  929. 'location' => 'path',
  930. 'type' => 'string',
  931. 'required' => true,
  932. ],
  933. ],
  934. ],
  935. ]
  936. ]
  937. );
  938. $this->projects_instances_operations = new Spanner\Resource\ProjectsInstancesOperations(
  939. $this,
  940. $this->serviceName,
  941. 'operations',
  942. [
  943. 'methods' => [
  944. 'cancel' => [
  945. 'path' => 'v1/{+name}:cancel',
  946. 'httpMethod' => 'POST',
  947. 'parameters' => [
  948. 'name' => [
  949. 'location' => 'path',
  950. 'type' => 'string',
  951. 'required' => true,
  952. ],
  953. ],
  954. ],'delete' => [
  955. 'path' => 'v1/{+name}',
  956. 'httpMethod' => 'DELETE',
  957. 'parameters' => [
  958. 'name' => [
  959. 'location' => 'path',
  960. 'type' => 'string',
  961. 'required' => true,
  962. ],
  963. ],
  964. ],'get' => [
  965. 'path' => 'v1/{+name}',
  966. 'httpMethod' => 'GET',
  967. 'parameters' => [
  968. 'name' => [
  969. 'location' => 'path',
  970. 'type' => 'string',
  971. 'required' => true,
  972. ],
  973. ],
  974. ],'list' => [
  975. 'path' => 'v1/{+name}',
  976. 'httpMethod' => 'GET',
  977. 'parameters' => [
  978. 'name' => [
  979. 'location' => 'path',
  980. 'type' => 'string',
  981. 'required' => true,
  982. ],
  983. 'filter' => [
  984. 'location' => 'query',
  985. 'type' => 'string',
  986. ],
  987. 'pageSize' => [
  988. 'location' => 'query',
  989. 'type' => 'integer',
  990. ],
  991. 'pageToken' => [
  992. 'location' => 'query',
  993. 'type' => 'string',
  994. ],
  995. ],
  996. ],
  997. ]
  998. ]
  999. );
  1000. $this->scans = new Spanner\Resource\Scans(
  1001. $this,
  1002. $this->serviceName,
  1003. 'scans',
  1004. [
  1005. 'methods' => [
  1006. 'list' => [
  1007. 'path' => 'v1/{+parent}',
  1008. 'httpMethod' => 'GET',
  1009. 'parameters' => [
  1010. 'parent' => [
  1011. 'location' => 'path',
  1012. 'type' => 'string',
  1013. 'required' => true,
  1014. ],
  1015. 'filter' => [
  1016. 'location' => 'query',
  1017. 'type' => 'string',
  1018. ],
  1019. 'pageSize' => [
  1020. 'location' => 'query',
  1021. 'type' => 'integer',
  1022. ],
  1023. 'pageToken' => [
  1024. 'location' => 'query',
  1025. 'type' => 'string',
  1026. ],
  1027. 'view' => [
  1028. 'location' => 'query',
  1029. 'type' => 'string',
  1030. ],
  1031. ],
  1032. ],
  1033. ]
  1034. ]
  1035. );
  1036. }
  1037. }
  1038. // Adding a class alias for backwards compatibility with the previous class name.
  1039. class_alias(Spanner::class, 'Google_Service_Spanner');