OLD | NEW |
1 library googleapis.ml.v1.test; | 1 library googleapis.ml.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 773 |
774 core.int buildCounterGoogleCloudMlV1Version = 0; | 774 core.int buildCounterGoogleCloudMlV1Version = 0; |
775 buildGoogleCloudMlV1Version() { | 775 buildGoogleCloudMlV1Version() { |
776 var o = new api.GoogleCloudMlV1Version(); | 776 var o = new api.GoogleCloudMlV1Version(); |
777 buildCounterGoogleCloudMlV1Version++; | 777 buildCounterGoogleCloudMlV1Version++; |
778 if (buildCounterGoogleCloudMlV1Version < 3) { | 778 if (buildCounterGoogleCloudMlV1Version < 3) { |
779 o.automaticScaling = buildGoogleCloudMlV1AutomaticScaling(); | 779 o.automaticScaling = buildGoogleCloudMlV1AutomaticScaling(); |
780 o.createTime = "foo"; | 780 o.createTime = "foo"; |
781 o.deploymentUri = "foo"; | 781 o.deploymentUri = "foo"; |
782 o.description = "foo"; | 782 o.description = "foo"; |
| 783 o.errorMessage = "foo"; |
783 o.isDefault = true; | 784 o.isDefault = true; |
784 o.lastUseTime = "foo"; | 785 o.lastUseTime = "foo"; |
785 o.manualScaling = buildGoogleCloudMlV1ManualScaling(); | 786 o.manualScaling = buildGoogleCloudMlV1ManualScaling(); |
786 o.name = "foo"; | 787 o.name = "foo"; |
787 o.runtimeVersion = "foo"; | 788 o.runtimeVersion = "foo"; |
| 789 o.state = "foo"; |
788 } | 790 } |
789 buildCounterGoogleCloudMlV1Version--; | 791 buildCounterGoogleCloudMlV1Version--; |
790 return o; | 792 return o; |
791 } | 793 } |
792 | 794 |
793 checkGoogleCloudMlV1Version(api.GoogleCloudMlV1Version o) { | 795 checkGoogleCloudMlV1Version(api.GoogleCloudMlV1Version o) { |
794 buildCounterGoogleCloudMlV1Version++; | 796 buildCounterGoogleCloudMlV1Version++; |
795 if (buildCounterGoogleCloudMlV1Version < 3) { | 797 if (buildCounterGoogleCloudMlV1Version < 3) { |
796 checkGoogleCloudMlV1AutomaticScaling(o.automaticScaling); | 798 checkGoogleCloudMlV1AutomaticScaling(o.automaticScaling); |
797 unittest.expect(o.createTime, unittest.equals('foo')); | 799 unittest.expect(o.createTime, unittest.equals('foo')); |
798 unittest.expect(o.deploymentUri, unittest.equals('foo')); | 800 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
799 unittest.expect(o.description, unittest.equals('foo')); | 801 unittest.expect(o.description, unittest.equals('foo')); |
| 802 unittest.expect(o.errorMessage, unittest.equals('foo')); |
800 unittest.expect(o.isDefault, unittest.isTrue); | 803 unittest.expect(o.isDefault, unittest.isTrue); |
801 unittest.expect(o.lastUseTime, unittest.equals('foo')); | 804 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
802 checkGoogleCloudMlV1ManualScaling(o.manualScaling); | 805 checkGoogleCloudMlV1ManualScaling(o.manualScaling); |
803 unittest.expect(o.name, unittest.equals('foo')); | 806 unittest.expect(o.name, unittest.equals('foo')); |
804 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 807 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 808 unittest.expect(o.state, unittest.equals('foo')); |
805 } | 809 } |
806 buildCounterGoogleCloudMlV1Version--; | 810 buildCounterGoogleCloudMlV1Version--; |
807 } | 811 } |
808 | 812 |
809 core.int buildCounterGoogleCloudMlV1beta1AutomaticScaling = 0; | 813 core.int buildCounterGoogleCloudMlV1beta1AutomaticScaling = 0; |
810 buildGoogleCloudMlV1beta1AutomaticScaling() { | 814 buildGoogleCloudMlV1beta1AutomaticScaling() { |
811 var o = new api.GoogleCloudMlV1beta1AutomaticScaling(); | 815 var o = new api.GoogleCloudMlV1beta1AutomaticScaling(); |
812 buildCounterGoogleCloudMlV1beta1AutomaticScaling++; | 816 buildCounterGoogleCloudMlV1beta1AutomaticScaling++; |
813 if (buildCounterGoogleCloudMlV1beta1AutomaticScaling < 3) { | 817 if (buildCounterGoogleCloudMlV1beta1AutomaticScaling < 3) { |
814 o.minNodes = 42; | 818 o.minNodes = 42; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 | 881 |
878 core.int buildCounterGoogleCloudMlV1beta1Version = 0; | 882 core.int buildCounterGoogleCloudMlV1beta1Version = 0; |
879 buildGoogleCloudMlV1beta1Version() { | 883 buildGoogleCloudMlV1beta1Version() { |
880 var o = new api.GoogleCloudMlV1beta1Version(); | 884 var o = new api.GoogleCloudMlV1beta1Version(); |
881 buildCounterGoogleCloudMlV1beta1Version++; | 885 buildCounterGoogleCloudMlV1beta1Version++; |
882 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 886 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
883 o.automaticScaling = buildGoogleCloudMlV1beta1AutomaticScaling(); | 887 o.automaticScaling = buildGoogleCloudMlV1beta1AutomaticScaling(); |
884 o.createTime = "foo"; | 888 o.createTime = "foo"; |
885 o.deploymentUri = "foo"; | 889 o.deploymentUri = "foo"; |
886 o.description = "foo"; | 890 o.description = "foo"; |
| 891 o.errorMessage = "foo"; |
887 o.isDefault = true; | 892 o.isDefault = true; |
888 o.lastUseTime = "foo"; | 893 o.lastUseTime = "foo"; |
889 o.manualScaling = buildGoogleCloudMlV1beta1ManualScaling(); | 894 o.manualScaling = buildGoogleCloudMlV1beta1ManualScaling(); |
890 o.name = "foo"; | 895 o.name = "foo"; |
891 o.runtimeVersion = "foo"; | 896 o.runtimeVersion = "foo"; |
| 897 o.state = "foo"; |
892 } | 898 } |
893 buildCounterGoogleCloudMlV1beta1Version--; | 899 buildCounterGoogleCloudMlV1beta1Version--; |
894 return o; | 900 return o; |
895 } | 901 } |
896 | 902 |
897 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { | 903 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { |
898 buildCounterGoogleCloudMlV1beta1Version++; | 904 buildCounterGoogleCloudMlV1beta1Version++; |
899 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 905 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
900 checkGoogleCloudMlV1beta1AutomaticScaling(o.automaticScaling); | 906 checkGoogleCloudMlV1beta1AutomaticScaling(o.automaticScaling); |
901 unittest.expect(o.createTime, unittest.equals('foo')); | 907 unittest.expect(o.createTime, unittest.equals('foo')); |
902 unittest.expect(o.deploymentUri, unittest.equals('foo')); | 908 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
903 unittest.expect(o.description, unittest.equals('foo')); | 909 unittest.expect(o.description, unittest.equals('foo')); |
| 910 unittest.expect(o.errorMessage, unittest.equals('foo')); |
904 unittest.expect(o.isDefault, unittest.isTrue); | 911 unittest.expect(o.isDefault, unittest.isTrue); |
905 unittest.expect(o.lastUseTime, unittest.equals('foo')); | 912 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
906 checkGoogleCloudMlV1beta1ManualScaling(o.manualScaling); | 913 checkGoogleCloudMlV1beta1ManualScaling(o.manualScaling); |
907 unittest.expect(o.name, unittest.equals('foo')); | 914 unittest.expect(o.name, unittest.equals('foo')); |
908 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 915 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 916 unittest.expect(o.state, unittest.equals('foo')); |
909 } | 917 } |
910 buildCounterGoogleCloudMlV1beta1Version--; | 918 buildCounterGoogleCloudMlV1beta1Version--; |
911 } | 919 } |
912 | 920 |
| 921 core.int buildCounterGoogleIamV1LogConfigCloudAuditOptions = 0; |
| 922 buildGoogleIamV1LogConfigCloudAuditOptions() { |
| 923 var o = new api.GoogleIamV1LogConfigCloudAuditOptions(); |
| 924 buildCounterGoogleIamV1LogConfigCloudAuditOptions++; |
| 925 if (buildCounterGoogleIamV1LogConfigCloudAuditOptions < 3) { |
| 926 o.logName = "foo"; |
| 927 } |
| 928 buildCounterGoogleIamV1LogConfigCloudAuditOptions--; |
| 929 return o; |
| 930 } |
| 931 |
| 932 checkGoogleIamV1LogConfigCloudAuditOptions(api.GoogleIamV1LogConfigCloudAuditOpt
ions o) { |
| 933 buildCounterGoogleIamV1LogConfigCloudAuditOptions++; |
| 934 if (buildCounterGoogleIamV1LogConfigCloudAuditOptions < 3) { |
| 935 unittest.expect(o.logName, unittest.equals('foo')); |
| 936 } |
| 937 buildCounterGoogleIamV1LogConfigCloudAuditOptions--; |
| 938 } |
| 939 |
| 940 core.int buildCounterGoogleIamV1LogConfigCounterOptions = 0; |
| 941 buildGoogleIamV1LogConfigCounterOptions() { |
| 942 var o = new api.GoogleIamV1LogConfigCounterOptions(); |
| 943 buildCounterGoogleIamV1LogConfigCounterOptions++; |
| 944 if (buildCounterGoogleIamV1LogConfigCounterOptions < 3) { |
| 945 o.field = "foo"; |
| 946 o.metric = "foo"; |
| 947 } |
| 948 buildCounterGoogleIamV1LogConfigCounterOptions--; |
| 949 return o; |
| 950 } |
| 951 |
| 952 checkGoogleIamV1LogConfigCounterOptions(api.GoogleIamV1LogConfigCounterOptions o
) { |
| 953 buildCounterGoogleIamV1LogConfigCounterOptions++; |
| 954 if (buildCounterGoogleIamV1LogConfigCounterOptions < 3) { |
| 955 unittest.expect(o.field, unittest.equals('foo')); |
| 956 unittest.expect(o.metric, unittest.equals('foo')); |
| 957 } |
| 958 buildCounterGoogleIamV1LogConfigCounterOptions--; |
| 959 } |
| 960 |
| 961 core.int buildCounterGoogleIamV1LogConfigDataAccessOptions = 0; |
| 962 buildGoogleIamV1LogConfigDataAccessOptions() { |
| 963 var o = new api.GoogleIamV1LogConfigDataAccessOptions(); |
| 964 buildCounterGoogleIamV1LogConfigDataAccessOptions++; |
| 965 if (buildCounterGoogleIamV1LogConfigDataAccessOptions < 3) { |
| 966 } |
| 967 buildCounterGoogleIamV1LogConfigDataAccessOptions--; |
| 968 return o; |
| 969 } |
| 970 |
| 971 checkGoogleIamV1LogConfigDataAccessOptions(api.GoogleIamV1LogConfigDataAccessOpt
ions o) { |
| 972 buildCounterGoogleIamV1LogConfigDataAccessOptions++; |
| 973 if (buildCounterGoogleIamV1LogConfigDataAccessOptions < 3) { |
| 974 } |
| 975 buildCounterGoogleIamV1LogConfigDataAccessOptions--; |
| 976 } |
| 977 |
913 buildUnnamed15() { | 978 buildUnnamed15() { |
| 979 var o = new core.List<api.GoogleIamV1AuditLogConfig>(); |
| 980 o.add(buildGoogleIamV1AuditLogConfig()); |
| 981 o.add(buildGoogleIamV1AuditLogConfig()); |
| 982 return o; |
| 983 } |
| 984 |
| 985 checkUnnamed15(core.List<api.GoogleIamV1AuditLogConfig> o) { |
| 986 unittest.expect(o, unittest.hasLength(2)); |
| 987 checkGoogleIamV1AuditLogConfig(o[0]); |
| 988 checkGoogleIamV1AuditLogConfig(o[1]); |
| 989 } |
| 990 |
| 991 buildUnnamed16() { |
| 992 var o = new core.List<core.String>(); |
| 993 o.add("foo"); |
| 994 o.add("foo"); |
| 995 return o; |
| 996 } |
| 997 |
| 998 checkUnnamed16(core.List<core.String> o) { |
| 999 unittest.expect(o, unittest.hasLength(2)); |
| 1000 unittest.expect(o[0], unittest.equals('foo')); |
| 1001 unittest.expect(o[1], unittest.equals('foo')); |
| 1002 } |
| 1003 |
| 1004 core.int buildCounterGoogleIamV1AuditConfig = 0; |
| 1005 buildGoogleIamV1AuditConfig() { |
| 1006 var o = new api.GoogleIamV1AuditConfig(); |
| 1007 buildCounterGoogleIamV1AuditConfig++; |
| 1008 if (buildCounterGoogleIamV1AuditConfig < 3) { |
| 1009 o.auditLogConfigs = buildUnnamed15(); |
| 1010 o.exemptedMembers = buildUnnamed16(); |
| 1011 o.service = "foo"; |
| 1012 } |
| 1013 buildCounterGoogleIamV1AuditConfig--; |
| 1014 return o; |
| 1015 } |
| 1016 |
| 1017 checkGoogleIamV1AuditConfig(api.GoogleIamV1AuditConfig o) { |
| 1018 buildCounterGoogleIamV1AuditConfig++; |
| 1019 if (buildCounterGoogleIamV1AuditConfig < 3) { |
| 1020 checkUnnamed15(o.auditLogConfigs); |
| 1021 checkUnnamed16(o.exemptedMembers); |
| 1022 unittest.expect(o.service, unittest.equals('foo')); |
| 1023 } |
| 1024 buildCounterGoogleIamV1AuditConfig--; |
| 1025 } |
| 1026 |
| 1027 buildUnnamed17() { |
| 1028 var o = new core.List<core.String>(); |
| 1029 o.add("foo"); |
| 1030 o.add("foo"); |
| 1031 return o; |
| 1032 } |
| 1033 |
| 1034 checkUnnamed17(core.List<core.String> o) { |
| 1035 unittest.expect(o, unittest.hasLength(2)); |
| 1036 unittest.expect(o[0], unittest.equals('foo')); |
| 1037 unittest.expect(o[1], unittest.equals('foo')); |
| 1038 } |
| 1039 |
| 1040 core.int buildCounterGoogleIamV1AuditLogConfig = 0; |
| 1041 buildGoogleIamV1AuditLogConfig() { |
| 1042 var o = new api.GoogleIamV1AuditLogConfig(); |
| 1043 buildCounterGoogleIamV1AuditLogConfig++; |
| 1044 if (buildCounterGoogleIamV1AuditLogConfig < 3) { |
| 1045 o.exemptedMembers = buildUnnamed17(); |
| 1046 o.logType = "foo"; |
| 1047 } |
| 1048 buildCounterGoogleIamV1AuditLogConfig--; |
| 1049 return o; |
| 1050 } |
| 1051 |
| 1052 checkGoogleIamV1AuditLogConfig(api.GoogleIamV1AuditLogConfig o) { |
| 1053 buildCounterGoogleIamV1AuditLogConfig++; |
| 1054 if (buildCounterGoogleIamV1AuditLogConfig < 3) { |
| 1055 checkUnnamed17(o.exemptedMembers); |
| 1056 unittest.expect(o.logType, unittest.equals('foo')); |
| 1057 } |
| 1058 buildCounterGoogleIamV1AuditLogConfig--; |
| 1059 } |
| 1060 |
| 1061 buildUnnamed18() { |
| 1062 var o = new core.List<core.String>(); |
| 1063 o.add("foo"); |
| 1064 o.add("foo"); |
| 1065 return o; |
| 1066 } |
| 1067 |
| 1068 checkUnnamed18(core.List<core.String> o) { |
| 1069 unittest.expect(o, unittest.hasLength(2)); |
| 1070 unittest.expect(o[0], unittest.equals('foo')); |
| 1071 unittest.expect(o[1], unittest.equals('foo')); |
| 1072 } |
| 1073 |
| 1074 core.int buildCounterGoogleIamV1Binding = 0; |
| 1075 buildGoogleIamV1Binding() { |
| 1076 var o = new api.GoogleIamV1Binding(); |
| 1077 buildCounterGoogleIamV1Binding++; |
| 1078 if (buildCounterGoogleIamV1Binding < 3) { |
| 1079 o.condition = buildGoogleTypeExpr(); |
| 1080 o.members = buildUnnamed18(); |
| 1081 o.role = "foo"; |
| 1082 } |
| 1083 buildCounterGoogleIamV1Binding--; |
| 1084 return o; |
| 1085 } |
| 1086 |
| 1087 checkGoogleIamV1Binding(api.GoogleIamV1Binding o) { |
| 1088 buildCounterGoogleIamV1Binding++; |
| 1089 if (buildCounterGoogleIamV1Binding < 3) { |
| 1090 checkGoogleTypeExpr(o.condition); |
| 1091 checkUnnamed18(o.members); |
| 1092 unittest.expect(o.role, unittest.equals('foo')); |
| 1093 } |
| 1094 buildCounterGoogleIamV1Binding--; |
| 1095 } |
| 1096 |
| 1097 buildUnnamed19() { |
| 1098 var o = new core.List<core.String>(); |
| 1099 o.add("foo"); |
| 1100 o.add("foo"); |
| 1101 return o; |
| 1102 } |
| 1103 |
| 1104 checkUnnamed19(core.List<core.String> o) { |
| 1105 unittest.expect(o, unittest.hasLength(2)); |
| 1106 unittest.expect(o[0], unittest.equals('foo')); |
| 1107 unittest.expect(o[1], unittest.equals('foo')); |
| 1108 } |
| 1109 |
| 1110 core.int buildCounterGoogleIamV1Condition = 0; |
| 1111 buildGoogleIamV1Condition() { |
| 1112 var o = new api.GoogleIamV1Condition(); |
| 1113 buildCounterGoogleIamV1Condition++; |
| 1114 if (buildCounterGoogleIamV1Condition < 3) { |
| 1115 o.iam = "foo"; |
| 1116 o.op = "foo"; |
| 1117 o.svc = "foo"; |
| 1118 o.sys = "foo"; |
| 1119 o.value = "foo"; |
| 1120 o.values = buildUnnamed19(); |
| 1121 } |
| 1122 buildCounterGoogleIamV1Condition--; |
| 1123 return o; |
| 1124 } |
| 1125 |
| 1126 checkGoogleIamV1Condition(api.GoogleIamV1Condition o) { |
| 1127 buildCounterGoogleIamV1Condition++; |
| 1128 if (buildCounterGoogleIamV1Condition < 3) { |
| 1129 unittest.expect(o.iam, unittest.equals('foo')); |
| 1130 unittest.expect(o.op, unittest.equals('foo')); |
| 1131 unittest.expect(o.svc, unittest.equals('foo')); |
| 1132 unittest.expect(o.sys, unittest.equals('foo')); |
| 1133 unittest.expect(o.value, unittest.equals('foo')); |
| 1134 checkUnnamed19(o.values); |
| 1135 } |
| 1136 buildCounterGoogleIamV1Condition--; |
| 1137 } |
| 1138 |
| 1139 core.int buildCounterGoogleIamV1LogConfig = 0; |
| 1140 buildGoogleIamV1LogConfig() { |
| 1141 var o = new api.GoogleIamV1LogConfig(); |
| 1142 buildCounterGoogleIamV1LogConfig++; |
| 1143 if (buildCounterGoogleIamV1LogConfig < 3) { |
| 1144 o.cloudAudit = buildGoogleIamV1LogConfigCloudAuditOptions(); |
| 1145 o.counter = buildGoogleIamV1LogConfigCounterOptions(); |
| 1146 o.dataAccess = buildGoogleIamV1LogConfigDataAccessOptions(); |
| 1147 } |
| 1148 buildCounterGoogleIamV1LogConfig--; |
| 1149 return o; |
| 1150 } |
| 1151 |
| 1152 checkGoogleIamV1LogConfig(api.GoogleIamV1LogConfig o) { |
| 1153 buildCounterGoogleIamV1LogConfig++; |
| 1154 if (buildCounterGoogleIamV1LogConfig < 3) { |
| 1155 checkGoogleIamV1LogConfigCloudAuditOptions(o.cloudAudit); |
| 1156 checkGoogleIamV1LogConfigCounterOptions(o.counter); |
| 1157 checkGoogleIamV1LogConfigDataAccessOptions(o.dataAccess); |
| 1158 } |
| 1159 buildCounterGoogleIamV1LogConfig--; |
| 1160 } |
| 1161 |
| 1162 buildUnnamed20() { |
| 1163 var o = new core.List<api.GoogleIamV1AuditConfig>(); |
| 1164 o.add(buildGoogleIamV1AuditConfig()); |
| 1165 o.add(buildGoogleIamV1AuditConfig()); |
| 1166 return o; |
| 1167 } |
| 1168 |
| 1169 checkUnnamed20(core.List<api.GoogleIamV1AuditConfig> o) { |
| 1170 unittest.expect(o, unittest.hasLength(2)); |
| 1171 checkGoogleIamV1AuditConfig(o[0]); |
| 1172 checkGoogleIamV1AuditConfig(o[1]); |
| 1173 } |
| 1174 |
| 1175 buildUnnamed21() { |
| 1176 var o = new core.List<api.GoogleIamV1Binding>(); |
| 1177 o.add(buildGoogleIamV1Binding()); |
| 1178 o.add(buildGoogleIamV1Binding()); |
| 1179 return o; |
| 1180 } |
| 1181 |
| 1182 checkUnnamed21(core.List<api.GoogleIamV1Binding> o) { |
| 1183 unittest.expect(o, unittest.hasLength(2)); |
| 1184 checkGoogleIamV1Binding(o[0]); |
| 1185 checkGoogleIamV1Binding(o[1]); |
| 1186 } |
| 1187 |
| 1188 buildUnnamed22() { |
| 1189 var o = new core.List<api.GoogleIamV1Rule>(); |
| 1190 o.add(buildGoogleIamV1Rule()); |
| 1191 o.add(buildGoogleIamV1Rule()); |
| 1192 return o; |
| 1193 } |
| 1194 |
| 1195 checkUnnamed22(core.List<api.GoogleIamV1Rule> o) { |
| 1196 unittest.expect(o, unittest.hasLength(2)); |
| 1197 checkGoogleIamV1Rule(o[0]); |
| 1198 checkGoogleIamV1Rule(o[1]); |
| 1199 } |
| 1200 |
| 1201 core.int buildCounterGoogleIamV1Policy = 0; |
| 1202 buildGoogleIamV1Policy() { |
| 1203 var o = new api.GoogleIamV1Policy(); |
| 1204 buildCounterGoogleIamV1Policy++; |
| 1205 if (buildCounterGoogleIamV1Policy < 3) { |
| 1206 o.auditConfigs = buildUnnamed20(); |
| 1207 o.bindings = buildUnnamed21(); |
| 1208 o.etag = "foo"; |
| 1209 o.iamOwned = true; |
| 1210 o.rules = buildUnnamed22(); |
| 1211 o.version = 42; |
| 1212 } |
| 1213 buildCounterGoogleIamV1Policy--; |
| 1214 return o; |
| 1215 } |
| 1216 |
| 1217 checkGoogleIamV1Policy(api.GoogleIamV1Policy o) { |
| 1218 buildCounterGoogleIamV1Policy++; |
| 1219 if (buildCounterGoogleIamV1Policy < 3) { |
| 1220 checkUnnamed20(o.auditConfigs); |
| 1221 checkUnnamed21(o.bindings); |
| 1222 unittest.expect(o.etag, unittest.equals('foo')); |
| 1223 unittest.expect(o.iamOwned, unittest.isTrue); |
| 1224 checkUnnamed22(o.rules); |
| 1225 unittest.expect(o.version, unittest.equals(42)); |
| 1226 } |
| 1227 buildCounterGoogleIamV1Policy--; |
| 1228 } |
| 1229 |
| 1230 buildUnnamed23() { |
| 1231 var o = new core.List<api.GoogleIamV1Condition>(); |
| 1232 o.add(buildGoogleIamV1Condition()); |
| 1233 o.add(buildGoogleIamV1Condition()); |
| 1234 return o; |
| 1235 } |
| 1236 |
| 1237 checkUnnamed23(core.List<api.GoogleIamV1Condition> o) { |
| 1238 unittest.expect(o, unittest.hasLength(2)); |
| 1239 checkGoogleIamV1Condition(o[0]); |
| 1240 checkGoogleIamV1Condition(o[1]); |
| 1241 } |
| 1242 |
| 1243 buildUnnamed24() { |
| 1244 var o = new core.List<core.String>(); |
| 1245 o.add("foo"); |
| 1246 o.add("foo"); |
| 1247 return o; |
| 1248 } |
| 1249 |
| 1250 checkUnnamed24(core.List<core.String> o) { |
| 1251 unittest.expect(o, unittest.hasLength(2)); |
| 1252 unittest.expect(o[0], unittest.equals('foo')); |
| 1253 unittest.expect(o[1], unittest.equals('foo')); |
| 1254 } |
| 1255 |
| 1256 buildUnnamed25() { |
| 1257 var o = new core.List<api.GoogleIamV1LogConfig>(); |
| 1258 o.add(buildGoogleIamV1LogConfig()); |
| 1259 o.add(buildGoogleIamV1LogConfig()); |
| 1260 return o; |
| 1261 } |
| 1262 |
| 1263 checkUnnamed25(core.List<api.GoogleIamV1LogConfig> o) { |
| 1264 unittest.expect(o, unittest.hasLength(2)); |
| 1265 checkGoogleIamV1LogConfig(o[0]); |
| 1266 checkGoogleIamV1LogConfig(o[1]); |
| 1267 } |
| 1268 |
| 1269 buildUnnamed26() { |
| 1270 var o = new core.List<core.String>(); |
| 1271 o.add("foo"); |
| 1272 o.add("foo"); |
| 1273 return o; |
| 1274 } |
| 1275 |
| 1276 checkUnnamed26(core.List<core.String> o) { |
| 1277 unittest.expect(o, unittest.hasLength(2)); |
| 1278 unittest.expect(o[0], unittest.equals('foo')); |
| 1279 unittest.expect(o[1], unittest.equals('foo')); |
| 1280 } |
| 1281 |
| 1282 buildUnnamed27() { |
| 1283 var o = new core.List<core.String>(); |
| 1284 o.add("foo"); |
| 1285 o.add("foo"); |
| 1286 return o; |
| 1287 } |
| 1288 |
| 1289 checkUnnamed27(core.List<core.String> o) { |
| 1290 unittest.expect(o, unittest.hasLength(2)); |
| 1291 unittest.expect(o[0], unittest.equals('foo')); |
| 1292 unittest.expect(o[1], unittest.equals('foo')); |
| 1293 } |
| 1294 |
| 1295 core.int buildCounterGoogleIamV1Rule = 0; |
| 1296 buildGoogleIamV1Rule() { |
| 1297 var o = new api.GoogleIamV1Rule(); |
| 1298 buildCounterGoogleIamV1Rule++; |
| 1299 if (buildCounterGoogleIamV1Rule < 3) { |
| 1300 o.action = "foo"; |
| 1301 o.conditions = buildUnnamed23(); |
| 1302 o.description = "foo"; |
| 1303 o.in_ = buildUnnamed24(); |
| 1304 o.logConfig = buildUnnamed25(); |
| 1305 o.notIn = buildUnnamed26(); |
| 1306 o.permissions = buildUnnamed27(); |
| 1307 } |
| 1308 buildCounterGoogleIamV1Rule--; |
| 1309 return o; |
| 1310 } |
| 1311 |
| 1312 checkGoogleIamV1Rule(api.GoogleIamV1Rule o) { |
| 1313 buildCounterGoogleIamV1Rule++; |
| 1314 if (buildCounterGoogleIamV1Rule < 3) { |
| 1315 unittest.expect(o.action, unittest.equals('foo')); |
| 1316 checkUnnamed23(o.conditions); |
| 1317 unittest.expect(o.description, unittest.equals('foo')); |
| 1318 checkUnnamed24(o.in_); |
| 1319 checkUnnamed25(o.logConfig); |
| 1320 checkUnnamed26(o.notIn); |
| 1321 checkUnnamed27(o.permissions); |
| 1322 } |
| 1323 buildCounterGoogleIamV1Rule--; |
| 1324 } |
| 1325 |
| 1326 core.int buildCounterGoogleIamV1SetIamPolicyRequest = 0; |
| 1327 buildGoogleIamV1SetIamPolicyRequest() { |
| 1328 var o = new api.GoogleIamV1SetIamPolicyRequest(); |
| 1329 buildCounterGoogleIamV1SetIamPolicyRequest++; |
| 1330 if (buildCounterGoogleIamV1SetIamPolicyRequest < 3) { |
| 1331 o.policy = buildGoogleIamV1Policy(); |
| 1332 o.updateMask = "foo"; |
| 1333 } |
| 1334 buildCounterGoogleIamV1SetIamPolicyRequest--; |
| 1335 return o; |
| 1336 } |
| 1337 |
| 1338 checkGoogleIamV1SetIamPolicyRequest(api.GoogleIamV1SetIamPolicyRequest o) { |
| 1339 buildCounterGoogleIamV1SetIamPolicyRequest++; |
| 1340 if (buildCounterGoogleIamV1SetIamPolicyRequest < 3) { |
| 1341 checkGoogleIamV1Policy(o.policy); |
| 1342 unittest.expect(o.updateMask, unittest.equals('foo')); |
| 1343 } |
| 1344 buildCounterGoogleIamV1SetIamPolicyRequest--; |
| 1345 } |
| 1346 |
| 1347 buildUnnamed28() { |
| 1348 var o = new core.List<core.String>(); |
| 1349 o.add("foo"); |
| 1350 o.add("foo"); |
| 1351 return o; |
| 1352 } |
| 1353 |
| 1354 checkUnnamed28(core.List<core.String> o) { |
| 1355 unittest.expect(o, unittest.hasLength(2)); |
| 1356 unittest.expect(o[0], unittest.equals('foo')); |
| 1357 unittest.expect(o[1], unittest.equals('foo')); |
| 1358 } |
| 1359 |
| 1360 core.int buildCounterGoogleIamV1TestIamPermissionsRequest = 0; |
| 1361 buildGoogleIamV1TestIamPermissionsRequest() { |
| 1362 var o = new api.GoogleIamV1TestIamPermissionsRequest(); |
| 1363 buildCounterGoogleIamV1TestIamPermissionsRequest++; |
| 1364 if (buildCounterGoogleIamV1TestIamPermissionsRequest < 3) { |
| 1365 o.permissions = buildUnnamed28(); |
| 1366 } |
| 1367 buildCounterGoogleIamV1TestIamPermissionsRequest--; |
| 1368 return o; |
| 1369 } |
| 1370 |
| 1371 checkGoogleIamV1TestIamPermissionsRequest(api.GoogleIamV1TestIamPermissionsReque
st o) { |
| 1372 buildCounterGoogleIamV1TestIamPermissionsRequest++; |
| 1373 if (buildCounterGoogleIamV1TestIamPermissionsRequest < 3) { |
| 1374 checkUnnamed28(o.permissions); |
| 1375 } |
| 1376 buildCounterGoogleIamV1TestIamPermissionsRequest--; |
| 1377 } |
| 1378 |
| 1379 buildUnnamed29() { |
| 1380 var o = new core.List<core.String>(); |
| 1381 o.add("foo"); |
| 1382 o.add("foo"); |
| 1383 return o; |
| 1384 } |
| 1385 |
| 1386 checkUnnamed29(core.List<core.String> o) { |
| 1387 unittest.expect(o, unittest.hasLength(2)); |
| 1388 unittest.expect(o[0], unittest.equals('foo')); |
| 1389 unittest.expect(o[1], unittest.equals('foo')); |
| 1390 } |
| 1391 |
| 1392 core.int buildCounterGoogleIamV1TestIamPermissionsResponse = 0; |
| 1393 buildGoogleIamV1TestIamPermissionsResponse() { |
| 1394 var o = new api.GoogleIamV1TestIamPermissionsResponse(); |
| 1395 buildCounterGoogleIamV1TestIamPermissionsResponse++; |
| 1396 if (buildCounterGoogleIamV1TestIamPermissionsResponse < 3) { |
| 1397 o.permissions = buildUnnamed29(); |
| 1398 } |
| 1399 buildCounterGoogleIamV1TestIamPermissionsResponse--; |
| 1400 return o; |
| 1401 } |
| 1402 |
| 1403 checkGoogleIamV1TestIamPermissionsResponse(api.GoogleIamV1TestIamPermissionsResp
onse o) { |
| 1404 buildCounterGoogleIamV1TestIamPermissionsResponse++; |
| 1405 if (buildCounterGoogleIamV1TestIamPermissionsResponse < 3) { |
| 1406 checkUnnamed29(o.permissions); |
| 1407 } |
| 1408 buildCounterGoogleIamV1TestIamPermissionsResponse--; |
| 1409 } |
| 1410 |
| 1411 buildUnnamed30() { |
914 var o = new core.List<api.GoogleLongrunningOperation>(); | 1412 var o = new core.List<api.GoogleLongrunningOperation>(); |
915 o.add(buildGoogleLongrunningOperation()); | 1413 o.add(buildGoogleLongrunningOperation()); |
916 o.add(buildGoogleLongrunningOperation()); | 1414 o.add(buildGoogleLongrunningOperation()); |
917 return o; | 1415 return o; |
918 } | 1416 } |
919 | 1417 |
920 checkUnnamed15(core.List<api.GoogleLongrunningOperation> o) { | 1418 checkUnnamed30(core.List<api.GoogleLongrunningOperation> o) { |
921 unittest.expect(o, unittest.hasLength(2)); | 1419 unittest.expect(o, unittest.hasLength(2)); |
922 checkGoogleLongrunningOperation(o[0]); | 1420 checkGoogleLongrunningOperation(o[0]); |
923 checkGoogleLongrunningOperation(o[1]); | 1421 checkGoogleLongrunningOperation(o[1]); |
924 } | 1422 } |
925 | 1423 |
926 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; | 1424 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; |
927 buildGoogleLongrunningListOperationsResponse() { | 1425 buildGoogleLongrunningListOperationsResponse() { |
928 var o = new api.GoogleLongrunningListOperationsResponse(); | 1426 var o = new api.GoogleLongrunningListOperationsResponse(); |
929 buildCounterGoogleLongrunningListOperationsResponse++; | 1427 buildCounterGoogleLongrunningListOperationsResponse++; |
930 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 1428 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
931 o.nextPageToken = "foo"; | 1429 o.nextPageToken = "foo"; |
932 o.operations = buildUnnamed15(); | 1430 o.operations = buildUnnamed30(); |
933 } | 1431 } |
934 buildCounterGoogleLongrunningListOperationsResponse--; | 1432 buildCounterGoogleLongrunningListOperationsResponse--; |
935 return o; | 1433 return o; |
936 } | 1434 } |
937 | 1435 |
938 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { | 1436 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { |
939 buildCounterGoogleLongrunningListOperationsResponse++; | 1437 buildCounterGoogleLongrunningListOperationsResponse++; |
940 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 1438 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
941 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1439 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
942 checkUnnamed15(o.operations); | 1440 checkUnnamed30(o.operations); |
943 } | 1441 } |
944 buildCounterGoogleLongrunningListOperationsResponse--; | 1442 buildCounterGoogleLongrunningListOperationsResponse--; |
945 } | 1443 } |
946 | 1444 |
947 buildUnnamed16() { | 1445 buildUnnamed31() { |
948 var o = new core.Map<core.String, core.Object>(); | 1446 var o = new core.Map<core.String, core.Object>(); |
949 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1447 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
950 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1448 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
951 return o; | 1449 return o; |
952 } | 1450 } |
953 | 1451 |
954 checkUnnamed16(core.Map<core.String, core.Object> o) { | 1452 checkUnnamed31(core.Map<core.String, core.Object> o) { |
955 unittest.expect(o, unittest.hasLength(2)); | 1453 unittest.expect(o, unittest.hasLength(2)); |
956 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 1454 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
957 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 1455 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
958 } | 1456 } |
959 | 1457 |
960 buildUnnamed17() { | 1458 buildUnnamed32() { |
961 var o = new core.Map<core.String, core.Object>(); | 1459 var o = new core.Map<core.String, core.Object>(); |
962 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1460 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
963 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1461 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
964 return o; | 1462 return o; |
965 } | 1463 } |
966 | 1464 |
967 checkUnnamed17(core.Map<core.String, core.Object> o) { | 1465 checkUnnamed32(core.Map<core.String, core.Object> o) { |
968 unittest.expect(o, unittest.hasLength(2)); | 1466 unittest.expect(o, unittest.hasLength(2)); |
969 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1467 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
970 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1468 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
971 } | 1469 } |
972 | 1470 |
973 core.int buildCounterGoogleLongrunningOperation = 0; | 1471 core.int buildCounterGoogleLongrunningOperation = 0; |
974 buildGoogleLongrunningOperation() { | 1472 buildGoogleLongrunningOperation() { |
975 var o = new api.GoogleLongrunningOperation(); | 1473 var o = new api.GoogleLongrunningOperation(); |
976 buildCounterGoogleLongrunningOperation++; | 1474 buildCounterGoogleLongrunningOperation++; |
977 if (buildCounterGoogleLongrunningOperation < 3) { | 1475 if (buildCounterGoogleLongrunningOperation < 3) { |
978 o.done = true; | 1476 o.done = true; |
979 o.error = buildGoogleRpcStatus(); | 1477 o.error = buildGoogleRpcStatus(); |
980 o.metadata = buildUnnamed16(); | 1478 o.metadata = buildUnnamed31(); |
981 o.name = "foo"; | 1479 o.name = "foo"; |
982 o.response = buildUnnamed17(); | 1480 o.response = buildUnnamed32(); |
983 } | 1481 } |
984 buildCounterGoogleLongrunningOperation--; | 1482 buildCounterGoogleLongrunningOperation--; |
985 return o; | 1483 return o; |
986 } | 1484 } |
987 | 1485 |
988 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { | 1486 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { |
989 buildCounterGoogleLongrunningOperation++; | 1487 buildCounterGoogleLongrunningOperation++; |
990 if (buildCounterGoogleLongrunningOperation < 3) { | 1488 if (buildCounterGoogleLongrunningOperation < 3) { |
991 unittest.expect(o.done, unittest.isTrue); | 1489 unittest.expect(o.done, unittest.isTrue); |
992 checkGoogleRpcStatus(o.error); | 1490 checkGoogleRpcStatus(o.error); |
993 checkUnnamed16(o.metadata); | 1491 checkUnnamed31(o.metadata); |
994 unittest.expect(o.name, unittest.equals('foo')); | 1492 unittest.expect(o.name, unittest.equals('foo')); |
995 checkUnnamed17(o.response); | 1493 checkUnnamed32(o.response); |
996 } | 1494 } |
997 buildCounterGoogleLongrunningOperation--; | 1495 buildCounterGoogleLongrunningOperation--; |
998 } | 1496 } |
999 | 1497 |
1000 core.int buildCounterGoogleProtobufEmpty = 0; | 1498 core.int buildCounterGoogleProtobufEmpty = 0; |
1001 buildGoogleProtobufEmpty() { | 1499 buildGoogleProtobufEmpty() { |
1002 var o = new api.GoogleProtobufEmpty(); | 1500 var o = new api.GoogleProtobufEmpty(); |
1003 buildCounterGoogleProtobufEmpty++; | 1501 buildCounterGoogleProtobufEmpty++; |
1004 if (buildCounterGoogleProtobufEmpty < 3) { | 1502 if (buildCounterGoogleProtobufEmpty < 3) { |
1005 } | 1503 } |
1006 buildCounterGoogleProtobufEmpty--; | 1504 buildCounterGoogleProtobufEmpty--; |
1007 return o; | 1505 return o; |
1008 } | 1506 } |
1009 | 1507 |
1010 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { | 1508 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { |
1011 buildCounterGoogleProtobufEmpty++; | 1509 buildCounterGoogleProtobufEmpty++; |
1012 if (buildCounterGoogleProtobufEmpty < 3) { | 1510 if (buildCounterGoogleProtobufEmpty < 3) { |
1013 } | 1511 } |
1014 buildCounterGoogleProtobufEmpty--; | 1512 buildCounterGoogleProtobufEmpty--; |
1015 } | 1513 } |
1016 | 1514 |
1017 buildUnnamed18() { | 1515 buildUnnamed33() { |
1018 var o = new core.Map<core.String, core.Object>(); | 1516 var o = new core.Map<core.String, core.Object>(); |
1019 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1517 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1020 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1518 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1021 return o; | 1519 return o; |
1022 } | 1520 } |
1023 | 1521 |
1024 checkUnnamed18(core.Map<core.String, core.Object> o) { | 1522 checkUnnamed33(core.Map<core.String, core.Object> o) { |
1025 unittest.expect(o, unittest.hasLength(2)); | 1523 unittest.expect(o, unittest.hasLength(2)); |
1026 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 1524 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
1027 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 1525 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
1028 } | 1526 } |
1029 | 1527 |
1030 buildUnnamed19() { | 1528 buildUnnamed34() { |
1031 var o = new core.List<core.Map<core.String, core.Object>>(); | 1529 var o = new core.List<core.Map<core.String, core.Object>>(); |
1032 o.add(buildUnnamed18()); | 1530 o.add(buildUnnamed33()); |
1033 o.add(buildUnnamed18()); | 1531 o.add(buildUnnamed33()); |
1034 return o; | 1532 return o; |
1035 } | 1533 } |
1036 | 1534 |
1037 checkUnnamed19(core.List<core.Map<core.String, core.Object>> o) { | 1535 checkUnnamed34(core.List<core.Map<core.String, core.Object>> o) { |
1038 unittest.expect(o, unittest.hasLength(2)); | 1536 unittest.expect(o, unittest.hasLength(2)); |
1039 checkUnnamed18(o[0]); | 1537 checkUnnamed33(o[0]); |
1040 checkUnnamed18(o[1]); | 1538 checkUnnamed33(o[1]); |
1041 } | 1539 } |
1042 | 1540 |
1043 core.int buildCounterGoogleRpcStatus = 0; | 1541 core.int buildCounterGoogleRpcStatus = 0; |
1044 buildGoogleRpcStatus() { | 1542 buildGoogleRpcStatus() { |
1045 var o = new api.GoogleRpcStatus(); | 1543 var o = new api.GoogleRpcStatus(); |
1046 buildCounterGoogleRpcStatus++; | 1544 buildCounterGoogleRpcStatus++; |
1047 if (buildCounterGoogleRpcStatus < 3) { | 1545 if (buildCounterGoogleRpcStatus < 3) { |
1048 o.code = 42; | 1546 o.code = 42; |
1049 o.details = buildUnnamed19(); | 1547 o.details = buildUnnamed34(); |
1050 o.message = "foo"; | 1548 o.message = "foo"; |
1051 } | 1549 } |
1052 buildCounterGoogleRpcStatus--; | 1550 buildCounterGoogleRpcStatus--; |
1053 return o; | 1551 return o; |
1054 } | 1552 } |
1055 | 1553 |
1056 checkGoogleRpcStatus(api.GoogleRpcStatus o) { | 1554 checkGoogleRpcStatus(api.GoogleRpcStatus o) { |
1057 buildCounterGoogleRpcStatus++; | 1555 buildCounterGoogleRpcStatus++; |
1058 if (buildCounterGoogleRpcStatus < 3) { | 1556 if (buildCounterGoogleRpcStatus < 3) { |
1059 unittest.expect(o.code, unittest.equals(42)); | 1557 unittest.expect(o.code, unittest.equals(42)); |
1060 checkUnnamed19(o.details); | 1558 checkUnnamed34(o.details); |
1061 unittest.expect(o.message, unittest.equals('foo')); | 1559 unittest.expect(o.message, unittest.equals('foo')); |
1062 } | 1560 } |
1063 buildCounterGoogleRpcStatus--; | 1561 buildCounterGoogleRpcStatus--; |
1064 } | 1562 } |
1065 | 1563 |
| 1564 core.int buildCounterGoogleTypeExpr = 0; |
| 1565 buildGoogleTypeExpr() { |
| 1566 var o = new api.GoogleTypeExpr(); |
| 1567 buildCounterGoogleTypeExpr++; |
| 1568 if (buildCounterGoogleTypeExpr < 3) { |
| 1569 o.description = "foo"; |
| 1570 o.expression = "foo"; |
| 1571 o.location = "foo"; |
| 1572 o.title = "foo"; |
| 1573 } |
| 1574 buildCounterGoogleTypeExpr--; |
| 1575 return o; |
| 1576 } |
| 1577 |
| 1578 checkGoogleTypeExpr(api.GoogleTypeExpr o) { |
| 1579 buildCounterGoogleTypeExpr++; |
| 1580 if (buildCounterGoogleTypeExpr < 3) { |
| 1581 unittest.expect(o.description, unittest.equals('foo')); |
| 1582 unittest.expect(o.expression, unittest.equals('foo')); |
| 1583 unittest.expect(o.location, unittest.equals('foo')); |
| 1584 unittest.expect(o.title, unittest.equals('foo')); |
| 1585 } |
| 1586 buildCounterGoogleTypeExpr--; |
| 1587 } |
| 1588 |
1066 | 1589 |
1067 main() { | 1590 main() { |
1068 unittest.group("obj-schema-GoogleApiHttpBody", () { | 1591 unittest.group("obj-schema-GoogleApiHttpBody", () { |
1069 unittest.test("to-json--from-json", () { | 1592 unittest.test("to-json--from-json", () { |
1070 var o = buildGoogleApiHttpBody(); | 1593 var o = buildGoogleApiHttpBody(); |
1071 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); | 1594 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); |
1072 checkGoogleApiHttpBody(od); | 1595 checkGoogleApiHttpBody(od); |
1073 }); | 1596 }); |
1074 }); | 1597 }); |
1075 | 1598 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 | 1815 |
1293 unittest.group("obj-schema-GoogleCloudMlV1beta1Version", () { | 1816 unittest.group("obj-schema-GoogleCloudMlV1beta1Version", () { |
1294 unittest.test("to-json--from-json", () { | 1817 unittest.test("to-json--from-json", () { |
1295 var o = buildGoogleCloudMlV1beta1Version(); | 1818 var o = buildGoogleCloudMlV1beta1Version(); |
1296 var od = new api.GoogleCloudMlV1beta1Version.fromJson(o.toJson()); | 1819 var od = new api.GoogleCloudMlV1beta1Version.fromJson(o.toJson()); |
1297 checkGoogleCloudMlV1beta1Version(od); | 1820 checkGoogleCloudMlV1beta1Version(od); |
1298 }); | 1821 }); |
1299 }); | 1822 }); |
1300 | 1823 |
1301 | 1824 |
| 1825 unittest.group("obj-schema-GoogleIamV1LogConfigCloudAuditOptions", () { |
| 1826 unittest.test("to-json--from-json", () { |
| 1827 var o = buildGoogleIamV1LogConfigCloudAuditOptions(); |
| 1828 var od = new api.GoogleIamV1LogConfigCloudAuditOptions.fromJson(o.toJson()
); |
| 1829 checkGoogleIamV1LogConfigCloudAuditOptions(od); |
| 1830 }); |
| 1831 }); |
| 1832 |
| 1833 |
| 1834 unittest.group("obj-schema-GoogleIamV1LogConfigCounterOptions", () { |
| 1835 unittest.test("to-json--from-json", () { |
| 1836 var o = buildGoogleIamV1LogConfigCounterOptions(); |
| 1837 var od = new api.GoogleIamV1LogConfigCounterOptions.fromJson(o.toJson()); |
| 1838 checkGoogleIamV1LogConfigCounterOptions(od); |
| 1839 }); |
| 1840 }); |
| 1841 |
| 1842 |
| 1843 unittest.group("obj-schema-GoogleIamV1LogConfigDataAccessOptions", () { |
| 1844 unittest.test("to-json--from-json", () { |
| 1845 var o = buildGoogleIamV1LogConfigDataAccessOptions(); |
| 1846 var od = new api.GoogleIamV1LogConfigDataAccessOptions.fromJson(o.toJson()
); |
| 1847 checkGoogleIamV1LogConfigDataAccessOptions(od); |
| 1848 }); |
| 1849 }); |
| 1850 |
| 1851 |
| 1852 unittest.group("obj-schema-GoogleIamV1AuditConfig", () { |
| 1853 unittest.test("to-json--from-json", () { |
| 1854 var o = buildGoogleIamV1AuditConfig(); |
| 1855 var od = new api.GoogleIamV1AuditConfig.fromJson(o.toJson()); |
| 1856 checkGoogleIamV1AuditConfig(od); |
| 1857 }); |
| 1858 }); |
| 1859 |
| 1860 |
| 1861 unittest.group("obj-schema-GoogleIamV1AuditLogConfig", () { |
| 1862 unittest.test("to-json--from-json", () { |
| 1863 var o = buildGoogleIamV1AuditLogConfig(); |
| 1864 var od = new api.GoogleIamV1AuditLogConfig.fromJson(o.toJson()); |
| 1865 checkGoogleIamV1AuditLogConfig(od); |
| 1866 }); |
| 1867 }); |
| 1868 |
| 1869 |
| 1870 unittest.group("obj-schema-GoogleIamV1Binding", () { |
| 1871 unittest.test("to-json--from-json", () { |
| 1872 var o = buildGoogleIamV1Binding(); |
| 1873 var od = new api.GoogleIamV1Binding.fromJson(o.toJson()); |
| 1874 checkGoogleIamV1Binding(od); |
| 1875 }); |
| 1876 }); |
| 1877 |
| 1878 |
| 1879 unittest.group("obj-schema-GoogleIamV1Condition", () { |
| 1880 unittest.test("to-json--from-json", () { |
| 1881 var o = buildGoogleIamV1Condition(); |
| 1882 var od = new api.GoogleIamV1Condition.fromJson(o.toJson()); |
| 1883 checkGoogleIamV1Condition(od); |
| 1884 }); |
| 1885 }); |
| 1886 |
| 1887 |
| 1888 unittest.group("obj-schema-GoogleIamV1LogConfig", () { |
| 1889 unittest.test("to-json--from-json", () { |
| 1890 var o = buildGoogleIamV1LogConfig(); |
| 1891 var od = new api.GoogleIamV1LogConfig.fromJson(o.toJson()); |
| 1892 checkGoogleIamV1LogConfig(od); |
| 1893 }); |
| 1894 }); |
| 1895 |
| 1896 |
| 1897 unittest.group("obj-schema-GoogleIamV1Policy", () { |
| 1898 unittest.test("to-json--from-json", () { |
| 1899 var o = buildGoogleIamV1Policy(); |
| 1900 var od = new api.GoogleIamV1Policy.fromJson(o.toJson()); |
| 1901 checkGoogleIamV1Policy(od); |
| 1902 }); |
| 1903 }); |
| 1904 |
| 1905 |
| 1906 unittest.group("obj-schema-GoogleIamV1Rule", () { |
| 1907 unittest.test("to-json--from-json", () { |
| 1908 var o = buildGoogleIamV1Rule(); |
| 1909 var od = new api.GoogleIamV1Rule.fromJson(o.toJson()); |
| 1910 checkGoogleIamV1Rule(od); |
| 1911 }); |
| 1912 }); |
| 1913 |
| 1914 |
| 1915 unittest.group("obj-schema-GoogleIamV1SetIamPolicyRequest", () { |
| 1916 unittest.test("to-json--from-json", () { |
| 1917 var o = buildGoogleIamV1SetIamPolicyRequest(); |
| 1918 var od = new api.GoogleIamV1SetIamPolicyRequest.fromJson(o.toJson()); |
| 1919 checkGoogleIamV1SetIamPolicyRequest(od); |
| 1920 }); |
| 1921 }); |
| 1922 |
| 1923 |
| 1924 unittest.group("obj-schema-GoogleIamV1TestIamPermissionsRequest", () { |
| 1925 unittest.test("to-json--from-json", () { |
| 1926 var o = buildGoogleIamV1TestIamPermissionsRequest(); |
| 1927 var od = new api.GoogleIamV1TestIamPermissionsRequest.fromJson(o.toJson())
; |
| 1928 checkGoogleIamV1TestIamPermissionsRequest(od); |
| 1929 }); |
| 1930 }); |
| 1931 |
| 1932 |
| 1933 unittest.group("obj-schema-GoogleIamV1TestIamPermissionsResponse", () { |
| 1934 unittest.test("to-json--from-json", () { |
| 1935 var o = buildGoogleIamV1TestIamPermissionsResponse(); |
| 1936 var od = new api.GoogleIamV1TestIamPermissionsResponse.fromJson(o.toJson()
); |
| 1937 checkGoogleIamV1TestIamPermissionsResponse(od); |
| 1938 }); |
| 1939 }); |
| 1940 |
| 1941 |
1302 unittest.group("obj-schema-GoogleLongrunningListOperationsResponse", () { | 1942 unittest.group("obj-schema-GoogleLongrunningListOperationsResponse", () { |
1303 unittest.test("to-json--from-json", () { | 1943 unittest.test("to-json--from-json", () { |
1304 var o = buildGoogleLongrunningListOperationsResponse(); | 1944 var o = buildGoogleLongrunningListOperationsResponse(); |
1305 var od = new api.GoogleLongrunningListOperationsResponse.fromJson(o.toJson
()); | 1945 var od = new api.GoogleLongrunningListOperationsResponse.fromJson(o.toJson
()); |
1306 checkGoogleLongrunningListOperationsResponse(od); | 1946 checkGoogleLongrunningListOperationsResponse(od); |
1307 }); | 1947 }); |
1308 }); | 1948 }); |
1309 | 1949 |
1310 | 1950 |
1311 unittest.group("obj-schema-GoogleLongrunningOperation", () { | 1951 unittest.group("obj-schema-GoogleLongrunningOperation", () { |
(...skipping 16 matching lines...) Expand all Loading... |
1328 | 1968 |
1329 unittest.group("obj-schema-GoogleRpcStatus", () { | 1969 unittest.group("obj-schema-GoogleRpcStatus", () { |
1330 unittest.test("to-json--from-json", () { | 1970 unittest.test("to-json--from-json", () { |
1331 var o = buildGoogleRpcStatus(); | 1971 var o = buildGoogleRpcStatus(); |
1332 var od = new api.GoogleRpcStatus.fromJson(o.toJson()); | 1972 var od = new api.GoogleRpcStatus.fromJson(o.toJson()); |
1333 checkGoogleRpcStatus(od); | 1973 checkGoogleRpcStatus(od); |
1334 }); | 1974 }); |
1335 }); | 1975 }); |
1336 | 1976 |
1337 | 1977 |
| 1978 unittest.group("obj-schema-GoogleTypeExpr", () { |
| 1979 unittest.test("to-json--from-json", () { |
| 1980 var o = buildGoogleTypeExpr(); |
| 1981 var od = new api.GoogleTypeExpr.fromJson(o.toJson()); |
| 1982 checkGoogleTypeExpr(od); |
| 1983 }); |
| 1984 }); |
| 1985 |
| 1986 |
1338 unittest.group("resource-ProjectsResourceApi", () { | 1987 unittest.group("resource-ProjectsResourceApi", () { |
1339 unittest.test("method--getConfig", () { | 1988 unittest.test("method--getConfig", () { |
1340 | 1989 |
1341 var mock = new HttpServerMock(); | 1990 var mock = new HttpServerMock(); |
1342 api.ProjectsResourceApi res = new api.MlApi(mock).projects; | 1991 api.ProjectsResourceApi res = new api.MlApi(mock).projects; |
1343 var arg_name = "foo"; | 1992 var arg_name = "foo"; |
1344 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1993 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1345 var path = (req.url).path; | 1994 var path = (req.url).path; |
1346 var pathOffset = 0; | 1995 var pathOffset = 0; |
1347 var index; | 1996 var index; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Job resp
onse) { | 2224 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Job resp
onse) { |
1576 checkGoogleCloudMlV1Job(response); | 2225 checkGoogleCloudMlV1Job(response); |
1577 }))); | 2226 }))); |
1578 }); | 2227 }); |
1579 | 2228 |
1580 unittest.test("method--list", () { | 2229 unittest.test("method--list", () { |
1581 | 2230 |
1582 var mock = new HttpServerMock(); | 2231 var mock = new HttpServerMock(); |
1583 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 2232 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
1584 var arg_parent = "foo"; | 2233 var arg_parent = "foo"; |
1585 var arg_filter = "foo"; | |
1586 var arg_pageToken = "foo"; | 2234 var arg_pageToken = "foo"; |
1587 var arg_pageSize = 42; | 2235 var arg_pageSize = 42; |
| 2236 var arg_filter = "foo"; |
1588 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2237 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1589 var path = (req.url).path; | 2238 var path = (req.url).path; |
1590 var pathOffset = 0; | 2239 var pathOffset = 0; |
1591 var index; | 2240 var index; |
1592 var subPart; | 2241 var subPart; |
1593 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2242 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1594 pathOffset += 1; | 2243 pathOffset += 1; |
1595 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2244 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1596 pathOffset += 3; | 2245 pathOffset += 3; |
1597 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2246 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1598 | 2247 |
1599 var query = (req.url).query; | 2248 var query = (req.url).query; |
1600 var queryOffset = 0; | 2249 var queryOffset = 0; |
1601 var queryMap = {}; | 2250 var queryMap = {}; |
1602 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1603 parseBool(n) { | 2252 parseBool(n) { |
1604 if (n == "true") return true; | 2253 if (n == "true") return true; |
1605 if (n == "false") return false; | 2254 if (n == "false") return false; |
1606 if (n == null) return null; | 2255 if (n == null) return null; |
1607 throw new core.ArgumentError("Invalid boolean: $n"); | 2256 throw new core.ArgumentError("Invalid boolean: $n"); |
1608 } | 2257 } |
1609 if (query.length > 0) { | 2258 if (query.length > 0) { |
1610 for (var part in query.split("&")) { | 2259 for (var part in query.split("&")) { |
1611 var keyvalue = part.split("="); | 2260 var keyvalue = part.split("="); |
1612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1613 } | 2262 } |
1614 } | 2263 } |
1615 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
1616 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2264 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1617 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2265 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2266 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1618 | 2267 |
1619 | 2268 |
1620 var h = { | 2269 var h = { |
1621 "content-type" : "application/json; charset=utf-8", | 2270 "content-type" : "application/json; charset=utf-8", |
1622 }; | 2271 }; |
1623 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListJobsResponse()); | 2272 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListJobsResponse()); |
1624 return new async.Future.value(stringResponse(200, h, resp)); | 2273 return new async.Future.value(stringResponse(200, h, resp)); |
1625 }), true); | 2274 }), true); |
1626 res.list(arg_parent, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.GoogleCloudMlV1ListJobsRespons
e response) { | 2275 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize, fil
ter: arg_filter).then(unittest.expectAsync1(((api.GoogleCloudMlV1ListJobsRespons
e response) { |
1627 checkGoogleCloudMlV1ListJobsResponse(response); | 2276 checkGoogleCloudMlV1ListJobsResponse(response); |
1628 }))); | 2277 }))); |
1629 }); | 2278 }); |
1630 | 2279 |
1631 }); | 2280 }); |
1632 | 2281 |
1633 | 2282 |
1634 unittest.group("resource-ProjectsModelsResourceApi", () { | 2283 unittest.group("resource-ProjectsModelsResourceApi", () { |
1635 unittest.test("method--create", () { | 2284 unittest.test("method--create", () { |
1636 | 2285 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 "content-type" : "application/json; charset=utf-8", | 2413 "content-type" : "application/json; charset=utf-8", |
1765 }; | 2414 }; |
1766 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); | 2415 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); |
1767 return new async.Future.value(stringResponse(200, h, resp)); | 2416 return new async.Future.value(stringResponse(200, h, resp)); |
1768 }), true); | 2417 }), true); |
1769 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Model re
sponse) { | 2418 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Model re
sponse) { |
1770 checkGoogleCloudMlV1Model(response); | 2419 checkGoogleCloudMlV1Model(response); |
1771 }))); | 2420 }))); |
1772 }); | 2421 }); |
1773 | 2422 |
| 2423 unittest.test("method--getIamPolicy", () { |
| 2424 |
| 2425 var mock = new HttpServerMock(); |
| 2426 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 2427 var arg_resource = "foo"; |
| 2428 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2429 var path = (req.url).path; |
| 2430 var pathOffset = 0; |
| 2431 var index; |
| 2432 var subPart; |
| 2433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2434 pathOffset += 1; |
| 2435 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2436 pathOffset += 3; |
| 2437 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2438 |
| 2439 var query = (req.url).query; |
| 2440 var queryOffset = 0; |
| 2441 var queryMap = {}; |
| 2442 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2443 parseBool(n) { |
| 2444 if (n == "true") return true; |
| 2445 if (n == "false") return false; |
| 2446 if (n == null) return null; |
| 2447 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2448 } |
| 2449 if (query.length > 0) { |
| 2450 for (var part in query.split("&")) { |
| 2451 var keyvalue = part.split("="); |
| 2452 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2453 } |
| 2454 } |
| 2455 |
| 2456 |
| 2457 var h = { |
| 2458 "content-type" : "application/json; charset=utf-8", |
| 2459 }; |
| 2460 var resp = convert.JSON.encode(buildGoogleIamV1Policy()); |
| 2461 return new async.Future.value(stringResponse(200, h, resp)); |
| 2462 }), true); |
| 2463 res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.GoogleIamV
1Policy response) { |
| 2464 checkGoogleIamV1Policy(response); |
| 2465 }))); |
| 2466 }); |
| 2467 |
1774 unittest.test("method--list", () { | 2468 unittest.test("method--list", () { |
1775 | 2469 |
1776 var mock = new HttpServerMock(); | 2470 var mock = new HttpServerMock(); |
1777 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 2471 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
1778 var arg_parent = "foo"; | 2472 var arg_parent = "foo"; |
1779 var arg_pageToken = "foo"; | 2473 var arg_pageToken = "foo"; |
1780 var arg_pageSize = 42; | 2474 var arg_pageSize = 42; |
1781 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2475 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1782 var path = (req.url).path; | 2476 var path = (req.url).path; |
1783 var pathOffset = 0; | 2477 var pathOffset = 0; |
(...skipping 29 matching lines...) Expand all Loading... |
1813 "content-type" : "application/json; charset=utf-8", | 2507 "content-type" : "application/json; charset=utf-8", |
1814 }; | 2508 }; |
1815 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListModelsResponse())
; | 2509 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListModelsResponse())
; |
1816 return new async.Future.value(stringResponse(200, h, resp)); | 2510 return new async.Future.value(stringResponse(200, h, resp)); |
1817 }), true); | 2511 }), true); |
1818 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.GoogleCloudMlV1ListModelsResponse response) { | 2512 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.GoogleCloudMlV1ListModelsResponse response) { |
1819 checkGoogleCloudMlV1ListModelsResponse(response); | 2513 checkGoogleCloudMlV1ListModelsResponse(response); |
1820 }))); | 2514 }))); |
1821 }); | 2515 }); |
1822 | 2516 |
| 2517 unittest.test("method--setIamPolicy", () { |
| 2518 |
| 2519 var mock = new HttpServerMock(); |
| 2520 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 2521 var arg_request = buildGoogleIamV1SetIamPolicyRequest(); |
| 2522 var arg_resource = "foo"; |
| 2523 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2524 var obj = new api.GoogleIamV1SetIamPolicyRequest.fromJson(json); |
| 2525 checkGoogleIamV1SetIamPolicyRequest(obj); |
| 2526 |
| 2527 var path = (req.url).path; |
| 2528 var pathOffset = 0; |
| 2529 var index; |
| 2530 var subPart; |
| 2531 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2532 pathOffset += 1; |
| 2533 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2534 pathOffset += 3; |
| 2535 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2536 |
| 2537 var query = (req.url).query; |
| 2538 var queryOffset = 0; |
| 2539 var queryMap = {}; |
| 2540 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2541 parseBool(n) { |
| 2542 if (n == "true") return true; |
| 2543 if (n == "false") return false; |
| 2544 if (n == null) return null; |
| 2545 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2546 } |
| 2547 if (query.length > 0) { |
| 2548 for (var part in query.split("&")) { |
| 2549 var keyvalue = part.split("="); |
| 2550 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2551 } |
| 2552 } |
| 2553 |
| 2554 |
| 2555 var h = { |
| 2556 "content-type" : "application/json; charset=utf-8", |
| 2557 }; |
| 2558 var resp = convert.JSON.encode(buildGoogleIamV1Policy()); |
| 2559 return new async.Future.value(stringResponse(200, h, resp)); |
| 2560 }), true); |
| 2561 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.GoogleIamV1Policy response) { |
| 2562 checkGoogleIamV1Policy(response); |
| 2563 }))); |
| 2564 }); |
| 2565 |
| 2566 unittest.test("method--testIamPermissions", () { |
| 2567 |
| 2568 var mock = new HttpServerMock(); |
| 2569 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 2570 var arg_request = buildGoogleIamV1TestIamPermissionsRequest(); |
| 2571 var arg_resource = "foo"; |
| 2572 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2573 var obj = new api.GoogleIamV1TestIamPermissionsRequest.fromJson(json); |
| 2574 checkGoogleIamV1TestIamPermissionsRequest(obj); |
| 2575 |
| 2576 var path = (req.url).path; |
| 2577 var pathOffset = 0; |
| 2578 var index; |
| 2579 var subPart; |
| 2580 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2581 pathOffset += 1; |
| 2582 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2583 pathOffset += 3; |
| 2584 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2585 |
| 2586 var query = (req.url).query; |
| 2587 var queryOffset = 0; |
| 2588 var queryMap = {}; |
| 2589 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2590 parseBool(n) { |
| 2591 if (n == "true") return true; |
| 2592 if (n == "false") return false; |
| 2593 if (n == null) return null; |
| 2594 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2595 } |
| 2596 if (query.length > 0) { |
| 2597 for (var part in query.split("&")) { |
| 2598 var keyvalue = part.split("="); |
| 2599 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2600 } |
| 2601 } |
| 2602 |
| 2603 |
| 2604 var h = { |
| 2605 "content-type" : "application/json; charset=utf-8", |
| 2606 }; |
| 2607 var resp = convert.JSON.encode(buildGoogleIamV1TestIamPermissionsRespons
e()); |
| 2608 return new async.Future.value(stringResponse(200, h, resp)); |
| 2609 }), true); |
| 2610 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c1(((api.GoogleIamV1TestIamPermissionsResponse response) { |
| 2611 checkGoogleIamV1TestIamPermissionsResponse(response); |
| 2612 }))); |
| 2613 }); |
| 2614 |
1823 }); | 2615 }); |
1824 | 2616 |
1825 | 2617 |
1826 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { | 2618 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { |
1827 unittest.test("method--create", () { | 2619 unittest.test("method--create", () { |
1828 | 2620 |
1829 var mock = new HttpServerMock(); | 2621 var mock = new HttpServerMock(); |
1830 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 2622 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
1831 var arg_request = buildGoogleCloudMlV1Version(); | 2623 var arg_request = buildGoogleCloudMlV1Version(); |
1832 var arg_parent = "foo"; | 2624 var arg_parent = "foo"; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsR
esponse response) { | 3041 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsR
esponse response) { |
2250 checkGoogleLongrunningListOperationsResponse(response); | 3042 checkGoogleLongrunningListOperationsResponse(response); |
2251 }))); | 3043 }))); |
2252 }); | 3044 }); |
2253 | 3045 |
2254 }); | 3046 }); |
2255 | 3047 |
2256 | 3048 |
2257 } | 3049 } |
2258 | 3050 |
OLD | NEW |