BigQueryReservation.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  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 BigQueryReservation (v1).
  21. *
  22. * <p>
  23. * A service to modify your BigQuery reservations.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/bigquery/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class BigQueryReservation extends \Google\Service
  33. {
  34. /** View and manage your data in Google BigQuery and see the email address for your Google Account. */
  35. const BIGQUERY =
  36. "https://www.googleapis.com/auth/bigquery";
  37. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  38. const CLOUD_PLATFORM =
  39. "https://www.googleapis.com/auth/cloud-platform";
  40. public $projects_locations;
  41. public $projects_locations_capacityCommitments;
  42. public $projects_locations_reservationGroups;
  43. public $projects_locations_reservations;
  44. public $projects_locations_reservations_assignments;
  45. public $rootUrlTemplate;
  46. /**
  47. * Constructs the internal representation of the BigQueryReservation service.
  48. *
  49. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  50. * config array to pass to a new Client instance.
  51. * @param string $rootUrl The root URL used for requests to the service.
  52. */
  53. public function __construct($clientOrConfig = [], $rootUrl = null)
  54. {
  55. parent::__construct($clientOrConfig);
  56. $this->rootUrl = $rootUrl ?: 'https://bigqueryreservation.googleapis.com/';
  57. $this->rootUrlTemplate = $rootUrl ?: 'https://bigqueryreservation.UNIVERSE_DOMAIN/';
  58. $this->servicePath = '';
  59. $this->batchPath = 'batch';
  60. $this->version = 'v1';
  61. $this->serviceName = 'bigqueryreservation';
  62. $this->projects_locations = new BigQueryReservation\Resource\ProjectsLocations(
  63. $this,
  64. $this->serviceName,
  65. 'locations',
  66. [
  67. 'methods' => [
  68. 'getBiReservation' => [
  69. 'path' => 'v1/{+name}',
  70. 'httpMethod' => 'GET',
  71. 'parameters' => [
  72. 'name' => [
  73. 'location' => 'path',
  74. 'type' => 'string',
  75. 'required' => true,
  76. ],
  77. ],
  78. ],'searchAllAssignments' => [
  79. 'path' => 'v1/{+parent}:searchAllAssignments',
  80. 'httpMethod' => 'GET',
  81. 'parameters' => [
  82. 'parent' => [
  83. 'location' => 'path',
  84. 'type' => 'string',
  85. 'required' => true,
  86. ],
  87. 'pageSize' => [
  88. 'location' => 'query',
  89. 'type' => 'integer',
  90. ],
  91. 'pageToken' => [
  92. 'location' => 'query',
  93. 'type' => 'string',
  94. ],
  95. 'query' => [
  96. 'location' => 'query',
  97. 'type' => 'string',
  98. ],
  99. ],
  100. ],'searchAssignments' => [
  101. 'path' => 'v1/{+parent}:searchAssignments',
  102. 'httpMethod' => 'GET',
  103. 'parameters' => [
  104. 'parent' => [
  105. 'location' => 'path',
  106. 'type' => 'string',
  107. 'required' => true,
  108. ],
  109. 'pageSize' => [
  110. 'location' => 'query',
  111. 'type' => 'integer',
  112. ],
  113. 'pageToken' => [
  114. 'location' => 'query',
  115. 'type' => 'string',
  116. ],
  117. 'query' => [
  118. 'location' => 'query',
  119. 'type' => 'string',
  120. ],
  121. ],
  122. ],'updateBiReservation' => [
  123. 'path' => 'v1/{+name}',
  124. 'httpMethod' => 'PATCH',
  125. 'parameters' => [
  126. 'name' => [
  127. 'location' => 'path',
  128. 'type' => 'string',
  129. 'required' => true,
  130. ],
  131. 'updateMask' => [
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ],
  135. ],
  136. ],
  137. ]
  138. ]
  139. );
  140. $this->projects_locations_capacityCommitments = new BigQueryReservation\Resource\ProjectsLocationsCapacityCommitments(
  141. $this,
  142. $this->serviceName,
  143. 'capacityCommitments',
  144. [
  145. 'methods' => [
  146. 'create' => [
  147. 'path' => 'v1/{+parent}/capacityCommitments',
  148. 'httpMethod' => 'POST',
  149. 'parameters' => [
  150. 'parent' => [
  151. 'location' => 'path',
  152. 'type' => 'string',
  153. 'required' => true,
  154. ],
  155. 'capacityCommitmentId' => [
  156. 'location' => 'query',
  157. 'type' => 'string',
  158. ],
  159. 'enforceSingleAdminProjectPerOrg' => [
  160. 'location' => 'query',
  161. 'type' => 'boolean',
  162. ],
  163. ],
  164. ],'delete' => [
  165. 'path' => 'v1/{+name}',
  166. 'httpMethod' => 'DELETE',
  167. 'parameters' => [
  168. 'name' => [
  169. 'location' => 'path',
  170. 'type' => 'string',
  171. 'required' => true,
  172. ],
  173. 'force' => [
  174. 'location' => 'query',
  175. 'type' => 'boolean',
  176. ],
  177. ],
  178. ],'get' => [
  179. 'path' => 'v1/{+name}',
  180. 'httpMethod' => 'GET',
  181. 'parameters' => [
  182. 'name' => [
  183. 'location' => 'path',
  184. 'type' => 'string',
  185. 'required' => true,
  186. ],
  187. ],
  188. ],'list' => [
  189. 'path' => 'v1/{+parent}/capacityCommitments',
  190. 'httpMethod' => 'GET',
  191. 'parameters' => [
  192. 'parent' => [
  193. 'location' => 'path',
  194. 'type' => 'string',
  195. 'required' => true,
  196. ],
  197. 'pageSize' => [
  198. 'location' => 'query',
  199. 'type' => 'integer',
  200. ],
  201. 'pageToken' => [
  202. 'location' => 'query',
  203. 'type' => 'string',
  204. ],
  205. ],
  206. ],'merge' => [
  207. 'path' => 'v1/{+parent}/capacityCommitments:merge',
  208. 'httpMethod' => 'POST',
  209. 'parameters' => [
  210. 'parent' => [
  211. 'location' => 'path',
  212. 'type' => 'string',
  213. 'required' => true,
  214. ],
  215. ],
  216. ],'patch' => [
  217. 'path' => 'v1/{+name}',
  218. 'httpMethod' => 'PATCH',
  219. 'parameters' => [
  220. 'name' => [
  221. 'location' => 'path',
  222. 'type' => 'string',
  223. 'required' => true,
  224. ],
  225. 'updateMask' => [
  226. 'location' => 'query',
  227. 'type' => 'string',
  228. ],
  229. ],
  230. ],'split' => [
  231. 'path' => 'v1/{+name}:split',
  232. 'httpMethod' => 'POST',
  233. 'parameters' => [
  234. 'name' => [
  235. 'location' => 'path',
  236. 'type' => 'string',
  237. 'required' => true,
  238. ],
  239. ],
  240. ],
  241. ]
  242. ]
  243. );
  244. $this->projects_locations_reservationGroups = new BigQueryReservation\Resource\ProjectsLocationsReservationGroups(
  245. $this,
  246. $this->serviceName,
  247. 'reservationGroups',
  248. [
  249. 'methods' => [
  250. 'create' => [
  251. 'path' => 'v1/{+parent}/reservationGroups',
  252. 'httpMethod' => 'POST',
  253. 'parameters' => [
  254. 'parent' => [
  255. 'location' => 'path',
  256. 'type' => 'string',
  257. 'required' => true,
  258. ],
  259. 'reservationGroupId' => [
  260. 'location' => 'query',
  261. 'type' => 'string',
  262. ],
  263. ],
  264. ],'delete' => [
  265. 'path' => 'v1/{+name}',
  266. 'httpMethod' => 'DELETE',
  267. 'parameters' => [
  268. 'name' => [
  269. 'location' => 'path',
  270. 'type' => 'string',
  271. 'required' => true,
  272. ],
  273. ],
  274. ],'get' => [
  275. 'path' => 'v1/{+name}',
  276. 'httpMethod' => 'GET',
  277. 'parameters' => [
  278. 'name' => [
  279. 'location' => 'path',
  280. 'type' => 'string',
  281. 'required' => true,
  282. ],
  283. ],
  284. ],'list' => [
  285. 'path' => 'v1/{+parent}/reservationGroups',
  286. 'httpMethod' => 'GET',
  287. 'parameters' => [
  288. 'parent' => [
  289. 'location' => 'path',
  290. 'type' => 'string',
  291. 'required' => true,
  292. ],
  293. 'pageSize' => [
  294. 'location' => 'query',
  295. 'type' => 'integer',
  296. ],
  297. 'pageToken' => [
  298. 'location' => 'query',
  299. 'type' => 'string',
  300. ],
  301. ],
  302. ],
  303. ]
  304. ]
  305. );
  306. $this->projects_locations_reservations = new BigQueryReservation\Resource\ProjectsLocationsReservations(
  307. $this,
  308. $this->serviceName,
  309. 'reservations',
  310. [
  311. 'methods' => [
  312. 'create' => [
  313. 'path' => 'v1/{+parent}/reservations',
  314. 'httpMethod' => 'POST',
  315. 'parameters' => [
  316. 'parent' => [
  317. 'location' => 'path',
  318. 'type' => 'string',
  319. 'required' => true,
  320. ],
  321. 'reservationId' => [
  322. 'location' => 'query',
  323. 'type' => 'string',
  324. ],
  325. ],
  326. ],'delete' => [
  327. 'path' => 'v1/{+name}',
  328. 'httpMethod' => 'DELETE',
  329. 'parameters' => [
  330. 'name' => [
  331. 'location' => 'path',
  332. 'type' => 'string',
  333. 'required' => true,
  334. ],
  335. ],
  336. ],'failoverReservation' => [
  337. 'path' => 'v1/{+name}:failoverReservation',
  338. 'httpMethod' => 'POST',
  339. 'parameters' => [
  340. 'name' => [
  341. 'location' => 'path',
  342. 'type' => 'string',
  343. 'required' => true,
  344. ],
  345. ],
  346. ],'get' => [
  347. 'path' => 'v1/{+name}',
  348. 'httpMethod' => 'GET',
  349. 'parameters' => [
  350. 'name' => [
  351. 'location' => 'path',
  352. 'type' => 'string',
  353. 'required' => true,
  354. ],
  355. ],
  356. ],'getIamPolicy' => [
  357. 'path' => 'v1/{+resource}:getIamPolicy',
  358. 'httpMethod' => 'GET',
  359. 'parameters' => [
  360. 'resource' => [
  361. 'location' => 'path',
  362. 'type' => 'string',
  363. 'required' => true,
  364. ],
  365. 'options.requestedPolicyVersion' => [
  366. 'location' => 'query',
  367. 'type' => 'integer',
  368. ],
  369. ],
  370. ],'list' => [
  371. 'path' => 'v1/{+parent}/reservations',
  372. 'httpMethod' => 'GET',
  373. 'parameters' => [
  374. 'parent' => [
  375. 'location' => 'path',
  376. 'type' => 'string',
  377. 'required' => true,
  378. ],
  379. 'pageSize' => [
  380. 'location' => 'query',
  381. 'type' => 'integer',
  382. ],
  383. 'pageToken' => [
  384. 'location' => 'query',
  385. 'type' => 'string',
  386. ],
  387. ],
  388. ],'patch' => [
  389. 'path' => 'v1/{+name}',
  390. 'httpMethod' => 'PATCH',
  391. 'parameters' => [
  392. 'name' => [
  393. 'location' => 'path',
  394. 'type' => 'string',
  395. 'required' => true,
  396. ],
  397. 'updateMask' => [
  398. 'location' => 'query',
  399. 'type' => 'string',
  400. ],
  401. ],
  402. ],'setIamPolicy' => [
  403. 'path' => 'v1/{+resource}:setIamPolicy',
  404. 'httpMethod' => 'POST',
  405. 'parameters' => [
  406. 'resource' => [
  407. 'location' => 'path',
  408. 'type' => 'string',
  409. 'required' => true,
  410. ],
  411. ],
  412. ],'testIamPermissions' => [
  413. 'path' => 'v1/{+resource}:testIamPermissions',
  414. 'httpMethod' => 'POST',
  415. 'parameters' => [
  416. 'resource' => [
  417. 'location' => 'path',
  418. 'type' => 'string',
  419. 'required' => true,
  420. ],
  421. ],
  422. ],
  423. ]
  424. ]
  425. );
  426. $this->projects_locations_reservations_assignments = new BigQueryReservation\Resource\ProjectsLocationsReservationsAssignments(
  427. $this,
  428. $this->serviceName,
  429. 'assignments',
  430. [
  431. 'methods' => [
  432. 'create' => [
  433. 'path' => 'v1/{+parent}/assignments',
  434. 'httpMethod' => 'POST',
  435. 'parameters' => [
  436. 'parent' => [
  437. 'location' => 'path',
  438. 'type' => 'string',
  439. 'required' => true,
  440. ],
  441. 'assignmentId' => [
  442. 'location' => 'query',
  443. 'type' => 'string',
  444. ],
  445. ],
  446. ],'delete' => [
  447. 'path' => 'v1/{+name}',
  448. 'httpMethod' => 'DELETE',
  449. 'parameters' => [
  450. 'name' => [
  451. 'location' => 'path',
  452. 'type' => 'string',
  453. 'required' => true,
  454. ],
  455. ],
  456. ],'getIamPolicy' => [
  457. 'path' => 'v1/{+resource}:getIamPolicy',
  458. 'httpMethod' => 'GET',
  459. 'parameters' => [
  460. 'resource' => [
  461. 'location' => 'path',
  462. 'type' => 'string',
  463. 'required' => true,
  464. ],
  465. 'options.requestedPolicyVersion' => [
  466. 'location' => 'query',
  467. 'type' => 'integer',
  468. ],
  469. ],
  470. ],'list' => [
  471. 'path' => 'v1/{+parent}/assignments',
  472. 'httpMethod' => 'GET',
  473. 'parameters' => [
  474. 'parent' => [
  475. 'location' => 'path',
  476. 'type' => 'string',
  477. 'required' => true,
  478. ],
  479. 'pageSize' => [
  480. 'location' => 'query',
  481. 'type' => 'integer',
  482. ],
  483. 'pageToken' => [
  484. 'location' => 'query',
  485. 'type' => 'string',
  486. ],
  487. ],
  488. ],'move' => [
  489. 'path' => 'v1/{+name}:move',
  490. 'httpMethod' => 'POST',
  491. 'parameters' => [
  492. 'name' => [
  493. 'location' => 'path',
  494. 'type' => 'string',
  495. 'required' => true,
  496. ],
  497. ],
  498. ],'patch' => [
  499. 'path' => 'v1/{+name}',
  500. 'httpMethod' => 'PATCH',
  501. 'parameters' => [
  502. 'name' => [
  503. 'location' => 'path',
  504. 'type' => 'string',
  505. 'required' => true,
  506. ],
  507. 'updateMask' => [
  508. 'location' => 'query',
  509. 'type' => 'string',
  510. ],
  511. ],
  512. ],'setIamPolicy' => [
  513. 'path' => 'v1/{+resource}:setIamPolicy',
  514. 'httpMethod' => 'POST',
  515. 'parameters' => [
  516. 'resource' => [
  517. 'location' => 'path',
  518. 'type' => 'string',
  519. 'required' => true,
  520. ],
  521. ],
  522. ],'testIamPermissions' => [
  523. 'path' => 'v1/{+resource}:testIamPermissions',
  524. 'httpMethod' => 'POST',
  525. 'parameters' => [
  526. 'resource' => [
  527. 'location' => 'path',
  528. 'type' => 'string',
  529. 'required' => true,
  530. ],
  531. ],
  532. ],
  533. ]
  534. ]
  535. );
  536. }
  537. }
  538. // Adding a class alias for backwards compatibility with the previous class name.
  539. class_alias(BigQueryReservation::class, 'Google_Service_BigQueryReservation');