Chromium Code Reviews

Side by Side Diff: generated/googleapis_beta/lib/speech/v1beta1.dart

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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_beta.speech.v1beta1; 3 library googleapis_beta.speech.v1beta1;
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;
(...skipping 156 matching lines...)
167 uploadOptions: _uploadOptions, 167 uploadOptions: _uploadOptions,
168 uploadMedia: _uploadMedia, 168 uploadMedia: _uploadMedia,
169 downloadOptions: _downloadOptions); 169 downloadOptions: _downloadOptions);
170 return _response.then((data) => new Operation.fromJson(data)); 170 return _response.then((data) => new Operation.fromJson(data));
171 } 171 }
172 172
173 /** 173 /**
174 * Lists operations that match the specified filter in the request. If the 174 * Lists operations that match the specified filter in the request. If the
175 * server doesn't support this method, it returns `UNIMPLEMENTED`. 175 * server doesn't support this method, it returns `UNIMPLEMENTED`.
176 * 176 *
177 * NOTE: the `name` binding below allows API services to override the binding 177 * NOTE: the `name` binding allows API services to override the binding
178 * to use different resource name schemes, such as `users / * /operations`. 178 * to use different resource name schemes, such as `users / * /operations`. To
179 * override the binding, API services can add a binding such as
180 * `"/v1/{name=users / * }/operations"` to their service configuration.
181 * For backwards compatibility, the default name includes the operations
182 * collection id, however overriding users must ensure the name binding
183 * is the parent resource, without the operations collection id.
179 * 184 *
180 * Request parameters: 185 * Request parameters:
181 * 186 *
182 * [name] - The name of the operation collection. 187 * [filter] - The standard list filter.
188 *
189 * [name] - The name of the operation's parent resource.
183 * 190 *
184 * [pageToken] - The standard list page token. 191 * [pageToken] - The standard list page token.
185 * 192 *
186 * [pageSize] - The standard list page size. 193 * [pageSize] - The standard list page size.
187 * 194 *
188 * [filter] - The standard list filter.
189 *
190 * Completes with a [ListOperationsResponse]. 195 * Completes with a [ListOperationsResponse].
191 * 196 *
192 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 197 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
193 * error. 198 * error.
194 * 199 *
195 * If the used [http.Client] completes with an error when making a REST call, 200 * If the used [http.Client] completes with an error when making a REST call,
196 * this method will complete with the same error. 201 * this method will complete with the same error.
197 */ 202 */
198 async.Future<ListOperationsResponse> list({core.String name, core.String pageT oken, core.int pageSize, core.String filter}) { 203 async.Future<ListOperationsResponse> list({core.String filter, core.String nam e, core.String pageToken, core.int pageSize}) {
199 var _url = null; 204 var _url = null;
200 var _queryParams = new core.Map(); 205 var _queryParams = new core.Map();
201 var _uploadMedia = null; 206 var _uploadMedia = null;
202 var _uploadOptions = null; 207 var _uploadOptions = null;
203 var _downloadOptions = commons.DownloadOptions.Metadata; 208 var _downloadOptions = commons.DownloadOptions.Metadata;
204 var _body = null; 209 var _body = null;
205 210
211 if (filter != null) {
212 _queryParams["filter"] = [filter];
213 }
206 if (name != null) { 214 if (name != null) {
207 _queryParams["name"] = [name]; 215 _queryParams["name"] = [name];
208 } 216 }
209 if (pageToken != null) { 217 if (pageToken != null) {
210 _queryParams["pageToken"] = [pageToken]; 218 _queryParams["pageToken"] = [pageToken];
211 } 219 }
212 if (pageSize != null) { 220 if (pageSize != null) {
213 _queryParams["pageSize"] = ["${pageSize}"]; 221 _queryParams["pageSize"] = ["${pageSize}"];
214 } 222 }
215 if (filter != null) {
216 _queryParams["filter"] = [filter];
217 }
218 223
219 _url = 'v1beta1/operations'; 224 _url = 'v1beta1/operations';
220 225
221 var _response = _requester.request(_url, 226 var _response = _requester.request(_url,
222 "GET", 227 "GET",
223 body: _body, 228 body: _body,
224 queryParams: _queryParams, 229 queryParams: _queryParams,
225 uploadOptions: _uploadOptions, 230 uploadOptions: _uploadOptions,
226 uploadMedia: _uploadMedia, 231 uploadMedia: _uploadMedia,
227 downloadOptions: _downloadOptions); 232 downloadOptions: _downloadOptions);
(...skipping 113 matching lines...)
341 346
342 AsyncRecognizeRequest.fromJson(core.Map _json) { 347 AsyncRecognizeRequest.fromJson(core.Map _json) {
343 if (_json.containsKey("audio")) { 348 if (_json.containsKey("audio")) {
344 audio = new RecognitionAudio.fromJson(_json["audio"]); 349 audio = new RecognitionAudio.fromJson(_json["audio"]);
345 } 350 }
346 if (_json.containsKey("config")) { 351 if (_json.containsKey("config")) {
347 config = new RecognitionConfig.fromJson(_json["config"]); 352 config = new RecognitionConfig.fromJson(_json["config"]);
348 } 353 }
349 } 354 }
350 355
351 core.Map toJson() { 356 core.Map<core.String, core.Object> toJson() {
352 var _json = new core.Map(); 357 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
353 if (audio != null) { 358 if (audio != null) {
354 _json["audio"] = (audio).toJson(); 359 _json["audio"] = (audio).toJson();
355 } 360 }
356 if (config != null) { 361 if (config != null) {
357 _json["config"] = (config).toJson(); 362 _json["config"] = (config).toJson();
358 } 363 }
359 return _json; 364 return _json;
360 } 365 }
361 } 366 }
362 367
363 /** 368 /**
364 * A generic empty message that you can re-use to avoid defining duplicated 369 * A generic empty message that you can re-use to avoid defining duplicated
365 * empty messages in your APIs. A typical example is to use it as the request 370 * empty messages in your APIs. A typical example is to use it as the request
366 * or the response type of an API method. For instance: 371 * or the response type of an API method. For instance:
367 * 372 *
368 * service Foo { 373 * service Foo {
369 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 374 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
370 * } 375 * }
371 * 376 *
372 * The JSON representation for `Empty` is empty JSON object `{}`. 377 * The JSON representation for `Empty` is empty JSON object `{}`.
373 */ 378 */
374 class Empty { 379 class Empty {
375 380
376 Empty(); 381 Empty();
377 382
378 Empty.fromJson(core.Map _json) { 383 Empty.fromJson(core.Map _json) {
379 } 384 }
380 385
381 core.Map toJson() { 386 core.Map<core.String, core.Object> toJson() {
382 var _json = new core.Map(); 387 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
383 return _json; 388 return _json;
384 } 389 }
385 } 390 }
386 391
387 /** The response message for Operations.ListOperations. */ 392 /** The response message for Operations.ListOperations. */
388 class ListOperationsResponse { 393 class ListOperationsResponse {
389 /** The standard List next-page token. */ 394 /** The standard List next-page token. */
390 core.String nextPageToken; 395 core.String nextPageToken;
391 /** A list of operations that matches the specified filter in the request. */ 396 /** A list of operations that matches the specified filter in the request. */
392 core.List<Operation> operations; 397 core.List<Operation> operations;
393 398
394 ListOperationsResponse(); 399 ListOperationsResponse();
395 400
396 ListOperationsResponse.fromJson(core.Map _json) { 401 ListOperationsResponse.fromJson(core.Map _json) {
397 if (_json.containsKey("nextPageToken")) { 402 if (_json.containsKey("nextPageToken")) {
398 nextPageToken = _json["nextPageToken"]; 403 nextPageToken = _json["nextPageToken"];
399 } 404 }
400 if (_json.containsKey("operations")) { 405 if (_json.containsKey("operations")) {
401 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList(); 406 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
402 } 407 }
403 } 408 }
404 409
405 core.Map toJson() { 410 core.Map<core.String, core.Object> toJson() {
406 var _json = new core.Map(); 411 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
407 if (nextPageToken != null) { 412 if (nextPageToken != null) {
408 _json["nextPageToken"] = nextPageToken; 413 _json["nextPageToken"] = nextPageToken;
409 } 414 }
410 if (operations != null) { 415 if (operations != null) {
411 _json["operations"] = operations.map((value) => (value).toJson()).toList() ; 416 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
412 } 417 }
413 return _json; 418 return _json;
414 } 419 }
415 } 420 }
416 421
(...skipping 54 matching lines...)
471 metadata = _json["metadata"]; 476 metadata = _json["metadata"];
472 } 477 }
473 if (_json.containsKey("name")) { 478 if (_json.containsKey("name")) {
474 name = _json["name"]; 479 name = _json["name"];
475 } 480 }
476 if (_json.containsKey("response")) { 481 if (_json.containsKey("response")) {
477 response = _json["response"]; 482 response = _json["response"];
478 } 483 }
479 } 484 }
480 485
481 core.Map toJson() { 486 core.Map<core.String, core.Object> toJson() {
482 var _json = new core.Map(); 487 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
483 if (done != null) { 488 if (done != null) {
484 _json["done"] = done; 489 _json["done"] = done;
485 } 490 }
486 if (error != null) { 491 if (error != null) {
487 _json["error"] = (error).toJson(); 492 _json["error"] = (error).toJson();
488 } 493 }
489 if (metadata != null) { 494 if (metadata != null) {
490 _json["metadata"] = metadata; 495 _json["metadata"] = metadata;
491 } 496 }
492 if (name != null) { 497 if (name != null) {
(...skipping 40 matching lines...)
533 538
534 RecognitionAudio.fromJson(core.Map _json) { 539 RecognitionAudio.fromJson(core.Map _json) {
535 if (_json.containsKey("content")) { 540 if (_json.containsKey("content")) {
536 content = _json["content"]; 541 content = _json["content"];
537 } 542 }
538 if (_json.containsKey("uri")) { 543 if (_json.containsKey("uri")) {
539 uri = _json["uri"]; 544 uri = _json["uri"];
540 } 545 }
541 } 546 }
542 547
543 core.Map toJson() { 548 core.Map<core.String, core.Object> toJson() {
544 var _json = new core.Map(); 549 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
545 if (content != null) { 550 if (content != null) {
546 _json["content"] = content; 551 _json["content"] = content;
547 } 552 }
548 if (uri != null) { 553 if (uri != null) {
549 _json["uri"] = uri; 554 _json["uri"] = uri;
550 } 555 }
551 return _json; 556 return _json;
552 } 557 }
553 } 558 }
554 559
(...skipping 79 matching lines...)
634 profanityFilter = _json["profanityFilter"]; 639 profanityFilter = _json["profanityFilter"];
635 } 640 }
636 if (_json.containsKey("sampleRate")) { 641 if (_json.containsKey("sampleRate")) {
637 sampleRate = _json["sampleRate"]; 642 sampleRate = _json["sampleRate"];
638 } 643 }
639 if (_json.containsKey("speechContext")) { 644 if (_json.containsKey("speechContext")) {
640 speechContext = new SpeechContext.fromJson(_json["speechContext"]); 645 speechContext = new SpeechContext.fromJson(_json["speechContext"]);
641 } 646 }
642 } 647 }
643 648
644 core.Map toJson() { 649 core.Map<core.String, core.Object> toJson() {
645 var _json = new core.Map(); 650 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
646 if (encoding != null) { 651 if (encoding != null) {
647 _json["encoding"] = encoding; 652 _json["encoding"] = encoding;
648 } 653 }
649 if (languageCode != null) { 654 if (languageCode != null) {
650 _json["languageCode"] = languageCode; 655 _json["languageCode"] = languageCode;
651 } 656 }
652 if (maxAlternatives != null) { 657 if (maxAlternatives != null) {
653 _json["maxAlternatives"] = maxAlternatives; 658 _json["maxAlternatives"] = maxAlternatives;
654 } 659 }
655 if (profanityFilter != null) { 660 if (profanityFilter != null) {
(...skipping 25 matching lines...)
681 core.List<core.String> phrases; 686 core.List<core.String> phrases;
682 687
683 SpeechContext(); 688 SpeechContext();
684 689
685 SpeechContext.fromJson(core.Map _json) { 690 SpeechContext.fromJson(core.Map _json) {
686 if (_json.containsKey("phrases")) { 691 if (_json.containsKey("phrases")) {
687 phrases = _json["phrases"]; 692 phrases = _json["phrases"];
688 } 693 }
689 } 694 }
690 695
691 core.Map toJson() { 696 core.Map<core.String, core.Object> toJson() {
692 var _json = new core.Map(); 697 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
693 if (phrases != null) { 698 if (phrases != null) {
694 _json["phrases"] = phrases; 699 _json["phrases"] = phrases;
695 } 700 }
696 return _json; 701 return _json;
697 } 702 }
698 } 703 }
699 704
700 /** Alternative hypotheses (a.k.a. n-best list). */ 705 /** Alternative hypotheses (a.k.a. n-best list). */
701 class SpeechRecognitionAlternative { 706 class SpeechRecognitionAlternative {
702 /** 707 /**
(...skipping 15 matching lines...)
718 723
719 SpeechRecognitionAlternative.fromJson(core.Map _json) { 724 SpeechRecognitionAlternative.fromJson(core.Map _json) {
720 if (_json.containsKey("confidence")) { 725 if (_json.containsKey("confidence")) {
721 confidence = _json["confidence"]; 726 confidence = _json["confidence"];
722 } 727 }
723 if (_json.containsKey("transcript")) { 728 if (_json.containsKey("transcript")) {
724 transcript = _json["transcript"]; 729 transcript = _json["transcript"];
725 } 730 }
726 } 731 }
727 732
728 core.Map toJson() { 733 core.Map<core.String, core.Object> toJson() {
729 var _json = new core.Map(); 734 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
730 if (confidence != null) { 735 if (confidence != null) {
731 _json["confidence"] = confidence; 736 _json["confidence"] = confidence;
732 } 737 }
733 if (transcript != null) { 738 if (transcript != null) {
734 _json["transcript"] = transcript; 739 _json["transcript"] = transcript;
735 } 740 }
736 return _json; 741 return _json;
737 } 742 }
738 } 743 }
739 744
740 /** A speech recognition result corresponding to a portion of the audio. */ 745 /** A speech recognition result corresponding to a portion of the audio. */
741 class SpeechRecognitionResult { 746 class SpeechRecognitionResult {
742 /** 747 /**
743 * *Output-only* May contain one or more recognition hypotheses (up to the 748 * *Output-only* May contain one or more recognition hypotheses (up to the
744 * maximum specified in `max_alternatives`). 749 * maximum specified in `max_alternatives`).
745 */ 750 */
746 core.List<SpeechRecognitionAlternative> alternatives; 751 core.List<SpeechRecognitionAlternative> alternatives;
747 752
748 SpeechRecognitionResult(); 753 SpeechRecognitionResult();
749 754
750 SpeechRecognitionResult.fromJson(core.Map _json) { 755 SpeechRecognitionResult.fromJson(core.Map _json) {
751 if (_json.containsKey("alternatives")) { 756 if (_json.containsKey("alternatives")) {
752 alternatives = _json["alternatives"].map((value) => new SpeechRecognitionA lternative.fromJson(value)).toList(); 757 alternatives = _json["alternatives"].map((value) => new SpeechRecognitionA lternative.fromJson(value)).toList();
753 } 758 }
754 } 759 }
755 760
756 core.Map toJson() { 761 core.Map<core.String, core.Object> toJson() {
757 var _json = new core.Map(); 762 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
758 if (alternatives != null) { 763 if (alternatives != null) {
759 _json["alternatives"] = alternatives.map((value) => (value).toJson()).toLi st(); 764 _json["alternatives"] = alternatives.map((value) => (value).toJson()).toLi st();
760 } 765 }
761 return _json; 766 return _json;
762 } 767 }
763 } 768 }
764 769
765 /** 770 /**
766 * The `Status` type defines a logical error model that is suitable for 771 * The `Status` type defines a logical error model that is suitable for
767 * different 772 * different
(...skipping 75 matching lines...)
843 code = _json["code"]; 848 code = _json["code"];
844 } 849 }
845 if (_json.containsKey("details")) { 850 if (_json.containsKey("details")) {
846 details = _json["details"]; 851 details = _json["details"];
847 } 852 }
848 if (_json.containsKey("message")) { 853 if (_json.containsKey("message")) {
849 message = _json["message"]; 854 message = _json["message"];
850 } 855 }
851 } 856 }
852 857
853 core.Map toJson() { 858 core.Map<core.String, core.Object> toJson() {
854 var _json = new core.Map(); 859 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
855 if (code != null) { 860 if (code != null) {
856 _json["code"] = code; 861 _json["code"] = code;
857 } 862 }
858 if (details != null) { 863 if (details != null) {
859 _json["details"] = details; 864 _json["details"] = details;
860 } 865 }
861 if (message != null) { 866 if (message != null) {
862 _json["message"] = message; 867 _json["message"] = message;
863 } 868 }
864 return _json; 869 return _json;
(...skipping 14 matching lines...)
879 884
880 SyncRecognizeRequest.fromJson(core.Map _json) { 885 SyncRecognizeRequest.fromJson(core.Map _json) {
881 if (_json.containsKey("audio")) { 886 if (_json.containsKey("audio")) {
882 audio = new RecognitionAudio.fromJson(_json["audio"]); 887 audio = new RecognitionAudio.fromJson(_json["audio"]);
883 } 888 }
884 if (_json.containsKey("config")) { 889 if (_json.containsKey("config")) {
885 config = new RecognitionConfig.fromJson(_json["config"]); 890 config = new RecognitionConfig.fromJson(_json["config"]);
886 } 891 }
887 } 892 }
888 893
889 core.Map toJson() { 894 core.Map<core.String, core.Object> toJson() {
890 var _json = new core.Map(); 895 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
891 if (audio != null) { 896 if (audio != null) {
892 _json["audio"] = (audio).toJson(); 897 _json["audio"] = (audio).toJson();
893 } 898 }
894 if (config != null) { 899 if (config != null) {
895 _json["config"] = (config).toJson(); 900 _json["config"] = (config).toJson();
896 } 901 }
897 return _json; 902 return _json;
898 } 903 }
899 } 904 }
900 905
(...skipping 10 matching lines...)
911 core.List<SpeechRecognitionResult> results; 916 core.List<SpeechRecognitionResult> results;
912 917
913 SyncRecognizeResponse(); 918 SyncRecognizeResponse();
914 919
915 SyncRecognizeResponse.fromJson(core.Map _json) { 920 SyncRecognizeResponse.fromJson(core.Map _json) {
916 if (_json.containsKey("results")) { 921 if (_json.containsKey("results")) {
917 results = _json["results"].map((value) => new SpeechRecognitionResult.from Json(value)).toList(); 922 results = _json["results"].map((value) => new SpeechRecognitionResult.from Json(value)).toList();
918 } 923 }
919 } 924 }
920 925
921 core.Map toJson() { 926 core.Map<core.String, core.Object> toJson() {
922 var _json = new core.Map(); 927 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
923 if (results != null) { 928 if (results != null) {
924 _json["results"] = results.map((value) => (value).toJson()).toList(); 929 _json["results"] = results.map((value) => (value).toJson()).toList();
925 } 930 }
926 return _json; 931 return _json;
927 } 932 }
928 } 933 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/runtimeconfig/v1beta1.dart ('k') | generated/googleapis_beta/lib/sqladmin/v1beta3.dart » ('j') | no next file with comments »

Powered by Google App Engine