OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.firebaserules.v1; | 3 library googleapis.firebaserules.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client firebaserules/v1'; | 15 const core.String USER_AGENT = 'dart-api-client firebaserules/v1'; |
16 | 16 |
17 /** | 17 /// Creates and manages rules that determine when a Firebase Rules-enabled |
18 * Creates and manages rules that determine when a Firebase Rules-enabled | 18 /// service should permit a request. |
19 * service should permit a request. | |
20 */ | |
21 class FirebaserulesApi { | 19 class FirebaserulesApi { |
22 /** View and manage your data across Google Cloud Platform services */ | 20 /// View and manage your data across Google Cloud Platform services |
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 21 static const CloudPlatformScope = |
| 22 "https://www.googleapis.com/auth/cloud-platform"; |
24 | 23 |
25 /** View and administer all your Firebase data and settings */ | 24 /// View and administer all your Firebase data and settings |
26 static const FirebaseScope = "https://www.googleapis.com/auth/firebase"; | 25 static const FirebaseScope = "https://www.googleapis.com/auth/firebase"; |
27 | 26 |
28 /** View all your Firebase data and settings */ | 27 /// View all your Firebase data and settings |
29 static const FirebaseReadonlyScope = "https://www.googleapis.com/auth/firebase
.readonly"; | 28 static const FirebaseReadonlyScope = |
30 | 29 "https://www.googleapis.com/auth/firebase.readonly"; |
31 | 30 |
32 final commons.ApiRequester _requester; | 31 final commons.ApiRequester _requester; |
33 | 32 |
34 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 33 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
35 | 34 |
36 FirebaserulesApi(http.Client client, {core.String rootUrl: "https://firebaseru
les.googleapis.com/", core.String servicePath: ""}) : | 35 FirebaserulesApi(http.Client client, |
37 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 36 {core.String rootUrl: "https://firebaserules.googleapis.com/", |
| 37 core.String servicePath: ""}) |
| 38 : _requester = |
| 39 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
38 } | 40 } |
39 | 41 |
40 | |
41 class ProjectsResourceApi { | 42 class ProjectsResourceApi { |
42 final commons.ApiRequester _requester; | 43 final commons.ApiRequester _requester; |
43 | 44 |
44 ProjectsReleasesResourceApi get releases => new ProjectsReleasesResourceApi(_r
equester); | 45 ProjectsReleasesResourceApi get releases => |
45 ProjectsRulesetsResourceApi get rulesets => new ProjectsRulesetsResourceApi(_r
equester); | 46 new ProjectsReleasesResourceApi(_requester); |
| 47 ProjectsRulesetsResourceApi get rulesets => |
| 48 new ProjectsRulesetsResourceApi(_requester); |
46 | 49 |
47 ProjectsResourceApi(commons.ApiRequester client) : | 50 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
48 _requester = client; | |
49 | 51 |
50 /** | 52 /// Test `Source` for syntactic and semantic correctness. Issues present, if |
51 * Test `Source` for syntactic and semantic correctness. Issues present, if | 53 /// any, will be returned to the caller with a description, severity, and |
52 * any, will be returned to the caller with a description, severity, and | 54 /// source location. |
53 * source location. | 55 /// |
54 * | 56 /// The test method may be executed with `Source` or a `Ruleset` name. |
55 * The test method may be executed with `Source` or a `Ruleset` name. | 57 /// Passing `Source` is useful for unit testing new rules. Passing a |
56 * Passing `Source` is useful for unit testing new rules. Passing a `Ruleset` | 58 /// `Ruleset` |
57 * name is useful for regression testing an existing rule. | 59 /// name is useful for regression testing an existing rule. |
58 * | 60 /// |
59 * The following is an example of `Source` that permits users to upload images | 61 /// The following is an example of `Source` that permits users to upload |
60 * to a bucket bearing their user id and matching the correct metadata: | 62 /// images |
61 * | 63 /// to a bucket bearing their user id and matching the correct metadata: |
62 * _*Example*_ | 64 /// |
63 * | 65 /// _*Example*_ |
64 * // Users are allowed to subscribe and unsubscribe to the blog. | 66 /// |
65 * service firebase.storage { | 67 /// // Users are allowed to subscribe and unsubscribe to the blog. |
66 * match /users/{userId}/images/{imageName} { | 68 /// service firebase.storage { |
67 * allow write: if userId == request.auth.uid | 69 /// match /users/{userId}/images/{imageName} { |
68 * && (imageName.matches('*.png$') | 70 /// allow write: if userId == request.auth.uid |
69 * || imageName.matches('*.jpg$')) | 71 /// && (imageName.matches('*.png$') |
70 * && resource.mimeType.matches('^image/') | 72 /// || imageName.matches('*.jpg$')) |
71 * } | 73 /// && resource.mimeType.matches('^image/') |
72 * } | 74 /// } |
73 * | 75 /// } |
74 * [request] - The metadata request object. | 76 /// |
75 * | 77 /// [request] - The metadata request object. |
76 * Request parameters: | 78 /// |
77 * | 79 /// Request parameters: |
78 * [name] - Tests may either provide `source` or a `Ruleset` resource name. | 80 /// |
79 * | 81 /// [name] - Tests may either provide `source` or a `Ruleset` resource name. |
80 * For tests against `source`, the resource name must refer to the project: | 82 /// |
81 * Format: `projects/{project_id}` | 83 /// For tests against `source`, the resource name must refer to the project: |
82 * | 84 /// Format: `projects/{project_id}` |
83 * For tests against a `Ruleset`, this must be the `Ruleset` resource name: | 85 /// |
84 * Format: `projects/{project_id}/rulesets/{ruleset_id}` | 86 /// For tests against a `Ruleset`, this must be the `Ruleset` resource name: |
85 * Value must have pattern "^projects/.+$". | 87 /// Format: `projects/{project_id}/rulesets/{ruleset_id}` |
86 * | 88 /// Value must have pattern "^projects/.+$". |
87 * Completes with a [TestRulesetResponse]. | 89 /// |
88 * | 90 /// Completes with a [TestRulesetResponse]. |
89 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 91 /// |
90 * error. | 92 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
91 * | 93 /// an error. |
92 * If the used [http.Client] completes with an error when making a REST call, | 94 /// |
93 * this method will complete with the same error. | 95 /// If the used [http.Client] completes with an error when making a REST |
94 */ | 96 /// call, this method will complete with the same error. |
95 async.Future<TestRulesetResponse> test(TestRulesetRequest request, core.String
name) { | 97 async.Future<TestRulesetResponse> test( |
| 98 TestRulesetRequest request, core.String name) { |
96 var _url = null; | 99 var _url = null; |
97 var _queryParams = new core.Map(); | 100 var _queryParams = new core.Map(); |
98 var _uploadMedia = null; | 101 var _uploadMedia = null; |
99 var _uploadOptions = null; | 102 var _uploadOptions = null; |
100 var _downloadOptions = commons.DownloadOptions.Metadata; | 103 var _downloadOptions = commons.DownloadOptions.Metadata; |
101 var _body = null; | 104 var _body = null; |
102 | 105 |
103 if (request != null) { | 106 if (request != null) { |
104 _body = convert.JSON.encode((request).toJson()); | 107 _body = convert.JSON.encode((request).toJson()); |
105 } | 108 } |
106 if (name == null) { | 109 if (name == null) { |
107 throw new core.ArgumentError("Parameter name is required."); | 110 throw new core.ArgumentError("Parameter name is required."); |
108 } | 111 } |
109 | 112 |
110 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':test'; | 113 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':test'; |
111 | 114 |
112 var _response = _requester.request(_url, | 115 var _response = _requester.request(_url, "POST", |
113 "POST", | 116 body: _body, |
114 body: _body, | 117 queryParams: _queryParams, |
115 queryParams: _queryParams, | 118 uploadOptions: _uploadOptions, |
116 uploadOptions: _uploadOptions, | 119 uploadMedia: _uploadMedia, |
117 uploadMedia: _uploadMedia, | 120 downloadOptions: _downloadOptions); |
118 downloadOptions: _downloadOptions); | |
119 return _response.then((data) => new TestRulesetResponse.fromJson(data)); | 121 return _response.then((data) => new TestRulesetResponse.fromJson(data)); |
120 } | 122 } |
121 | |
122 } | 123 } |
123 | 124 |
124 | |
125 class ProjectsReleasesResourceApi { | 125 class ProjectsReleasesResourceApi { |
126 final commons.ApiRequester _requester; | 126 final commons.ApiRequester _requester; |
127 | 127 |
128 ProjectsReleasesResourceApi(commons.ApiRequester client) : | 128 ProjectsReleasesResourceApi(commons.ApiRequester client) |
129 _requester = client; | 129 : _requester = client; |
130 | 130 |
131 /** | 131 /// Create a `Release`. |
132 * Create a `Release`. | 132 /// |
133 * | 133 /// Release names should reflect the developer's deployment practices. For |
134 * Release names should reflect the developer's deployment practices. For | 134 /// example, the release name may include the environment name, application |
135 * example, the release name may include the environment name, application | 135 /// name, application version, or any other name meaningful to the developer. |
136 * name, application version, or any other name meaningful to the developer. | 136 /// Once a `Release` refers to a `Ruleset`, the rules can be enforced by |
137 * Once a `Release` refers to a `Ruleset`, the rules can be enforced by | 137 /// Firebase Rules-enabled services. |
138 * Firebase Rules-enabled services. | 138 /// |
139 * | 139 /// More than one `Release` may be 'live' concurrently. Consider the |
140 * More than one `Release` may be 'live' concurrently. Consider the following | 140 /// following |
141 * three `Release` names for `projects/foo` and the `Ruleset` to which they | 141 /// three `Release` names for `projects/foo` and the `Ruleset` to which they |
142 * refer. | 142 /// refer. |
143 * | 143 /// |
144 * Release Name | Ruleset Name | 144 /// Release Name | Ruleset Name |
145 * --------------------------------|------------- | 145 /// --------------------------------|------------- |
146 * projects/foo/releases/prod | projects/foo/rulesets/uuid123 | 146 /// projects/foo/releases/prod | projects/foo/rulesets/uuid123 |
147 * projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123 | 147 /// projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123 |
148 * projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456 | 148 /// projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456 |
149 * | 149 /// |
150 * The table reflects the `Ruleset` rollout in progress. The `prod` and | 150 /// The table reflects the `Ruleset` rollout in progress. The `prod` and |
151 * `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` | 151 /// `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` |
152 * refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be | 152 /// refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be |
153 * updated using the UpdateRelease method. | 153 /// updated using the UpdateRelease method. |
154 * | 154 /// |
155 * [request] - The metadata request object. | 155 /// [request] - The metadata request object. |
156 * | 156 /// |
157 * Request parameters: | 157 /// Request parameters: |
158 * | 158 /// |
159 * [name] - Resource name for the project which owns this `Release`. | 159 /// [name] - Resource name for the project which owns this `Release`. |
160 * | 160 /// |
161 * Format: `projects/{project_id}` | 161 /// Format: `projects/{project_id}` |
162 * Value must have pattern "^projects/[^/]+$". | 162 /// Value must have pattern "^projects/[^/]+$". |
163 * | 163 /// |
164 * Completes with a [Release]. | 164 /// Completes with a [Release]. |
165 * | 165 /// |
166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 166 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
167 * error. | 167 /// an error. |
168 * | 168 /// |
169 * If the used [http.Client] completes with an error when making a REST call, | 169 /// If the used [http.Client] completes with an error when making a REST |
170 * this method will complete with the same error. | 170 /// call, this method will complete with the same error. |
171 */ | |
172 async.Future<Release> create(Release request, core.String name) { | 171 async.Future<Release> create(Release request, core.String name) { |
173 var _url = null; | 172 var _url = null; |
174 var _queryParams = new core.Map(); | 173 var _queryParams = new core.Map(); |
175 var _uploadMedia = null; | 174 var _uploadMedia = null; |
176 var _uploadOptions = null; | 175 var _uploadOptions = null; |
177 var _downloadOptions = commons.DownloadOptions.Metadata; | 176 var _downloadOptions = commons.DownloadOptions.Metadata; |
178 var _body = null; | 177 var _body = null; |
179 | 178 |
180 if (request != null) { | 179 if (request != null) { |
181 _body = convert.JSON.encode((request).toJson()); | 180 _body = convert.JSON.encode((request).toJson()); |
182 } | 181 } |
183 if (name == null) { | 182 if (name == null) { |
184 throw new core.ArgumentError("Parameter name is required."); | 183 throw new core.ArgumentError("Parameter name is required."); |
185 } | 184 } |
186 | 185 |
187 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/releases'; | 186 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/releases'; |
188 | 187 |
189 var _response = _requester.request(_url, | 188 var _response = _requester.request(_url, "POST", |
190 "POST", | 189 body: _body, |
191 body: _body, | 190 queryParams: _queryParams, |
192 queryParams: _queryParams, | 191 uploadOptions: _uploadOptions, |
193 uploadOptions: _uploadOptions, | 192 uploadMedia: _uploadMedia, |
194 uploadMedia: _uploadMedia, | 193 downloadOptions: _downloadOptions); |
195 downloadOptions: _downloadOptions); | |
196 return _response.then((data) => new Release.fromJson(data)); | 194 return _response.then((data) => new Release.fromJson(data)); |
197 } | 195 } |
198 | 196 |
199 /** | 197 /// Delete a `Release` by resource name. |
200 * Delete a `Release` by resource name. | 198 /// |
201 * | 199 /// Request parameters: |
202 * Request parameters: | 200 /// |
203 * | 201 /// [name] - Resource name for the `Release` to delete. |
204 * [name] - Resource name for the `Release` to delete. | 202 /// |
205 * | 203 /// Format: `projects/{project_id}/releases/{release_id}` |
206 * Format: `projects/{project_id}/releases/{release_id}` | 204 /// Value must have pattern "^projects/[^/]+/releases/.+$". |
207 * Value must have pattern "^projects/[^/]+/releases/.+$". | 205 /// |
208 * | 206 /// Completes with a [Empty]. |
209 * Completes with a [Empty]. | 207 /// |
210 * | 208 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
211 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 209 /// an error. |
212 * error. | 210 /// |
213 * | 211 /// If the used [http.Client] completes with an error when making a REST |
214 * If the used [http.Client] completes with an error when making a REST call, | 212 /// call, this method will complete with the same error. |
215 * this method will complete with the same error. | |
216 */ | |
217 async.Future<Empty> delete(core.String name) { | 213 async.Future<Empty> delete(core.String name) { |
218 var _url = null; | 214 var _url = null; |
219 var _queryParams = new core.Map(); | 215 var _queryParams = new core.Map(); |
220 var _uploadMedia = null; | 216 var _uploadMedia = null; |
221 var _uploadOptions = null; | 217 var _uploadOptions = null; |
222 var _downloadOptions = commons.DownloadOptions.Metadata; | 218 var _downloadOptions = commons.DownloadOptions.Metadata; |
223 var _body = null; | 219 var _body = null; |
224 | 220 |
225 if (name == null) { | 221 if (name == null) { |
226 throw new core.ArgumentError("Parameter name is required."); | 222 throw new core.ArgumentError("Parameter name is required."); |
227 } | 223 } |
228 | 224 |
229 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 225 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
230 | 226 |
231 var _response = _requester.request(_url, | 227 var _response = _requester.request(_url, "DELETE", |
232 "DELETE", | 228 body: _body, |
233 body: _body, | 229 queryParams: _queryParams, |
234 queryParams: _queryParams, | 230 uploadOptions: _uploadOptions, |
235 uploadOptions: _uploadOptions, | 231 uploadMedia: _uploadMedia, |
236 uploadMedia: _uploadMedia, | 232 downloadOptions: _downloadOptions); |
237 downloadOptions: _downloadOptions); | |
238 return _response.then((data) => new Empty.fromJson(data)); | 233 return _response.then((data) => new Empty.fromJson(data)); |
239 } | 234 } |
240 | 235 |
241 /** | 236 /// Get a `Release` by name. |
242 * Get a `Release` by name. | 237 /// |
243 * | 238 /// Request parameters: |
244 * Request parameters: | 239 /// |
245 * | 240 /// [name] - Resource name of the `Release`. |
246 * [name] - Resource name of the `Release`. | 241 /// |
247 * | 242 /// Format: `projects/{project_id}/releases/{release_id}` |
248 * Format: `projects/{project_id}/releases/{release_id}` | 243 /// Value must have pattern "^projects/[^/]+/releases/.+$". |
249 * Value must have pattern "^projects/[^/]+/releases/.+$". | 244 /// |
250 * | 245 /// Completes with a [Release]. |
251 * Completes with a [Release]. | 246 /// |
252 * | 247 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
253 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 248 /// an error. |
254 * error. | 249 /// |
255 * | 250 /// If the used [http.Client] completes with an error when making a REST |
256 * If the used [http.Client] completes with an error when making a REST call, | 251 /// call, this method will complete with the same error. |
257 * this method will complete with the same error. | |
258 */ | |
259 async.Future<Release> get(core.String name) { | 252 async.Future<Release> get(core.String name) { |
260 var _url = null; | 253 var _url = null; |
261 var _queryParams = new core.Map(); | 254 var _queryParams = new core.Map(); |
262 var _uploadMedia = null; | 255 var _uploadMedia = null; |
263 var _uploadOptions = null; | 256 var _uploadOptions = null; |
264 var _downloadOptions = commons.DownloadOptions.Metadata; | 257 var _downloadOptions = commons.DownloadOptions.Metadata; |
265 var _body = null; | 258 var _body = null; |
266 | 259 |
267 if (name == null) { | 260 if (name == null) { |
268 throw new core.ArgumentError("Parameter name is required."); | 261 throw new core.ArgumentError("Parameter name is required."); |
269 } | 262 } |
270 | 263 |
271 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 264 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
272 | 265 |
273 var _response = _requester.request(_url, | 266 var _response = _requester.request(_url, "GET", |
274 "GET", | 267 body: _body, |
275 body: _body, | 268 queryParams: _queryParams, |
276 queryParams: _queryParams, | 269 uploadOptions: _uploadOptions, |
277 uploadOptions: _uploadOptions, | 270 uploadMedia: _uploadMedia, |
278 uploadMedia: _uploadMedia, | 271 downloadOptions: _downloadOptions); |
279 downloadOptions: _downloadOptions); | |
280 return _response.then((data) => new Release.fromJson(data)); | 272 return _response.then((data) => new Release.fromJson(data)); |
281 } | 273 } |
282 | 274 |
283 /** | 275 /// List the `Release` values for a project. This list may optionally be |
284 * List the `Release` values for a project. This list may optionally be | 276 /// filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any |
285 * filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any | 277 /// combination thereof. |
286 * combination thereof. | 278 /// |
287 * | 279 /// Request parameters: |
288 * Request parameters: | 280 /// |
289 * | 281 /// [name] - Resource name for the project. |
290 * [name] - Resource name for the project. | 282 /// |
291 * | 283 /// Format: `projects/{project_id}` |
292 * Format: `projects/{project_id}` | 284 /// Value must have pattern "^projects/[^/]+$". |
293 * Value must have pattern "^projects/[^/]+$". | 285 /// |
294 * | 286 /// [filter] - `Release` filter. The list method supports filters with |
295 * [filter] - `Release` filter. The list method supports filters with | 287 /// restrictions on the |
296 * restrictions on the | 288 /// `Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`. |
297 * `Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`. | 289 /// |
298 * | 290 /// Example 1: A filter of 'name=prod*' might return `Release`s with names |
299 * Example 1: A filter of 'name=prod*' might return `Release`s with names | 291 /// within 'projects/foo' prefixed with 'prod': |
300 * within 'projects/foo' prefixed with 'prod': | 292 /// |
301 * | 293 /// Name | Ruleset Name |
302 * Name | Ruleset Name | 294 /// ------------------------------|------------- |
303 * ------------------------------|------------- | 295 /// projects/foo/releases/prod | projects/foo/rulesets/uuid1234 |
304 * projects/foo/releases/prod | projects/foo/rulesets/uuid1234 | 296 /// projects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234 |
305 * projects/foo/releases/prod/v1 | projects/foo/rulesets/uuid1234 | 297 /// projects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888 |
306 * projects/foo/releases/prod/v2 | projects/foo/rulesets/uuid8888 | 298 /// |
307 * | 299 /// Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return |
308 * Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only | 300 /// only |
309 * `Release` instances for 'projects/foo' with names prefixed with 'prod' | 301 /// `Release` instances for 'projects/foo' with names prefixed with 'prod' |
310 * referring to the same `Ruleset` name of 'uuid1234': | 302 /// referring to the same `Ruleset` name of 'uuid1234': |
311 * | 303 /// |
312 * Name | Ruleset Name | 304 /// Name | Ruleset Name |
313 * ------------------------------|------------- | 305 /// ------------------------------|------------- |
314 * projects/foo/releases/prod | projects/foo/rulesets/1234 | 306 /// projects/foo/releases/prod | projects/foo/rulesets/1234 |
315 * projects/foo/releases/prod/v1 | projects/foo/rulesets/1234 | 307 /// projects/foo/releases/prod/v1 | projects/foo/rulesets/1234 |
316 * | 308 /// |
317 * In the examples, the filter parameters refer to the search filters are | 309 /// In the examples, the filter parameters refer to the search filters are |
318 * relative to the project. Fully qualified prefixed may also be used. e.g. | 310 /// relative to the project. Fully qualified prefixed may also be used. e.g. |
319 * `test_suite_name=projects/foo/testsuites/uuid1` | 311 /// `test_suite_name=projects/foo/testsuites/uuid1` |
320 * | 312 /// |
321 * [pageToken] - Next page token for the next batch of `Release` instances. | 313 /// [pageToken] - Next page token for the next batch of `Release` instances. |
322 * | 314 /// |
323 * [pageSize] - Page size to load. Maximum of 100. Defaults to 10. | 315 /// [pageSize] - Page size to load. Maximum of 100. Defaults to 10. |
324 * Note: `page_size` is just a hint and the service may choose to load fewer | 316 /// Note: `page_size` is just a hint and the service may choose to load fewer |
325 * than `page_size` results due to the size of the output. To traverse all of | 317 /// than `page_size` results due to the size of the output. To traverse all |
326 * the releases, the caller should iterate until the `page_token` on the | 318 /// of |
327 * response is empty. | 319 /// the releases, the caller should iterate until the `page_token` on the |
328 * | 320 /// response is empty. |
329 * Completes with a [ListReleasesResponse]. | 321 /// |
330 * | 322 /// Completes with a [ListReleasesResponse]. |
331 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 323 /// |
332 * error. | 324 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
333 * | 325 /// an error. |
334 * If the used [http.Client] completes with an error when making a REST call, | 326 /// |
335 * this method will complete with the same error. | 327 /// If the used [http.Client] completes with an error when making a REST |
336 */ | 328 /// call, this method will complete with the same error. |
337 async.Future<ListReleasesResponse> list(core.String name, {core.String filter,
core.String pageToken, core.int pageSize}) { | 329 async.Future<ListReleasesResponse> list(core.String name, |
| 330 {core.String filter, core.String pageToken, core.int pageSize}) { |
338 var _url = null; | 331 var _url = null; |
339 var _queryParams = new core.Map(); | 332 var _queryParams = new core.Map(); |
340 var _uploadMedia = null; | 333 var _uploadMedia = null; |
341 var _uploadOptions = null; | 334 var _uploadOptions = null; |
342 var _downloadOptions = commons.DownloadOptions.Metadata; | 335 var _downloadOptions = commons.DownloadOptions.Metadata; |
343 var _body = null; | 336 var _body = null; |
344 | 337 |
345 if (name == null) { | 338 if (name == null) { |
346 throw new core.ArgumentError("Parameter name is required."); | 339 throw new core.ArgumentError("Parameter name is required."); |
347 } | 340 } |
348 if (filter != null) { | 341 if (filter != null) { |
349 _queryParams["filter"] = [filter]; | 342 _queryParams["filter"] = [filter]; |
350 } | 343 } |
351 if (pageToken != null) { | 344 if (pageToken != null) { |
352 _queryParams["pageToken"] = [pageToken]; | 345 _queryParams["pageToken"] = [pageToken]; |
353 } | 346 } |
354 if (pageSize != null) { | 347 if (pageSize != null) { |
355 _queryParams["pageSize"] = ["${pageSize}"]; | 348 _queryParams["pageSize"] = ["${pageSize}"]; |
356 } | 349 } |
357 | 350 |
358 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/releases'; | 351 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/releases'; |
359 | 352 |
360 var _response = _requester.request(_url, | 353 var _response = _requester.request(_url, "GET", |
361 "GET", | 354 body: _body, |
362 body: _body, | 355 queryParams: _queryParams, |
363 queryParams: _queryParams, | 356 uploadOptions: _uploadOptions, |
364 uploadOptions: _uploadOptions, | 357 uploadMedia: _uploadMedia, |
365 uploadMedia: _uploadMedia, | 358 downloadOptions: _downloadOptions); |
366 downloadOptions: _downloadOptions); | |
367 return _response.then((data) => new ListReleasesResponse.fromJson(data)); | 359 return _response.then((data) => new ListReleasesResponse.fromJson(data)); |
368 } | 360 } |
369 | 361 |
370 /** | 362 /// Update a `Release`. |
371 * Update a `Release`. | 363 /// |
372 * | 364 /// Only updates to the `ruleset_name` and `test_suite_name` fields will be |
373 * Only updates to the `ruleset_name` and `test_suite_name` fields will be | 365 /// honored. `Release` rename is not supported. To create a `Release` use the |
374 * honored. `Release` rename is not supported. To create a `Release` use the | 366 /// CreateRelease method. |
375 * CreateRelease method. | 367 /// |
376 * | 368 /// [request] - The metadata request object. |
377 * [request] - The metadata request object. | 369 /// |
378 * | 370 /// Request parameters: |
379 * Request parameters: | 371 /// |
380 * | 372 /// [name] - Resource name for the `Release`. |
381 * [name] - Resource name for the `Release`. | 373 /// |
382 * | 374 /// `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` |
383 * `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` | 375 /// which affords developers a great deal of flexibility in mapping the name |
384 * which affords developers a great deal of flexibility in mapping the name | 376 /// to the style that best fits their existing development practices. For |
385 * to the style that best fits their existing development practices. For | 377 /// example, a name could refer to an environment, an app, a version, or some |
386 * example, a name could refer to an environment, an app, a version, or some | 378 /// combination of three. |
387 * combination of three. | 379 /// |
388 * | 380 /// In the table below, for the project name `projects/foo`, the following |
389 * In the table below, for the project name `projects/foo`, the following | 381 /// relative release paths show how flat and structured names might be chosen |
390 * relative release paths show how flat and structured names might be chosen | 382 /// to match a desired development / deployment strategy. |
391 * to match a desired development / deployment strategy. | 383 /// |
392 * | 384 /// Use Case | Flat Name | Structured Name |
393 * Use Case | Flat Name | Structured Name | 385 /// -------------|---------------------|---------------- |
394 * -------------|---------------------|---------------- | 386 /// Environments | releases/qa | releases/qa |
395 * Environments | releases/qa | releases/qa | 387 /// Apps | releases/app1_qa | releases/app1/qa |
396 * Apps | releases/app1_qa | releases/app1/qa | 388 /// Versions | releases/app1_v2_qa | releases/app1/v2/qa |
397 * Versions | releases/app1_v2_qa | releases/app1/v2/qa | 389 /// |
398 * | 390 /// The delimiter between the release name path elements can be almost |
399 * The delimiter between the release name path elements can be almost anything | 391 /// anything |
400 * and it should work equally well with the release name list filter, but in | 392 /// and it should work equally well with the release name list filter, but in |
401 * many ways the structured paths provide a clearer picture of the | 393 /// many ways the structured paths provide a clearer picture of the |
402 * relationship between `Release` instances. | 394 /// relationship between `Release` instances. |
403 * | 395 /// |
404 * Format: `projects/{project_id}/releases/{release_id}` | 396 /// Format: `projects/{project_id}/releases/{release_id}` |
405 * Value must have pattern "^projects/[^/]+/releases/.+$". | 397 /// Value must have pattern "^projects/[^/]+/releases/.+$". |
406 * | 398 /// |
407 * Completes with a [Release]. | 399 /// Completes with a [Release]. |
408 * | 400 /// |
409 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 401 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
410 * error. | 402 /// an error. |
411 * | 403 /// |
412 * If the used [http.Client] completes with an error when making a REST call, | 404 /// If the used [http.Client] completes with an error when making a REST |
413 * this method will complete with the same error. | 405 /// call, this method will complete with the same error. |
414 */ | |
415 async.Future<Release> update(Release request, core.String name) { | 406 async.Future<Release> update(Release request, core.String name) { |
416 var _url = null; | 407 var _url = null; |
417 var _queryParams = new core.Map(); | 408 var _queryParams = new core.Map(); |
418 var _uploadMedia = null; | 409 var _uploadMedia = null; |
419 var _uploadOptions = null; | 410 var _uploadOptions = null; |
420 var _downloadOptions = commons.DownloadOptions.Metadata; | 411 var _downloadOptions = commons.DownloadOptions.Metadata; |
421 var _body = null; | 412 var _body = null; |
422 | 413 |
423 if (request != null) { | 414 if (request != null) { |
424 _body = convert.JSON.encode((request).toJson()); | 415 _body = convert.JSON.encode((request).toJson()); |
425 } | 416 } |
426 if (name == null) { | 417 if (name == null) { |
427 throw new core.ArgumentError("Parameter name is required."); | 418 throw new core.ArgumentError("Parameter name is required."); |
428 } | 419 } |
429 | 420 |
430 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 421 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
431 | 422 |
432 var _response = _requester.request(_url, | 423 var _response = _requester.request(_url, "PUT", |
433 "PUT", | 424 body: _body, |
434 body: _body, | 425 queryParams: _queryParams, |
435 queryParams: _queryParams, | 426 uploadOptions: _uploadOptions, |
436 uploadOptions: _uploadOptions, | 427 uploadMedia: _uploadMedia, |
437 uploadMedia: _uploadMedia, | 428 downloadOptions: _downloadOptions); |
438 downloadOptions: _downloadOptions); | |
439 return _response.then((data) => new Release.fromJson(data)); | 429 return _response.then((data) => new Release.fromJson(data)); |
440 } | 430 } |
441 | |
442 } | 431 } |
443 | 432 |
444 | |
445 class ProjectsRulesetsResourceApi { | 433 class ProjectsRulesetsResourceApi { |
446 final commons.ApiRequester _requester; | 434 final commons.ApiRequester _requester; |
447 | 435 |
448 ProjectsRulesetsResourceApi(commons.ApiRequester client) : | 436 ProjectsRulesetsResourceApi(commons.ApiRequester client) |
449 _requester = client; | 437 : _requester = client; |
450 | 438 |
451 /** | 439 /// Create a `Ruleset` from `Source`. |
452 * Create a `Ruleset` from `Source`. | 440 /// |
453 * | 441 /// The `Ruleset` is given a unique generated name which is returned to the |
454 * The `Ruleset` is given a unique generated name which is returned to the | 442 /// caller. `Source` containing syntactic or semantics errors will result in |
455 * caller. `Source` containing syntactic or semantics errors will result in an | 443 /// an |
456 * error response indicating the first error encountered. For a detailed view | 444 /// error response indicating the first error encountered. For a detailed |
457 * of `Source` issues, use TestRuleset. | 445 /// view |
458 * | 446 /// of `Source` issues, use TestRuleset. |
459 * [request] - The metadata request object. | 447 /// |
460 * | 448 /// [request] - The metadata request object. |
461 * Request parameters: | 449 /// |
462 * | 450 /// Request parameters: |
463 * [name] - Resource name for Project which owns this `Ruleset`. | 451 /// |
464 * | 452 /// [name] - Resource name for Project which owns this `Ruleset`. |
465 * Format: `projects/{project_id}` | 453 /// |
466 * Value must have pattern "^projects/[^/]+$". | 454 /// Format: `projects/{project_id}` |
467 * | 455 /// Value must have pattern "^projects/[^/]+$". |
468 * Completes with a [Ruleset]. | 456 /// |
469 * | 457 /// Completes with a [Ruleset]. |
470 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 458 /// |
471 * error. | 459 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
472 * | 460 /// an error. |
473 * If the used [http.Client] completes with an error when making a REST call, | 461 /// |
474 * this method will complete with the same error. | 462 /// If the used [http.Client] completes with an error when making a REST |
475 */ | 463 /// call, this method will complete with the same error. |
476 async.Future<Ruleset> create(Ruleset request, core.String name) { | 464 async.Future<Ruleset> create(Ruleset request, core.String name) { |
477 var _url = null; | 465 var _url = null; |
478 var _queryParams = new core.Map(); | 466 var _queryParams = new core.Map(); |
479 var _uploadMedia = null; | 467 var _uploadMedia = null; |
480 var _uploadOptions = null; | 468 var _uploadOptions = null; |
481 var _downloadOptions = commons.DownloadOptions.Metadata; | 469 var _downloadOptions = commons.DownloadOptions.Metadata; |
482 var _body = null; | 470 var _body = null; |
483 | 471 |
484 if (request != null) { | 472 if (request != null) { |
485 _body = convert.JSON.encode((request).toJson()); | 473 _body = convert.JSON.encode((request).toJson()); |
486 } | 474 } |
487 if (name == null) { | 475 if (name == null) { |
488 throw new core.ArgumentError("Parameter name is required."); | 476 throw new core.ArgumentError("Parameter name is required."); |
489 } | 477 } |
490 | 478 |
491 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/rulesets'; | 479 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/rulesets'; |
492 | 480 |
493 var _response = _requester.request(_url, | 481 var _response = _requester.request(_url, "POST", |
494 "POST", | 482 body: _body, |
495 body: _body, | 483 queryParams: _queryParams, |
496 queryParams: _queryParams, | 484 uploadOptions: _uploadOptions, |
497 uploadOptions: _uploadOptions, | 485 uploadMedia: _uploadMedia, |
498 uploadMedia: _uploadMedia, | 486 downloadOptions: _downloadOptions); |
499 downloadOptions: _downloadOptions); | |
500 return _response.then((data) => new Ruleset.fromJson(data)); | 487 return _response.then((data) => new Ruleset.fromJson(data)); |
501 } | 488 } |
502 | 489 |
503 /** | 490 /// Delete a `Ruleset` by resource name. |
504 * Delete a `Ruleset` by resource name. | 491 /// |
505 * | 492 /// If the `Ruleset` is referenced by a `Release` the operation will fail. |
506 * If the `Ruleset` is referenced by a `Release` the operation will fail. | 493 /// |
507 * | 494 /// Request parameters: |
508 * Request parameters: | 495 /// |
509 * | 496 /// [name] - Resource name for the ruleset to delete. |
510 * [name] - Resource name for the ruleset to delete. | 497 /// |
511 * | 498 /// Format: `projects/{project_id}/rulesets/{ruleset_id}` |
512 * Format: `projects/{project_id}/rulesets/{ruleset_id}` | 499 /// Value must have pattern "^projects/[^/]+/rulesets/[^/]+$". |
513 * Value must have pattern "^projects/[^/]+/rulesets/[^/]+$". | 500 /// |
514 * | 501 /// Completes with a [Empty]. |
515 * Completes with a [Empty]. | 502 /// |
516 * | 503 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
517 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 504 /// an error. |
518 * error. | 505 /// |
519 * | 506 /// If the used [http.Client] completes with an error when making a REST |
520 * If the used [http.Client] completes with an error when making a REST call, | 507 /// call, this method will complete with the same error. |
521 * this method will complete with the same error. | |
522 */ | |
523 async.Future<Empty> delete(core.String name) { | 508 async.Future<Empty> delete(core.String name) { |
524 var _url = null; | 509 var _url = null; |
525 var _queryParams = new core.Map(); | 510 var _queryParams = new core.Map(); |
526 var _uploadMedia = null; | 511 var _uploadMedia = null; |
527 var _uploadOptions = null; | 512 var _uploadOptions = null; |
528 var _downloadOptions = commons.DownloadOptions.Metadata; | 513 var _downloadOptions = commons.DownloadOptions.Metadata; |
529 var _body = null; | 514 var _body = null; |
530 | 515 |
531 if (name == null) { | 516 if (name == null) { |
532 throw new core.ArgumentError("Parameter name is required."); | 517 throw new core.ArgumentError("Parameter name is required."); |
533 } | 518 } |
534 | 519 |
535 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 520 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
536 | 521 |
537 var _response = _requester.request(_url, | 522 var _response = _requester.request(_url, "DELETE", |
538 "DELETE", | 523 body: _body, |
539 body: _body, | 524 queryParams: _queryParams, |
540 queryParams: _queryParams, | 525 uploadOptions: _uploadOptions, |
541 uploadOptions: _uploadOptions, | 526 uploadMedia: _uploadMedia, |
542 uploadMedia: _uploadMedia, | 527 downloadOptions: _downloadOptions); |
543 downloadOptions: _downloadOptions); | |
544 return _response.then((data) => new Empty.fromJson(data)); | 528 return _response.then((data) => new Empty.fromJson(data)); |
545 } | 529 } |
546 | 530 |
547 /** | 531 /// Get a `Ruleset` by name including the full `Source` contents. |
548 * Get a `Ruleset` by name including the full `Source` contents. | 532 /// |
549 * | 533 /// Request parameters: |
550 * Request parameters: | 534 /// |
551 * | 535 /// [name] - Resource name for the ruleset to get. |
552 * [name] - Resource name for the ruleset to get. | 536 /// |
553 * | 537 /// Format: `projects/{project_id}/rulesets/{ruleset_id}` |
554 * Format: `projects/{project_id}/rulesets/{ruleset_id}` | 538 /// Value must have pattern "^projects/[^/]+/rulesets/[^/]+$". |
555 * Value must have pattern "^projects/[^/]+/rulesets/[^/]+$". | 539 /// |
556 * | 540 /// Completes with a [Ruleset]. |
557 * Completes with a [Ruleset]. | 541 /// |
558 * | 542 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 543 /// an error. |
560 * error. | 544 /// |
561 * | 545 /// If the used [http.Client] completes with an error when making a REST |
562 * If the used [http.Client] completes with an error when making a REST call, | 546 /// call, this method will complete with the same error. |
563 * this method will complete with the same error. | |
564 */ | |
565 async.Future<Ruleset> get(core.String name) { | 547 async.Future<Ruleset> get(core.String name) { |
566 var _url = null; | 548 var _url = null; |
567 var _queryParams = new core.Map(); | 549 var _queryParams = new core.Map(); |
568 var _uploadMedia = null; | 550 var _uploadMedia = null; |
569 var _uploadOptions = null; | 551 var _uploadOptions = null; |
570 var _downloadOptions = commons.DownloadOptions.Metadata; | 552 var _downloadOptions = commons.DownloadOptions.Metadata; |
571 var _body = null; | 553 var _body = null; |
572 | 554 |
573 if (name == null) { | 555 if (name == null) { |
574 throw new core.ArgumentError("Parameter name is required."); | 556 throw new core.ArgumentError("Parameter name is required."); |
575 } | 557 } |
576 | 558 |
577 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 559 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
578 | 560 |
579 var _response = _requester.request(_url, | 561 var _response = _requester.request(_url, "GET", |
580 "GET", | 562 body: _body, |
581 body: _body, | 563 queryParams: _queryParams, |
582 queryParams: _queryParams, | 564 uploadOptions: _uploadOptions, |
583 uploadOptions: _uploadOptions, | 565 uploadMedia: _uploadMedia, |
584 uploadMedia: _uploadMedia, | 566 downloadOptions: _downloadOptions); |
585 downloadOptions: _downloadOptions); | |
586 return _response.then((data) => new Ruleset.fromJson(data)); | 567 return _response.then((data) => new Ruleset.fromJson(data)); |
587 } | 568 } |
588 | 569 |
589 /** | 570 /// List `Ruleset` metadata only and optionally filter the results by |
590 * List `Ruleset` metadata only and optionally filter the results by `Ruleset` | 571 /// `Ruleset` |
591 * name. | 572 /// name. |
592 * | 573 /// |
593 * The full `Source` contents of a `Ruleset` may be retrieved with | 574 /// The full `Source` contents of a `Ruleset` may be retrieved with |
594 * GetRuleset. | 575 /// GetRuleset. |
595 * | 576 /// |
596 * Request parameters: | 577 /// Request parameters: |
597 * | 578 /// |
598 * [name] - Resource name for the project. | 579 /// [name] - Resource name for the project. |
599 * | 580 /// |
600 * Format: `projects/{project_id}` | 581 /// Format: `projects/{project_id}` |
601 * Value must have pattern "^projects/[^/]+$". | 582 /// Value must have pattern "^projects/[^/]+$". |
602 * | 583 /// |
603 * [pageToken] - Next page token for loading the next batch of `Ruleset` | 584 /// [filter] - `Ruleset` filter. The list method supports filters with |
604 * instances. | 585 /// restrictions on |
605 * | 586 /// `Ruleset.name`. |
606 * [pageSize] - Page size to load. Maximum of 100. Defaults to 10. | 587 /// |
607 * Note: `page_size` is just a hint and the service may choose to load less | 588 /// Filters on `Ruleset.create_time` should use the `date` function which |
608 * than `page_size` due to the size of the output. To traverse all of the | 589 /// parses strings that conform to the RFC 3339 date/time specifications. |
609 * releases, caller should iterate until the `page_token` is empty. | 590 /// |
610 * | 591 /// Example: `create_time > date("2017-01-01") AND name=UUID-*` |
611 * [filter] - `Ruleset` filter. The list method supports filters with | 592 /// |
612 * restrictions on | 593 /// [pageToken] - Next page token for loading the next batch of `Ruleset` |
613 * `Ruleset.name`. | 594 /// instances. |
614 * | 595 /// |
615 * Filters on `Ruleset.create_time` should use the `date` function which | 596 /// [pageSize] - Page size to load. Maximum of 100. Defaults to 10. |
616 * parses strings that conform to the RFC 3339 date/time specifications. | 597 /// Note: `page_size` is just a hint and the service may choose to load less |
617 * | 598 /// than `page_size` due to the size of the output. To traverse all of the |
618 * Example: `create_time > date("2017-01-01") AND name=UUID-*` | 599 /// releases, caller should iterate until the `page_token` is empty. |
619 * | 600 /// |
620 * Completes with a [ListRulesetsResponse]. | 601 /// Completes with a [ListRulesetsResponse]. |
621 * | 602 /// |
622 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 603 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
623 * error. | 604 /// an error. |
624 * | 605 /// |
625 * If the used [http.Client] completes with an error when making a REST call, | 606 /// If the used [http.Client] completes with an error when making a REST |
626 * this method will complete with the same error. | 607 /// call, this method will complete with the same error. |
627 */ | 608 async.Future<ListRulesetsResponse> list(core.String name, |
628 async.Future<ListRulesetsResponse> list(core.String name, {core.String pageTok
en, core.int pageSize, core.String filter}) { | 609 {core.String filter, core.String pageToken, core.int pageSize}) { |
629 var _url = null; | 610 var _url = null; |
630 var _queryParams = new core.Map(); | 611 var _queryParams = new core.Map(); |
631 var _uploadMedia = null; | 612 var _uploadMedia = null; |
632 var _uploadOptions = null; | 613 var _uploadOptions = null; |
633 var _downloadOptions = commons.DownloadOptions.Metadata; | 614 var _downloadOptions = commons.DownloadOptions.Metadata; |
634 var _body = null; | 615 var _body = null; |
635 | 616 |
636 if (name == null) { | 617 if (name == null) { |
637 throw new core.ArgumentError("Parameter name is required."); | 618 throw new core.ArgumentError("Parameter name is required."); |
638 } | 619 } |
| 620 if (filter != null) { |
| 621 _queryParams["filter"] = [filter]; |
| 622 } |
639 if (pageToken != null) { | 623 if (pageToken != null) { |
640 _queryParams["pageToken"] = [pageToken]; | 624 _queryParams["pageToken"] = [pageToken]; |
641 } | 625 } |
642 if (pageSize != null) { | 626 if (pageSize != null) { |
643 _queryParams["pageSize"] = ["${pageSize}"]; | 627 _queryParams["pageSize"] = ["${pageSize}"]; |
644 } | 628 } |
645 if (filter != null) { | |
646 _queryParams["filter"] = [filter]; | |
647 } | |
648 | 629 |
649 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/rulesets'; | 630 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/rulesets'; |
650 | 631 |
651 var _response = _requester.request(_url, | 632 var _response = _requester.request(_url, "GET", |
652 "GET", | 633 body: _body, |
653 body: _body, | 634 queryParams: _queryParams, |
654 queryParams: _queryParams, | 635 uploadOptions: _uploadOptions, |
655 uploadOptions: _uploadOptions, | 636 uploadMedia: _uploadMedia, |
656 uploadMedia: _uploadMedia, | 637 downloadOptions: _downloadOptions); |
657 downloadOptions: _downloadOptions); | |
658 return _response.then((data) => new ListRulesetsResponse.fromJson(data)); | 638 return _response.then((data) => new ListRulesetsResponse.fromJson(data)); |
659 } | 639 } |
660 | |
661 } | 640 } |
662 | 641 |
| 642 /// Arg matchers for the mock function. |
| 643 class Arg { |
| 644 /// Argument matches any value provided. |
| 645 Empty anyValue; |
663 | 646 |
664 | 647 /// Argument exactly matches value provided. |
665 /** Arg matchers for the mock function. */ | 648 /// |
666 class Arg { | 649 /// The values for Object must be JSON objects. It can consist of `num`, |
667 /** Argument matches any value provided. */ | 650 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
668 Empty anyValue; | |
669 /** | |
670 * Argument exactly matches value provided. | |
671 * | |
672 * The values for Object must be JSON objects. It can consist of `num`, | |
673 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
674 */ | |
675 core.Object exactValue; | 651 core.Object exactValue; |
676 | 652 |
677 Arg(); | 653 Arg(); |
678 | 654 |
679 Arg.fromJson(core.Map _json) { | 655 Arg.fromJson(core.Map _json) { |
680 if (_json.containsKey("anyValue")) { | 656 if (_json.containsKey("anyValue")) { |
681 anyValue = new Empty.fromJson(_json["anyValue"]); | 657 anyValue = new Empty.fromJson(_json["anyValue"]); |
682 } | 658 } |
683 if (_json.containsKey("exactValue")) { | 659 if (_json.containsKey("exactValue")) { |
684 exactValue = _json["exactValue"]; | 660 exactValue = _json["exactValue"]; |
685 } | 661 } |
686 } | 662 } |
687 | 663 |
688 core.Map<core.String, core.Object> toJson() { | 664 core.Map<core.String, core.Object> toJson() { |
689 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 665 final core.Map<core.String, core.Object> _json = |
| 666 new core.Map<core.String, core.Object>(); |
690 if (anyValue != null) { | 667 if (anyValue != null) { |
691 _json["anyValue"] = (anyValue).toJson(); | 668 _json["anyValue"] = (anyValue).toJson(); |
692 } | 669 } |
693 if (exactValue != null) { | 670 if (exactValue != null) { |
694 _json["exactValue"] = exactValue; | 671 _json["exactValue"] = exactValue; |
695 } | 672 } |
696 return _json; | 673 return _json; |
697 } | 674 } |
698 } | 675 } |
699 | 676 |
700 /** | 677 /// A generic empty message that you can re-use to avoid defining duplicated |
701 * A generic empty message that you can re-use to avoid defining duplicated | 678 /// empty messages in your APIs. A typical example is to use it as the request |
702 * empty messages in your APIs. A typical example is to use it as the request | 679 /// or the response type of an API method. For instance: |
703 * or the response type of an API method. For instance: | 680 /// |
704 * | 681 /// service Foo { |
705 * service Foo { | 682 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
706 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 683 /// } |
707 * } | 684 /// |
708 * | 685 /// The JSON representation for `Empty` is empty JSON object `{}`. |
709 * The JSON representation for `Empty` is empty JSON object `{}`. | |
710 */ | |
711 class Empty { | 686 class Empty { |
712 | |
713 Empty(); | 687 Empty(); |
714 | 688 |
715 Empty.fromJson(core.Map _json) { | 689 Empty.fromJson(core.Map _json) {} |
716 } | |
717 | 690 |
718 core.Map<core.String, core.Object> toJson() { | 691 core.Map<core.String, core.Object> toJson() { |
719 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 692 final core.Map<core.String, core.Object> _json = |
| 693 new core.Map<core.String, core.Object>(); |
720 return _json; | 694 return _json; |
721 } | 695 } |
722 } | 696 } |
723 | 697 |
724 /** `File` containing source content. */ | 698 /// `File` containing source content. |
725 class File { | 699 class File { |
726 /** Textual Content. */ | 700 /// Textual Content. |
727 core.String content; | 701 core.String content; |
728 /** Fingerprint (e.g. github sha) associated with the `File`. */ | 702 |
| 703 /// Fingerprint (e.g. github sha) associated with the `File`. |
729 core.String fingerprint; | 704 core.String fingerprint; |
730 core.List<core.int> get fingerprintAsBytes { | 705 core.List<core.int> get fingerprintAsBytes { |
731 return convert.BASE64.decode(fingerprint); | 706 return convert.BASE64.decode(fingerprint); |
732 } | 707 } |
733 | 708 |
734 void set fingerprintAsBytes(core.List<core.int> _bytes) { | 709 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
735 fingerprint = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); | 710 fingerprint = |
| 711 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
736 } | 712 } |
737 /** File name. */ | 713 |
| 714 /// File name. |
738 core.String name; | 715 core.String name; |
739 | 716 |
740 File(); | 717 File(); |
741 | 718 |
742 File.fromJson(core.Map _json) { | 719 File.fromJson(core.Map _json) { |
743 if (_json.containsKey("content")) { | 720 if (_json.containsKey("content")) { |
744 content = _json["content"]; | 721 content = _json["content"]; |
745 } | 722 } |
746 if (_json.containsKey("fingerprint")) { | 723 if (_json.containsKey("fingerprint")) { |
747 fingerprint = _json["fingerprint"]; | 724 fingerprint = _json["fingerprint"]; |
748 } | 725 } |
749 if (_json.containsKey("name")) { | 726 if (_json.containsKey("name")) { |
750 name = _json["name"]; | 727 name = _json["name"]; |
751 } | 728 } |
752 } | 729 } |
753 | 730 |
754 core.Map<core.String, core.Object> toJson() { | 731 core.Map<core.String, core.Object> toJson() { |
755 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 732 final core.Map<core.String, core.Object> _json = |
| 733 new core.Map<core.String, core.Object>(); |
756 if (content != null) { | 734 if (content != null) { |
757 _json["content"] = content; | 735 _json["content"] = content; |
758 } | 736 } |
759 if (fingerprint != null) { | 737 if (fingerprint != null) { |
760 _json["fingerprint"] = fingerprint; | 738 _json["fingerprint"] = fingerprint; |
761 } | 739 } |
762 if (name != null) { | 740 if (name != null) { |
763 _json["name"] = name; | 741 _json["name"] = name; |
764 } | 742 } |
765 return _json; | 743 return _json; |
766 } | 744 } |
767 } | 745 } |
768 | 746 |
769 /** | 747 /// Represents a service-defined function call that was invoked during test |
770 * Represents a service-defined function call that was invoked during test | 748 /// execution. |
771 * execution. | |
772 */ | |
773 class FunctionCall { | 749 class FunctionCall { |
774 /** | 750 /// The arguments that were provided to the function. |
775 * The arguments that were provided to the function. | 751 /// |
776 * | 752 /// The values for Object must be JSON objects. It can consist of `num`, |
777 * The values for Object must be JSON objects. It can consist of `num`, | 753 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
778 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
779 */ | |
780 core.List<core.Object> args; | 754 core.List<core.Object> args; |
781 /** Name of the function invoked. */ | 755 |
| 756 /// Name of the function invoked. |
782 core.String function; | 757 core.String function; |
783 | 758 |
784 FunctionCall(); | 759 FunctionCall(); |
785 | 760 |
786 FunctionCall.fromJson(core.Map _json) { | 761 FunctionCall.fromJson(core.Map _json) { |
787 if (_json.containsKey("args")) { | 762 if (_json.containsKey("args")) { |
788 args = _json["args"]; | 763 args = _json["args"]; |
789 } | 764 } |
790 if (_json.containsKey("function")) { | 765 if (_json.containsKey("function")) { |
791 function = _json["function"]; | 766 function = _json["function"]; |
792 } | 767 } |
793 } | 768 } |
794 | 769 |
795 core.Map<core.String, core.Object> toJson() { | 770 core.Map<core.String, core.Object> toJson() { |
796 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 771 final core.Map<core.String, core.Object> _json = |
| 772 new core.Map<core.String, core.Object>(); |
797 if (args != null) { | 773 if (args != null) { |
798 _json["args"] = args; | 774 _json["args"] = args; |
799 } | 775 } |
800 if (function != null) { | 776 if (function != null) { |
801 _json["function"] = function; | 777 _json["function"] = function; |
802 } | 778 } |
803 return _json; | 779 return _json; |
804 } | 780 } |
805 } | 781 } |
806 | 782 |
807 /** | 783 /// Mock function definition. |
808 * Mock function definition. | 784 /// |
809 * | 785 /// Mocks must refer to a function declared by the target service. The type of |
810 * Mocks must refer to a function declared by the target service. The type of | 786 /// the function args and result will be inferred at test time. If either the |
811 * the function args and result will be inferred at test time. If either the | 787 /// arg or result values are not compatible with function type declaration, the |
812 * arg or result values are not compatible with function type declaration, the | 788 /// request will be considered invalid. |
813 * request will be considered invalid. | 789 /// |
814 * | 790 /// More than one `FunctionMock` may be provided for a given function name so |
815 * More than one `FunctionMock` may be provided for a given function name so | 791 /// long as the `Arg` matchers are distinct. There may be only one function |
816 * long as the `Arg` matchers are distinct. There may be only one function | 792 /// for a given overload where all `Arg` values are `Arg.any_value`. |
817 * for a given overload where all `Arg` values are `Arg.any_value`. | |
818 */ | |
819 class FunctionMock { | 793 class FunctionMock { |
820 /** | 794 /// The list of `Arg` values to match. The order in which the arguments are |
821 * The list of `Arg` values to match. The order in which the arguments are | 795 /// provided is the order in which they must appear in the function |
822 * provided is the order in which they must appear in the function | 796 /// invocation. |
823 * invocation. | |
824 */ | |
825 core.List<Arg> args; | 797 core.List<Arg> args; |
826 /** | 798 |
827 * The name of the function. | 799 /// The name of the function. |
828 * | 800 /// |
829 * The function name must match one provided by a service declaration. | 801 /// The function name must match one provided by a service declaration. |
830 */ | |
831 core.String function; | 802 core.String function; |
832 /** The mock result of the function call. */ | 803 |
| 804 /// The mock result of the function call. |
833 Result result; | 805 Result result; |
834 | 806 |
835 FunctionMock(); | 807 FunctionMock(); |
836 | 808 |
837 FunctionMock.fromJson(core.Map _json) { | 809 FunctionMock.fromJson(core.Map _json) { |
838 if (_json.containsKey("args")) { | 810 if (_json.containsKey("args")) { |
839 args = _json["args"].map((value) => new Arg.fromJson(value)).toList(); | 811 args = _json["args"].map((value) => new Arg.fromJson(value)).toList(); |
840 } | 812 } |
841 if (_json.containsKey("function")) { | 813 if (_json.containsKey("function")) { |
842 function = _json["function"]; | 814 function = _json["function"]; |
843 } | 815 } |
844 if (_json.containsKey("result")) { | 816 if (_json.containsKey("result")) { |
845 result = new Result.fromJson(_json["result"]); | 817 result = new Result.fromJson(_json["result"]); |
846 } | 818 } |
847 } | 819 } |
848 | 820 |
849 core.Map<core.String, core.Object> toJson() { | 821 core.Map<core.String, core.Object> toJson() { |
850 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 822 final core.Map<core.String, core.Object> _json = |
| 823 new core.Map<core.String, core.Object>(); |
851 if (args != null) { | 824 if (args != null) { |
852 _json["args"] = args.map((value) => (value).toJson()).toList(); | 825 _json["args"] = args.map((value) => (value).toJson()).toList(); |
853 } | 826 } |
854 if (function != null) { | 827 if (function != null) { |
855 _json["function"] = function; | 828 _json["function"] = function; |
856 } | 829 } |
857 if (result != null) { | 830 if (result != null) { |
858 _json["result"] = (result).toJson(); | 831 _json["result"] = (result).toJson(); |
859 } | 832 } |
860 return _json; | 833 return _json; |
861 } | 834 } |
862 } | 835 } |
863 | 836 |
864 /** Issues include warnings, errors, and deprecation notices. */ | 837 /// Issues include warnings, errors, and deprecation notices. |
865 class Issue { | 838 class Issue { |
866 /** Short error description. */ | 839 /// Short error description. |
867 core.String description; | 840 core.String description; |
868 /** | 841 |
869 * The severity of the issue. | 842 /// The severity of the issue. |
870 * Possible string values are: | 843 /// Possible string values are: |
871 * - "SEVERITY_UNSPECIFIED" : An unspecified severity. | 844 /// - "SEVERITY_UNSPECIFIED" : An unspecified severity. |
872 * - "DEPRECATION" : Deprecation issue for statements and method that may no | 845 /// - "DEPRECATION" : Deprecation issue for statements and method that may no |
873 * longer be | 846 /// longer be |
874 * supported or maintained. | 847 /// supported or maintained. |
875 * - "WARNING" : Warnings such as: unused variables. | 848 /// - "WARNING" : Warnings such as: unused variables. |
876 * - "ERROR" : Errors such as: unmatched curly braces or variable | 849 /// - "ERROR" : Errors such as: unmatched curly braces or variable |
877 * redefinition. | 850 /// redefinition. |
878 */ | |
879 core.String severity; | 851 core.String severity; |
880 /** Position of the issue in the `Source`. */ | 852 |
| 853 /// Position of the issue in the `Source`. |
881 SourcePosition sourcePosition; | 854 SourcePosition sourcePosition; |
882 | 855 |
883 Issue(); | 856 Issue(); |
884 | 857 |
885 Issue.fromJson(core.Map _json) { | 858 Issue.fromJson(core.Map _json) { |
886 if (_json.containsKey("description")) { | 859 if (_json.containsKey("description")) { |
887 description = _json["description"]; | 860 description = _json["description"]; |
888 } | 861 } |
889 if (_json.containsKey("severity")) { | 862 if (_json.containsKey("severity")) { |
890 severity = _json["severity"]; | 863 severity = _json["severity"]; |
891 } | 864 } |
892 if (_json.containsKey("sourcePosition")) { | 865 if (_json.containsKey("sourcePosition")) { |
893 sourcePosition = new SourcePosition.fromJson(_json["sourcePosition"]); | 866 sourcePosition = new SourcePosition.fromJson(_json["sourcePosition"]); |
894 } | 867 } |
895 } | 868 } |
896 | 869 |
897 core.Map<core.String, core.Object> toJson() { | 870 core.Map<core.String, core.Object> toJson() { |
898 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 871 final core.Map<core.String, core.Object> _json = |
| 872 new core.Map<core.String, core.Object>(); |
899 if (description != null) { | 873 if (description != null) { |
900 _json["description"] = description; | 874 _json["description"] = description; |
901 } | 875 } |
902 if (severity != null) { | 876 if (severity != null) { |
903 _json["severity"] = severity; | 877 _json["severity"] = severity; |
904 } | 878 } |
905 if (sourcePosition != null) { | 879 if (sourcePosition != null) { |
906 _json["sourcePosition"] = (sourcePosition).toJson(); | 880 _json["sourcePosition"] = (sourcePosition).toJson(); |
907 } | 881 } |
908 return _json; | 882 return _json; |
909 } | 883 } |
910 } | 884 } |
911 | 885 |
912 /** The response for FirebaseRulesService.ListReleases. */ | 886 /// The response for FirebaseRulesService.ListReleases. |
913 class ListReleasesResponse { | 887 class ListReleasesResponse { |
914 /** | 888 /// The pagination token to retrieve the next page of results. If the value |
915 * The pagination token to retrieve the next page of results. If the value is | 889 /// is |
916 * empty, no further results remain. | 890 /// empty, no further results remain. |
917 */ | |
918 core.String nextPageToken; | 891 core.String nextPageToken; |
919 /** List of `Release` instances. */ | 892 |
| 893 /// List of `Release` instances. |
920 core.List<Release> releases; | 894 core.List<Release> releases; |
921 | 895 |
922 ListReleasesResponse(); | 896 ListReleasesResponse(); |
923 | 897 |
924 ListReleasesResponse.fromJson(core.Map _json) { | 898 ListReleasesResponse.fromJson(core.Map _json) { |
925 if (_json.containsKey("nextPageToken")) { | 899 if (_json.containsKey("nextPageToken")) { |
926 nextPageToken = _json["nextPageToken"]; | 900 nextPageToken = _json["nextPageToken"]; |
927 } | 901 } |
928 if (_json.containsKey("releases")) { | 902 if (_json.containsKey("releases")) { |
929 releases = _json["releases"].map((value) => new Release.fromJson(value)).t
oList(); | 903 releases = _json["releases"] |
| 904 .map((value) => new Release.fromJson(value)) |
| 905 .toList(); |
930 } | 906 } |
931 } | 907 } |
932 | 908 |
933 core.Map<core.String, core.Object> toJson() { | 909 core.Map<core.String, core.Object> toJson() { |
934 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 910 final core.Map<core.String, core.Object> _json = |
| 911 new core.Map<core.String, core.Object>(); |
935 if (nextPageToken != null) { | 912 if (nextPageToken != null) { |
936 _json["nextPageToken"] = nextPageToken; | 913 _json["nextPageToken"] = nextPageToken; |
937 } | 914 } |
938 if (releases != null) { | 915 if (releases != null) { |
939 _json["releases"] = releases.map((value) => (value).toJson()).toList(); | 916 _json["releases"] = releases.map((value) => (value).toJson()).toList(); |
940 } | 917 } |
941 return _json; | 918 return _json; |
942 } | 919 } |
943 } | 920 } |
944 | 921 |
945 /** The response for FirebaseRulesService.ListRulesets. */ | 922 /// The response for FirebaseRulesService.ListRulesets. |
946 class ListRulesetsResponse { | 923 class ListRulesetsResponse { |
947 /** | 924 /// The pagination token to retrieve the next page of results. If the value |
948 * The pagination token to retrieve the next page of results. If the value is | 925 /// is |
949 * empty, no further results remain. | 926 /// empty, no further results remain. |
950 */ | |
951 core.String nextPageToken; | 927 core.String nextPageToken; |
952 /** List of `Ruleset` instances. */ | 928 |
| 929 /// List of `Ruleset` instances. |
953 core.List<Ruleset> rulesets; | 930 core.List<Ruleset> rulesets; |
954 | 931 |
955 ListRulesetsResponse(); | 932 ListRulesetsResponse(); |
956 | 933 |
957 ListRulesetsResponse.fromJson(core.Map _json) { | 934 ListRulesetsResponse.fromJson(core.Map _json) { |
958 if (_json.containsKey("nextPageToken")) { | 935 if (_json.containsKey("nextPageToken")) { |
959 nextPageToken = _json["nextPageToken"]; | 936 nextPageToken = _json["nextPageToken"]; |
960 } | 937 } |
961 if (_json.containsKey("rulesets")) { | 938 if (_json.containsKey("rulesets")) { |
962 rulesets = _json["rulesets"].map((value) => new Ruleset.fromJson(value)).t
oList(); | 939 rulesets = _json["rulesets"] |
| 940 .map((value) => new Ruleset.fromJson(value)) |
| 941 .toList(); |
963 } | 942 } |
964 } | 943 } |
965 | 944 |
966 core.Map<core.String, core.Object> toJson() { | 945 core.Map<core.String, core.Object> toJson() { |
967 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 946 final core.Map<core.String, core.Object> _json = |
| 947 new core.Map<core.String, core.Object>(); |
968 if (nextPageToken != null) { | 948 if (nextPageToken != null) { |
969 _json["nextPageToken"] = nextPageToken; | 949 _json["nextPageToken"] = nextPageToken; |
970 } | 950 } |
971 if (rulesets != null) { | 951 if (rulesets != null) { |
972 _json["rulesets"] = rulesets.map((value) => (value).toJson()).toList(); | 952 _json["rulesets"] = rulesets.map((value) => (value).toJson()).toList(); |
973 } | 953 } |
974 return _json; | 954 return _json; |
975 } | 955 } |
976 } | 956 } |
977 | 957 |
978 /** | 958 /// `Release` is a named reference to a `Ruleset`. Once a `Release` refers to a |
979 * `Release` is a named reference to a `Ruleset`. Once a `Release` refers to a | 959 /// `Ruleset`, rules-enabled services will be able to enforce the `Ruleset`. |
980 * `Ruleset`, rules-enabled services will be able to enforce the `Ruleset`. | |
981 */ | |
982 class Release { | 960 class Release { |
983 /** | 961 /// Time the release was created. |
984 * Time the release was created. | 962 /// Output only. |
985 * Output only. | |
986 */ | |
987 core.String createTime; | 963 core.String createTime; |
988 /** | 964 |
989 * Resource name for the `Release`. | 965 /// Resource name for the `Release`. |
990 * | 966 /// |
991 * `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` | 967 /// `Release` names may be structured `app1/prod/v2` or flat `app1_prod_v2` |
992 * which affords developers a great deal of flexibility in mapping the name | 968 /// which affords developers a great deal of flexibility in mapping the name |
993 * to the style that best fits their existing development practices. For | 969 /// to the style that best fits their existing development practices. For |
994 * example, a name could refer to an environment, an app, a version, or some | 970 /// example, a name could refer to an environment, an app, a version, or some |
995 * combination of three. | 971 /// combination of three. |
996 * | 972 /// |
997 * In the table below, for the project name `projects/foo`, the following | 973 /// In the table below, for the project name `projects/foo`, the following |
998 * relative release paths show how flat and structured names might be chosen | 974 /// relative release paths show how flat and structured names might be chosen |
999 * to match a desired development / deployment strategy. | 975 /// to match a desired development / deployment strategy. |
1000 * | 976 /// |
1001 * Use Case | Flat Name | Structured Name | 977 /// Use Case | Flat Name | Structured Name |
1002 * -------------|---------------------|---------------- | 978 /// -------------|---------------------|---------------- |
1003 * Environments | releases/qa | releases/qa | 979 /// Environments | releases/qa | releases/qa |
1004 * Apps | releases/app1_qa | releases/app1/qa | 980 /// Apps | releases/app1_qa | releases/app1/qa |
1005 * Versions | releases/app1_v2_qa | releases/app1/v2/qa | 981 /// Versions | releases/app1_v2_qa | releases/app1/v2/qa |
1006 * | 982 /// |
1007 * The delimiter between the release name path elements can be almost anything | 983 /// The delimiter between the release name path elements can be almost |
1008 * and it should work equally well with the release name list filter, but in | 984 /// anything |
1009 * many ways the structured paths provide a clearer picture of the | 985 /// and it should work equally well with the release name list filter, but in |
1010 * relationship between `Release` instances. | 986 /// many ways the structured paths provide a clearer picture of the |
1011 * | 987 /// relationship between `Release` instances. |
1012 * Format: `projects/{project_id}/releases/{release_id}` | 988 /// |
1013 */ | 989 /// Format: `projects/{project_id}/releases/{release_id}` |
1014 core.String name; | 990 core.String name; |
1015 /** | 991 |
1016 * Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must | 992 /// Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must |
1017 * exist the `Release` to be created. | 993 /// exist the `Release` to be created. |
1018 */ | |
1019 core.String rulesetName; | 994 core.String rulesetName; |
1020 /** | 995 |
1021 * Time the release was updated. | 996 /// Time the release was updated. |
1022 * Output only. | 997 /// Output only. |
1023 */ | |
1024 core.String updateTime; | 998 core.String updateTime; |
1025 | 999 |
1026 Release(); | 1000 Release(); |
1027 | 1001 |
1028 Release.fromJson(core.Map _json) { | 1002 Release.fromJson(core.Map _json) { |
1029 if (_json.containsKey("createTime")) { | 1003 if (_json.containsKey("createTime")) { |
1030 createTime = _json["createTime"]; | 1004 createTime = _json["createTime"]; |
1031 } | 1005 } |
1032 if (_json.containsKey("name")) { | 1006 if (_json.containsKey("name")) { |
1033 name = _json["name"]; | 1007 name = _json["name"]; |
1034 } | 1008 } |
1035 if (_json.containsKey("rulesetName")) { | 1009 if (_json.containsKey("rulesetName")) { |
1036 rulesetName = _json["rulesetName"]; | 1010 rulesetName = _json["rulesetName"]; |
1037 } | 1011 } |
1038 if (_json.containsKey("updateTime")) { | 1012 if (_json.containsKey("updateTime")) { |
1039 updateTime = _json["updateTime"]; | 1013 updateTime = _json["updateTime"]; |
1040 } | 1014 } |
1041 } | 1015 } |
1042 | 1016 |
1043 core.Map<core.String, core.Object> toJson() { | 1017 core.Map<core.String, core.Object> toJson() { |
1044 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1018 final core.Map<core.String, core.Object> _json = |
| 1019 new core.Map<core.String, core.Object>(); |
1045 if (createTime != null) { | 1020 if (createTime != null) { |
1046 _json["createTime"] = createTime; | 1021 _json["createTime"] = createTime; |
1047 } | 1022 } |
1048 if (name != null) { | 1023 if (name != null) { |
1049 _json["name"] = name; | 1024 _json["name"] = name; |
1050 } | 1025 } |
1051 if (rulesetName != null) { | 1026 if (rulesetName != null) { |
1052 _json["rulesetName"] = rulesetName; | 1027 _json["rulesetName"] = rulesetName; |
1053 } | 1028 } |
1054 if (updateTime != null) { | 1029 if (updateTime != null) { |
1055 _json["updateTime"] = updateTime; | 1030 _json["updateTime"] = updateTime; |
1056 } | 1031 } |
1057 return _json; | 1032 return _json; |
1058 } | 1033 } |
1059 } | 1034 } |
1060 | 1035 |
1061 /** Possible result values from the function mock invocation. */ | 1036 /// Possible result values from the function mock invocation. |
1062 class Result { | 1037 class Result { |
1063 /** The result is undefined, meaning the result could not be computed. */ | 1038 /// The result is undefined, meaning the result could not be computed. |
1064 Empty undefined; | 1039 Empty undefined; |
1065 /** | 1040 |
1066 * The result is an actual value. The type of the value must match that | 1041 /// The result is an actual value. The type of the value must match that |
1067 * of the type declared by the service. | 1042 /// of the type declared by the service. |
1068 * | 1043 /// |
1069 * The values for Object must be JSON objects. It can consist of `num`, | 1044 /// The values for Object must be JSON objects. It can consist of `num`, |
1070 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1045 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1071 */ | |
1072 core.Object value; | 1046 core.Object value; |
1073 | 1047 |
1074 Result(); | 1048 Result(); |
1075 | 1049 |
1076 Result.fromJson(core.Map _json) { | 1050 Result.fromJson(core.Map _json) { |
1077 if (_json.containsKey("undefined")) { | 1051 if (_json.containsKey("undefined")) { |
1078 undefined = new Empty.fromJson(_json["undefined"]); | 1052 undefined = new Empty.fromJson(_json["undefined"]); |
1079 } | 1053 } |
1080 if (_json.containsKey("value")) { | 1054 if (_json.containsKey("value")) { |
1081 value = _json["value"]; | 1055 value = _json["value"]; |
1082 } | 1056 } |
1083 } | 1057 } |
1084 | 1058 |
1085 core.Map<core.String, core.Object> toJson() { | 1059 core.Map<core.String, core.Object> toJson() { |
1086 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1060 final core.Map<core.String, core.Object> _json = |
| 1061 new core.Map<core.String, core.Object>(); |
1087 if (undefined != null) { | 1062 if (undefined != null) { |
1088 _json["undefined"] = (undefined).toJson(); | 1063 _json["undefined"] = (undefined).toJson(); |
1089 } | 1064 } |
1090 if (value != null) { | 1065 if (value != null) { |
1091 _json["value"] = value; | 1066 _json["value"] = value; |
1092 } | 1067 } |
1093 return _json; | 1068 return _json; |
1094 } | 1069 } |
1095 } | 1070 } |
1096 | 1071 |
1097 /** | 1072 /// `Ruleset` is an immutable copy of `Source` with a globally unique |
1098 * `Ruleset` is an immutable copy of `Source` with a globally unique identifier | 1073 /// identifier |
1099 * and a creation time. | 1074 /// and a creation time. |
1100 */ | |
1101 class Ruleset { | 1075 class Ruleset { |
1102 /** | 1076 /// Time the `Ruleset` was created. |
1103 * Time the `Ruleset` was created. | 1077 /// Output only. |
1104 * Output only. | |
1105 */ | |
1106 core.String createTime; | 1078 core.String createTime; |
1107 /** | 1079 |
1108 * Name of the `Ruleset`. The ruleset_id is auto generated by the service. | 1080 /// Name of the `Ruleset`. The ruleset_id is auto generated by the service. |
1109 * Format: `projects/{project_id}/rulesets/{ruleset_id}` | 1081 /// Format: `projects/{project_id}/rulesets/{ruleset_id}` |
1110 * Output only. | 1082 /// Output only. |
1111 */ | |
1112 core.String name; | 1083 core.String name; |
1113 /** `Source` for the `Ruleset`. */ | 1084 |
| 1085 /// `Source` for the `Ruleset`. |
1114 Source source; | 1086 Source source; |
1115 | 1087 |
1116 Ruleset(); | 1088 Ruleset(); |
1117 | 1089 |
1118 Ruleset.fromJson(core.Map _json) { | 1090 Ruleset.fromJson(core.Map _json) { |
1119 if (_json.containsKey("createTime")) { | 1091 if (_json.containsKey("createTime")) { |
1120 createTime = _json["createTime"]; | 1092 createTime = _json["createTime"]; |
1121 } | 1093 } |
1122 if (_json.containsKey("name")) { | 1094 if (_json.containsKey("name")) { |
1123 name = _json["name"]; | 1095 name = _json["name"]; |
1124 } | 1096 } |
1125 if (_json.containsKey("source")) { | 1097 if (_json.containsKey("source")) { |
1126 source = new Source.fromJson(_json["source"]); | 1098 source = new Source.fromJson(_json["source"]); |
1127 } | 1099 } |
1128 } | 1100 } |
1129 | 1101 |
1130 core.Map<core.String, core.Object> toJson() { | 1102 core.Map<core.String, core.Object> toJson() { |
1131 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1103 final core.Map<core.String, core.Object> _json = |
| 1104 new core.Map<core.String, core.Object>(); |
1132 if (createTime != null) { | 1105 if (createTime != null) { |
1133 _json["createTime"] = createTime; | 1106 _json["createTime"] = createTime; |
1134 } | 1107 } |
1135 if (name != null) { | 1108 if (name != null) { |
1136 _json["name"] = name; | 1109 _json["name"] = name; |
1137 } | 1110 } |
1138 if (source != null) { | 1111 if (source != null) { |
1139 _json["source"] = (source).toJson(); | 1112 _json["source"] = (source).toJson(); |
1140 } | 1113 } |
1141 return _json; | 1114 return _json; |
1142 } | 1115 } |
1143 } | 1116 } |
1144 | 1117 |
1145 /** | 1118 /// `Source` is one or more `File` messages comprising a logical set of rules. |
1146 * `Source` is one or more `File` messages comprising a logical set of rules. | |
1147 */ | |
1148 class Source { | 1119 class Source { |
1149 /** `File` set constituting the `Source` bundle. */ | 1120 /// `File` set constituting the `Source` bundle. |
1150 core.List<File> files; | 1121 core.List<File> files; |
1151 | 1122 |
1152 Source(); | 1123 Source(); |
1153 | 1124 |
1154 Source.fromJson(core.Map _json) { | 1125 Source.fromJson(core.Map _json) { |
1155 if (_json.containsKey("files")) { | 1126 if (_json.containsKey("files")) { |
1156 files = _json["files"].map((value) => new File.fromJson(value)).toList(); | 1127 files = _json["files"].map((value) => new File.fromJson(value)).toList(); |
1157 } | 1128 } |
1158 } | 1129 } |
1159 | 1130 |
1160 core.Map<core.String, core.Object> toJson() { | 1131 core.Map<core.String, core.Object> toJson() { |
1161 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1132 final core.Map<core.String, core.Object> _json = |
| 1133 new core.Map<core.String, core.Object>(); |
1162 if (files != null) { | 1134 if (files != null) { |
1163 _json["files"] = files.map((value) => (value).toJson()).toList(); | 1135 _json["files"] = files.map((value) => (value).toJson()).toList(); |
1164 } | 1136 } |
1165 return _json; | 1137 return _json; |
1166 } | 1138 } |
1167 } | 1139 } |
1168 | 1140 |
1169 /** | 1141 /// Position in the `Source` content including its line, column number, and an |
1170 * Position in the `Source` content including its line, column number, and an | 1142 /// index of the `File` in the `Source` message. Used for debug purposes. |
1171 * index of the `File` in the `Source` message. Used for debug purposes. | |
1172 */ | |
1173 class SourcePosition { | 1143 class SourcePosition { |
1174 /** First column on the source line associated with the source fragment. */ | 1144 /// First column on the source line associated with the source fragment. |
1175 core.int column; | 1145 core.int column; |
1176 /** Name of the `File`. */ | 1146 |
| 1147 /// Name of the `File`. |
1177 core.String fileName; | 1148 core.String fileName; |
1178 /** Line number of the source fragment. 1-based. */ | 1149 |
| 1150 /// Line number of the source fragment. 1-based. |
1179 core.int line; | 1151 core.int line; |
1180 | 1152 |
1181 SourcePosition(); | 1153 SourcePosition(); |
1182 | 1154 |
1183 SourcePosition.fromJson(core.Map _json) { | 1155 SourcePosition.fromJson(core.Map _json) { |
1184 if (_json.containsKey("column")) { | 1156 if (_json.containsKey("column")) { |
1185 column = _json["column"]; | 1157 column = _json["column"]; |
1186 } | 1158 } |
1187 if (_json.containsKey("fileName")) { | 1159 if (_json.containsKey("fileName")) { |
1188 fileName = _json["fileName"]; | 1160 fileName = _json["fileName"]; |
1189 } | 1161 } |
1190 if (_json.containsKey("line")) { | 1162 if (_json.containsKey("line")) { |
1191 line = _json["line"]; | 1163 line = _json["line"]; |
1192 } | 1164 } |
1193 } | 1165 } |
1194 | 1166 |
1195 core.Map<core.String, core.Object> toJson() { | 1167 core.Map<core.String, core.Object> toJson() { |
1196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1168 final core.Map<core.String, core.Object> _json = |
| 1169 new core.Map<core.String, core.Object>(); |
1197 if (column != null) { | 1170 if (column != null) { |
1198 _json["column"] = column; | 1171 _json["column"] = column; |
1199 } | 1172 } |
1200 if (fileName != null) { | 1173 if (fileName != null) { |
1201 _json["fileName"] = fileName; | 1174 _json["fileName"] = fileName; |
1202 } | 1175 } |
1203 if (line != null) { | 1176 if (line != null) { |
1204 _json["line"] = line; | 1177 _json["line"] = line; |
1205 } | 1178 } |
1206 return _json; | 1179 return _json; |
1207 } | 1180 } |
1208 } | 1181 } |
1209 | 1182 |
1210 /** | 1183 /// `TestCase` messages provide the request context and an expectation as to |
1211 * `TestCase` messages provide the request context and an expectation as to | 1184 /// whether the given context will be allowed or denied. Test cases may specify |
1212 * whether the given context will be allowed or denied. Test cases may specify | 1185 /// the `request`, `resource`, and `function_mocks` to mock a function call to |
1213 * the `request`, `resource`, and `function_mocks` to mock a function call to | 1186 /// a service-provided function. |
1214 * a service-provided function. | 1187 /// |
1215 * | 1188 /// The `request` object represents context present at request-time. |
1216 * The `request` object represents context present at request-time. | 1189 /// |
1217 * | 1190 /// The `resource` is the value of the target resource as it appears in |
1218 * The `resource` is the value of the target resource as it appears in | 1191 /// persistent storage before the request is executed. |
1219 * persistent storage before the request is executed. | |
1220 */ | |
1221 class TestCase { | 1192 class TestCase { |
1222 /** | 1193 /// Test expectation. |
1223 * Test expectation. | 1194 /// Possible string values are: |
1224 * Possible string values are: | 1195 /// - "EXPECTATION_UNSPECIFIED" : Unspecified expectation. |
1225 * - "EXPECTATION_UNSPECIFIED" : Unspecified expectation. | 1196 /// - "ALLOW" : Expect an allowed result. |
1226 * - "ALLOW" : Expect an allowed result. | 1197 /// - "DENY" : Expect a denied result. |
1227 * - "DENY" : Expect a denied result. | |
1228 */ | |
1229 core.String expectation; | 1198 core.String expectation; |
1230 /** | 1199 |
1231 * Optional function mocks for service-defined functions. If not set, any | 1200 /// Optional function mocks for service-defined functions. If not set, any |
1232 * service defined function is expected to return an error, which may or may | 1201 /// service defined function is expected to return an error, which may or may |
1233 * not influence the test outcome. | 1202 /// not influence the test outcome. |
1234 */ | |
1235 core.List<FunctionMock> functionMocks; | 1203 core.List<FunctionMock> functionMocks; |
1236 /** | 1204 |
1237 * Request context. | 1205 /// Request context. |
1238 * | 1206 /// |
1239 * The exact format of the request context is service-dependent. See the | 1207 /// The exact format of the request context is service-dependent. See the |
1240 * appropriate service documentation for information about the supported | 1208 /// appropriate service documentation for information about the supported |
1241 * fields and types on the request. Minimally, all services support the | 1209 /// fields and types on the request. Minimally, all services support the |
1242 * following fields and types: | 1210 /// following fields and types: |
1243 * | 1211 /// |
1244 * Request field | Type | 1212 /// Request field | Type |
1245 * ---------------|----------------- | 1213 /// ---------------|----------------- |
1246 * auth.uid | `string` | 1214 /// auth.uid | `string` |
1247 * auth.token | `map<string, string>` | 1215 /// auth.token | `map<string, string>` |
1248 * headers | `map<string, string>` | 1216 /// headers | `map<string, string>` |
1249 * method | `string` | 1217 /// method | `string` |
1250 * params | `map<string, string>` | 1218 /// params | `map<string, string>` |
1251 * path | `string` | 1219 /// path | `string` |
1252 * time | `google.protobuf.Timestamp` | 1220 /// time | `google.protobuf.Timestamp` |
1253 * | 1221 /// |
1254 * If the request value is not well-formed for the service, the request will | 1222 /// If the request value is not well-formed for the service, the request will |
1255 * be rejected as an invalid argument. | 1223 /// be rejected as an invalid argument. |
1256 * | 1224 /// |
1257 * The values for Object must be JSON objects. It can consist of `num`, | 1225 /// The values for Object must be JSON objects. It can consist of `num`, |
1258 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1226 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1259 */ | |
1260 core.Object request; | 1227 core.Object request; |
1261 /** | 1228 |
1262 * Optional resource value as it appears in persistent storage before the | 1229 /// Optional resource value as it appears in persistent storage before the |
1263 * request is fulfilled. | 1230 /// request is fulfilled. |
1264 * | 1231 /// |
1265 * The resource type depends on the `request.path` value. | 1232 /// The resource type depends on the `request.path` value. |
1266 * | 1233 /// |
1267 * The values for Object must be JSON objects. It can consist of `num`, | 1234 /// The values for Object must be JSON objects. It can consist of `num`, |
1268 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1235 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1269 */ | |
1270 core.Object resource; | 1236 core.Object resource; |
1271 | 1237 |
1272 TestCase(); | 1238 TestCase(); |
1273 | 1239 |
1274 TestCase.fromJson(core.Map _json) { | 1240 TestCase.fromJson(core.Map _json) { |
1275 if (_json.containsKey("expectation")) { | 1241 if (_json.containsKey("expectation")) { |
1276 expectation = _json["expectation"]; | 1242 expectation = _json["expectation"]; |
1277 } | 1243 } |
1278 if (_json.containsKey("functionMocks")) { | 1244 if (_json.containsKey("functionMocks")) { |
1279 functionMocks = _json["functionMocks"].map((value) => new FunctionMock.fro
mJson(value)).toList(); | 1245 functionMocks = _json["functionMocks"] |
| 1246 .map((value) => new FunctionMock.fromJson(value)) |
| 1247 .toList(); |
1280 } | 1248 } |
1281 if (_json.containsKey("request")) { | 1249 if (_json.containsKey("request")) { |
1282 request = _json["request"]; | 1250 request = _json["request"]; |
1283 } | 1251 } |
1284 if (_json.containsKey("resource")) { | 1252 if (_json.containsKey("resource")) { |
1285 resource = _json["resource"]; | 1253 resource = _json["resource"]; |
1286 } | 1254 } |
1287 } | 1255 } |
1288 | 1256 |
1289 core.Map<core.String, core.Object> toJson() { | 1257 core.Map<core.String, core.Object> toJson() { |
1290 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1258 final core.Map<core.String, core.Object> _json = |
| 1259 new core.Map<core.String, core.Object>(); |
1291 if (expectation != null) { | 1260 if (expectation != null) { |
1292 _json["expectation"] = expectation; | 1261 _json["expectation"] = expectation; |
1293 } | 1262 } |
1294 if (functionMocks != null) { | 1263 if (functionMocks != null) { |
1295 _json["functionMocks"] = functionMocks.map((value) => (value).toJson()).to
List(); | 1264 _json["functionMocks"] = |
| 1265 functionMocks.map((value) => (value).toJson()).toList(); |
1296 } | 1266 } |
1297 if (request != null) { | 1267 if (request != null) { |
1298 _json["request"] = request; | 1268 _json["request"] = request; |
1299 } | 1269 } |
1300 if (resource != null) { | 1270 if (resource != null) { |
1301 _json["resource"] = resource; | 1271 _json["resource"] = resource; |
1302 } | 1272 } |
1303 return _json; | 1273 return _json; |
1304 } | 1274 } |
1305 } | 1275 } |
1306 | 1276 |
1307 /** | 1277 /// Test result message containing the state of the test as well as a |
1308 * Test result message containing the state of the test as well as a | 1278 /// description and source position for test failures. |
1309 * description and source position for test failures. | |
1310 */ | |
1311 class TestResult { | 1279 class TestResult { |
1312 /** | 1280 /// Debug messages related to test execution issues encountered during |
1313 * Debug messages related to test execution issues encountered during | 1281 /// evaluation. |
1314 * evaluation. | 1282 /// |
1315 * | 1283 /// Debug messages may be related to too many or too few invocations of |
1316 * Debug messages may be related to too many or too few invocations of | 1284 /// function mocks or to runtime errors that occur during evaluation. |
1317 * function mocks or to runtime errors that occur during evaluation. | 1285 /// |
1318 * | 1286 /// For example: ```Unable to read variable [name: "resource"]``` |
1319 * For example: ```Unable to read variable [name: "resource"]``` | |
1320 */ | |
1321 core.List<core.String> debugMessages; | 1287 core.List<core.String> debugMessages; |
1322 /** | 1288 |
1323 * Position in the `Source` or `Ruleset` where the principle runtime error | 1289 /// Position in the `Source` or `Ruleset` where the principle runtime error |
1324 * occurs. | 1290 /// occurs. |
1325 * | 1291 /// |
1326 * Evaluation of an expression may result in an error. Rules are deny by | 1292 /// Evaluation of an expression may result in an error. Rules are deny by |
1327 * default, so a `DENY` expectation when an error is generated is valid. | 1293 /// default, so a `DENY` expectation when an error is generated is valid. |
1328 * When there is a `DENY` with an error, the `SourcePosition` is returned. | 1294 /// When there is a `DENY` with an error, the `SourcePosition` is returned. |
1329 * | 1295 /// |
1330 * E.g. `error_position { line: 19 column: 37 }` | 1296 /// E.g. `error_position { line: 19 column: 37 }` |
1331 */ | |
1332 SourcePosition errorPosition; | 1297 SourcePosition errorPosition; |
1333 /** | 1298 |
1334 * The set of function calls made to service-defined methods. | 1299 /// The set of function calls made to service-defined methods. |
1335 * | 1300 /// |
1336 * Function calls are included in the order in which they are encountered | 1301 /// Function calls are included in the order in which they are encountered |
1337 * during evaluation, are provided for both mocked and unmocked functions, | 1302 /// during evaluation, are provided for both mocked and unmocked functions, |
1338 * and included on the response regardless of the test `state`. | 1303 /// and included on the response regardless of the test `state`. |
1339 */ | |
1340 core.List<FunctionCall> functionCalls; | 1304 core.List<FunctionCall> functionCalls; |
1341 /** | 1305 |
1342 * State of the test. | 1306 /// State of the test. |
1343 * Possible string values are: | 1307 /// Possible string values are: |
1344 * - "STATE_UNSPECIFIED" : Test state is not set. | 1308 /// - "STATE_UNSPECIFIED" : Test state is not set. |
1345 * - "SUCCESS" : Test is a success. | 1309 /// - "SUCCESS" : Test is a success. |
1346 * - "FAILURE" : Test is a failure. | 1310 /// - "FAILURE" : Test is a failure. |
1347 */ | |
1348 core.String state; | 1311 core.String state; |
1349 | 1312 |
1350 TestResult(); | 1313 TestResult(); |
1351 | 1314 |
1352 TestResult.fromJson(core.Map _json) { | 1315 TestResult.fromJson(core.Map _json) { |
1353 if (_json.containsKey("debugMessages")) { | 1316 if (_json.containsKey("debugMessages")) { |
1354 debugMessages = _json["debugMessages"]; | 1317 debugMessages = _json["debugMessages"]; |
1355 } | 1318 } |
1356 if (_json.containsKey("errorPosition")) { | 1319 if (_json.containsKey("errorPosition")) { |
1357 errorPosition = new SourcePosition.fromJson(_json["errorPosition"]); | 1320 errorPosition = new SourcePosition.fromJson(_json["errorPosition"]); |
1358 } | 1321 } |
1359 if (_json.containsKey("functionCalls")) { | 1322 if (_json.containsKey("functionCalls")) { |
1360 functionCalls = _json["functionCalls"].map((value) => new FunctionCall.fro
mJson(value)).toList(); | 1323 functionCalls = _json["functionCalls"] |
| 1324 .map((value) => new FunctionCall.fromJson(value)) |
| 1325 .toList(); |
1361 } | 1326 } |
1362 if (_json.containsKey("state")) { | 1327 if (_json.containsKey("state")) { |
1363 state = _json["state"]; | 1328 state = _json["state"]; |
1364 } | 1329 } |
1365 } | 1330 } |
1366 | 1331 |
1367 core.Map<core.String, core.Object> toJson() { | 1332 core.Map<core.String, core.Object> toJson() { |
1368 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1333 final core.Map<core.String, core.Object> _json = |
| 1334 new core.Map<core.String, core.Object>(); |
1369 if (debugMessages != null) { | 1335 if (debugMessages != null) { |
1370 _json["debugMessages"] = debugMessages; | 1336 _json["debugMessages"] = debugMessages; |
1371 } | 1337 } |
1372 if (errorPosition != null) { | 1338 if (errorPosition != null) { |
1373 _json["errorPosition"] = (errorPosition).toJson(); | 1339 _json["errorPosition"] = (errorPosition).toJson(); |
1374 } | 1340 } |
1375 if (functionCalls != null) { | 1341 if (functionCalls != null) { |
1376 _json["functionCalls"] = functionCalls.map((value) => (value).toJson()).to
List(); | 1342 _json["functionCalls"] = |
| 1343 functionCalls.map((value) => (value).toJson()).toList(); |
1377 } | 1344 } |
1378 if (state != null) { | 1345 if (state != null) { |
1379 _json["state"] = state; | 1346 _json["state"] = state; |
1380 } | 1347 } |
1381 return _json; | 1348 return _json; |
1382 } | 1349 } |
1383 } | 1350 } |
1384 | 1351 |
1385 /** The request for FirebaseRulesService.TestRuleset. */ | 1352 /// The request for FirebaseRulesService.TestRuleset. |
1386 class TestRulesetRequest { | 1353 class TestRulesetRequest { |
1387 /** | 1354 /// Optional `Source` to be checked for correctness. |
1388 * Optional `Source` to be checked for correctness. | 1355 /// |
1389 * | 1356 /// This field must not be set when the resource name refers to a `Ruleset`. |
1390 * This field must not be set when the resource name refers to a `Ruleset`. | |
1391 */ | |
1392 Source source; | 1357 Source source; |
1393 /** Inline `TestSuite` to run. */ | 1358 |
| 1359 /// Inline `TestSuite` to run. |
1394 TestSuite testSuite; | 1360 TestSuite testSuite; |
1395 | 1361 |
1396 TestRulesetRequest(); | 1362 TestRulesetRequest(); |
1397 | 1363 |
1398 TestRulesetRequest.fromJson(core.Map _json) { | 1364 TestRulesetRequest.fromJson(core.Map _json) { |
1399 if (_json.containsKey("source")) { | 1365 if (_json.containsKey("source")) { |
1400 source = new Source.fromJson(_json["source"]); | 1366 source = new Source.fromJson(_json["source"]); |
1401 } | 1367 } |
1402 if (_json.containsKey("testSuite")) { | 1368 if (_json.containsKey("testSuite")) { |
1403 testSuite = new TestSuite.fromJson(_json["testSuite"]); | 1369 testSuite = new TestSuite.fromJson(_json["testSuite"]); |
1404 } | 1370 } |
1405 } | 1371 } |
1406 | 1372 |
1407 core.Map<core.String, core.Object> toJson() { | 1373 core.Map<core.String, core.Object> toJson() { |
1408 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1374 final core.Map<core.String, core.Object> _json = |
| 1375 new core.Map<core.String, core.Object>(); |
1409 if (source != null) { | 1376 if (source != null) { |
1410 _json["source"] = (source).toJson(); | 1377 _json["source"] = (source).toJson(); |
1411 } | 1378 } |
1412 if (testSuite != null) { | 1379 if (testSuite != null) { |
1413 _json["testSuite"] = (testSuite).toJson(); | 1380 _json["testSuite"] = (testSuite).toJson(); |
1414 } | 1381 } |
1415 return _json; | 1382 return _json; |
1416 } | 1383 } |
1417 } | 1384 } |
1418 | 1385 |
1419 /** The response for FirebaseRulesService.TestRuleset. */ | 1386 /// The response for FirebaseRulesService.TestRuleset. |
1420 class TestRulesetResponse { | 1387 class TestRulesetResponse { |
1421 /** | 1388 /// Syntactic and semantic `Source` issues of varying severity. Issues of |
1422 * Syntactic and semantic `Source` issues of varying severity. Issues of | 1389 /// `ERROR` severity will prevent tests from executing. |
1423 * `ERROR` severity will prevent tests from executing. | |
1424 */ | |
1425 core.List<Issue> issues; | 1390 core.List<Issue> issues; |
1426 /** | 1391 |
1427 * The set of test results given the test cases in the `TestSuite`. | 1392 /// The set of test results given the test cases in the `TestSuite`. |
1428 * The results will appear in the same order as the test cases appear in the | 1393 /// The results will appear in the same order as the test cases appear in the |
1429 * `TestSuite`. | 1394 /// `TestSuite`. |
1430 */ | |
1431 core.List<TestResult> testResults; | 1395 core.List<TestResult> testResults; |
1432 | 1396 |
1433 TestRulesetResponse(); | 1397 TestRulesetResponse(); |
1434 | 1398 |
1435 TestRulesetResponse.fromJson(core.Map _json) { | 1399 TestRulesetResponse.fromJson(core.Map _json) { |
1436 if (_json.containsKey("issues")) { | 1400 if (_json.containsKey("issues")) { |
1437 issues = _json["issues"].map((value) => new Issue.fromJson(value)).toList(
); | 1401 issues = |
| 1402 _json["issues"].map((value) => new Issue.fromJson(value)).toList(); |
1438 } | 1403 } |
1439 if (_json.containsKey("testResults")) { | 1404 if (_json.containsKey("testResults")) { |
1440 testResults = _json["testResults"].map((value) => new TestResult.fromJson(
value)).toList(); | 1405 testResults = _json["testResults"] |
| 1406 .map((value) => new TestResult.fromJson(value)) |
| 1407 .toList(); |
1441 } | 1408 } |
1442 } | 1409 } |
1443 | 1410 |
1444 core.Map<core.String, core.Object> toJson() { | 1411 core.Map<core.String, core.Object> toJson() { |
1445 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1412 final core.Map<core.String, core.Object> _json = |
| 1413 new core.Map<core.String, core.Object>(); |
1446 if (issues != null) { | 1414 if (issues != null) { |
1447 _json["issues"] = issues.map((value) => (value).toJson()).toList(); | 1415 _json["issues"] = issues.map((value) => (value).toJson()).toList(); |
1448 } | 1416 } |
1449 if (testResults != null) { | 1417 if (testResults != null) { |
1450 _json["testResults"] = testResults.map((value) => (value).toJson()).toList
(); | 1418 _json["testResults"] = |
| 1419 testResults.map((value) => (value).toJson()).toList(); |
1451 } | 1420 } |
1452 return _json; | 1421 return _json; |
1453 } | 1422 } |
1454 } | 1423 } |
1455 | 1424 |
1456 /** | 1425 /// `TestSuite` is a collection of `TestCase` instances that validate the |
1457 * `TestSuite` is a collection of `TestCase` instances that validate the logical | 1426 /// logical |
1458 * correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within | 1427 /// correctness of a `Ruleset`. The `TestSuite` may be referenced in-line |
1459 * a `TestRuleset` invocation or as part of a `Release` object as a pre-release | 1428 /// within |
1460 * check. | 1429 /// a `TestRuleset` invocation or as part of a `Release` object as a |
1461 */ | 1430 /// pre-release |
| 1431 /// check. |
1462 class TestSuite { | 1432 class TestSuite { |
1463 /** Collection of test cases associated with the `TestSuite`. */ | 1433 /// Collection of test cases associated with the `TestSuite`. |
1464 core.List<TestCase> testCases; | 1434 core.List<TestCase> testCases; |
1465 | 1435 |
1466 TestSuite(); | 1436 TestSuite(); |
1467 | 1437 |
1468 TestSuite.fromJson(core.Map _json) { | 1438 TestSuite.fromJson(core.Map _json) { |
1469 if (_json.containsKey("testCases")) { | 1439 if (_json.containsKey("testCases")) { |
1470 testCases = _json["testCases"].map((value) => new TestCase.fromJson(value)
).toList(); | 1440 testCases = _json["testCases"] |
| 1441 .map((value) => new TestCase.fromJson(value)) |
| 1442 .toList(); |
1471 } | 1443 } |
1472 } | 1444 } |
1473 | 1445 |
1474 core.Map<core.String, core.Object> toJson() { | 1446 core.Map<core.String, core.Object> toJson() { |
1475 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1447 final core.Map<core.String, core.Object> _json = |
| 1448 new core.Map<core.String, core.Object>(); |
1476 if (testCases != null) { | 1449 if (testCases != null) { |
1477 _json["testCases"] = testCases.map((value) => (value).toJson()).toList(); | 1450 _json["testCases"] = testCases.map((value) => (value).toJson()).toList(); |
1478 } | 1451 } |
1479 return _json; | 1452 return _json; |
1480 } | 1453 } |
1481 } | 1454 } |
OLD | NEW |