OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis_beta.videointelligence.v1beta1; | 3 library googleapis_beta.videointelligence.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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 if (level != null) { | 643 if (level != null) { |
644 _json["level"] = level; | 644 _json["level"] = level; |
645 } | 645 } |
646 if (segment != null) { | 646 if (segment != null) { |
647 _json["segment"] = (segment).toJson(); | 647 _json["segment"] = (segment).toJson(); |
648 } | 648 } |
649 return _json; | 649 return _json; |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
| 653 /** |
| 654 * Safe search annotation (based on per-frame visual signals only). |
| 655 * If no unsafe content has been detected in a frame, no annotations |
| 656 * are present for that frame. If only some types of unsafe content |
| 657 * have been detected in a frame, the likelihood is set to `UNKNOWN` |
| 658 * for all other types of unsafe content. |
| 659 */ |
| 660 class GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation { |
| 661 /** |
| 662 * Likelihood of adult content. |
| 663 * Possible string values are: |
| 664 * - "UNKNOWN" : Unknown likelihood. |
| 665 * - "VERY_UNLIKELY" : Very unlikely. |
| 666 * - "UNLIKELY" : Unlikely. |
| 667 * - "POSSIBLE" : Possible. |
| 668 * - "LIKELY" : Likely. |
| 669 * - "VERY_LIKELY" : Very likely. |
| 670 */ |
| 671 core.String adult; |
| 672 /** |
| 673 * Likelihood of medical content. |
| 674 * Possible string values are: |
| 675 * - "UNKNOWN" : Unknown likelihood. |
| 676 * - "VERY_UNLIKELY" : Very unlikely. |
| 677 * - "UNLIKELY" : Unlikely. |
| 678 * - "POSSIBLE" : Possible. |
| 679 * - "LIKELY" : Likely. |
| 680 * - "VERY_LIKELY" : Very likely. |
| 681 */ |
| 682 core.String medical; |
| 683 /** |
| 684 * Likelihood of racy content. |
| 685 * Possible string values are: |
| 686 * - "UNKNOWN" : Unknown likelihood. |
| 687 * - "VERY_UNLIKELY" : Very unlikely. |
| 688 * - "UNLIKELY" : Unlikely. |
| 689 * - "POSSIBLE" : Possible. |
| 690 * - "LIKELY" : Likely. |
| 691 * - "VERY_LIKELY" : Very likely. |
| 692 */ |
| 693 core.String racy; |
| 694 /** |
| 695 * Likelihood that an obvious modification was made to the original |
| 696 * version to make it appear funny or offensive. |
| 697 * Possible string values are: |
| 698 * - "UNKNOWN" : Unknown likelihood. |
| 699 * - "VERY_UNLIKELY" : Very unlikely. |
| 700 * - "UNLIKELY" : Unlikely. |
| 701 * - "POSSIBLE" : Possible. |
| 702 * - "LIKELY" : Likely. |
| 703 * - "VERY_LIKELY" : Very likely. |
| 704 */ |
| 705 core.String spoof; |
| 706 /** Video time offset in microseconds. */ |
| 707 core.String timeOffset; |
| 708 /** |
| 709 * Likelihood of violent content. |
| 710 * Possible string values are: |
| 711 * - "UNKNOWN" : Unknown likelihood. |
| 712 * - "VERY_UNLIKELY" : Very unlikely. |
| 713 * - "UNLIKELY" : Unlikely. |
| 714 * - "POSSIBLE" : Possible. |
| 715 * - "LIKELY" : Likely. |
| 716 * - "VERY_LIKELY" : Very likely. |
| 717 */ |
| 718 core.String violent; |
| 719 |
| 720 GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation(); |
| 721 |
| 722 GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation.fromJson(core.Map _jso
n) { |
| 723 if (_json.containsKey("adult")) { |
| 724 adult = _json["adult"]; |
| 725 } |
| 726 if (_json.containsKey("medical")) { |
| 727 medical = _json["medical"]; |
| 728 } |
| 729 if (_json.containsKey("racy")) { |
| 730 racy = _json["racy"]; |
| 731 } |
| 732 if (_json.containsKey("spoof")) { |
| 733 spoof = _json["spoof"]; |
| 734 } |
| 735 if (_json.containsKey("timeOffset")) { |
| 736 timeOffset = _json["timeOffset"]; |
| 737 } |
| 738 if (_json.containsKey("violent")) { |
| 739 violent = _json["violent"]; |
| 740 } |
| 741 } |
| 742 |
| 743 core.Map<core.String, core.Object> toJson() { |
| 744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 745 if (adult != null) { |
| 746 _json["adult"] = adult; |
| 747 } |
| 748 if (medical != null) { |
| 749 _json["medical"] = medical; |
| 750 } |
| 751 if (racy != null) { |
| 752 _json["racy"] = racy; |
| 753 } |
| 754 if (spoof != null) { |
| 755 _json["spoof"] = spoof; |
| 756 } |
| 757 if (timeOffset != null) { |
| 758 _json["timeOffset"] = timeOffset; |
| 759 } |
| 760 if (violent != null) { |
| 761 _json["violent"] = violent; |
| 762 } |
| 763 return _json; |
| 764 } |
| 765 } |
| 766 |
653 /** Annotation progress for a single video. */ | 767 /** Annotation progress for a single video. */ |
654 class GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress { | 768 class GoogleCloudVideointelligenceV1beta1VideoAnnotationProgress { |
655 /** | 769 /** |
656 * Video file location in | 770 * Video file location in |
657 * [Google Cloud Storage](https://cloud.google.com/storage/). | 771 * [Google Cloud Storage](https://cloud.google.com/storage/). |
658 */ | 772 */ |
659 core.String inputUri; | 773 core.String inputUri; |
660 /** | 774 /** |
661 * Approximate percentage processed thus far. | 775 * Approximate percentage processed thus far. |
662 * Guaranteed to be 100 when fully processed. | 776 * Guaranteed to be 100 when fully processed. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 * some videos may succeed and some may fail. | 823 * some videos may succeed and some may fail. |
710 */ | 824 */ |
711 GoogleRpcStatus error; | 825 GoogleRpcStatus error; |
712 /** | 826 /** |
713 * Video file location in | 827 * Video file location in |
714 * [Google Cloud Storage](https://cloud.google.com/storage/). | 828 * [Google Cloud Storage](https://cloud.google.com/storage/). |
715 */ | 829 */ |
716 core.String inputUri; | 830 core.String inputUri; |
717 /** Label annotations. There is exactly one element for each unique label. */ | 831 /** Label annotations. There is exactly one element for each unique label. */ |
718 core.List<GoogleCloudVideointelligenceV1beta1LabelAnnotation> labelAnnotations
; | 832 core.List<GoogleCloudVideointelligenceV1beta1LabelAnnotation> labelAnnotations
; |
| 833 /** Safe search annotations. */ |
| 834 core.List<GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation> safeSearchA
nnotations; |
719 /** Shot annotations. Each shot is represented as a video segment. */ | 835 /** Shot annotations. Each shot is represented as a video segment. */ |
720 core.List<GoogleCloudVideointelligenceV1beta1VideoSegment> shotAnnotations; | 836 core.List<GoogleCloudVideointelligenceV1beta1VideoSegment> shotAnnotations; |
721 | 837 |
722 GoogleCloudVideointelligenceV1beta1VideoAnnotationResults(); | 838 GoogleCloudVideointelligenceV1beta1VideoAnnotationResults(); |
723 | 839 |
724 GoogleCloudVideointelligenceV1beta1VideoAnnotationResults.fromJson(core.Map _j
son) { | 840 GoogleCloudVideointelligenceV1beta1VideoAnnotationResults.fromJson(core.Map _j
son) { |
725 if (_json.containsKey("error")) { | 841 if (_json.containsKey("error")) { |
726 error = new GoogleRpcStatus.fromJson(_json["error"]); | 842 error = new GoogleRpcStatus.fromJson(_json["error"]); |
727 } | 843 } |
728 if (_json.containsKey("inputUri")) { | 844 if (_json.containsKey("inputUri")) { |
729 inputUri = _json["inputUri"]; | 845 inputUri = _json["inputUri"]; |
730 } | 846 } |
731 if (_json.containsKey("labelAnnotations")) { | 847 if (_json.containsKey("labelAnnotations")) { |
732 labelAnnotations = _json["labelAnnotations"].map((value) => new GoogleClou
dVideointelligenceV1beta1LabelAnnotation.fromJson(value)).toList(); | 848 labelAnnotations = _json["labelAnnotations"].map((value) => new GoogleClou
dVideointelligenceV1beta1LabelAnnotation.fromJson(value)).toList(); |
733 } | 849 } |
| 850 if (_json.containsKey("safeSearchAnnotations")) { |
| 851 safeSearchAnnotations = _json["safeSearchAnnotations"].map((value) => new
GoogleCloudVideointelligenceV1beta1SafeSearchAnnotation.fromJson(value)).toList(
); |
| 852 } |
734 if (_json.containsKey("shotAnnotations")) { | 853 if (_json.containsKey("shotAnnotations")) { |
735 shotAnnotations = _json["shotAnnotations"].map((value) => new GoogleCloudV
ideointelligenceV1beta1VideoSegment.fromJson(value)).toList(); | 854 shotAnnotations = _json["shotAnnotations"].map((value) => new GoogleCloudV
ideointelligenceV1beta1VideoSegment.fromJson(value)).toList(); |
736 } | 855 } |
737 } | 856 } |
738 | 857 |
739 core.Map<core.String, core.Object> toJson() { | 858 core.Map<core.String, core.Object> toJson() { |
740 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 859 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
741 if (error != null) { | 860 if (error != null) { |
742 _json["error"] = (error).toJson(); | 861 _json["error"] = (error).toJson(); |
743 } | 862 } |
744 if (inputUri != null) { | 863 if (inputUri != null) { |
745 _json["inputUri"] = inputUri; | 864 _json["inputUri"] = inputUri; |
746 } | 865 } |
747 if (labelAnnotations != null) { | 866 if (labelAnnotations != null) { |
748 _json["labelAnnotations"] = labelAnnotations.map((value) => (value).toJson
()).toList(); | 867 _json["labelAnnotations"] = labelAnnotations.map((value) => (value).toJson
()).toList(); |
749 } | 868 } |
| 869 if (safeSearchAnnotations != null) { |
| 870 _json["safeSearchAnnotations"] = safeSearchAnnotations.map((value) => (val
ue).toJson()).toList(); |
| 871 } |
750 if (shotAnnotations != null) { | 872 if (shotAnnotations != null) { |
751 _json["shotAnnotations"] = shotAnnotations.map((value) => (value).toJson()
).toList(); | 873 _json["shotAnnotations"] = shotAnnotations.map((value) => (value).toJson()
).toList(); |
752 } | 874 } |
753 return _json; | 875 return _json; |
754 } | 876 } |
755 } | 877 } |
756 | 878 |
757 /** Video context and/or feature-specific parameters. */ | 879 /** Video context and/or feature-specific parameters. */ |
758 class GoogleCloudVideointelligenceV1beta1VideoContext { | 880 class GoogleCloudVideointelligenceV1beta1VideoContext { |
759 /** | 881 /** |
760 * If label detection has been requested, what labels should be detected | 882 * If label detection has been requested, what labels should be detected |
761 * in addition to video-level labels or segment-level labels. If unspecified, | 883 * in addition to video-level labels or segment-level labels. If unspecified, |
762 * defaults to `SHOT_MODE`. | 884 * defaults to `SHOT_MODE`. |
763 * Possible string values are: | 885 * Possible string values are: |
764 * - "LABEL_DETECTION_MODE_UNSPECIFIED" : Unspecified. | 886 * - "LABEL_DETECTION_MODE_UNSPECIFIED" : Unspecified. |
765 * - "SHOT_MODE" : Detect shot-level labels. | 887 * - "SHOT_MODE" : Detect shot-level labels. |
766 * - "FRAME_MODE" : Detect frame-level labels. | 888 * - "FRAME_MODE" : Detect frame-level labels. |
767 * - "SHOT_AND_FRAME_MODE" : Detect both shot-level and frame-level labels. | 889 * - "SHOT_AND_FRAME_MODE" : Detect both shot-level and frame-level labels. |
768 */ | 890 */ |
769 core.String labelDetectionMode; | 891 core.String labelDetectionMode; |
770 /** | 892 /** |
771 * Model to use for label detection. | 893 * Model to use for label detection. |
772 * Supported values: "latest" and "stable" (the default). | 894 * Supported values: "latest" and "stable" (the default). |
773 */ | 895 */ |
774 core.String labelDetectionModel; | 896 core.String labelDetectionModel; |
775 /** | 897 /** |
| 898 * Model to use for safe search detection. |
| 899 * Supported values: "latest" and "stable" (the default). |
| 900 */ |
| 901 core.String safeSearchDetectionModel; |
| 902 /** |
776 * Video segments to annotate. The segments may overlap and are not required | 903 * Video segments to annotate. The segments may overlap and are not required |
777 * to be contiguous or span the whole video. If unspecified, each video | 904 * to be contiguous or span the whole video. If unspecified, each video |
778 * is treated as a single segment. | 905 * is treated as a single segment. |
779 */ | 906 */ |
780 core.List<GoogleCloudVideointelligenceV1beta1VideoSegment> segments; | 907 core.List<GoogleCloudVideointelligenceV1beta1VideoSegment> segments; |
781 /** | 908 /** |
782 * Model to use for shot change detection. | 909 * Model to use for shot change detection. |
783 * Supported values: "latest" and "stable" (the default). | 910 * Supported values: "latest" and "stable" (the default). |
784 */ | 911 */ |
785 core.String shotChangeDetectionModel; | 912 core.String shotChangeDetectionModel; |
| 913 /** |
| 914 * Whether the video has been shot from a stationary (i.e. non-moving) camera. |
| 915 * When set to true, might improve detection accuracy for moving objects. |
| 916 */ |
| 917 core.bool stationaryCamera; |
786 | 918 |
787 GoogleCloudVideointelligenceV1beta1VideoContext(); | 919 GoogleCloudVideointelligenceV1beta1VideoContext(); |
788 | 920 |
789 GoogleCloudVideointelligenceV1beta1VideoContext.fromJson(core.Map _json) { | 921 GoogleCloudVideointelligenceV1beta1VideoContext.fromJson(core.Map _json) { |
790 if (_json.containsKey("labelDetectionMode")) { | 922 if (_json.containsKey("labelDetectionMode")) { |
791 labelDetectionMode = _json["labelDetectionMode"]; | 923 labelDetectionMode = _json["labelDetectionMode"]; |
792 } | 924 } |
793 if (_json.containsKey("labelDetectionModel")) { | 925 if (_json.containsKey("labelDetectionModel")) { |
794 labelDetectionModel = _json["labelDetectionModel"]; | 926 labelDetectionModel = _json["labelDetectionModel"]; |
795 } | 927 } |
| 928 if (_json.containsKey("safeSearchDetectionModel")) { |
| 929 safeSearchDetectionModel = _json["safeSearchDetectionModel"]; |
| 930 } |
796 if (_json.containsKey("segments")) { | 931 if (_json.containsKey("segments")) { |
797 segments = _json["segments"].map((value) => new GoogleCloudVideointelligen
ceV1beta1VideoSegment.fromJson(value)).toList(); | 932 segments = _json["segments"].map((value) => new GoogleCloudVideointelligen
ceV1beta1VideoSegment.fromJson(value)).toList(); |
798 } | 933 } |
799 if (_json.containsKey("shotChangeDetectionModel")) { | 934 if (_json.containsKey("shotChangeDetectionModel")) { |
800 shotChangeDetectionModel = _json["shotChangeDetectionModel"]; | 935 shotChangeDetectionModel = _json["shotChangeDetectionModel"]; |
801 } | 936 } |
| 937 if (_json.containsKey("stationaryCamera")) { |
| 938 stationaryCamera = _json["stationaryCamera"]; |
| 939 } |
802 } | 940 } |
803 | 941 |
804 core.Map<core.String, core.Object> toJson() { | 942 core.Map<core.String, core.Object> toJson() { |
805 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 943 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
806 if (labelDetectionMode != null) { | 944 if (labelDetectionMode != null) { |
807 _json["labelDetectionMode"] = labelDetectionMode; | 945 _json["labelDetectionMode"] = labelDetectionMode; |
808 } | 946 } |
809 if (labelDetectionModel != null) { | 947 if (labelDetectionModel != null) { |
810 _json["labelDetectionModel"] = labelDetectionModel; | 948 _json["labelDetectionModel"] = labelDetectionModel; |
811 } | 949 } |
| 950 if (safeSearchDetectionModel != null) { |
| 951 _json["safeSearchDetectionModel"] = safeSearchDetectionModel; |
| 952 } |
812 if (segments != null) { | 953 if (segments != null) { |
813 _json["segments"] = segments.map((value) => (value).toJson()).toList(); | 954 _json["segments"] = segments.map((value) => (value).toJson()).toList(); |
814 } | 955 } |
815 if (shotChangeDetectionModel != null) { | 956 if (shotChangeDetectionModel != null) { |
816 _json["shotChangeDetectionModel"] = shotChangeDetectionModel; | 957 _json["shotChangeDetectionModel"] = shotChangeDetectionModel; |
817 } | 958 } |
| 959 if (stationaryCamera != null) { |
| 960 _json["stationaryCamera"] = stationaryCamera; |
| 961 } |
818 return _json; | 962 return _json; |
819 } | 963 } |
820 } | 964 } |
821 | 965 |
822 /** Video segment. */ | 966 /** Video segment. */ |
823 class GoogleCloudVideointelligenceV1beta1VideoSegment { | 967 class GoogleCloudVideointelligenceV1beta1VideoSegment { |
824 /** End offset in microseconds (inclusive). Unset means 0. */ | 968 /** End offset in microseconds (inclusive). Unset means 0. */ |
825 core.String endTimeOffset; | 969 core.String endTimeOffset; |
826 /** Start offset in microseconds (inclusive). Unset means 0. */ | 970 /** Start offset in microseconds (inclusive). Unset means 0. */ |
827 core.String startTimeOffset; | 971 core.String startTimeOffset; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 * results in its response, the status of those operations should be | 1131 * results in its response, the status of those operations should be |
988 * represented directly using the `Status` message. | 1132 * represented directly using the `Status` message. |
989 * | 1133 * |
990 * - Logging. If some API errors are stored in logs, the message `Status` could | 1134 * - Logging. If some API errors are stored in logs, the message `Status` could |
991 * be used directly after any stripping needed for security/privacy reasons. | 1135 * be used directly after any stripping needed for security/privacy reasons. |
992 */ | 1136 */ |
993 class GoogleRpcStatus { | 1137 class GoogleRpcStatus { |
994 /** The status code, which should be an enum value of google.rpc.Code. */ | 1138 /** The status code, which should be an enum value of google.rpc.Code. */ |
995 core.int code; | 1139 core.int code; |
996 /** | 1140 /** |
997 * A list of messages that carry the error details. There will be a | 1141 * A list of messages that carry the error details. There is a common set of |
998 * common set of message types for APIs to use. | 1142 * message types for APIs to use. |
999 * | 1143 * |
1000 * The values for Object must be JSON objects. It can consist of `num`, | 1144 * The values for Object must be JSON objects. It can consist of `num`, |
1001 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1145 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1002 */ | 1146 */ |
1003 core.List<core.Map<core.String, core.Object>> details; | 1147 core.List<core.Map<core.String, core.Object>> details; |
1004 /** | 1148 /** |
1005 * A developer-facing error message, which should be in English. Any | 1149 * A developer-facing error message, which should be in English. Any |
1006 * user-facing error message should be localized and sent in the | 1150 * user-facing error message should be localized and sent in the |
1007 * google.rpc.Status.details field, or localized by the client. | 1151 * google.rpc.Status.details field, or localized by the client. |
1008 */ | 1152 */ |
(...skipping 20 matching lines...) Expand all Loading... |
1029 } | 1173 } |
1030 if (details != null) { | 1174 if (details != null) { |
1031 _json["details"] = details; | 1175 _json["details"] = details; |
1032 } | 1176 } |
1033 if (message != null) { | 1177 if (message != null) { |
1034 _json["message"] = message; | 1178 _json["message"] = message; |
1035 } | 1179 } |
1036 return _json; | 1180 return _json; |
1037 } | 1181 } |
1038 } | 1182 } |
OLD | NEW |