FirebaseRules.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 FirebaseRules (v1).
  21. *
  22. * <p>
  23. * Creates and manages rules that determine when a Firebase Rules-enabled
  24. * service should permit a request.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://firebase.google.com/docs/storage/security" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class FirebaseRules 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 and administer all your Firebase data and settings. */
  39. const FIREBASE =
  40. "https://www.googleapis.com/auth/firebase";
  41. /** View all your Firebase data and settings. */
  42. const FIREBASE_READONLY =
  43. "https://www.googleapis.com/auth/firebase.readonly";
  44. public $projects;
  45. public $projects_releases;
  46. public $projects_rulesets;
  47. /**
  48. * Constructs the internal representation of the FirebaseRules service.
  49. *
  50. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  51. * config array to pass to a new Client instance.
  52. * @param string $rootUrl The root URL used for requests to the service.
  53. */
  54. public function __construct($clientOrConfig = [], $rootUrl = null)
  55. {
  56. parent::__construct($clientOrConfig);
  57. $this->rootUrl = $rootUrl ?: 'https://firebaserules.googleapis.com/';
  58. $this->servicePath = '';
  59. $this->batchPath = 'batch';
  60. $this->version = 'v1';
  61. $this->serviceName = 'firebaserules';
  62. $this->projects = new FirebaseRules\Resource\Projects(
  63. $this,
  64. $this->serviceName,
  65. 'projects',
  66. [
  67. 'methods' => [
  68. 'test' => [
  69. 'path' => 'v1/{+name}:test',
  70. 'httpMethod' => 'POST',
  71. 'parameters' => [
  72. 'name' => [
  73. 'location' => 'path',
  74. 'type' => 'string',
  75. 'required' => true,
  76. ],
  77. ],
  78. ],
  79. ]
  80. ]
  81. );
  82. $this->projects_releases = new FirebaseRules\Resource\ProjectsReleases(
  83. $this,
  84. $this->serviceName,
  85. 'releases',
  86. [
  87. 'methods' => [
  88. 'create' => [
  89. 'path' => 'v1/{+name}/releases',
  90. 'httpMethod' => 'POST',
  91. 'parameters' => [
  92. 'name' => [
  93. 'location' => 'path',
  94. 'type' => 'string',
  95. 'required' => true,
  96. ],
  97. ],
  98. ],'delete' => [
  99. 'path' => 'v1/{+name}',
  100. 'httpMethod' => 'DELETE',
  101. 'parameters' => [
  102. 'name' => [
  103. 'location' => 'path',
  104. 'type' => 'string',
  105. 'required' => true,
  106. ],
  107. ],
  108. ],'get' => [
  109. 'path' => 'v1/{+name}',
  110. 'httpMethod' => 'GET',
  111. 'parameters' => [
  112. 'name' => [
  113. 'location' => 'path',
  114. 'type' => 'string',
  115. 'required' => true,
  116. ],
  117. ],
  118. ],'getExecutable' => [
  119. 'path' => 'v1/{+name}:getExecutable',
  120. 'httpMethod' => 'GET',
  121. 'parameters' => [
  122. 'name' => [
  123. 'location' => 'path',
  124. 'type' => 'string',
  125. 'required' => true,
  126. ],
  127. 'executableVersion' => [
  128. 'location' => 'query',
  129. 'type' => 'string',
  130. ],
  131. ],
  132. ],'list' => [
  133. 'path' => 'v1/{+name}/releases',
  134. 'httpMethod' => 'GET',
  135. 'parameters' => [
  136. 'name' => [
  137. 'location' => 'path',
  138. 'type' => 'string',
  139. 'required' => true,
  140. ],
  141. 'filter' => [
  142. 'location' => 'query',
  143. 'type' => 'string',
  144. ],
  145. 'pageSize' => [
  146. 'location' => 'query',
  147. 'type' => 'integer',
  148. ],
  149. 'pageToken' => [
  150. 'location' => 'query',
  151. 'type' => 'string',
  152. ],
  153. ],
  154. ],'patch' => [
  155. 'path' => 'v1/{+name}',
  156. 'httpMethod' => 'PATCH',
  157. 'parameters' => [
  158. 'name' => [
  159. 'location' => 'path',
  160. 'type' => 'string',
  161. 'required' => true,
  162. ],
  163. ],
  164. ],
  165. ]
  166. ]
  167. );
  168. $this->projects_rulesets = new FirebaseRules\Resource\ProjectsRulesets(
  169. $this,
  170. $this->serviceName,
  171. 'rulesets',
  172. [
  173. 'methods' => [
  174. 'create' => [
  175. 'path' => 'v1/{+name}/rulesets',
  176. 'httpMethod' => 'POST',
  177. 'parameters' => [
  178. 'name' => [
  179. 'location' => 'path',
  180. 'type' => 'string',
  181. 'required' => true,
  182. ],
  183. ],
  184. ],'delete' => [
  185. 'path' => 'v1/{+name}',
  186. 'httpMethod' => 'DELETE',
  187. 'parameters' => [
  188. 'name' => [
  189. 'location' => 'path',
  190. 'type' => 'string',
  191. 'required' => true,
  192. ],
  193. ],
  194. ],'get' => [
  195. 'path' => 'v1/{+name}',
  196. 'httpMethod' => 'GET',
  197. 'parameters' => [
  198. 'name' => [
  199. 'location' => 'path',
  200. 'type' => 'string',
  201. 'required' => true,
  202. ],
  203. ],
  204. ],'list' => [
  205. 'path' => 'v1/{+name}/rulesets',
  206. 'httpMethod' => 'GET',
  207. 'parameters' => [
  208. 'name' => [
  209. 'location' => 'path',
  210. 'type' => 'string',
  211. 'required' => true,
  212. ],
  213. 'filter' => [
  214. 'location' => 'query',
  215. 'type' => 'string',
  216. ],
  217. 'pageSize' => [
  218. 'location' => 'query',
  219. 'type' => 'integer',
  220. ],
  221. 'pageToken' => [
  222. 'location' => 'query',
  223. 'type' => 'string',
  224. ],
  225. ],
  226. ],
  227. ]
  228. ]
  229. );
  230. }
  231. }
  232. // Adding a class alias for backwards compatibility with the previous class name.
  233. class_alias(FirebaseRules::class, 'Google_Service_FirebaseRules');