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