CloudRedis.php 17 KB

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