Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: generated/googleapis/lib/discovery/v1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.discovery.v1; 3 library googleapis.discovery.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 discovery/v1'; 15 const core.String USER_AGENT = 'dart-api-client discovery/v1';
16 16
17 /** 17 /// Provides information about other Google APIs, such as what APIs are
18 * Provides information about other Google APIs, such as what APIs are 18 /// available, the resource, and method details for each API.
19 * available, the resource, and method details for each API.
20 */
21 class DiscoveryApi { 19 class DiscoveryApi {
22
23 final commons.ApiRequester _requester; 20 final commons.ApiRequester _requester;
24 21
25 ApisResourceApi get apis => new ApisResourceApi(_requester); 22 ApisResourceApi get apis => new ApisResourceApi(_requester);
26 23
27 DiscoveryApi(http.Client client, {core.String rootUrl: "https://www.googleapis .com/", core.String servicePath: "discovery/v1/"}) : 24 DiscoveryApi(http.Client client,
28 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 25 {core.String rootUrl: "https://www.googleapis.com/",
26 core.String servicePath: "discovery/v1/"})
27 : _requester =
28 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
29 } 29 }
30 30
31
32 class ApisResourceApi { 31 class ApisResourceApi {
33 final commons.ApiRequester _requester; 32 final commons.ApiRequester _requester;
34 33
35 ApisResourceApi(commons.ApiRequester client) : 34 ApisResourceApi(commons.ApiRequester client) : _requester = client;
36 _requester = client;
37 35
38 /** 36 /// Retrieve the description of a particular version of an api.
39 * Retrieve the description of a particular version of an api. 37 ///
40 * 38 /// Request parameters:
41 * Request parameters: 39 ///
42 * 40 /// [api] - The name of the API.
43 * [api] - The name of the API. 41 ///
44 * 42 /// [version] - The version of the API.
45 * [version] - The version of the API. 43 ///
46 * 44 /// Completes with a [RestDescription].
47 * Completes with a [RestDescription]. 45 ///
48 * 46 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
49 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 47 /// an error.
50 * error. 48 ///
51 * 49 /// If the used [http.Client] completes with an error when making a REST
52 * If the used [http.Client] completes with an error when making a REST call, 50 /// call, this method will complete with the same error.
53 * this method will complete with the same error.
54 */
55 async.Future<RestDescription> getRest(core.String api, core.String version) { 51 async.Future<RestDescription> getRest(core.String api, core.String version) {
56 var _url = null; 52 var _url = null;
57 var _queryParams = new core.Map(); 53 var _queryParams = new core.Map();
58 var _uploadMedia = null; 54 var _uploadMedia = null;
59 var _uploadOptions = null; 55 var _uploadOptions = null;
60 var _downloadOptions = commons.DownloadOptions.Metadata; 56 var _downloadOptions = commons.DownloadOptions.Metadata;
61 var _body = null; 57 var _body = null;
62 58
63 if (api == null) { 59 if (api == null) {
64 throw new core.ArgumentError("Parameter api is required."); 60 throw new core.ArgumentError("Parameter api is required.");
65 } 61 }
66 if (version == null) { 62 if (version == null) {
67 throw new core.ArgumentError("Parameter version is required."); 63 throw new core.ArgumentError("Parameter version is required.");
68 } 64 }
69 65
70 _url = 'apis/' + commons.Escaper.ecapeVariable('$api') + '/' + commons.Escap er.ecapeVariable('$version') + '/rest'; 66 _url = 'apis/' +
67 commons.Escaper.ecapeVariable('$api') +
68 '/' +
69 commons.Escaper.ecapeVariable('$version') +
70 '/rest';
71 71
72 var _response = _requester.request(_url, 72 var _response = _requester.request(_url, "GET",
73 "GET", 73 body: _body,
74 body: _body, 74 queryParams: _queryParams,
75 queryParams: _queryParams, 75 uploadOptions: _uploadOptions,
76 uploadOptions: _uploadOptions, 76 uploadMedia: _uploadMedia,
77 uploadMedia: _uploadMedia, 77 downloadOptions: _downloadOptions);
78 downloadOptions: _downloadOptions);
79 return _response.then((data) => new RestDescription.fromJson(data)); 78 return _response.then((data) => new RestDescription.fromJson(data));
80 } 79 }
81 80
82 /** 81 /// Retrieve the list of APIs supported at this endpoint.
83 * Retrieve the list of APIs supported at this endpoint. 82 ///
84 * 83 /// Request parameters:
85 * Request parameters: 84 ///
86 * 85 /// [name] - Only include APIs with the given name.
87 * [name] - Only include APIs with the given name. 86 ///
88 * 87 /// [preferred] - Return only the preferred version of an API.
89 * [preferred] - Return only the preferred version of an API. 88 ///
90 * 89 /// Completes with a [DirectoryList].
91 * Completes with a [DirectoryList]. 90 ///
92 * 91 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
93 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 92 /// an error.
94 * error. 93 ///
95 * 94 /// If the used [http.Client] completes with an error when making a REST
96 * If the used [http.Client] completes with an error when making a REST call, 95 /// call, this method will complete with the same error.
97 * this method will complete with the same error.
98 */
99 async.Future<DirectoryList> list({core.String name, core.bool preferred}) { 96 async.Future<DirectoryList> list({core.String name, core.bool preferred}) {
100 var _url = null; 97 var _url = null;
101 var _queryParams = new core.Map(); 98 var _queryParams = new core.Map();
102 var _uploadMedia = null; 99 var _uploadMedia = null;
103 var _uploadOptions = null; 100 var _uploadOptions = null;
104 var _downloadOptions = commons.DownloadOptions.Metadata; 101 var _downloadOptions = commons.DownloadOptions.Metadata;
105 var _body = null; 102 var _body = null;
106 103
107 if (name != null) { 104 if (name != null) {
108 _queryParams["name"] = [name]; 105 _queryParams["name"] = [name];
109 } 106 }
110 if (preferred != null) { 107 if (preferred != null) {
111 _queryParams["preferred"] = ["${preferred}"]; 108 _queryParams["preferred"] = ["${preferred}"];
112 } 109 }
113 110
114 _url = 'apis'; 111 _url = 'apis';
115 112
116 var _response = _requester.request(_url, 113 var _response = _requester.request(_url, "GET",
117 "GET", 114 body: _body,
118 body: _body, 115 queryParams: _queryParams,
119 queryParams: _queryParams, 116 uploadOptions: _uploadOptions,
120 uploadOptions: _uploadOptions, 117 uploadMedia: _uploadMedia,
121 uploadMedia: _uploadMedia, 118 downloadOptions: _downloadOptions);
122 downloadOptions: _downloadOptions);
123 return _response.then((data) => new DirectoryList.fromJson(data)); 119 return _response.then((data) => new DirectoryList.fromJson(data));
124 } 120 }
125
126 } 121 }
127 122
123 /// Links to 16x16 and 32x32 icons representing the API.
124 class DirectoryListItemsIcons {
125 /// The URL of the 16x16 icon.
126 core.String x16;
128 127
129 128 /// The URL of the 32x32 icon.
130 /** Links to 16x16 and 32x32 icons representing the API. */
131 class DirectoryListItemsIcons {
132 /** The URL of the 16x16 icon. */
133 core.String x16;
134 /** The URL of the 32x32 icon. */
135 core.String x32; 129 core.String x32;
136 130
137 DirectoryListItemsIcons(); 131 DirectoryListItemsIcons();
138 132
139 DirectoryListItemsIcons.fromJson(core.Map _json) { 133 DirectoryListItemsIcons.fromJson(core.Map _json) {
140 if (_json.containsKey("x16")) { 134 if (_json.containsKey("x16")) {
141 x16 = _json["x16"]; 135 x16 = _json["x16"];
142 } 136 }
143 if (_json.containsKey("x32")) { 137 if (_json.containsKey("x32")) {
144 x32 = _json["x32"]; 138 x32 = _json["x32"];
145 } 139 }
146 } 140 }
147 141
148 core.Map<core.String, core.Object> toJson() { 142 core.Map<core.String, core.Object> toJson() {
149 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 143 final core.Map<core.String, core.Object> _json =
144 new core.Map<core.String, core.Object>();
150 if (x16 != null) { 145 if (x16 != null) {
151 _json["x16"] = x16; 146 _json["x16"] = x16;
152 } 147 }
153 if (x32 != null) { 148 if (x32 != null) {
154 _json["x32"] = x32; 149 _json["x32"] = x32;
155 } 150 }
156 return _json; 151 return _json;
157 } 152 }
158 } 153 }
159 154
160 class DirectoryListItems { 155 class DirectoryListItems {
161 /** The description of this API. */ 156 /// The description of this API.
162 core.String description; 157 core.String description;
163 /** A link to the discovery document. */ 158
159 /// A link to the discovery document.
164 core.String discoveryLink; 160 core.String discoveryLink;
165 /** The URL for the discovery REST document. */ 161
162 /// The URL for the discovery REST document.
166 core.String discoveryRestUrl; 163 core.String discoveryRestUrl;
167 /** A link to human readable documentation for the API. */ 164
165 /// A link to human readable documentation for the API.
168 core.String documentationLink; 166 core.String documentationLink;
169 /** Links to 16x16 and 32x32 icons representing the API. */ 167
168 /// Links to 16x16 and 32x32 icons representing the API.
170 DirectoryListItemsIcons icons; 169 DirectoryListItemsIcons icons;
171 /** The id of this API. */ 170
171 /// The id of this API.
172 core.String id; 172 core.String id;
173 /** The kind for this response. */ 173
174 /// The kind for this response.
174 core.String kind; 175 core.String kind;
175 /** Labels for the status of this API, such as labs or deprecated. */ 176
177 /// Labels for the status of this API, such as labs or deprecated.
176 core.List<core.String> labels; 178 core.List<core.String> labels;
177 /** The name of the API. */ 179
180 /// The name of the API.
178 core.String name; 181 core.String name;
179 /** True if this version is the preferred version to use. */ 182
183 /// True if this version is the preferred version to use.
180 core.bool preferred; 184 core.bool preferred;
181 /** The title of this API. */ 185
186 /// The title of this API.
182 core.String title; 187 core.String title;
183 /** The version of the API. */ 188
189 /// The version of the API.
184 core.String version; 190 core.String version;
185 191
186 DirectoryListItems(); 192 DirectoryListItems();
187 193
188 DirectoryListItems.fromJson(core.Map _json) { 194 DirectoryListItems.fromJson(core.Map _json) {
189 if (_json.containsKey("description")) { 195 if (_json.containsKey("description")) {
190 description = _json["description"]; 196 description = _json["description"];
191 } 197 }
192 if (_json.containsKey("discoveryLink")) { 198 if (_json.containsKey("discoveryLink")) {
193 discoveryLink = _json["discoveryLink"]; 199 discoveryLink = _json["discoveryLink"];
(...skipping 24 matching lines...) Expand all
218 } 224 }
219 if (_json.containsKey("title")) { 225 if (_json.containsKey("title")) {
220 title = _json["title"]; 226 title = _json["title"];
221 } 227 }
222 if (_json.containsKey("version")) { 228 if (_json.containsKey("version")) {
223 version = _json["version"]; 229 version = _json["version"];
224 } 230 }
225 } 231 }
226 232
227 core.Map<core.String, core.Object> toJson() { 233 core.Map<core.String, core.Object> toJson() {
228 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 234 final core.Map<core.String, core.Object> _json =
235 new core.Map<core.String, core.Object>();
229 if (description != null) { 236 if (description != null) {
230 _json["description"] = description; 237 _json["description"] = description;
231 } 238 }
232 if (discoveryLink != null) { 239 if (discoveryLink != null) {
233 _json["discoveryLink"] = discoveryLink; 240 _json["discoveryLink"] = discoveryLink;
234 } 241 }
235 if (discoveryRestUrl != null) { 242 if (discoveryRestUrl != null) {
236 _json["discoveryRestUrl"] = discoveryRestUrl; 243 _json["discoveryRestUrl"] = discoveryRestUrl;
237 } 244 }
238 if (documentationLink != null) { 245 if (documentationLink != null) {
(...skipping 21 matching lines...) Expand all
260 _json["title"] = title; 267 _json["title"] = title;
261 } 268 }
262 if (version != null) { 269 if (version != null) {
263 _json["version"] = version; 270 _json["version"] = version;
264 } 271 }
265 return _json; 272 return _json;
266 } 273 }
267 } 274 }
268 275
269 class DirectoryList { 276 class DirectoryList {
270 /** Indicate the version of the Discovery API used to generate this doc. */ 277 /// Indicate the version of the Discovery API used to generate this doc.
271 core.String discoveryVersion; 278 core.String discoveryVersion;
272 /** The individual directory entries. One entry per api/version pair. */ 279
280 /// The individual directory entries. One entry per api/version pair.
273 core.List<DirectoryListItems> items; 281 core.List<DirectoryListItems> items;
274 /** The kind for this response. */ 282
283 /// The kind for this response.
275 core.String kind; 284 core.String kind;
276 285
277 DirectoryList(); 286 DirectoryList();
278 287
279 DirectoryList.fromJson(core.Map _json) { 288 DirectoryList.fromJson(core.Map _json) {
280 if (_json.containsKey("discoveryVersion")) { 289 if (_json.containsKey("discoveryVersion")) {
281 discoveryVersion = _json["discoveryVersion"]; 290 discoveryVersion = _json["discoveryVersion"];
282 } 291 }
283 if (_json.containsKey("items")) { 292 if (_json.containsKey("items")) {
284 items = _json["items"].map((value) => new DirectoryListItems.fromJson(valu e)).toList(); 293 items = _json["items"]
294 .map((value) => new DirectoryListItems.fromJson(value))
295 .toList();
285 } 296 }
286 if (_json.containsKey("kind")) { 297 if (_json.containsKey("kind")) {
287 kind = _json["kind"]; 298 kind = _json["kind"];
288 } 299 }
289 } 300 }
290 301
291 core.Map<core.String, core.Object> toJson() { 302 core.Map<core.String, core.Object> toJson() {
292 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 303 final core.Map<core.String, core.Object> _json =
304 new core.Map<core.String, core.Object>();
293 if (discoveryVersion != null) { 305 if (discoveryVersion != null) {
294 _json["discoveryVersion"] = discoveryVersion; 306 _json["discoveryVersion"] = discoveryVersion;
295 } 307 }
296 if (items != null) { 308 if (items != null) {
297 _json["items"] = items.map((value) => (value).toJson()).toList(); 309 _json["items"] = items.map((value) => (value).toJson()).toList();
298 } 310 }
299 if (kind != null) { 311 if (kind != null) {
300 _json["kind"] = kind; 312 _json["kind"] = kind;
301 } 313 }
302 return _json; 314 return _json;
303 } 315 }
304 } 316 }
305 317
306 /** Additional information about this property. */ 318 /// Additional information about this property.
307 class JsonSchemaAnnotations { 319 class JsonSchemaAnnotations {
308 /** A list of methods for which this property is required on requests. */ 320 /// A list of methods for which this property is required on requests.
309 core.List<core.String> required; 321 core.List<core.String> required;
310 322
311 JsonSchemaAnnotations(); 323 JsonSchemaAnnotations();
312 324
313 JsonSchemaAnnotations.fromJson(core.Map _json) { 325 JsonSchemaAnnotations.fromJson(core.Map _json) {
314 if (_json.containsKey("required")) { 326 if (_json.containsKey("required")) {
315 required = _json["required"]; 327 required = _json["required"];
316 } 328 }
317 } 329 }
318 330
319 core.Map<core.String, core.Object> toJson() { 331 core.Map<core.String, core.Object> toJson() {
320 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 332 final core.Map<core.String, core.Object> _json =
333 new core.Map<core.String, core.Object>();
321 if (required != null) { 334 if (required != null) {
322 _json["required"] = required; 335 _json["required"] = required;
323 } 336 }
324 return _json; 337 return _json;
325 } 338 }
326 } 339 }
327 340
328 class JsonSchemaVariantMap { 341 class JsonSchemaVariantMap {
329 core.String P_ref; 342 core.String P_ref;
330 core.String typeValue; 343 core.String typeValue;
331 344
332 JsonSchemaVariantMap(); 345 JsonSchemaVariantMap();
333 346
334 JsonSchemaVariantMap.fromJson(core.Map _json) { 347 JsonSchemaVariantMap.fromJson(core.Map _json) {
335 if (_json.containsKey("\$ref")) { 348 if (_json.containsKey("\$ref")) {
336 P_ref = _json["\$ref"]; 349 P_ref = _json["\$ref"];
337 } 350 }
338 if (_json.containsKey("type_value")) { 351 if (_json.containsKey("type_value")) {
339 typeValue = _json["type_value"]; 352 typeValue = _json["type_value"];
340 } 353 }
341 } 354 }
342 355
343 core.Map<core.String, core.Object> toJson() { 356 core.Map<core.String, core.Object> toJson() {
344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 357 final core.Map<core.String, core.Object> _json =
358 new core.Map<core.String, core.Object>();
345 if (P_ref != null) { 359 if (P_ref != null) {
346 _json["\$ref"] = P_ref; 360 _json["\$ref"] = P_ref;
347 } 361 }
348 if (typeValue != null) { 362 if (typeValue != null) {
349 _json["type_value"] = typeValue; 363 _json["type_value"] = typeValue;
350 } 364 }
351 return _json; 365 return _json;
352 } 366 }
353 } 367 }
354 368
355 /** 369 /// In a variant data type, the value of one property is used to determine how
356 * In a variant data type, the value of one property is used to determine how to 370 /// to interpret the entire entity. Its value must exist in a map of
357 * interpret the entire entity. Its value must exist in a map of descriminant 371 /// descriminant values to schema names.
358 * values to schema names.
359 */
360 class JsonSchemaVariant { 372 class JsonSchemaVariant {
361 /** The name of the type discriminant property. */ 373 /// The name of the type discriminant property.
362 core.String discriminant; 374 core.String discriminant;
363 /** The map of discriminant value to schema to use for parsing.. */ 375
376 /// The map of discriminant value to schema to use for parsing..
364 core.List<JsonSchemaVariantMap> map; 377 core.List<JsonSchemaVariantMap> map;
365 378
366 JsonSchemaVariant(); 379 JsonSchemaVariant();
367 380
368 JsonSchemaVariant.fromJson(core.Map _json) { 381 JsonSchemaVariant.fromJson(core.Map _json) {
369 if (_json.containsKey("discriminant")) { 382 if (_json.containsKey("discriminant")) {
370 discriminant = _json["discriminant"]; 383 discriminant = _json["discriminant"];
371 } 384 }
372 if (_json.containsKey("map")) { 385 if (_json.containsKey("map")) {
373 map = _json["map"].map((value) => new JsonSchemaVariantMap.fromJson(value) ).toList(); 386 map = _json["map"]
387 .map((value) => new JsonSchemaVariantMap.fromJson(value))
388 .toList();
374 } 389 }
375 } 390 }
376 391
377 core.Map<core.String, core.Object> toJson() { 392 core.Map<core.String, core.Object> toJson() {
378 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 393 final core.Map<core.String, core.Object> _json =
394 new core.Map<core.String, core.Object>();
379 if (discriminant != null) { 395 if (discriminant != null) {
380 _json["discriminant"] = discriminant; 396 _json["discriminant"] = discriminant;
381 } 397 }
382 if (map != null) { 398 if (map != null) {
383 _json["map"] = map.map((value) => (value).toJson()).toList(); 399 _json["map"] = map.map((value) => (value).toJson()).toList();
384 } 400 }
385 return _json; 401 return _json;
386 } 402 }
387 } 403 }
388 404
389 class JsonSchema { 405 class JsonSchema {
390 /** 406 /// A reference to another schema. The value of this property is the "id" of
391 * A reference to another schema. The value of this property is the "id" of 407 /// another schema.
392 * another schema.
393 */
394 core.String P_ref; 408 core.String P_ref;
395 /** 409
396 * If this is a schema for an object, this property is the schema for any 410 /// If this is a schema for an object, this property is the schema for any
397 * additional properties with dynamic keys on this object. 411 /// additional properties with dynamic keys on this object.
398 */
399 JsonSchema additionalProperties; 412 JsonSchema additionalProperties;
400 /** Additional information about this property. */ 413
414 /// Additional information about this property.
401 JsonSchemaAnnotations annotations; 415 JsonSchemaAnnotations annotations;
402 /** The default value of this property (if one exists). */ 416
417 /// The default value of this property (if one exists).
403 core.String default_; 418 core.String default_;
404 /** A description of this object. */ 419
420 /// A description of this object.
405 core.String description; 421 core.String description;
406 /** Values this parameter may take (if it is an enum). */ 422
423 /// Values this parameter may take (if it is an enum).
407 core.List<core.String> enum_; 424 core.List<core.String> enum_;
408 /** 425
409 * The descriptions for the enums. Each position maps to the corresponding 426 /// The descriptions for the enums. Each position maps to the corresponding
410 * value in the "enum" array. 427 /// value in the "enum" array.
411 */
412 core.List<core.String> enumDescriptions; 428 core.List<core.String> enumDescriptions;
413 /** 429
414 * An additional regular expression or key that helps constrain the value. For 430 /// An additional regular expression or key that helps constrain the value.
415 * more details see: 431 /// For more details see:
416 * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 432 /// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23
417 */
418 core.String format; 433 core.String format;
419 /** Unique identifier for this schema. */ 434
435 /// Unique identifier for this schema.
420 core.String id; 436 core.String id;
421 /** 437
422 * If this is a schema for an array, this property is the schema for each 438 /// If this is a schema for an array, this property is the schema for each
423 * element in the array. 439 /// element in the array.
424 */
425 JsonSchema items; 440 JsonSchema items;
426 /** 441
427 * Whether this parameter goes in the query or the path for REST requests. 442 /// Whether this parameter goes in the query or the path for REST requests.
428 */
429 core.String location; 443 core.String location;
430 /** The maximum value of this parameter. */ 444
445 /// The maximum value of this parameter.
431 core.String maximum; 446 core.String maximum;
432 /** The minimum value of this parameter. */ 447
448 /// The minimum value of this parameter.
433 core.String minimum; 449 core.String minimum;
434 /** 450
435 * The regular expression this parameter must conform to. Uses Java 6 regex 451 /// The regular expression this parameter must conform to. Uses Java 6 regex
436 * format: 452 /// format:
437 * http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html 453 /// http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
438 */
439 core.String pattern; 454 core.String pattern;
440 /** 455
441 * If this is a schema for an object, list the schema for each property of 456 /// If this is a schema for an object, list the schema for each property of
442 * this object. 457 /// this object.
443 */
444 core.Map<core.String, JsonSchema> properties; 458 core.Map<core.String, JsonSchema> properties;
445 /** 459
446 * The value is read-only, generated by the service. The value cannot be 460 /// The value is read-only, generated by the service. The value cannot be
447 * modified by the client. If the value is included in a POST, PUT, or PATCH 461 /// modified by the client. If the value is included in a POST, PUT, or PATCH
448 * request, it is ignored by the service. 462 /// request, it is ignored by the service.
449 */
450 core.bool readOnly; 463 core.bool readOnly;
451 /** Whether this parameter may appear multiple times. */ 464
465 /// Whether this parameter may appear multiple times.
452 core.bool repeated; 466 core.bool repeated;
453 /** Whether the parameter is required. */ 467
468 /// Whether the parameter is required.
454 core.bool required; 469 core.bool required;
455 /** 470
456 * The value type for this schema. A list of values can be found here: 471 /// The value type for this schema. A list of values can be found here:
457 * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 472 /// http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
458 */
459 core.String type; 473 core.String type;
460 /** 474
461 * In a variant data type, the value of one property is used to determine how 475 /// In a variant data type, the value of one property is used to determine
462 * to interpret the entire entity. Its value must exist in a map of 476 /// how to interpret the entire entity. Its value must exist in a map of
463 * descriminant values to schema names. 477 /// descriminant values to schema names.
464 */
465 JsonSchemaVariant variant; 478 JsonSchemaVariant variant;
466 479
467 JsonSchema(); 480 JsonSchema();
468 481
469 JsonSchema.fromJson(core.Map _json) { 482 JsonSchema.fromJson(core.Map _json) {
470 if (_json.containsKey("\$ref")) { 483 if (_json.containsKey("\$ref")) {
471 P_ref = _json["\$ref"]; 484 P_ref = _json["\$ref"];
472 } 485 }
473 if (_json.containsKey("additionalProperties")) { 486 if (_json.containsKey("additionalProperties")) {
474 additionalProperties = new JsonSchema.fromJson(_json["additionalProperties "]); 487 additionalProperties =
488 new JsonSchema.fromJson(_json["additionalProperties"]);
475 } 489 }
476 if (_json.containsKey("annotations")) { 490 if (_json.containsKey("annotations")) {
477 annotations = new JsonSchemaAnnotations.fromJson(_json["annotations"]); 491 annotations = new JsonSchemaAnnotations.fromJson(_json["annotations"]);
478 } 492 }
479 if (_json.containsKey("default")) { 493 if (_json.containsKey("default")) {
480 default_ = _json["default"]; 494 default_ = _json["default"];
481 } 495 }
482 if (_json.containsKey("description")) { 496 if (_json.containsKey("description")) {
483 description = _json["description"]; 497 description = _json["description"];
484 } 498 }
(...skipping 18 matching lines...) Expand all
503 if (_json.containsKey("maximum")) { 517 if (_json.containsKey("maximum")) {
504 maximum = _json["maximum"]; 518 maximum = _json["maximum"];
505 } 519 }
506 if (_json.containsKey("minimum")) { 520 if (_json.containsKey("minimum")) {
507 minimum = _json["minimum"]; 521 minimum = _json["minimum"];
508 } 522 }
509 if (_json.containsKey("pattern")) { 523 if (_json.containsKey("pattern")) {
510 pattern = _json["pattern"]; 524 pattern = _json["pattern"];
511 } 525 }
512 if (_json.containsKey("properties")) { 526 if (_json.containsKey("properties")) {
513 properties = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema >(_json["properties"], (core.Map<core.String, core.Object> item) => new JsonSche ma.fromJson(item)); 527 properties =
528 commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(
529 _json["properties"],
530 (core.Map<core.String, core.Object> item) =>
531 new JsonSchema.fromJson(item));
514 } 532 }
515 if (_json.containsKey("readOnly")) { 533 if (_json.containsKey("readOnly")) {
516 readOnly = _json["readOnly"]; 534 readOnly = _json["readOnly"];
517 } 535 }
518 if (_json.containsKey("repeated")) { 536 if (_json.containsKey("repeated")) {
519 repeated = _json["repeated"]; 537 repeated = _json["repeated"];
520 } 538 }
521 if (_json.containsKey("required")) { 539 if (_json.containsKey("required")) {
522 required = _json["required"]; 540 required = _json["required"];
523 } 541 }
524 if (_json.containsKey("type")) { 542 if (_json.containsKey("type")) {
525 type = _json["type"]; 543 type = _json["type"];
526 } 544 }
527 if (_json.containsKey("variant")) { 545 if (_json.containsKey("variant")) {
528 variant = new JsonSchemaVariant.fromJson(_json["variant"]); 546 variant = new JsonSchemaVariant.fromJson(_json["variant"]);
529 } 547 }
530 } 548 }
531 549
532 core.Map<core.String, core.Object> toJson() { 550 core.Map<core.String, core.Object> toJson() {
533 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 551 final core.Map<core.String, core.Object> _json =
552 new core.Map<core.String, core.Object>();
534 if (P_ref != null) { 553 if (P_ref != null) {
535 _json["\$ref"] = P_ref; 554 _json["\$ref"] = P_ref;
536 } 555 }
537 if (additionalProperties != null) { 556 if (additionalProperties != null) {
538 _json["additionalProperties"] = (additionalProperties).toJson(); 557 _json["additionalProperties"] = (additionalProperties).toJson();
539 } 558 }
540 if (annotations != null) { 559 if (annotations != null) {
541 _json["annotations"] = (annotations).toJson(); 560 _json["annotations"] = (annotations).toJson();
542 } 561 }
543 if (default_ != null) { 562 if (default_ != null) {
(...skipping 23 matching lines...) Expand all
567 if (maximum != null) { 586 if (maximum != null) {
568 _json["maximum"] = maximum; 587 _json["maximum"] = maximum;
569 } 588 }
570 if (minimum != null) { 589 if (minimum != null) {
571 _json["minimum"] = minimum; 590 _json["minimum"] = minimum;
572 } 591 }
573 if (pattern != null) { 592 if (pattern != null) {
574 _json["pattern"] = pattern; 593 _json["pattern"] = pattern;
575 } 594 }
576 if (properties != null) { 595 if (properties != null) {
577 _json["properties"] = commons.mapMap<JsonSchema, core.Map<core.String, cor e.Object>>(properties, (JsonSchema item) => (item).toJson()); 596 _json["properties"] =
597 commons.mapMap<JsonSchema, core.Map<core.String, core.Object>>(
598 properties, (JsonSchema item) => (item).toJson());
578 } 599 }
579 if (readOnly != null) { 600 if (readOnly != null) {
580 _json["readOnly"] = readOnly; 601 _json["readOnly"] = readOnly;
581 } 602 }
582 if (repeated != null) { 603 if (repeated != null) {
583 _json["repeated"] = repeated; 604 _json["repeated"] = repeated;
584 } 605 }
585 if (required != null) { 606 if (required != null) {
586 _json["required"] = required; 607 _json["required"] = required;
587 } 608 }
588 if (type != null) { 609 if (type != null) {
589 _json["type"] = type; 610 _json["type"] = type;
590 } 611 }
591 if (variant != null) { 612 if (variant != null) {
592 _json["variant"] = (variant).toJson(); 613 _json["variant"] = (variant).toJson();
593 } 614 }
594 return _json; 615 return _json;
595 } 616 }
596 } 617 }
597 618
598 /** The scope value. */ 619 /// The scope value.
599 class RestDescriptionAuthOauth2ScopesValue { 620 class RestDescriptionAuthOauth2ScopesValue {
600 /** Description of scope. */ 621 /// Description of scope.
601 core.String description; 622 core.String description;
602 623
603 RestDescriptionAuthOauth2ScopesValue(); 624 RestDescriptionAuthOauth2ScopesValue();
604 625
605 RestDescriptionAuthOauth2ScopesValue.fromJson(core.Map _json) { 626 RestDescriptionAuthOauth2ScopesValue.fromJson(core.Map _json) {
606 if (_json.containsKey("description")) { 627 if (_json.containsKey("description")) {
607 description = _json["description"]; 628 description = _json["description"];
608 } 629 }
609 } 630 }
610 631
611 core.Map<core.String, core.Object> toJson() { 632 core.Map<core.String, core.Object> toJson() {
612 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 633 final core.Map<core.String, core.Object> _json =
634 new core.Map<core.String, core.Object>();
613 if (description != null) { 635 if (description != null) {
614 _json["description"] = description; 636 _json["description"] = description;
615 } 637 }
616 return _json; 638 return _json;
617 } 639 }
618 } 640 }
619 641
620 /** OAuth 2.0 authentication information. */ 642 /// OAuth 2.0 authentication information.
621 class RestDescriptionAuthOauth2 { 643 class RestDescriptionAuthOauth2 {
622 /** Available OAuth 2.0 scopes. */ 644 /// Available OAuth 2.0 scopes.
623 core.Map<core.String, RestDescriptionAuthOauth2ScopesValue> scopes; 645 core.Map<core.String, RestDescriptionAuthOauth2ScopesValue> scopes;
624 646
625 RestDescriptionAuthOauth2(); 647 RestDescriptionAuthOauth2();
626 648
627 RestDescriptionAuthOauth2.fromJson(core.Map _json) { 649 RestDescriptionAuthOauth2.fromJson(core.Map _json) {
628 if (_json.containsKey("scopes")) { 650 if (_json.containsKey("scopes")) {
629 scopes = commons.mapMap<core.Map<core.String, core.Object>, RestDescriptio nAuthOauth2ScopesValue>(_json["scopes"], (core.Map<core.String, core.Object> ite m) => new RestDescriptionAuthOauth2ScopesValue.fromJson(item)); 651 scopes = commons.mapMap<core.Map<core.String, core.Object>,
652 RestDescriptionAuthOauth2ScopesValue>(
653 _json["scopes"],
654 (core.Map<core.String, core.Object> item) =>
655 new RestDescriptionAuthOauth2ScopesValue.fromJson(item));
630 } 656 }
631 } 657 }
632 658
633 core.Map<core.String, core.Object> toJson() { 659 core.Map<core.String, core.Object> toJson() {
634 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 660 final core.Map<core.String, core.Object> _json =
661 new core.Map<core.String, core.Object>();
635 if (scopes != null) { 662 if (scopes != null) {
636 _json["scopes"] = commons.mapMap<RestDescriptionAuthOauth2ScopesValue, cor e.Map<core.String, core.Object>>(scopes, (RestDescriptionAuthOauth2ScopesValue i tem) => (item).toJson()); 663 _json["scopes"] = commons.mapMap<RestDescriptionAuthOauth2ScopesValue,
664 core.Map<core.String, core.Object>>(scopes,
665 (RestDescriptionAuthOauth2ScopesValue item) => (item).toJson());
637 } 666 }
638 return _json; 667 return _json;
639 } 668 }
640 } 669 }
641 670
642 /** Authentication information. */ 671 /// Authentication information.
643 class RestDescriptionAuth { 672 class RestDescriptionAuth {
644 /** OAuth 2.0 authentication information. */ 673 /// OAuth 2.0 authentication information.
645 RestDescriptionAuthOauth2 oauth2; 674 RestDescriptionAuthOauth2 oauth2;
646 675
647 RestDescriptionAuth(); 676 RestDescriptionAuth();
648 677
649 RestDescriptionAuth.fromJson(core.Map _json) { 678 RestDescriptionAuth.fromJson(core.Map _json) {
650 if (_json.containsKey("oauth2")) { 679 if (_json.containsKey("oauth2")) {
651 oauth2 = new RestDescriptionAuthOauth2.fromJson(_json["oauth2"]); 680 oauth2 = new RestDescriptionAuthOauth2.fromJson(_json["oauth2"]);
652 } 681 }
653 } 682 }
654 683
655 core.Map<core.String, core.Object> toJson() { 684 core.Map<core.String, core.Object> toJson() {
656 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 685 final core.Map<core.String, core.Object> _json =
686 new core.Map<core.String, core.Object>();
657 if (oauth2 != null) { 687 if (oauth2 != null) {
658 _json["oauth2"] = (oauth2).toJson(); 688 _json["oauth2"] = (oauth2).toJson();
659 } 689 }
660 return _json; 690 return _json;
661 } 691 }
662 } 692 }
663 693
664 /** Links to 16x16 and 32x32 icons representing the API. */ 694 /// Links to 16x16 and 32x32 icons representing the API.
665 class RestDescriptionIcons { 695 class RestDescriptionIcons {
666 /** The URL of the 16x16 icon. */ 696 /// The URL of the 16x16 icon.
667 core.String x16; 697 core.String x16;
668 /** The URL of the 32x32 icon. */ 698
699 /// The URL of the 32x32 icon.
669 core.String x32; 700 core.String x32;
670 701
671 RestDescriptionIcons(); 702 RestDescriptionIcons();
672 703
673 RestDescriptionIcons.fromJson(core.Map _json) { 704 RestDescriptionIcons.fromJson(core.Map _json) {
674 if (_json.containsKey("x16")) { 705 if (_json.containsKey("x16")) {
675 x16 = _json["x16"]; 706 x16 = _json["x16"];
676 } 707 }
677 if (_json.containsKey("x32")) { 708 if (_json.containsKey("x32")) {
678 x32 = _json["x32"]; 709 x32 = _json["x32"];
679 } 710 }
680 } 711 }
681 712
682 core.Map<core.String, core.Object> toJson() { 713 core.Map<core.String, core.Object> toJson() {
683 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 714 final core.Map<core.String, core.Object> _json =
715 new core.Map<core.String, core.Object>();
684 if (x16 != null) { 716 if (x16 != null) {
685 _json["x16"] = x16; 717 _json["x16"] = x16;
686 } 718 }
687 if (x32 != null) { 719 if (x32 != null) {
688 _json["x32"] = x32; 720 _json["x32"] = x32;
689 } 721 }
690 return _json; 722 return _json;
691 } 723 }
692 } 724 }
693 725
694 class RestDescription { 726 class RestDescription {
695 /** Authentication information. */ 727 /// Authentication information.
696 RestDescriptionAuth auth; 728 RestDescriptionAuth auth;
697 /** [DEPRECATED] The base path for REST requests. */ 729
730 /// [DEPRECATED] The base path for REST requests.
698 core.String basePath; 731 core.String basePath;
699 /** [DEPRECATED] The base URL for REST requests. */ 732
733 /// [DEPRECATED] The base URL for REST requests.
700 core.String baseUrl; 734 core.String baseUrl;
701 /** The path for REST batch requests. */ 735
736 /// The path for REST batch requests.
702 core.String batchPath; 737 core.String batchPath;
703 /** 738
704 * Indicates how the API name should be capitalized and split into various 739 /// Indicates how the API name should be capitalized and split into various
705 * parts. Useful for generating pretty class names. 740 /// parts. Useful for generating pretty class names.
706 */
707 core.String canonicalName; 741 core.String canonicalName;
708 /** The description of this API. */ 742
743 /// The description of this API.
709 core.String description; 744 core.String description;
710 /** Indicate the version of the Discovery API used to generate this doc. */ 745
746 /// Indicate the version of the Discovery API used to generate this doc.
711 core.String discoveryVersion; 747 core.String discoveryVersion;
712 /** A link to human readable documentation for the API. */ 748
749 /// A link to human readable documentation for the API.
713 core.String documentationLink; 750 core.String documentationLink;
714 /** The ETag for this response. */ 751
752 /// The ETag for this response.
715 core.String etag; 753 core.String etag;
716 /** 754
717 * Enable exponential backoff for suitable methods in the generated clients. 755 /// Enable exponential backoff for suitable methods in the generated clients.
718 */
719 core.bool exponentialBackoffDefault; 756 core.bool exponentialBackoffDefault;
720 /** A list of supported features for this API. */ 757
758 /// A list of supported features for this API.
721 core.List<core.String> features; 759 core.List<core.String> features;
722 /** Links to 16x16 and 32x32 icons representing the API. */ 760
761 /// Links to 16x16 and 32x32 icons representing the API.
723 RestDescriptionIcons icons; 762 RestDescriptionIcons icons;
724 /** The ID of this API. */ 763
764 /// The ID of this API.
725 core.String id; 765 core.String id;
726 /** The kind for this response. */ 766
767 /// The kind for this response.
727 core.String kind; 768 core.String kind;
728 /** Labels for the status of this API, such as labs or deprecated. */ 769
770 /// Labels for the status of this API, such as labs or deprecated.
729 core.List<core.String> labels; 771 core.List<core.String> labels;
730 /** API-level methods for this API. */ 772
773 /// API-level methods for this API.
731 core.Map<core.String, RestMethod> methods; 774 core.Map<core.String, RestMethod> methods;
732 /** The name of this API. */ 775
776 /// The name of this API.
733 core.String name; 777 core.String name;
734 /** 778
735 * The domain of the owner of this API. Together with the ownerName and a 779 /// The domain of the owner of this API. Together with the ownerName and a
736 * packagePath values, this can be used to generate a library for this API 780 /// packagePath values, this can be used to generate a library for this API
737 * which would have a unique fully qualified name. 781 /// which would have a unique fully qualified name.
738 */
739 core.String ownerDomain; 782 core.String ownerDomain;
740 /** The name of the owner of this API. See ownerDomain. */ 783
784 /// The name of the owner of this API. See ownerDomain.
741 core.String ownerName; 785 core.String ownerName;
742 /** The package of the owner of this API. See ownerDomain. */ 786
787 /// The package of the owner of this API. See ownerDomain.
743 core.String packagePath; 788 core.String packagePath;
744 /** Common parameters that apply across all apis. */ 789
790 /// Common parameters that apply across all apis.
745 core.Map<core.String, JsonSchema> parameters; 791 core.Map<core.String, JsonSchema> parameters;
746 /** The protocol described by this document. */ 792
793 /// The protocol described by this document.
747 core.String protocol; 794 core.String protocol;
748 /** The resources in this API. */ 795
796 /// The resources in this API.
749 core.Map<core.String, RestResource> resources; 797 core.Map<core.String, RestResource> resources;
750 /** The version of this API. */ 798
799 /// The version of this API.
751 core.String revision; 800 core.String revision;
752 /** The root URL under which all API services live. */ 801
802 /// The root URL under which all API services live.
753 core.String rootUrl; 803 core.String rootUrl;
754 /** The schemas for this API. */ 804
805 /// The schemas for this API.
755 core.Map<core.String, JsonSchema> schemas; 806 core.Map<core.String, JsonSchema> schemas;
756 /** The base path for all REST requests. */ 807
808 /// The base path for all REST requests.
757 core.String servicePath; 809 core.String servicePath;
758 /** The title of this API. */ 810
811 /// The title of this API.
759 core.String title; 812 core.String title;
760 /** The version of this API. */ 813
814 /// The version of this API.
761 core.String version; 815 core.String version;
762 core.bool versionModule; 816 core.bool versionModule;
763 817
764 RestDescription(); 818 RestDescription();
765 819
766 RestDescription.fromJson(core.Map _json) { 820 RestDescription.fromJson(core.Map _json) {
767 if (_json.containsKey("auth")) { 821 if (_json.containsKey("auth")) {
768 auth = new RestDescriptionAuth.fromJson(_json["auth"]); 822 auth = new RestDescriptionAuth.fromJson(_json["auth"]);
769 } 823 }
770 if (_json.containsKey("basePath")) { 824 if (_json.containsKey("basePath")) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 if (_json.containsKey("id")) { 857 if (_json.containsKey("id")) {
804 id = _json["id"]; 858 id = _json["id"];
805 } 859 }
806 if (_json.containsKey("kind")) { 860 if (_json.containsKey("kind")) {
807 kind = _json["kind"]; 861 kind = _json["kind"];
808 } 862 }
809 if (_json.containsKey("labels")) { 863 if (_json.containsKey("labels")) {
810 labels = _json["labels"]; 864 labels = _json["labels"];
811 } 865 }
812 if (_json.containsKey("methods")) { 866 if (_json.containsKey("methods")) {
813 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(_ json["methods"], (core.Map<core.String, core.Object> item) => new RestMethod.fro mJson(item)); 867 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(
868 _json["methods"],
869 (core.Map<core.String, core.Object> item) =>
870 new RestMethod.fromJson(item));
814 } 871 }
815 if (_json.containsKey("name")) { 872 if (_json.containsKey("name")) {
816 name = _json["name"]; 873 name = _json["name"];
817 } 874 }
818 if (_json.containsKey("ownerDomain")) { 875 if (_json.containsKey("ownerDomain")) {
819 ownerDomain = _json["ownerDomain"]; 876 ownerDomain = _json["ownerDomain"];
820 } 877 }
821 if (_json.containsKey("ownerName")) { 878 if (_json.containsKey("ownerName")) {
822 ownerName = _json["ownerName"]; 879 ownerName = _json["ownerName"];
823 } 880 }
824 if (_json.containsKey("packagePath")) { 881 if (_json.containsKey("packagePath")) {
825 packagePath = _json["packagePath"]; 882 packagePath = _json["packagePath"];
826 } 883 }
827 if (_json.containsKey("parameters")) { 884 if (_json.containsKey("parameters")) {
828 parameters = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema >(_json["parameters"], (core.Map<core.String, core.Object> item) => new JsonSche ma.fromJson(item)); 885 parameters =
886 commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(
887 _json["parameters"],
888 (core.Map<core.String, core.Object> item) =>
889 new JsonSchema.fromJson(item));
829 } 890 }
830 if (_json.containsKey("protocol")) { 891 if (_json.containsKey("protocol")) {
831 protocol = _json["protocol"]; 892 protocol = _json["protocol"];
832 } 893 }
833 if (_json.containsKey("resources")) { 894 if (_json.containsKey("resources")) {
834 resources = commons.mapMap<core.Map<core.String, core.Object>, RestResourc e>(_json["resources"], (core.Map<core.String, core.Object> item) => new RestReso urce.fromJson(item)); 895 resources =
896 commons.mapMap<core.Map<core.String, core.Object>, RestResource>(
897 _json["resources"],
898 (core.Map<core.String, core.Object> item) =>
899 new RestResource.fromJson(item));
835 } 900 }
836 if (_json.containsKey("revision")) { 901 if (_json.containsKey("revision")) {
837 revision = _json["revision"]; 902 revision = _json["revision"];
838 } 903 }
839 if (_json.containsKey("rootUrl")) { 904 if (_json.containsKey("rootUrl")) {
840 rootUrl = _json["rootUrl"]; 905 rootUrl = _json["rootUrl"];
841 } 906 }
842 if (_json.containsKey("schemas")) { 907 if (_json.containsKey("schemas")) {
843 schemas = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(_ json["schemas"], (core.Map<core.String, core.Object> item) => new JsonSchema.fro mJson(item)); 908 schemas = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(
909 _json["schemas"],
910 (core.Map<core.String, core.Object> item) =>
911 new JsonSchema.fromJson(item));
844 } 912 }
845 if (_json.containsKey("servicePath")) { 913 if (_json.containsKey("servicePath")) {
846 servicePath = _json["servicePath"]; 914 servicePath = _json["servicePath"];
847 } 915 }
848 if (_json.containsKey("title")) { 916 if (_json.containsKey("title")) {
849 title = _json["title"]; 917 title = _json["title"];
850 } 918 }
851 if (_json.containsKey("version")) { 919 if (_json.containsKey("version")) {
852 version = _json["version"]; 920 version = _json["version"];
853 } 921 }
854 if (_json.containsKey("version_module")) { 922 if (_json.containsKey("version_module")) {
855 versionModule = _json["version_module"]; 923 versionModule = _json["version_module"];
856 } 924 }
857 } 925 }
858 926
859 core.Map<core.String, core.Object> toJson() { 927 core.Map<core.String, core.Object> toJson() {
860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 928 final core.Map<core.String, core.Object> _json =
929 new core.Map<core.String, core.Object>();
861 if (auth != null) { 930 if (auth != null) {
862 _json["auth"] = (auth).toJson(); 931 _json["auth"] = (auth).toJson();
863 } 932 }
864 if (basePath != null) { 933 if (basePath != null) {
865 _json["basePath"] = basePath; 934 _json["basePath"] = basePath;
866 } 935 }
867 if (baseUrl != null) { 936 if (baseUrl != null) {
868 _json["baseUrl"] = baseUrl; 937 _json["baseUrl"] = baseUrl;
869 } 938 }
870 if (batchPath != null) { 939 if (batchPath != null) {
(...skipping 26 matching lines...) Expand all
897 if (id != null) { 966 if (id != null) {
898 _json["id"] = id; 967 _json["id"] = id;
899 } 968 }
900 if (kind != null) { 969 if (kind != null) {
901 _json["kind"] = kind; 970 _json["kind"] = kind;
902 } 971 }
903 if (labels != null) { 972 if (labels != null) {
904 _json["labels"] = labels; 973 _json["labels"] = labels;
905 } 974 }
906 if (methods != null) { 975 if (methods != null) {
907 _json["methods"] = commons.mapMap<RestMethod, core.Map<core.String, core.O bject>>(methods, (RestMethod item) => (item).toJson()); 976 _json["methods"] =
977 commons.mapMap<RestMethod, core.Map<core.String, core.Object>>(
978 methods, (RestMethod item) => (item).toJson());
908 } 979 }
909 if (name != null) { 980 if (name != null) {
910 _json["name"] = name; 981 _json["name"] = name;
911 } 982 }
912 if (ownerDomain != null) { 983 if (ownerDomain != null) {
913 _json["ownerDomain"] = ownerDomain; 984 _json["ownerDomain"] = ownerDomain;
914 } 985 }
915 if (ownerName != null) { 986 if (ownerName != null) {
916 _json["ownerName"] = ownerName; 987 _json["ownerName"] = ownerName;
917 } 988 }
918 if (packagePath != null) { 989 if (packagePath != null) {
919 _json["packagePath"] = packagePath; 990 _json["packagePath"] = packagePath;
920 } 991 }
921 if (parameters != null) { 992 if (parameters != null) {
922 _json["parameters"] = commons.mapMap<JsonSchema, core.Map<core.String, cor e.Object>>(parameters, (JsonSchema item) => (item).toJson()); 993 _json["parameters"] =
994 commons.mapMap<JsonSchema, core.Map<core.String, core.Object>>(
995 parameters, (JsonSchema item) => (item).toJson());
923 } 996 }
924 if (protocol != null) { 997 if (protocol != null) {
925 _json["protocol"] = protocol; 998 _json["protocol"] = protocol;
926 } 999 }
927 if (resources != null) { 1000 if (resources != null) {
928 _json["resources"] = commons.mapMap<RestResource, core.Map<core.String, co re.Object>>(resources, (RestResource item) => (item).toJson()); 1001 _json["resources"] =
1002 commons.mapMap<RestResource, core.Map<core.String, core.Object>>(
1003 resources, (RestResource item) => (item).toJson());
929 } 1004 }
930 if (revision != null) { 1005 if (revision != null) {
931 _json["revision"] = revision; 1006 _json["revision"] = revision;
932 } 1007 }
933 if (rootUrl != null) { 1008 if (rootUrl != null) {
934 _json["rootUrl"] = rootUrl; 1009 _json["rootUrl"] = rootUrl;
935 } 1010 }
936 if (schemas != null) { 1011 if (schemas != null) {
937 _json["schemas"] = commons.mapMap<JsonSchema, core.Map<core.String, core.O bject>>(schemas, (JsonSchema item) => (item).toJson()); 1012 _json["schemas"] =
1013 commons.mapMap<JsonSchema, core.Map<core.String, core.Object>>(
1014 schemas, (JsonSchema item) => (item).toJson());
938 } 1015 }
939 if (servicePath != null) { 1016 if (servicePath != null) {
940 _json["servicePath"] = servicePath; 1017 _json["servicePath"] = servicePath;
941 } 1018 }
942 if (title != null) { 1019 if (title != null) {
943 _json["title"] = title; 1020 _json["title"] = title;
944 } 1021 }
945 if (version != null) { 1022 if (version != null) {
946 _json["version"] = version; 1023 _json["version"] = version;
947 } 1024 }
948 if (versionModule != null) { 1025 if (versionModule != null) {
949 _json["version_module"] = versionModule; 1026 _json["version_module"] = versionModule;
950 } 1027 }
951 return _json; 1028 return _json;
952 } 1029 }
953 } 1030 }
954 1031
955 /** Supports the Resumable Media Upload protocol. */ 1032 /// Supports the Resumable Media Upload protocol.
956 class RestMethodMediaUploadProtocolsResumable { 1033 class RestMethodMediaUploadProtocolsResumable {
957 /** True if this endpoint supports uploading multipart media. */ 1034 /// True if this endpoint supports uploading multipart media.
958 core.bool multipart; 1035 core.bool multipart;
959 /** 1036
960 * The URI path to be used for upload. Should be used in conjunction with the 1037 /// The URI path to be used for upload. Should be used in conjunction with
961 * basePath property at the api-level. 1038 /// the basePath property at the api-level.
962 */
963 core.String path; 1039 core.String path;
964 1040
965 RestMethodMediaUploadProtocolsResumable(); 1041 RestMethodMediaUploadProtocolsResumable();
966 1042
967 RestMethodMediaUploadProtocolsResumable.fromJson(core.Map _json) { 1043 RestMethodMediaUploadProtocolsResumable.fromJson(core.Map _json) {
968 if (_json.containsKey("multipart")) { 1044 if (_json.containsKey("multipart")) {
969 multipart = _json["multipart"]; 1045 multipart = _json["multipart"];
970 } 1046 }
971 if (_json.containsKey("path")) { 1047 if (_json.containsKey("path")) {
972 path = _json["path"]; 1048 path = _json["path"];
973 } 1049 }
974 } 1050 }
975 1051
976 core.Map<core.String, core.Object> toJson() { 1052 core.Map<core.String, core.Object> toJson() {
977 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1053 final core.Map<core.String, core.Object> _json =
1054 new core.Map<core.String, core.Object>();
978 if (multipart != null) { 1055 if (multipart != null) {
979 _json["multipart"] = multipart; 1056 _json["multipart"] = multipart;
980 } 1057 }
981 if (path != null) { 1058 if (path != null) {
982 _json["path"] = path; 1059 _json["path"] = path;
983 } 1060 }
984 return _json; 1061 return _json;
985 } 1062 }
986 } 1063 }
987 1064
988 /** Supports uploading as a single HTTP request. */ 1065 /// Supports uploading as a single HTTP request.
989 class RestMethodMediaUploadProtocolsSimple { 1066 class RestMethodMediaUploadProtocolsSimple {
990 /** True if this endpoint supports upload multipart media. */ 1067 /// True if this endpoint supports upload multipart media.
991 core.bool multipart; 1068 core.bool multipart;
992 /** 1069
993 * The URI path to be used for upload. Should be used in conjunction with the 1070 /// The URI path to be used for upload. Should be used in conjunction with
994 * basePath property at the api-level. 1071 /// the basePath property at the api-level.
995 */
996 core.String path; 1072 core.String path;
997 1073
998 RestMethodMediaUploadProtocolsSimple(); 1074 RestMethodMediaUploadProtocolsSimple();
999 1075
1000 RestMethodMediaUploadProtocolsSimple.fromJson(core.Map _json) { 1076 RestMethodMediaUploadProtocolsSimple.fromJson(core.Map _json) {
1001 if (_json.containsKey("multipart")) { 1077 if (_json.containsKey("multipart")) {
1002 multipart = _json["multipart"]; 1078 multipart = _json["multipart"];
1003 } 1079 }
1004 if (_json.containsKey("path")) { 1080 if (_json.containsKey("path")) {
1005 path = _json["path"]; 1081 path = _json["path"];
1006 } 1082 }
1007 } 1083 }
1008 1084
1009 core.Map<core.String, core.Object> toJson() { 1085 core.Map<core.String, core.Object> toJson() {
1010 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1086 final core.Map<core.String, core.Object> _json =
1087 new core.Map<core.String, core.Object>();
1011 if (multipart != null) { 1088 if (multipart != null) {
1012 _json["multipart"] = multipart; 1089 _json["multipart"] = multipart;
1013 } 1090 }
1014 if (path != null) { 1091 if (path != null) {
1015 _json["path"] = path; 1092 _json["path"] = path;
1016 } 1093 }
1017 return _json; 1094 return _json;
1018 } 1095 }
1019 } 1096 }
1020 1097
1021 /** Supported upload protocols. */ 1098 /// Supported upload protocols.
1022 class RestMethodMediaUploadProtocols { 1099 class RestMethodMediaUploadProtocols {
1023 /** Supports the Resumable Media Upload protocol. */ 1100 /// Supports the Resumable Media Upload protocol.
1024 RestMethodMediaUploadProtocolsResumable resumable; 1101 RestMethodMediaUploadProtocolsResumable resumable;
1025 /** Supports uploading as a single HTTP request. */ 1102
1103 /// Supports uploading as a single HTTP request.
1026 RestMethodMediaUploadProtocolsSimple simple; 1104 RestMethodMediaUploadProtocolsSimple simple;
1027 1105
1028 RestMethodMediaUploadProtocols(); 1106 RestMethodMediaUploadProtocols();
1029 1107
1030 RestMethodMediaUploadProtocols.fromJson(core.Map _json) { 1108 RestMethodMediaUploadProtocols.fromJson(core.Map _json) {
1031 if (_json.containsKey("resumable")) { 1109 if (_json.containsKey("resumable")) {
1032 resumable = new RestMethodMediaUploadProtocolsResumable.fromJson(_json["re sumable"]); 1110 resumable = new RestMethodMediaUploadProtocolsResumable.fromJson(
1111 _json["resumable"]);
1033 } 1112 }
1034 if (_json.containsKey("simple")) { 1113 if (_json.containsKey("simple")) {
1035 simple = new RestMethodMediaUploadProtocolsSimple.fromJson(_json["simple"] ); 1114 simple =
1115 new RestMethodMediaUploadProtocolsSimple.fromJson(_json["simple"]);
1036 } 1116 }
1037 } 1117 }
1038 1118
1039 core.Map<core.String, core.Object> toJson() { 1119 core.Map<core.String, core.Object> toJson() {
1040 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1120 final core.Map<core.String, core.Object> _json =
1121 new core.Map<core.String, core.Object>();
1041 if (resumable != null) { 1122 if (resumable != null) {
1042 _json["resumable"] = (resumable).toJson(); 1123 _json["resumable"] = (resumable).toJson();
1043 } 1124 }
1044 if (simple != null) { 1125 if (simple != null) {
1045 _json["simple"] = (simple).toJson(); 1126 _json["simple"] = (simple).toJson();
1046 } 1127 }
1047 return _json; 1128 return _json;
1048 } 1129 }
1049 } 1130 }
1050 1131
1051 /** Media upload parameters. */ 1132 /// Media upload parameters.
1052 class RestMethodMediaUpload { 1133 class RestMethodMediaUpload {
1053 /** MIME Media Ranges for acceptable media uploads to this method. */ 1134 /// MIME Media Ranges for acceptable media uploads to this method.
1054 core.List<core.String> accept; 1135 core.List<core.String> accept;
1055 /** Maximum size of a media upload, such as "1MB", "2GB" or "3TB". */ 1136
1137 /// Maximum size of a media upload, such as "1MB", "2GB" or "3TB".
1056 core.String maxSize; 1138 core.String maxSize;
1057 /** Supported upload protocols. */ 1139
1140 /// Supported upload protocols.
1058 RestMethodMediaUploadProtocols protocols; 1141 RestMethodMediaUploadProtocols protocols;
1059 1142
1060 RestMethodMediaUpload(); 1143 RestMethodMediaUpload();
1061 1144
1062 RestMethodMediaUpload.fromJson(core.Map _json) { 1145 RestMethodMediaUpload.fromJson(core.Map _json) {
1063 if (_json.containsKey("accept")) { 1146 if (_json.containsKey("accept")) {
1064 accept = _json["accept"]; 1147 accept = _json["accept"];
1065 } 1148 }
1066 if (_json.containsKey("maxSize")) { 1149 if (_json.containsKey("maxSize")) {
1067 maxSize = _json["maxSize"]; 1150 maxSize = _json["maxSize"];
1068 } 1151 }
1069 if (_json.containsKey("protocols")) { 1152 if (_json.containsKey("protocols")) {
1070 protocols = new RestMethodMediaUploadProtocols.fromJson(_json["protocols"] ); 1153 protocols =
1154 new RestMethodMediaUploadProtocols.fromJson(_json["protocols"]);
1071 } 1155 }
1072 } 1156 }
1073 1157
1074 core.Map<core.String, core.Object> toJson() { 1158 core.Map<core.String, core.Object> toJson() {
1075 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1159 final core.Map<core.String, core.Object> _json =
1160 new core.Map<core.String, core.Object>();
1076 if (accept != null) { 1161 if (accept != null) {
1077 _json["accept"] = accept; 1162 _json["accept"] = accept;
1078 } 1163 }
1079 if (maxSize != null) { 1164 if (maxSize != null) {
1080 _json["maxSize"] = maxSize; 1165 _json["maxSize"] = maxSize;
1081 } 1166 }
1082 if (protocols != null) { 1167 if (protocols != null) {
1083 _json["protocols"] = (protocols).toJson(); 1168 _json["protocols"] = (protocols).toJson();
1084 } 1169 }
1085 return _json; 1170 return _json;
1086 } 1171 }
1087 } 1172 }
1088 1173
1089 /** The schema for the request. */ 1174 /// The schema for the request.
1090 class RestMethodRequest { 1175 class RestMethodRequest {
1091 /** Schema ID for the request schema. */ 1176 /// Schema ID for the request schema.
1092 core.String P_ref; 1177 core.String P_ref;
1093 /** parameter name. */ 1178
1179 /// parameter name.
1094 core.String parameterName; 1180 core.String parameterName;
1095 1181
1096 RestMethodRequest(); 1182 RestMethodRequest();
1097 1183
1098 RestMethodRequest.fromJson(core.Map _json) { 1184 RestMethodRequest.fromJson(core.Map _json) {
1099 if (_json.containsKey("\$ref")) { 1185 if (_json.containsKey("\$ref")) {
1100 P_ref = _json["\$ref"]; 1186 P_ref = _json["\$ref"];
1101 } 1187 }
1102 if (_json.containsKey("parameterName")) { 1188 if (_json.containsKey("parameterName")) {
1103 parameterName = _json["parameterName"]; 1189 parameterName = _json["parameterName"];
1104 } 1190 }
1105 } 1191 }
1106 1192
1107 core.Map<core.String, core.Object> toJson() { 1193 core.Map<core.String, core.Object> toJson() {
1108 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1194 final core.Map<core.String, core.Object> _json =
1195 new core.Map<core.String, core.Object>();
1109 if (P_ref != null) { 1196 if (P_ref != null) {
1110 _json["\$ref"] = P_ref; 1197 _json["\$ref"] = P_ref;
1111 } 1198 }
1112 if (parameterName != null) { 1199 if (parameterName != null) {
1113 _json["parameterName"] = parameterName; 1200 _json["parameterName"] = parameterName;
1114 } 1201 }
1115 return _json; 1202 return _json;
1116 } 1203 }
1117 } 1204 }
1118 1205
1119 /** The schema for the response. */ 1206 /// The schema for the response.
1120 class RestMethodResponse { 1207 class RestMethodResponse {
1121 /** Schema ID for the response schema. */ 1208 /// Schema ID for the response schema.
1122 core.String P_ref; 1209 core.String P_ref;
1123 1210
1124 RestMethodResponse(); 1211 RestMethodResponse();
1125 1212
1126 RestMethodResponse.fromJson(core.Map _json) { 1213 RestMethodResponse.fromJson(core.Map _json) {
1127 if (_json.containsKey("\$ref")) { 1214 if (_json.containsKey("\$ref")) {
1128 P_ref = _json["\$ref"]; 1215 P_ref = _json["\$ref"];
1129 } 1216 }
1130 } 1217 }
1131 1218
1132 core.Map<core.String, core.Object> toJson() { 1219 core.Map<core.String, core.Object> toJson() {
1133 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1220 final core.Map<core.String, core.Object> _json =
1221 new core.Map<core.String, core.Object>();
1134 if (P_ref != null) { 1222 if (P_ref != null) {
1135 _json["\$ref"] = P_ref; 1223 _json["\$ref"] = P_ref;
1136 } 1224 }
1137 return _json; 1225 return _json;
1138 } 1226 }
1139 } 1227 }
1140 1228
1141 class RestMethod { 1229 class RestMethod {
1142 /** Description of this method. */ 1230 /// Description of this method.
1143 core.String description; 1231 core.String description;
1144 /** 1232
1145 * Whether this method requires an ETag to be specified. The ETag is sent as 1233 /// Whether this method requires an ETag to be specified. The ETag is sent as
1146 * an HTTP If-Match or If-None-Match header. 1234 /// an HTTP If-Match or If-None-Match header.
1147 */
1148 core.bool etagRequired; 1235 core.bool etagRequired;
1149 /** HTTP method used by this method. */ 1236
1237 /// HTTP method used by this method.
1150 core.String httpMethod; 1238 core.String httpMethod;
1151 /** 1239
1152 * A unique ID for this method. This property can be used to match methods 1240 /// A unique ID for this method. This property can be used to match methods
1153 * between different versions of Discovery. 1241 /// between different versions of Discovery.
1154 */
1155 core.String id; 1242 core.String id;
1156 /** Media upload parameters. */ 1243
1244 /// Media upload parameters.
1157 RestMethodMediaUpload mediaUpload; 1245 RestMethodMediaUpload mediaUpload;
1158 /** 1246
1159 * Ordered list of required parameters, serves as a hint to clients on how to 1247 /// Ordered list of required parameters, serves as a hint to clients on how
1160 * structure their method signatures. The array is ordered such that the 1248 /// to structure their method signatures. The array is ordered such that the
1161 * "most-significant" parameter appears first. 1249 /// "most-significant" parameter appears first.
1162 */
1163 core.List<core.String> parameterOrder; 1250 core.List<core.String> parameterOrder;
1164 /** Details for all parameters in this method. */ 1251
1252 /// Details for all parameters in this method.
1165 core.Map<core.String, JsonSchema> parameters; 1253 core.Map<core.String, JsonSchema> parameters;
1166 /** 1254
1167 * The URI path of this REST method. Should be used in conjunction with the 1255 /// The URI path of this REST method. Should be used in conjunction with the
1168 * basePath property at the api-level. 1256 /// basePath property at the api-level.
1169 */
1170 core.String path; 1257 core.String path;
1171 /** The schema for the request. */ 1258
1259 /// The schema for the request.
1172 RestMethodRequest request; 1260 RestMethodRequest request;
1173 /** The schema for the response. */ 1261
1262 /// The schema for the response.
1174 RestMethodResponse response; 1263 RestMethodResponse response;
1175 /** OAuth 2.0 scopes applicable to this method. */ 1264
1265 /// OAuth 2.0 scopes applicable to this method.
1176 core.List<core.String> scopes; 1266 core.List<core.String> scopes;
1177 /** Whether this method supports media downloads. */ 1267
1268 /// Whether this method supports media downloads.
1178 core.bool supportsMediaDownload; 1269 core.bool supportsMediaDownload;
1179 /** Whether this method supports media uploads. */ 1270
1271 /// Whether this method supports media uploads.
1180 core.bool supportsMediaUpload; 1272 core.bool supportsMediaUpload;
1181 /** Whether this method supports subscriptions. */ 1273
1274 /// Whether this method supports subscriptions.
1182 core.bool supportsSubscription; 1275 core.bool supportsSubscription;
1183 /** 1276
1184 * Indicates that downloads from this method should use the download service 1277 /// Indicates that downloads from this method should use the download service
1185 * URL (i.e. "/download"). Only applies if the method supports media download. 1278 /// URL (i.e. "/download"). Only applies if the method supports media
1186 */ 1279 /// download.
1187 core.bool useMediaDownloadService; 1280 core.bool useMediaDownloadService;
1188 1281
1189 RestMethod(); 1282 RestMethod();
1190 1283
1191 RestMethod.fromJson(core.Map _json) { 1284 RestMethod.fromJson(core.Map _json) {
1192 if (_json.containsKey("description")) { 1285 if (_json.containsKey("description")) {
1193 description = _json["description"]; 1286 description = _json["description"];
1194 } 1287 }
1195 if (_json.containsKey("etagRequired")) { 1288 if (_json.containsKey("etagRequired")) {
1196 etagRequired = _json["etagRequired"]; 1289 etagRequired = _json["etagRequired"];
1197 } 1290 }
1198 if (_json.containsKey("httpMethod")) { 1291 if (_json.containsKey("httpMethod")) {
1199 httpMethod = _json["httpMethod"]; 1292 httpMethod = _json["httpMethod"];
1200 } 1293 }
1201 if (_json.containsKey("id")) { 1294 if (_json.containsKey("id")) {
1202 id = _json["id"]; 1295 id = _json["id"];
1203 } 1296 }
1204 if (_json.containsKey("mediaUpload")) { 1297 if (_json.containsKey("mediaUpload")) {
1205 mediaUpload = new RestMethodMediaUpload.fromJson(_json["mediaUpload"]); 1298 mediaUpload = new RestMethodMediaUpload.fromJson(_json["mediaUpload"]);
1206 } 1299 }
1207 if (_json.containsKey("parameterOrder")) { 1300 if (_json.containsKey("parameterOrder")) {
1208 parameterOrder = _json["parameterOrder"]; 1301 parameterOrder = _json["parameterOrder"];
1209 } 1302 }
1210 if (_json.containsKey("parameters")) { 1303 if (_json.containsKey("parameters")) {
1211 parameters = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema >(_json["parameters"], (core.Map<core.String, core.Object> item) => new JsonSche ma.fromJson(item)); 1304 parameters =
1305 commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(
1306 _json["parameters"],
1307 (core.Map<core.String, core.Object> item) =>
1308 new JsonSchema.fromJson(item));
1212 } 1309 }
1213 if (_json.containsKey("path")) { 1310 if (_json.containsKey("path")) {
1214 path = _json["path"]; 1311 path = _json["path"];
1215 } 1312 }
1216 if (_json.containsKey("request")) { 1313 if (_json.containsKey("request")) {
1217 request = new RestMethodRequest.fromJson(_json["request"]); 1314 request = new RestMethodRequest.fromJson(_json["request"]);
1218 } 1315 }
1219 if (_json.containsKey("response")) { 1316 if (_json.containsKey("response")) {
1220 response = new RestMethodResponse.fromJson(_json["response"]); 1317 response = new RestMethodResponse.fromJson(_json["response"]);
1221 } 1318 }
1222 if (_json.containsKey("scopes")) { 1319 if (_json.containsKey("scopes")) {
1223 scopes = _json["scopes"]; 1320 scopes = _json["scopes"];
1224 } 1321 }
1225 if (_json.containsKey("supportsMediaDownload")) { 1322 if (_json.containsKey("supportsMediaDownload")) {
1226 supportsMediaDownload = _json["supportsMediaDownload"]; 1323 supportsMediaDownload = _json["supportsMediaDownload"];
1227 } 1324 }
1228 if (_json.containsKey("supportsMediaUpload")) { 1325 if (_json.containsKey("supportsMediaUpload")) {
1229 supportsMediaUpload = _json["supportsMediaUpload"]; 1326 supportsMediaUpload = _json["supportsMediaUpload"];
1230 } 1327 }
1231 if (_json.containsKey("supportsSubscription")) { 1328 if (_json.containsKey("supportsSubscription")) {
1232 supportsSubscription = _json["supportsSubscription"]; 1329 supportsSubscription = _json["supportsSubscription"];
1233 } 1330 }
1234 if (_json.containsKey("useMediaDownloadService")) { 1331 if (_json.containsKey("useMediaDownloadService")) {
1235 useMediaDownloadService = _json["useMediaDownloadService"]; 1332 useMediaDownloadService = _json["useMediaDownloadService"];
1236 } 1333 }
1237 } 1334 }
1238 1335
1239 core.Map<core.String, core.Object> toJson() { 1336 core.Map<core.String, core.Object> toJson() {
1240 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1337 final core.Map<core.String, core.Object> _json =
1338 new core.Map<core.String, core.Object>();
1241 if (description != null) { 1339 if (description != null) {
1242 _json["description"] = description; 1340 _json["description"] = description;
1243 } 1341 }
1244 if (etagRequired != null) { 1342 if (etagRequired != null) {
1245 _json["etagRequired"] = etagRequired; 1343 _json["etagRequired"] = etagRequired;
1246 } 1344 }
1247 if (httpMethod != null) { 1345 if (httpMethod != null) {
1248 _json["httpMethod"] = httpMethod; 1346 _json["httpMethod"] = httpMethod;
1249 } 1347 }
1250 if (id != null) { 1348 if (id != null) {
1251 _json["id"] = id; 1349 _json["id"] = id;
1252 } 1350 }
1253 if (mediaUpload != null) { 1351 if (mediaUpload != null) {
1254 _json["mediaUpload"] = (mediaUpload).toJson(); 1352 _json["mediaUpload"] = (mediaUpload).toJson();
1255 } 1353 }
1256 if (parameterOrder != null) { 1354 if (parameterOrder != null) {
1257 _json["parameterOrder"] = parameterOrder; 1355 _json["parameterOrder"] = parameterOrder;
1258 } 1356 }
1259 if (parameters != null) { 1357 if (parameters != null) {
1260 _json["parameters"] = commons.mapMap<JsonSchema, core.Map<core.String, cor e.Object>>(parameters, (JsonSchema item) => (item).toJson()); 1358 _json["parameters"] =
1359 commons.mapMap<JsonSchema, core.Map<core.String, core.Object>>(
1360 parameters, (JsonSchema item) => (item).toJson());
1261 } 1361 }
1262 if (path != null) { 1362 if (path != null) {
1263 _json["path"] = path; 1363 _json["path"] = path;
1264 } 1364 }
1265 if (request != null) { 1365 if (request != null) {
1266 _json["request"] = (request).toJson(); 1366 _json["request"] = (request).toJson();
1267 } 1367 }
1268 if (response != null) { 1368 if (response != null) {
1269 _json["response"] = (response).toJson(); 1369 _json["response"] = (response).toJson();
1270 } 1370 }
(...skipping 10 matching lines...) Expand all
1281 _json["supportsSubscription"] = supportsSubscription; 1381 _json["supportsSubscription"] = supportsSubscription;
1282 } 1382 }
1283 if (useMediaDownloadService != null) { 1383 if (useMediaDownloadService != null) {
1284 _json["useMediaDownloadService"] = useMediaDownloadService; 1384 _json["useMediaDownloadService"] = useMediaDownloadService;
1285 } 1385 }
1286 return _json; 1386 return _json;
1287 } 1387 }
1288 } 1388 }
1289 1389
1290 class RestResource { 1390 class RestResource {
1291 /** Methods on this resource. */ 1391 /// Methods on this resource.
1292 core.Map<core.String, RestMethod> methods; 1392 core.Map<core.String, RestMethod> methods;
1293 /** Sub-resources on this resource. */ 1393
1394 /// Sub-resources on this resource.
1294 core.Map<core.String, RestResource> resources; 1395 core.Map<core.String, RestResource> resources;
1295 1396
1296 RestResource(); 1397 RestResource();
1297 1398
1298 RestResource.fromJson(core.Map _json) { 1399 RestResource.fromJson(core.Map _json) {
1299 if (_json.containsKey("methods")) { 1400 if (_json.containsKey("methods")) {
1300 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(_ json["methods"], (core.Map<core.String, core.Object> item) => new RestMethod.fro mJson(item)); 1401 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(
1402 _json["methods"],
1403 (core.Map<core.String, core.Object> item) =>
1404 new RestMethod.fromJson(item));
1301 } 1405 }
1302 if (_json.containsKey("resources")) { 1406 if (_json.containsKey("resources")) {
1303 resources = commons.mapMap<core.Map<core.String, core.Object>, RestResourc e>(_json["resources"], (core.Map<core.String, core.Object> item) => new RestReso urce.fromJson(item)); 1407 resources =
1408 commons.mapMap<core.Map<core.String, core.Object>, RestResource>(
1409 _json["resources"],
1410 (core.Map<core.String, core.Object> item) =>
1411 new RestResource.fromJson(item));
1304 } 1412 }
1305 } 1413 }
1306 1414
1307 core.Map<core.String, core.Object> toJson() { 1415 core.Map<core.String, core.Object> toJson() {
1308 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1416 final core.Map<core.String, core.Object> _json =
1417 new core.Map<core.String, core.Object>();
1309 if (methods != null) { 1418 if (methods != null) {
1310 _json["methods"] = commons.mapMap<RestMethod, core.Map<core.String, core.O bject>>(methods, (RestMethod item) => (item).toJson()); 1419 _json["methods"] =
1420 commons.mapMap<RestMethod, core.Map<core.String, core.Object>>(
1421 methods, (RestMethod item) => (item).toJson());
1311 } 1422 }
1312 if (resources != null) { 1423 if (resources != null) {
1313 _json["resources"] = commons.mapMap<RestResource, core.Map<core.String, co re.Object>>(resources, (RestResource item) => (item).toJson()); 1424 _json["resources"] =
1425 commons.mapMap<RestResource, core.Map<core.String, core.Object>>(
1426 resources, (RestResource item) => (item).toJson());
1314 } 1427 }
1315 return _json; 1428 return _json;
1316 } 1429 }
1317 } 1430 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/deploymentmanager/v2.dart ('k') | generated/googleapis/lib/dns/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698