FirebaseRealtimeDatabase.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 FirebaseRealtimeDatabase (v1beta).
  21. *
  22. * <p>
  23. * The Firebase Realtime Database Management API enables programmatic
  24. * provisioning and management of Realtime Database instances.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://firebase.google.com/docs/reference/rest/database/database-management/rest/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class FirebaseRealtimeDatabase 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. /** View your data across Google Cloud services and see the email address of your Google Account. */
  39. const CLOUD_PLATFORM_READ_ONLY =
  40. "https://www.googleapis.com/auth/cloud-platform.read-only";
  41. /** View and administer all your Firebase data and settings. */
  42. const FIREBASE =
  43. "https://www.googleapis.com/auth/firebase";
  44. /** View all your Firebase data and settings. */
  45. const FIREBASE_READONLY =
  46. "https://www.googleapis.com/auth/firebase.readonly";
  47. public $projects_locations_instances;
  48. /**
  49. * Constructs the internal representation of the FirebaseRealtimeDatabase
  50. * service.
  51. *
  52. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  53. * config array to pass to a new Client instance.
  54. * @param string $rootUrl The root URL used for requests to the service.
  55. */
  56. public function __construct($clientOrConfig = [], $rootUrl = null)
  57. {
  58. parent::__construct($clientOrConfig);
  59. $this->rootUrl = $rootUrl ?: 'https://firebasedatabase.googleapis.com/';
  60. $this->servicePath = '';
  61. $this->batchPath = 'batch';
  62. $this->version = 'v1beta';
  63. $this->serviceName = 'firebasedatabase';
  64. $this->projects_locations_instances = new FirebaseRealtimeDatabase\Resource\ProjectsLocationsInstances(
  65. $this,
  66. $this->serviceName,
  67. 'instances',
  68. [
  69. 'methods' => [
  70. 'create' => [
  71. 'path' => 'v1beta/{+parent}/instances',
  72. 'httpMethod' => 'POST',
  73. 'parameters' => [
  74. 'parent' => [
  75. 'location' => 'path',
  76. 'type' => 'string',
  77. 'required' => true,
  78. ],
  79. 'databaseId' => [
  80. 'location' => 'query',
  81. 'type' => 'string',
  82. ],
  83. 'validateOnly' => [
  84. 'location' => 'query',
  85. 'type' => 'boolean',
  86. ],
  87. ],
  88. ],'delete' => [
  89. 'path' => 'v1beta/{+name}',
  90. 'httpMethod' => 'DELETE',
  91. 'parameters' => [
  92. 'name' => [
  93. 'location' => 'path',
  94. 'type' => 'string',
  95. 'required' => true,
  96. ],
  97. ],
  98. ],'disable' => [
  99. 'path' => 'v1beta/{+name}:disable',
  100. 'httpMethod' => 'POST',
  101. 'parameters' => [
  102. 'name' => [
  103. 'location' => 'path',
  104. 'type' => 'string',
  105. 'required' => true,
  106. ],
  107. ],
  108. ],'get' => [
  109. 'path' => 'v1beta/{+name}',
  110. 'httpMethod' => 'GET',
  111. 'parameters' => [
  112. 'name' => [
  113. 'location' => 'path',
  114. 'type' => 'string',
  115. 'required' => true,
  116. ],
  117. ],
  118. ],'list' => [
  119. 'path' => 'v1beta/{+parent}/instances',
  120. 'httpMethod' => 'GET',
  121. 'parameters' => [
  122. 'parent' => [
  123. 'location' => 'path',
  124. 'type' => 'string',
  125. 'required' => true,
  126. ],
  127. 'pageSize' => [
  128. 'location' => 'query',
  129. 'type' => 'integer',
  130. ],
  131. 'pageToken' => [
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ],
  135. 'showDeleted' => [
  136. 'location' => 'query',
  137. 'type' => 'boolean',
  138. ],
  139. ],
  140. ],'reenable' => [
  141. 'path' => 'v1beta/{+name}:reenable',
  142. 'httpMethod' => 'POST',
  143. 'parameters' => [
  144. 'name' => [
  145. 'location' => 'path',
  146. 'type' => 'string',
  147. 'required' => true,
  148. ],
  149. ],
  150. ],'undelete' => [
  151. 'path' => 'v1beta/{+name}:undelete',
  152. 'httpMethod' => 'POST',
  153. 'parameters' => [
  154. 'name' => [
  155. 'location' => 'path',
  156. 'type' => 'string',
  157. 'required' => true,
  158. ],
  159. ],
  160. ],
  161. ]
  162. ]
  163. );
  164. }
  165. }
  166. // Adding a class alias for backwards compatibility with the previous class name.
  167. class_alias(FirebaseRealtimeDatabase::class, 'Google_Service_FirebaseRealtimeDatabase');