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

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

Issue 2571553005: Api-roll 43: 2016-12-13 (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « generated/googleapis/lib/tagmanager/v1.dart ('k') | generated/googleapis/lib/youtube/v3.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.vision.v1; 3 library googleapis.vision.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;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 _json["imageContext"] = (imageContext).toJson(); 120 _json["imageContext"] = (imageContext).toJson();
121 } 121 }
122 return _json; 122 return _json;
123 } 123 }
124 } 124 }
125 125
126 /** Response to an image annotation request. */ 126 /** Response to an image annotation request. */
127 class AnnotateImageResponse { 127 class AnnotateImageResponse {
128 /** 128 /**
129 * If set, represents the error message for the operation. 129 * If set, represents the error message for the operation.
130 * Note that filled-in mage annotations are guaranteed to be 130 * Note that filled-in image annotations are guaranteed to be
131 * correct, even when <code>error</code> is non-empty. 131 * correct, even when `error` is set.
132 */ 132 */
133 Status error; 133 Status error;
134 /** If present, face detection completed successfully. */ 134 /** If present, face detection has completed successfully. */
135 core.List<FaceAnnotation> faceAnnotations; 135 core.List<FaceAnnotation> faceAnnotations;
136 /** If present, image properties were extracted successfully. */ 136 /** If present, image properties were extracted successfully. */
137 ImageProperties imagePropertiesAnnotation; 137 ImageProperties imagePropertiesAnnotation;
138 /** If present, label detection completed successfully. */ 138 /** If present, label detection has completed successfully. */
139 core.List<EntityAnnotation> labelAnnotations; 139 core.List<EntityAnnotation> labelAnnotations;
140 /** If present, landmark detection completed successfully. */ 140 /** If present, landmark detection has completed successfully. */
141 core.List<EntityAnnotation> landmarkAnnotations; 141 core.List<EntityAnnotation> landmarkAnnotations;
142 /** If present, logo detection completed successfully. */ 142 /** If present, logo detection has completed successfully. */
143 core.List<EntityAnnotation> logoAnnotations; 143 core.List<EntityAnnotation> logoAnnotations;
144 /** If present, safe-search annotation completed successfully. */ 144 /** If present, safe-search annotation has completed successfully. */
145 SafeSearchAnnotation safeSearchAnnotation; 145 SafeSearchAnnotation safeSearchAnnotation;
146 /** If present, text (OCR) detection completed successfully. */ 146 /** If present, text (OCR) detection has completed successfully. */
147 core.List<EntityAnnotation> textAnnotations; 147 core.List<EntityAnnotation> textAnnotations;
148 148
149 AnnotateImageResponse(); 149 AnnotateImageResponse();
150 150
151 AnnotateImageResponse.fromJson(core.Map _json) { 151 AnnotateImageResponse.fromJson(core.Map _json) {
152 if (_json.containsKey("error")) { 152 if (_json.containsKey("error")) {
153 error = new Status.fromJson(_json["error"]); 153 error = new Status.fromJson(_json["error"]);
154 } 154 }
155 if (_json.containsKey("faceAnnotations")) { 155 if (_json.containsKey("faceAnnotations")) {
156 faceAnnotations = _json["faceAnnotations"].map((value) => new FaceAnnotati on.fromJson(value)).toList(); 156 faceAnnotations = _json["faceAnnotations"].map((value) => new FaceAnnotati on.fromJson(value)).toList();
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 _json["green"] = green; 440 _json["green"] = green;
441 } 441 }
442 if (red != null) { 442 if (red != null) {
443 _json["red"] = red; 443 _json["red"] = red;
444 } 444 }
445 return _json; 445 return _json;
446 } 446 }
447 } 447 }
448 448
449 /** 449 /**
450 * Color information consists of RGB channels, score and fraction of 450 * Color information consists of RGB channels, score, and the fraction of
451 * image the color occupies in the image. 451 * the image that the color occupies in the image.
452 */ 452 */
453 class ColorInfo { 453 class ColorInfo {
454 /** RGB components of the color. */ 454 /** RGB components of the color. */
455 Color color; 455 Color color;
456 /** 456 /**
457 * Stores the fraction of pixels the color occupies in the image. 457 * The fraction of pixels the color occupies in the image.
458 * Value in range [0, 1]. 458 * Value in range [0, 1].
459 */ 459 */
460 core.double pixelFraction; 460 core.double pixelFraction;
461 /** Image-specific score for this color. Value in range [0, 1]. */ 461 /** Image-specific score for this color. Value in range [0, 1]. */
462 core.double score; 462 core.double score;
463 463
464 ColorInfo(); 464 ColorInfo();
465 465
466 ColorInfo.fromJson(core.Map _json) { 466 ColorInfo.fromJson(core.Map _json) {
467 if (_json.containsKey("color")) { 467 if (_json.containsKey("color")) {
(...skipping 17 matching lines...) Expand all
485 } 485 }
486 if (score != null) { 486 if (score != null) {
487 _json["score"] = score; 487 _json["score"] = score;
488 } 488 }
489 return _json; 489 return _json;
490 } 490 }
491 } 491 }
492 492
493 /** Set of dominant colors and their corresponding scores. */ 493 /** Set of dominant colors and their corresponding scores. */
494 class DominantColorsAnnotation { 494 class DominantColorsAnnotation {
495 /** RGB color values, with their score and pixel fraction. */ 495 /** RGB color values with their score and pixel fraction. */
496 core.List<ColorInfo> colors; 496 core.List<ColorInfo> colors;
497 497
498 DominantColorsAnnotation(); 498 DominantColorsAnnotation();
499 499
500 DominantColorsAnnotation.fromJson(core.Map _json) { 500 DominantColorsAnnotation.fromJson(core.Map _json) {
501 if (_json.containsKey("colors")) { 501 if (_json.containsKey("colors")) {
502 colors = _json["colors"].map((value) => new ColorInfo.fromJson(value)).toL ist(); 502 colors = _json["colors"].map((value) => new ColorInfo.fromJson(value)).toL ist();
503 } 503 }
504 } 504 }
505 505
506 core.Map toJson() { 506 core.Map toJson() {
507 var _json = new core.Map(); 507 var _json = new core.Map();
508 if (colors != null) { 508 if (colors != null) {
509 _json["colors"] = colors.map((value) => (value).toJson()).toList(); 509 _json["colors"] = colors.map((value) => (value).toJson()).toList();
510 } 510 }
511 return _json; 511 return _json;
512 } 512 }
513 } 513 }
514 514
515 /** Set of detected entity features. */ 515 /** Set of detected entity features. */
516 class EntityAnnotation { 516 class EntityAnnotation {
517 /** 517 /**
518 * Image region to which this entity belongs. Not filled currently 518 * Image region to which this entity belongs. Currently not produced
519 * for `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s 519 * for `LABEL_DETECTION` features. For `TEXT_DETECTION` (OCR), `boundingPoly`s
520 * are produced for the entire text detected in an image region, followed by 520 * are produced for the entire text detected in an image region, followed by
521 * `boundingPoly`s for each word within the detected text. 521 * `boundingPoly`s for each word within the detected text.
522 */ 522 */
523 BoundingPoly boundingPoly; 523 BoundingPoly boundingPoly;
524 /** 524 /**
525 * The accuracy of the entity detection in an image. 525 * The accuracy of the entity detection in an image.
526 * For example, for an image containing 'Eiffel Tower,' this field represents 526 * For example, for an image in which the "Eiffel Tower" entity is detected,
527 * the confidence that there is a tower in the query image. Range [0, 1]. 527 * this field represents the confidence that there is a tower in the query
528 * image. Range [0, 1].
528 */ 529 */
529 core.double confidence; 530 core.double confidence;
530 /** 531 /** Entity textual description, expressed in its `locale` language. */
531 * Entity textual description, expressed in its <code>locale</code> language.
532 */
533 core.String description; 532 core.String description;
534 /** 533 /**
535 * The language code for the locale in which the entity textual 534 * The language code for the locale in which the entity textual
536 * <code>description</code> (next field) is expressed. 535 * `description` is expressed.
537 */ 536 */
538 core.String locale; 537 core.String locale;
539 /** 538 /**
540 * The location information for the detected entity. Multiple 539 * The location information for the detected entity. Multiple
541 * <code>LocationInfo</code> elements can be present since one location may 540 * `LocationInfo` elements can be present because one location may
542 * indicate the location of the scene in the query image, and another the 541 * indicate the location of the scene in the image, and another location
543 * location of the place where the query image was taken. Location information 542 * may indicate the location of the place where the image was taken.
544 * is usually present for landmarks. 543 * Location information is usually present for landmarks.
545 */ 544 */
546 core.List<LocationInfo> locations; 545 core.List<LocationInfo> locations;
547 /** 546 /**
548 * Opaque entity ID. Some IDs might be available in Knowledge Graph(KG). 547 * Opaque entity ID. Some IDs may be available in
549 * For more details on KG please see: 548 * [Google Knowledge Graph Search
550 * https://developers.google.com/knowledge-graph/ 549 * API](https://developers.google.com/knowledge-graph/).
551 */ 550 */
552 core.String mid; 551 core.String mid;
553 /** 552 /**
554 * Some entities can have additional optional <code>Property</code> fields. 553 * Some entities may have optional user-supplied `Property` (name/value)
555 * For example a different kind of score or string that qualifies the entity. 554 * fields, such a score or string that qualifies the entity.
556 */ 555 */
557 core.List<Property> properties; 556 core.List<Property> properties;
558 /** Overall score of the result. Range [0, 1]. */ 557 /** Overall score of the result. Range [0, 1]. */
559 core.double score; 558 core.double score;
560 /** 559 /**
561 * The relevancy of the ICA (Image Content Annotation) label to the 560 * The relevancy of the ICA (Image Content Annotation) label to the
562 * image. For example, the relevancy of 'tower' to an image containing 561 * image. For example, the relevancy of "tower" is likely higher to an image
563 * 'Eiffel Tower' is likely higher than an image containing a distant towering 562 * containing the detected "Eiffel Tower" than to an image containing a
564 * building, though the confidence that there is a tower may be the same. 563 * detected distant towering building, even though the confidence that
565 * Range [0, 1]. 564 * there is a tower in each image may be the same. Range [0, 1].
566 */ 565 */
567 core.double topicality; 566 core.double topicality;
568 567
569 EntityAnnotation(); 568 EntityAnnotation();
570 569
571 EntityAnnotation.fromJson(core.Map _json) { 570 EntityAnnotation.fromJson(core.Map _json) {
572 if (_json.containsKey("boundingPoly")) { 571 if (_json.containsKey("boundingPoly")) {
573 boundingPoly = new BoundingPoly.fromJson(_json["boundingPoly"]); 572 boundingPoly = new BoundingPoly.fromJson(_json["boundingPoly"]);
574 } 573 }
575 if (_json.containsKey("confidence")) { 574 if (_json.containsKey("confidence")) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 return _json; 629 return _json;
631 } 630 }
632 } 631 }
633 632
634 /** A face annotation object contains the results of face detection. */ 633 /** A face annotation object contains the results of face detection. */
635 class FaceAnnotation { 634 class FaceAnnotation {
636 /** 635 /**
637 * Anger likelihood. 636 * Anger likelihood.
638 * Possible string values are: 637 * Possible string values are:
639 * - "UNKNOWN" : Unknown likelihood. 638 * - "UNKNOWN" : Unknown likelihood.
640 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 639 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
641 * specified. 640 * specified vertical.
642 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 641 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
643 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 642 * vertical.
644 * - "LIKELY" : The image likely belongs to the vertical specified. 643 * - "POSSIBLE" : It is possible that the image belongs to the specified
645 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 644 * vertical.
645 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
646 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
647 * vertical.
646 */ 648 */
647 core.String angerLikelihood; 649 core.String angerLikelihood;
648 /** 650 /**
649 * Blurred likelihood. 651 * Blurred likelihood.
650 * Possible string values are: 652 * Possible string values are:
651 * - "UNKNOWN" : Unknown likelihood. 653 * - "UNKNOWN" : Unknown likelihood.
652 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 654 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
653 * specified. 655 * specified vertical.
654 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 656 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
655 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 657 * vertical.
656 * - "LIKELY" : The image likely belongs to the vertical specified. 658 * - "POSSIBLE" : It is possible that the image belongs to the specified
657 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 659 * vertical.
660 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
661 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
662 * vertical.
658 */ 663 */
659 core.String blurredLikelihood; 664 core.String blurredLikelihood;
660 /** 665 /**
661 * The bounding polygon around the face. The coordinates of the bounding box 666 * The bounding polygon around the face. The coordinates of the bounding box
662 * are in the original image's scale, as returned in ImageParams. 667 * are in the original image's scale, as returned in `ImageParams`.
663 * The bounding box is computed to "frame" the face in accordance with human 668 * The bounding box is computed to "frame" the face in accordance with human
664 * expectations. It is based on the landmarker results. 669 * expectations. It is based on the landmarker results.
665 * Note that one or more x and/or y coordinates may not be generated in the 670 * Note that one or more x and/or y coordinates may not be generated in the
666 * BoundingPoly (the polygon will be unbounded) if only a partial face appears 671 * `BoundingPoly` (the polygon will be unbounded) if only a partial face
667 * in 672 * appears in the image to be annotated.
668 * the image to be annotated.
669 */ 673 */
670 BoundingPoly boundingPoly; 674 BoundingPoly boundingPoly;
671 /** Detection confidence. Range [0, 1]. */ 675 /** Detection confidence. Range [0, 1]. */
672 core.double detectionConfidence; 676 core.double detectionConfidence;
673 /** 677 /**
674 * This bounding polygon is tighter than the previous 678 * The `fd_bounding_poly` bounding polygon is tighter than the
675 * <code>boundingPoly</code>, and 679 * `boundingPoly`, and encloses only the skin part of the face. Typically, it
676 * encloses only the skin part of the face. Typically, it is used to 680 * is used to eliminate the face from any image analysis that detects the
677 * eliminate the face from any image analysis that detects the
678 * "amount of skin" visible in an image. It is not based on the 681 * "amount of skin" visible in an image. It is not based on the
679 * landmarker results, only on the initial face detection, hence 682 * landmarker results, only on the initial face detection, hence
680 * the <code>fd</code> (face detection) prefix. 683 * the <code>fd</code> (face detection) prefix.
681 */ 684 */
682 BoundingPoly fdBoundingPoly; 685 BoundingPoly fdBoundingPoly;
683 /** 686 /**
684 * Headwear likelihood. 687 * Headwear likelihood.
685 * Possible string values are: 688 * Possible string values are:
686 * - "UNKNOWN" : Unknown likelihood. 689 * - "UNKNOWN" : Unknown likelihood.
687 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 690 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
688 * specified. 691 * specified vertical.
689 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 692 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
690 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 693 * vertical.
691 * - "LIKELY" : The image likely belongs to the vertical specified. 694 * - "POSSIBLE" : It is possible that the image belongs to the specified
692 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 695 * vertical.
696 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
697 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
698 * vertical.
693 */ 699 */
694 core.String headwearLikelihood; 700 core.String headwearLikelihood;
695 /** 701 /**
696 * Joy likelihood. 702 * Joy likelihood.
697 * Possible string values are: 703 * Possible string values are:
698 * - "UNKNOWN" : Unknown likelihood. 704 * - "UNKNOWN" : Unknown likelihood.
699 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 705 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
700 * specified. 706 * specified vertical.
701 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 707 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
702 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 708 * vertical.
703 * - "LIKELY" : The image likely belongs to the vertical specified. 709 * - "POSSIBLE" : It is possible that the image belongs to the specified
704 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 710 * vertical.
711 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
712 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
713 * vertical.
705 */ 714 */
706 core.String joyLikelihood; 715 core.String joyLikelihood;
707 /** Face landmarking confidence. Range [0, 1]. */ 716 /** Face landmarking confidence. Range [0, 1]. */
708 core.double landmarkingConfidence; 717 core.double landmarkingConfidence;
709 /** Detected face landmarks. */ 718 /** Detected face landmarks. */
710 core.List<Landmark> landmarks; 719 core.List<Landmark> landmarks;
711 /** 720 /**
712 * Yaw angle. Indicates the leftward/rightward angle that the face is 721 * Yaw angle, which indicates the leftward/rightward angle that the face is
713 * pointing, relative to the vertical plane perpendicular to the image. Range 722 * pointing relative to the vertical plane perpendicular to the image. Range
714 * [-180,180]. 723 * [-180,180].
715 */ 724 */
716 core.double panAngle; 725 core.double panAngle;
717 /** 726 /**
718 * Roll angle. Indicates the amount of clockwise/anti-clockwise rotation of 727 * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
719 * the 728 * of the face relative to the image vertical about the axis perpendicular to
720 * face relative to the image vertical, about the axis perpendicular to the 729 * the face. Range [-180,180].
721 * face. Range [-180,180].
722 */ 730 */
723 core.double rollAngle; 731 core.double rollAngle;
724 /** 732 /**
725 * Sorrow likelihood. 733 * Sorrow likelihood.
726 * Possible string values are: 734 * Possible string values are:
727 * - "UNKNOWN" : Unknown likelihood. 735 * - "UNKNOWN" : Unknown likelihood.
728 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 736 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
729 * specified. 737 * specified vertical.
730 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 738 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
731 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 739 * vertical.
732 * - "LIKELY" : The image likely belongs to the vertical specified. 740 * - "POSSIBLE" : It is possible that the image belongs to the specified
733 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 741 * vertical.
742 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
743 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
744 * vertical.
734 */ 745 */
735 core.String sorrowLikelihood; 746 core.String sorrowLikelihood;
736 /** 747 /**
737 * Surprise likelihood. 748 * Surprise likelihood.
738 * Possible string values are: 749 * Possible string values are:
739 * - "UNKNOWN" : Unknown likelihood. 750 * - "UNKNOWN" : Unknown likelihood.
740 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 751 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
741 * specified. 752 * specified vertical.
742 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 753 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
743 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 754 * vertical.
744 * - "LIKELY" : The image likely belongs to the vertical specified. 755 * - "POSSIBLE" : It is possible that the image belongs to the specified
745 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 756 * vertical.
757 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
758 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
759 * vertical.
746 */ 760 */
747 core.String surpriseLikelihood; 761 core.String surpriseLikelihood;
748 /** 762 /**
749 * Pitch angle. Indicates the upwards/downwards angle that the face is 763 * Pitch angle, which indicates the upwards/downwards angle that the face is
750 * pointing 764 * pointing relative to the image's horizontal plane. Range [-180,180].
751 * relative to the image's horizontal plane. Range [-180,180].
752 */ 765 */
753 core.double tiltAngle; 766 core.double tiltAngle;
754 /** 767 /**
755 * Under-exposed likelihood. 768 * Under-exposed likelihood.
756 * Possible string values are: 769 * Possible string values are:
757 * - "UNKNOWN" : Unknown likelihood. 770 * - "UNKNOWN" : Unknown likelihood.
758 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 771 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
759 * specified. 772 * specified vertical.
760 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 773 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
761 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 774 * vertical.
762 * - "LIKELY" : The image likely belongs to the vertical specified. 775 * - "POSSIBLE" : It is possible that the image belongs to the specified
763 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 776 * vertical.
777 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
778 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
779 * vertical.
764 */ 780 */
765 core.String underExposedLikelihood; 781 core.String underExposedLikelihood;
766 782
767 FaceAnnotation(); 783 FaceAnnotation();
768 784
769 FaceAnnotation.fromJson(core.Map _json) { 785 FaceAnnotation.fromJson(core.Map _json) {
770 if (_json.containsKey("angerLikelihood")) { 786 if (_json.containsKey("angerLikelihood")) {
771 angerLikelihood = _json["angerLikelihood"]; 787 angerLikelihood = _json["angerLikelihood"];
772 } 788 }
773 if (_json.containsKey("blurredLikelihood")) { 789 if (_json.containsKey("blurredLikelihood")) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 _json["tiltAngle"] = tiltAngle; 875 _json["tiltAngle"] = tiltAngle;
860 } 876 }
861 if (underExposedLikelihood != null) { 877 if (underExposedLikelihood != null) {
862 _json["underExposedLikelihood"] = underExposedLikelihood; 878 _json["underExposedLikelihood"] = underExposedLikelihood;
863 } 879 }
864 return _json; 880 return _json;
865 } 881 }
866 } 882 }
867 883
868 /** 884 /**
869 * The <em>Feature</em> indicates what type of image detection task to perform.
870 * Users describe the type of Google Cloud Vision API tasks to perform over 885 * Users describe the type of Google Cloud Vision API tasks to perform over
871 * images by using <em>Feature</em>s. Features encode the Cloud Vision API 886 * images by using *Feature*s. Each Feature indicates a type of image
887 * detection task to perform. Features encode the Cloud Vision API
872 * vertical to operate on and the number of top-scoring results to return. 888 * vertical to operate on and the number of top-scoring results to return.
873 */ 889 */
874 class Feature { 890 class Feature {
875 /** Maximum number of results of this type. */ 891 /** Maximum number of results of this type. */
876 core.int maxResults; 892 core.int maxResults;
877 /** 893 /**
878 * The feature type. 894 * The feature type.
879 * Possible string values are: 895 * Possible string values are:
880 * - "TYPE_UNSPECIFIED" : Unspecified feature type. 896 * - "TYPE_UNSPECIFIED" : Unspecified feature type.
881 * - "FACE_DETECTION" : Run face detection. 897 * - "FACE_DETECTION" : Run face detection.
882 * - "LANDMARK_DETECTION" : Run landmark detection. 898 * - "LANDMARK_DETECTION" : Run landmark detection.
883 * - "LOGO_DETECTION" : Run logo detection. 899 * - "LOGO_DETECTION" : Run logo detection.
884 * - "LABEL_DETECTION" : Run label detection. 900 * - "LABEL_DETECTION" : Run label detection.
885 * - "TEXT_DETECTION" : Run OCR. 901 * - "TEXT_DETECTION" : Run OCR.
886 * - "SAFE_SEARCH_DETECTION" : Run various computer vision models to compute 902 * - "SAFE_SEARCH_DETECTION" : Run computer vision models to compute image
887 * image safe-search properties. 903 * safe-search properties.
888 * - "IMAGE_PROPERTIES" : Compute a set of properties about the image (such as 904 * - "IMAGE_PROPERTIES" : Compute a set of image properties, such as the
889 * the image's dominant colors). 905 * image's dominant colors.
890 */ 906 */
891 core.String type; 907 core.String type;
892 908
893 Feature(); 909 Feature();
894 910
895 Feature.fromJson(core.Map _json) { 911 Feature.fromJson(core.Map _json) {
896 if (_json.containsKey("maxResults")) { 912 if (_json.containsKey("maxResults")) {
897 maxResults = _json["maxResults"]; 913 maxResults = _json["maxResults"];
898 } 914 }
899 if (_json.containsKey("type")) { 915 if (_json.containsKey("type")) {
(...skipping 22 matching lines...) Expand all
922 */ 938 */
923 core.String content; 939 core.String content;
924 core.List<core.int> get contentAsBytes { 940 core.List<core.int> get contentAsBytes {
925 return convert.BASE64.decode(content); 941 return convert.BASE64.decode(content);
926 } 942 }
927 943
928 void set contentAsBytes(core.List<core.int> _bytes) { 944 void set contentAsBytes(core.List<core.int> _bytes) {
929 content = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); 945 content = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
930 } 946 }
931 /** 947 /**
932 * Google Cloud Storage image location. If both 'content' and 'source' 948 * Google Cloud Storage image location. If both `content` and `source`
933 * are filled for an image, 'content' takes precedence and it will be 949 * are provided for an image, `content` takes precedence and is
934 * used for performing the image annotation request. 950 * used to perform the image annotation request.
935 */ 951 */
936 ImageSource source; 952 ImageSource source;
937 953
938 Image(); 954 Image();
939 955
940 Image.fromJson(core.Map _json) { 956 Image.fromJson(core.Map _json) {
941 if (_json.containsKey("content")) { 957 if (_json.containsKey("content")) {
942 content = _json["content"]; 958 content = _json["content"];
943 } 959 }
944 if (_json.containsKey("source")) { 960 if (_json.containsKey("source")) {
(...skipping 16 matching lines...) Expand all
961 /** Image context and/or feature-specific parameters. */ 977 /** Image context and/or feature-specific parameters. */
962 class ImageContext { 978 class ImageContext {
963 /** 979 /**
964 * List of languages to use for TEXT_DETECTION. In most cases, an empty value 980 * List of languages to use for TEXT_DETECTION. In most cases, an empty value
965 * yields the best results since it enables automatic language detection. For 981 * yields the best results since it enables automatic language detection. For
966 * languages based on the Latin alphabet, setting `language_hints` is not 982 * languages based on the Latin alphabet, setting `language_hints` is not
967 * needed. In rare cases, when the language of the text in the image is known, 983 * needed. In rare cases, when the language of the text in the image is known,
968 * setting a hint will help get better results (although it will be a 984 * setting a hint will help get better results (although it will be a
969 * significant hindrance if the hint is wrong). Text detection returns an 985 * significant hindrance if the hint is wrong). Text detection returns an
970 * error if one or more of the specified languages is not one of the 986 * error if one or more of the specified languages is not one of the
971 * [supported 987 * [supported languages](/vision/docs/languages).
972 * languages](/translate/v2/translate-reference#supported_languages).
973 */ 988 */
974 core.List<core.String> languageHints; 989 core.List<core.String> languageHints;
975 /** Lat/long rectangle that specifies the location of the image. */ 990 /** lat/long rectangle that specifies the location of the image. */
976 LatLongRect latLongRect; 991 LatLongRect latLongRect;
977 992
978 ImageContext(); 993 ImageContext();
979 994
980 ImageContext.fromJson(core.Map _json) { 995 ImageContext.fromJson(core.Map _json) {
981 if (_json.containsKey("languageHints")) { 996 if (_json.containsKey("languageHints")) {
982 languageHints = _json["languageHints"]; 997 languageHints = _json["languageHints"];
983 } 998 }
984 if (_json.containsKey("latLongRect")) { 999 if (_json.containsKey("latLongRect")) {
985 latLongRect = new LatLongRect.fromJson(_json["latLongRect"]); 1000 latLongRect = new LatLongRect.fromJson(_json["latLongRect"]);
986 } 1001 }
987 } 1002 }
988 1003
989 core.Map toJson() { 1004 core.Map toJson() {
990 var _json = new core.Map(); 1005 var _json = new core.Map();
991 if (languageHints != null) { 1006 if (languageHints != null) {
992 _json["languageHints"] = languageHints; 1007 _json["languageHints"] = languageHints;
993 } 1008 }
994 if (latLongRect != null) { 1009 if (latLongRect != null) {
995 _json["latLongRect"] = (latLongRect).toJson(); 1010 _json["latLongRect"] = (latLongRect).toJson();
996 } 1011 }
997 return _json; 1012 return _json;
998 } 1013 }
999 } 1014 }
1000 1015
1001 /** Stores image properties (e.g. dominant colors). */ 1016 /** Stores image properties, such as dominant colors. */
1002 class ImageProperties { 1017 class ImageProperties {
1003 /** If present, dominant colors completed successfully. */ 1018 /** If present, dominant colors completed successfully. */
1004 DominantColorsAnnotation dominantColors; 1019 DominantColorsAnnotation dominantColors;
1005 1020
1006 ImageProperties(); 1021 ImageProperties();
1007 1022
1008 ImageProperties.fromJson(core.Map _json) { 1023 ImageProperties.fromJson(core.Map _json) {
1009 if (_json.containsKey("dominantColors")) { 1024 if (_json.containsKey("dominantColors")) {
1010 dominantColors = new DominantColorsAnnotation.fromJson(_json["dominantColo rs"]); 1025 dominantColors = new DominantColorsAnnotation.fromJson(_json["dominantColo rs"]);
1011 } 1026 }
1012 } 1027 }
1013 1028
1014 core.Map toJson() { 1029 core.Map toJson() {
1015 var _json = new core.Map(); 1030 var _json = new core.Map();
1016 if (dominantColors != null) { 1031 if (dominantColors != null) {
1017 _json["dominantColors"] = (dominantColors).toJson(); 1032 _json["dominantColors"] = (dominantColors).toJson();
1018 } 1033 }
1019 return _json; 1034 return _json;
1020 } 1035 }
1021 } 1036 }
1022 1037
1023 /** External image source (Google Cloud Storage image location). */ 1038 /** External image source (Google Cloud Storage image location). */
1024 class ImageSource { 1039 class ImageSource {
1025 /** 1040 /**
1026 * Google Cloud Storage image URI. It must be in the following form: 1041 * Google Cloud Storage image URI, which must be in the following form:
1027 * `gs://bucket_name/object_name`. For more 1042 * `gs://bucket_name/object_name` (for details, see
1028 * details, please see: https://cloud.google.com/storage/docs/reference-uris. 1043 * [Google Cloud Storage Request
1029 * NOTE: Cloud Storage object versioning is not supported! 1044 * URIs](https://cloud.google.com/storage/docs/reference-uris)).
1045 * NOTE: Cloud Storage object versioning is not supported.
1030 */ 1046 */
1031 core.String gcsImageUri; 1047 core.String gcsImageUri;
1032 1048
1033 ImageSource(); 1049 ImageSource();
1034 1050
1035 ImageSource.fromJson(core.Map _json) { 1051 ImageSource.fromJson(core.Map _json) {
1036 if (_json.containsKey("gcsImageUri")) { 1052 if (_json.containsKey("gcsImageUri")) {
1037 gcsImageUri = _json["gcsImageUri"]; 1053 gcsImageUri = _json["gcsImageUri"];
1038 } 1054 }
1039 } 1055 }
1040 1056
1041 core.Map toJson() { 1057 core.Map toJson() {
1042 var _json = new core.Map(); 1058 var _json = new core.Map();
1043 if (gcsImageUri != null) { 1059 if (gcsImageUri != null) {
1044 _json["gcsImageUri"] = gcsImageUri; 1060 _json["gcsImageUri"] = gcsImageUri;
1045 } 1061 }
1046 return _json; 1062 return _json;
1047 } 1063 }
1048 } 1064 }
1049 1065
1050 /** 1066 /**
1051 * A face-specific landmark (for example, a face feature). 1067 * A face-specific landmark (for example, a face feature).
1052 * Landmark positions may fall outside the bounds of the image 1068 * Landmark positions may fall outside the bounds of the image
1053 * when the face is near one or more edges of the image. 1069 * if the face is near one or more edges of the image.
1054 * Therefore it is NOT guaranteed that 0 <= x < width or 0 <= y < height. 1070 * Therefore it is NOT guaranteed that `0 <= x < width` or
1071 * `0 <= y < height`.
1055 */ 1072 */
1056 class Landmark { 1073 class Landmark {
1057 /** Face landmark position. */ 1074 /** Face landmark position. */
1058 Position position; 1075 Position position;
1059 /** 1076 /**
1060 * Face landmark type. 1077 * Face landmark type.
1061 * Possible string values are: 1078 * Possible string values are:
1062 * - "UNKNOWN_LANDMARK" : Unknown face landmark detected. Should not be 1079 * - "UNKNOWN_LANDMARK" : Unknown face landmark detected. Should not be
1063 * filled. 1080 * filled.
1064 * - "LEFT_EYE" : Left eye. 1081 * - "LEFT_EYE" : Left eye.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 if (latitude != null) { 1201 if (latitude != null) {
1185 _json["latitude"] = latitude; 1202 _json["latitude"] = latitude;
1186 } 1203 }
1187 if (longitude != null) { 1204 if (longitude != null) {
1188 _json["longitude"] = longitude; 1205 _json["longitude"] = longitude;
1189 } 1206 }
1190 return _json; 1207 return _json;
1191 } 1208 }
1192 } 1209 }
1193 1210
1194 /** Rectangle determined by min and max LatLng pairs. */ 1211 /** Rectangle determined by min and max `LatLng` pairs. */
1195 class LatLongRect { 1212 class LatLongRect {
1196 /** Max lat/long pair. */ 1213 /** Max lat/long pair. */
1197 LatLng maxLatLng; 1214 LatLng maxLatLng;
1198 /** Min lat/long pair. */ 1215 /** Min lat/long pair. */
1199 LatLng minLatLng; 1216 LatLng minLatLng;
1200 1217
1201 LatLongRect(); 1218 LatLongRect();
1202 1219
1203 LatLongRect.fromJson(core.Map _json) { 1220 LatLongRect.fromJson(core.Map _json) {
1204 if (_json.containsKey("maxLatLng")) { 1221 if (_json.containsKey("maxLatLng")) {
(...skipping 11 matching lines...) Expand all
1216 } 1233 }
1217 if (minLatLng != null) { 1234 if (minLatLng != null) {
1218 _json["minLatLng"] = (minLatLng).toJson(); 1235 _json["minLatLng"] = (minLatLng).toJson();
1219 } 1236 }
1220 return _json; 1237 return _json;
1221 } 1238 }
1222 } 1239 }
1223 1240
1224 /** Detected entity location information. */ 1241 /** Detected entity location information. */
1225 class LocationInfo { 1242 class LocationInfo {
1226 /** Lat - long location coordinates. */ 1243 /** lat/long location coordinates. */
1227 LatLng latLng; 1244 LatLng latLng;
1228 1245
1229 LocationInfo(); 1246 LocationInfo();
1230 1247
1231 LocationInfo.fromJson(core.Map _json) { 1248 LocationInfo.fromJson(core.Map _json) {
1232 if (_json.containsKey("latLng")) { 1249 if (_json.containsKey("latLng")) {
1233 latLng = new LatLng.fromJson(_json["latLng"]); 1250 latLng = new LatLng.fromJson(_json["latLng"]);
1234 } 1251 }
1235 } 1252 }
1236 1253
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 if (y != null) { 1295 if (y != null) {
1279 _json["y"] = y; 1296 _json["y"] = y;
1280 } 1297 }
1281 if (z != null) { 1298 if (z != null) {
1282 _json["z"] = z; 1299 _json["z"] = z;
1283 } 1300 }
1284 return _json; 1301 return _json;
1285 } 1302 }
1286 } 1303 }
1287 1304
1288 /** Arbitrary name/value pair. */ 1305 /** A `Property` consists of a user-supplied name/value pair. */
1289 class Property { 1306 class Property {
1290 /** Name of the property. */ 1307 /** Name of the property. */
1291 core.String name; 1308 core.String name;
1292 /** Value of the property. */ 1309 /** Value of the property. */
1293 core.String value; 1310 core.String value;
1294 1311
1295 Property(); 1312 Property();
1296 1313
1297 Property.fromJson(core.Map _json) { 1314 Property.fromJson(core.Map _json) {
1298 if (_json.containsKey("name")) { 1315 if (_json.containsKey("name")) {
1299 name = _json["name"]; 1316 name = _json["name"];
1300 } 1317 }
1301 if (_json.containsKey("value")) { 1318 if (_json.containsKey("value")) {
1302 value = _json["value"]; 1319 value = _json["value"];
1303 } 1320 }
1304 } 1321 }
1305 1322
1306 core.Map toJson() { 1323 core.Map toJson() {
1307 var _json = new core.Map(); 1324 var _json = new core.Map();
1308 if (name != null) { 1325 if (name != null) {
1309 _json["name"] = name; 1326 _json["name"] = name;
1310 } 1327 }
1311 if (value != null) { 1328 if (value != null) {
1312 _json["value"] = value; 1329 _json["value"] = value;
1313 } 1330 }
1314 return _json; 1331 return _json;
1315 } 1332 }
1316 } 1333 }
1317 1334
1318 /**
1319 * Set of features pertaining to the image, computed by various computer vision
1320 * methods over safe-search verticals (for example, adult, spoof, medical,
1321 * violence).
1322 */
1323 class SafeSearchAnnotation { 1335 class SafeSearchAnnotation {
1324 /** 1336 /**
1325 * Represents the adult contents likelihood for the image. 1337 * Represents the adult content likelihood for the image.
1326 * Possible string values are: 1338 * Possible string values are:
1327 * - "UNKNOWN" : Unknown likelihood. 1339 * - "UNKNOWN" : Unknown likelihood.
1328 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 1340 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
1329 * specified. 1341 * specified vertical.
1330 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 1342 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
1331 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 1343 * vertical.
1332 * - "LIKELY" : The image likely belongs to the vertical specified. 1344 * - "POSSIBLE" : It is possible that the image belongs to the specified
1333 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 1345 * vertical.
1346 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
1347 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
1348 * vertical.
1334 */ 1349 */
1335 core.String adult; 1350 core.String adult;
1336 /** 1351 /**
1337 * Likelihood this is a medical image. 1352 * Likelihood that this is a medical image.
1338 * Possible string values are: 1353 * Possible string values are:
1339 * - "UNKNOWN" : Unknown likelihood. 1354 * - "UNKNOWN" : Unknown likelihood.
1340 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 1355 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
1341 * specified. 1356 * specified vertical.
1342 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 1357 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
1343 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 1358 * vertical.
1344 * - "LIKELY" : The image likely belongs to the vertical specified. 1359 * - "POSSIBLE" : It is possible that the image belongs to the specified
1345 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 1360 * vertical.
1361 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
1362 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
1363 * vertical.
1346 */ 1364 */
1347 core.String medical; 1365 core.String medical;
1348 /** 1366 /**
1349 * Spoof likelihood. The likelihood that an obvious modification 1367 * Spoof likelihood. The likelihood that an modification
1350 * was made to the image's canonical version to make it appear 1368 * was made to the image's canonical version to make it appear
1351 * funny or offensive. 1369 * funny or offensive.
1352 * Possible string values are: 1370 * Possible string values are:
1353 * - "UNKNOWN" : Unknown likelihood. 1371 * - "UNKNOWN" : Unknown likelihood.
1354 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 1372 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
1355 * specified. 1373 * specified vertical.
1356 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 1374 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
1357 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 1375 * vertical.
1358 * - "LIKELY" : The image likely belongs to the vertical specified. 1376 * - "POSSIBLE" : It is possible that the image belongs to the specified
1359 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 1377 * vertical.
1378 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
1379 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
1380 * vertical.
1360 */ 1381 */
1361 core.String spoof; 1382 core.String spoof;
1362 /** 1383 /**
1363 * Violence likelihood. 1384 * Violence likelihood.
1364 * Possible string values are: 1385 * Possible string values are:
1365 * - "UNKNOWN" : Unknown likelihood. 1386 * - "UNKNOWN" : Unknown likelihood.
1366 * - "VERY_UNLIKELY" : The image very unlikely belongs to the vertical 1387 * - "VERY_UNLIKELY" : It is very unlikely that the image belongs to the
1367 * specified. 1388 * specified vertical.
1368 * - "UNLIKELY" : The image unlikely belongs to the vertical specified. 1389 * - "UNLIKELY" : It is unlikely that the image belongs to the specified
1369 * - "POSSIBLE" : The image possibly belongs to the vertical specified. 1390 * vertical.
1370 * - "LIKELY" : The image likely belongs to the vertical specified. 1391 * - "POSSIBLE" : It is possible that the image belongs to the specified
1371 * - "VERY_LIKELY" : The image very likely belongs to the vertical specified. 1392 * vertical.
1393 * - "LIKELY" : It is likely that the image belongs to the specified vertical.
1394 * - "VERY_LIKELY" : It is very likely that the image belongs to the specified
1395 * vertical.
1372 */ 1396 */
1373 core.String violence; 1397 core.String violence;
1374 1398
1375 SafeSearchAnnotation(); 1399 SafeSearchAnnotation();
1376 1400
1377 SafeSearchAnnotation.fromJson(core.Map _json) { 1401 SafeSearchAnnotation.fromJson(core.Map _json) {
1378 if (_json.containsKey("adult")) { 1402 if (_json.containsKey("adult")) {
1379 adult = _json["adult"]; 1403 adult = _json["adult"];
1380 } 1404 }
1381 if (_json.containsKey("medical")) { 1405 if (_json.containsKey("medical")) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 var _json = new core.Map(); 1559 var _json = new core.Map();
1536 if (x != null) { 1560 if (x != null) {
1537 _json["x"] = x; 1561 _json["x"] = x;
1538 } 1562 }
1539 if (y != null) { 1563 if (y != null) {
1540 _json["y"] = y; 1564 _json["y"] = y;
1541 } 1565 }
1542 return _json; 1566 return _json;
1543 } 1567 }
1544 } 1568 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/tagmanager/v1.dart ('k') | generated/googleapis/lib/youtube/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698