OLD | NEW |
1 library googleapis_beta.ml.v1beta1.test; | 1 library googleapis_beta.ml.v1beta1.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:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 checkGoogleApiHttpBody(api.GoogleApiHttpBody o) { | 66 checkGoogleApiHttpBody(api.GoogleApiHttpBody o) { |
67 buildCounterGoogleApiHttpBody++; | 67 buildCounterGoogleApiHttpBody++; |
68 if (buildCounterGoogleApiHttpBody < 3) { | 68 if (buildCounterGoogleApiHttpBody < 3) { |
69 unittest.expect(o.contentType, unittest.equals('foo')); | 69 unittest.expect(o.contentType, unittest.equals('foo')); |
70 unittest.expect(o.data, unittest.equals('foo')); | 70 unittest.expect(o.data, unittest.equals('foo')); |
71 } | 71 } |
72 buildCounterGoogleApiHttpBody--; | 72 buildCounterGoogleApiHttpBody--; |
73 } | 73 } |
74 | 74 |
| 75 core.int buildCounterGoogleCloudMlV1OperationMetadata = 0; |
| 76 buildGoogleCloudMlV1OperationMetadata() { |
| 77 var o = new api.GoogleCloudMlV1OperationMetadata(); |
| 78 buildCounterGoogleCloudMlV1OperationMetadata++; |
| 79 if (buildCounterGoogleCloudMlV1OperationMetadata < 3) { |
| 80 o.createTime = "foo"; |
| 81 o.endTime = "foo"; |
| 82 o.isCancellationRequested = true; |
| 83 o.modelName = "foo"; |
| 84 o.operationType = "foo"; |
| 85 o.startTime = "foo"; |
| 86 o.version = buildGoogleCloudMlV1Version(); |
| 87 } |
| 88 buildCounterGoogleCloudMlV1OperationMetadata--; |
| 89 return o; |
| 90 } |
| 91 |
| 92 checkGoogleCloudMlV1OperationMetadata(api.GoogleCloudMlV1OperationMetadata o) { |
| 93 buildCounterGoogleCloudMlV1OperationMetadata++; |
| 94 if (buildCounterGoogleCloudMlV1OperationMetadata < 3) { |
| 95 unittest.expect(o.createTime, unittest.equals('foo')); |
| 96 unittest.expect(o.endTime, unittest.equals('foo')); |
| 97 unittest.expect(o.isCancellationRequested, unittest.isTrue); |
| 98 unittest.expect(o.modelName, unittest.equals('foo')); |
| 99 unittest.expect(o.operationType, unittest.equals('foo')); |
| 100 unittest.expect(o.startTime, unittest.equals('foo')); |
| 101 checkGoogleCloudMlV1Version(o.version); |
| 102 } |
| 103 buildCounterGoogleCloudMlV1OperationMetadata--; |
| 104 } |
| 105 |
| 106 core.int buildCounterGoogleCloudMlV1Version = 0; |
| 107 buildGoogleCloudMlV1Version() { |
| 108 var o = new api.GoogleCloudMlV1Version(); |
| 109 buildCounterGoogleCloudMlV1Version++; |
| 110 if (buildCounterGoogleCloudMlV1Version < 3) { |
| 111 o.createTime = "foo"; |
| 112 o.deploymentUri = "foo"; |
| 113 o.description = "foo"; |
| 114 o.isDefault = true; |
| 115 o.lastUseTime = "foo"; |
| 116 o.name = "foo"; |
| 117 o.runtimeVersion = "foo"; |
| 118 } |
| 119 buildCounterGoogleCloudMlV1Version--; |
| 120 return o; |
| 121 } |
| 122 |
| 123 checkGoogleCloudMlV1Version(api.GoogleCloudMlV1Version o) { |
| 124 buildCounterGoogleCloudMlV1Version++; |
| 125 if (buildCounterGoogleCloudMlV1Version < 3) { |
| 126 unittest.expect(o.createTime, unittest.equals('foo')); |
| 127 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
| 128 unittest.expect(o.description, unittest.equals('foo')); |
| 129 unittest.expect(o.isDefault, unittest.isTrue); |
| 130 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
| 131 unittest.expect(o.name, unittest.equals('foo')); |
| 132 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 133 } |
| 134 buildCounterGoogleCloudMlV1Version--; |
| 135 } |
| 136 |
75 core.int buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetri
c = 0; | 137 core.int buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetri
c = 0; |
76 buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric() { | 138 buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric() { |
77 var o = new api.GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()
; | 139 var o = new api.GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()
; |
78 buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric++; | 140 buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric++; |
79 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric <
3) { | 141 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric <
3) { |
80 o.objectiveValue = 42.0; | 142 o.objectiveValue = 42.0; |
81 o.trainingStep = "foo"; | 143 o.trainingStep = "foo"; |
82 } | 144 } |
83 buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric--; | 145 buildCounterGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric--; |
84 return o; | 146 return o; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 186 |
125 checkGoogleCloudMlV1beta1GetConfigResponse(api.GoogleCloudMlV1beta1GetConfigResp
onse o) { | 187 checkGoogleCloudMlV1beta1GetConfigResponse(api.GoogleCloudMlV1beta1GetConfigResp
onse o) { |
126 buildCounterGoogleCloudMlV1beta1GetConfigResponse++; | 188 buildCounterGoogleCloudMlV1beta1GetConfigResponse++; |
127 if (buildCounterGoogleCloudMlV1beta1GetConfigResponse < 3) { | 189 if (buildCounterGoogleCloudMlV1beta1GetConfigResponse < 3) { |
128 unittest.expect(o.serviceAccount, unittest.equals('foo')); | 190 unittest.expect(o.serviceAccount, unittest.equals('foo')); |
129 unittest.expect(o.serviceAccountProject, unittest.equals('foo')); | 191 unittest.expect(o.serviceAccountProject, unittest.equals('foo')); |
130 } | 192 } |
131 buildCounterGoogleCloudMlV1beta1GetConfigResponse--; | 193 buildCounterGoogleCloudMlV1beta1GetConfigResponse--; |
132 } | 194 } |
133 | 195 |
134 buildUnnamed3132() { | 196 buildUnnamed3222() { |
135 var o = new core.List<api.GoogleCloudMlV1beta1HyperparameterOutputHyperparamet
erMetric>(); | 197 var o = new core.List<api.GoogleCloudMlV1beta1HyperparameterOutputHyperparamet
erMetric>(); |
136 o.add(buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()); | 198 o.add(buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()); |
137 o.add(buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()); | 199 o.add(buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric()); |
138 return o; | 200 return o; |
139 } | 201 } |
140 | 202 |
141 checkUnnamed3132(core.List<api.GoogleCloudMlV1beta1HyperparameterOutputHyperpara
meterMetric> o) { | 203 checkUnnamed3222(core.List<api.GoogleCloudMlV1beta1HyperparameterOutputHyperpara
meterMetric> o) { |
142 unittest.expect(o, unittest.hasLength(2)); | 204 unittest.expect(o, unittest.hasLength(2)); |
143 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o[0]); | 205 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o[0]); |
144 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o[1]); | 206 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o[1]); |
145 } | 207 } |
146 | 208 |
147 buildUnnamed3133() { | 209 buildUnnamed3223() { |
148 var o = new core.Map<core.String, core.String>(); | 210 var o = new core.Map<core.String, core.String>(); |
149 o["x"] = "foo"; | 211 o["x"] = "foo"; |
150 o["y"] = "foo"; | 212 o["y"] = "foo"; |
151 return o; | 213 return o; |
152 } | 214 } |
153 | 215 |
154 checkUnnamed3133(core.Map<core.String, core.String> o) { | 216 checkUnnamed3223(core.Map<core.String, core.String> o) { |
155 unittest.expect(o, unittest.hasLength(2)); | 217 unittest.expect(o, unittest.hasLength(2)); |
156 unittest.expect(o["x"], unittest.equals('foo')); | 218 unittest.expect(o["x"], unittest.equals('foo')); |
157 unittest.expect(o["y"], unittest.equals('foo')); | 219 unittest.expect(o["y"], unittest.equals('foo')); |
158 } | 220 } |
159 | 221 |
160 core.int buildCounterGoogleCloudMlV1beta1HyperparameterOutput = 0; | 222 core.int buildCounterGoogleCloudMlV1beta1HyperparameterOutput = 0; |
161 buildGoogleCloudMlV1beta1HyperparameterOutput() { | 223 buildGoogleCloudMlV1beta1HyperparameterOutput() { |
162 var o = new api.GoogleCloudMlV1beta1HyperparameterOutput(); | 224 var o = new api.GoogleCloudMlV1beta1HyperparameterOutput(); |
163 buildCounterGoogleCloudMlV1beta1HyperparameterOutput++; | 225 buildCounterGoogleCloudMlV1beta1HyperparameterOutput++; |
164 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutput < 3) { | 226 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutput < 3) { |
165 o.allMetrics = buildUnnamed3132(); | 227 o.allMetrics = buildUnnamed3222(); |
166 o.finalMetric = buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterM
etric(); | 228 o.finalMetric = buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterM
etric(); |
167 o.hyperparameters = buildUnnamed3133(); | 229 o.hyperparameters = buildUnnamed3223(); |
168 o.trialId = "foo"; | 230 o.trialId = "foo"; |
169 } | 231 } |
170 buildCounterGoogleCloudMlV1beta1HyperparameterOutput--; | 232 buildCounterGoogleCloudMlV1beta1HyperparameterOutput--; |
171 return o; | 233 return o; |
172 } | 234 } |
173 | 235 |
174 checkGoogleCloudMlV1beta1HyperparameterOutput(api.GoogleCloudMlV1beta1Hyperparam
eterOutput o) { | 236 checkGoogleCloudMlV1beta1HyperparameterOutput(api.GoogleCloudMlV1beta1Hyperparam
eterOutput o) { |
175 buildCounterGoogleCloudMlV1beta1HyperparameterOutput++; | 237 buildCounterGoogleCloudMlV1beta1HyperparameterOutput++; |
176 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutput < 3) { | 238 if (buildCounterGoogleCloudMlV1beta1HyperparameterOutput < 3) { |
177 checkUnnamed3132(o.allMetrics); | 239 checkUnnamed3222(o.allMetrics); |
178 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o.finalMet
ric); | 240 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(o.finalMet
ric); |
179 checkUnnamed3133(o.hyperparameters); | 241 checkUnnamed3223(o.hyperparameters); |
180 unittest.expect(o.trialId, unittest.equals('foo')); | 242 unittest.expect(o.trialId, unittest.equals('foo')); |
181 } | 243 } |
182 buildCounterGoogleCloudMlV1beta1HyperparameterOutput--; | 244 buildCounterGoogleCloudMlV1beta1HyperparameterOutput--; |
183 } | 245 } |
184 | 246 |
185 buildUnnamed3134() { | 247 buildUnnamed3224() { |
186 var o = new core.List<api.GoogleCloudMlV1beta1ParameterSpec>(); | 248 var o = new core.List<api.GoogleCloudMlV1beta1ParameterSpec>(); |
187 o.add(buildGoogleCloudMlV1beta1ParameterSpec()); | 249 o.add(buildGoogleCloudMlV1beta1ParameterSpec()); |
188 o.add(buildGoogleCloudMlV1beta1ParameterSpec()); | 250 o.add(buildGoogleCloudMlV1beta1ParameterSpec()); |
189 return o; | 251 return o; |
190 } | 252 } |
191 | 253 |
192 checkUnnamed3134(core.List<api.GoogleCloudMlV1beta1ParameterSpec> o) { | 254 checkUnnamed3224(core.List<api.GoogleCloudMlV1beta1ParameterSpec> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 255 unittest.expect(o, unittest.hasLength(2)); |
194 checkGoogleCloudMlV1beta1ParameterSpec(o[0]); | 256 checkGoogleCloudMlV1beta1ParameterSpec(o[0]); |
195 checkGoogleCloudMlV1beta1ParameterSpec(o[1]); | 257 checkGoogleCloudMlV1beta1ParameterSpec(o[1]); |
196 } | 258 } |
197 | 259 |
198 core.int buildCounterGoogleCloudMlV1beta1HyperparameterSpec = 0; | 260 core.int buildCounterGoogleCloudMlV1beta1HyperparameterSpec = 0; |
199 buildGoogleCloudMlV1beta1HyperparameterSpec() { | 261 buildGoogleCloudMlV1beta1HyperparameterSpec() { |
200 var o = new api.GoogleCloudMlV1beta1HyperparameterSpec(); | 262 var o = new api.GoogleCloudMlV1beta1HyperparameterSpec(); |
201 buildCounterGoogleCloudMlV1beta1HyperparameterSpec++; | 263 buildCounterGoogleCloudMlV1beta1HyperparameterSpec++; |
202 if (buildCounterGoogleCloudMlV1beta1HyperparameterSpec < 3) { | 264 if (buildCounterGoogleCloudMlV1beta1HyperparameterSpec < 3) { |
203 o.goal = "foo"; | 265 o.goal = "foo"; |
| 266 o.hyperparameterMetricTag = "foo"; |
204 o.maxParallelTrials = 42; | 267 o.maxParallelTrials = 42; |
205 o.maxTrials = 42; | 268 o.maxTrials = 42; |
206 o.params = buildUnnamed3134(); | 269 o.params = buildUnnamed3224(); |
207 } | 270 } |
208 buildCounterGoogleCloudMlV1beta1HyperparameterSpec--; | 271 buildCounterGoogleCloudMlV1beta1HyperparameterSpec--; |
209 return o; | 272 return o; |
210 } | 273 } |
211 | 274 |
212 checkGoogleCloudMlV1beta1HyperparameterSpec(api.GoogleCloudMlV1beta1Hyperparamet
erSpec o) { | 275 checkGoogleCloudMlV1beta1HyperparameterSpec(api.GoogleCloudMlV1beta1Hyperparamet
erSpec o) { |
213 buildCounterGoogleCloudMlV1beta1HyperparameterSpec++; | 276 buildCounterGoogleCloudMlV1beta1HyperparameterSpec++; |
214 if (buildCounterGoogleCloudMlV1beta1HyperparameterSpec < 3) { | 277 if (buildCounterGoogleCloudMlV1beta1HyperparameterSpec < 3) { |
215 unittest.expect(o.goal, unittest.equals('foo')); | 278 unittest.expect(o.goal, unittest.equals('foo')); |
| 279 unittest.expect(o.hyperparameterMetricTag, unittest.equals('foo')); |
216 unittest.expect(o.maxParallelTrials, unittest.equals(42)); | 280 unittest.expect(o.maxParallelTrials, unittest.equals(42)); |
217 unittest.expect(o.maxTrials, unittest.equals(42)); | 281 unittest.expect(o.maxTrials, unittest.equals(42)); |
218 checkUnnamed3134(o.params); | 282 checkUnnamed3224(o.params); |
219 } | 283 } |
220 buildCounterGoogleCloudMlV1beta1HyperparameterSpec--; | 284 buildCounterGoogleCloudMlV1beta1HyperparameterSpec--; |
221 } | 285 } |
222 | 286 |
223 core.int buildCounterGoogleCloudMlV1beta1Job = 0; | 287 core.int buildCounterGoogleCloudMlV1beta1Job = 0; |
224 buildGoogleCloudMlV1beta1Job() { | 288 buildGoogleCloudMlV1beta1Job() { |
225 var o = new api.GoogleCloudMlV1beta1Job(); | 289 var o = new api.GoogleCloudMlV1beta1Job(); |
226 buildCounterGoogleCloudMlV1beta1Job++; | 290 buildCounterGoogleCloudMlV1beta1Job++; |
227 if (buildCounterGoogleCloudMlV1beta1Job < 3) { | 291 if (buildCounterGoogleCloudMlV1beta1Job < 3) { |
228 o.createTime = "foo"; | 292 o.createTime = "foo"; |
(...skipping 21 matching lines...) Expand all Loading... |
250 checkGoogleCloudMlV1beta1PredictionInput(o.predictionInput); | 314 checkGoogleCloudMlV1beta1PredictionInput(o.predictionInput); |
251 checkGoogleCloudMlV1beta1PredictionOutput(o.predictionOutput); | 315 checkGoogleCloudMlV1beta1PredictionOutput(o.predictionOutput); |
252 unittest.expect(o.startTime, unittest.equals('foo')); | 316 unittest.expect(o.startTime, unittest.equals('foo')); |
253 unittest.expect(o.state, unittest.equals('foo')); | 317 unittest.expect(o.state, unittest.equals('foo')); |
254 checkGoogleCloudMlV1beta1TrainingInput(o.trainingInput); | 318 checkGoogleCloudMlV1beta1TrainingInput(o.trainingInput); |
255 checkGoogleCloudMlV1beta1TrainingOutput(o.trainingOutput); | 319 checkGoogleCloudMlV1beta1TrainingOutput(o.trainingOutput); |
256 } | 320 } |
257 buildCounterGoogleCloudMlV1beta1Job--; | 321 buildCounterGoogleCloudMlV1beta1Job--; |
258 } | 322 } |
259 | 323 |
260 buildUnnamed3135() { | 324 buildUnnamed3225() { |
261 var o = new core.List<api.GoogleCloudMlV1beta1Job>(); | 325 var o = new core.List<api.GoogleCloudMlV1beta1Job>(); |
262 o.add(buildGoogleCloudMlV1beta1Job()); | 326 o.add(buildGoogleCloudMlV1beta1Job()); |
263 o.add(buildGoogleCloudMlV1beta1Job()); | 327 o.add(buildGoogleCloudMlV1beta1Job()); |
264 return o; | 328 return o; |
265 } | 329 } |
266 | 330 |
267 checkUnnamed3135(core.List<api.GoogleCloudMlV1beta1Job> o) { | 331 checkUnnamed3225(core.List<api.GoogleCloudMlV1beta1Job> o) { |
268 unittest.expect(o, unittest.hasLength(2)); | 332 unittest.expect(o, unittest.hasLength(2)); |
269 checkGoogleCloudMlV1beta1Job(o[0]); | 333 checkGoogleCloudMlV1beta1Job(o[0]); |
270 checkGoogleCloudMlV1beta1Job(o[1]); | 334 checkGoogleCloudMlV1beta1Job(o[1]); |
271 } | 335 } |
272 | 336 |
273 core.int buildCounterGoogleCloudMlV1beta1ListJobsResponse = 0; | 337 core.int buildCounterGoogleCloudMlV1beta1ListJobsResponse = 0; |
274 buildGoogleCloudMlV1beta1ListJobsResponse() { | 338 buildGoogleCloudMlV1beta1ListJobsResponse() { |
275 var o = new api.GoogleCloudMlV1beta1ListJobsResponse(); | 339 var o = new api.GoogleCloudMlV1beta1ListJobsResponse(); |
276 buildCounterGoogleCloudMlV1beta1ListJobsResponse++; | 340 buildCounterGoogleCloudMlV1beta1ListJobsResponse++; |
277 if (buildCounterGoogleCloudMlV1beta1ListJobsResponse < 3) { | 341 if (buildCounterGoogleCloudMlV1beta1ListJobsResponse < 3) { |
278 o.jobs = buildUnnamed3135(); | 342 o.jobs = buildUnnamed3225(); |
279 o.nextPageToken = "foo"; | 343 o.nextPageToken = "foo"; |
280 } | 344 } |
281 buildCounterGoogleCloudMlV1beta1ListJobsResponse--; | 345 buildCounterGoogleCloudMlV1beta1ListJobsResponse--; |
282 return o; | 346 return o; |
283 } | 347 } |
284 | 348 |
285 checkGoogleCloudMlV1beta1ListJobsResponse(api.GoogleCloudMlV1beta1ListJobsRespon
se o) { | 349 checkGoogleCloudMlV1beta1ListJobsResponse(api.GoogleCloudMlV1beta1ListJobsRespon
se o) { |
286 buildCounterGoogleCloudMlV1beta1ListJobsResponse++; | 350 buildCounterGoogleCloudMlV1beta1ListJobsResponse++; |
287 if (buildCounterGoogleCloudMlV1beta1ListJobsResponse < 3) { | 351 if (buildCounterGoogleCloudMlV1beta1ListJobsResponse < 3) { |
288 checkUnnamed3135(o.jobs); | 352 checkUnnamed3225(o.jobs); |
289 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 353 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
290 } | 354 } |
291 buildCounterGoogleCloudMlV1beta1ListJobsResponse--; | 355 buildCounterGoogleCloudMlV1beta1ListJobsResponse--; |
292 } | 356 } |
293 | 357 |
294 buildUnnamed3136() { | 358 buildUnnamed3226() { |
295 var o = new core.List<api.GoogleCloudMlV1beta1Model>(); | 359 var o = new core.List<api.GoogleCloudMlV1beta1Model>(); |
296 o.add(buildGoogleCloudMlV1beta1Model()); | 360 o.add(buildGoogleCloudMlV1beta1Model()); |
297 o.add(buildGoogleCloudMlV1beta1Model()); | 361 o.add(buildGoogleCloudMlV1beta1Model()); |
298 return o; | 362 return o; |
299 } | 363 } |
300 | 364 |
301 checkUnnamed3136(core.List<api.GoogleCloudMlV1beta1Model> o) { | 365 checkUnnamed3226(core.List<api.GoogleCloudMlV1beta1Model> o) { |
302 unittest.expect(o, unittest.hasLength(2)); | 366 unittest.expect(o, unittest.hasLength(2)); |
303 checkGoogleCloudMlV1beta1Model(o[0]); | 367 checkGoogleCloudMlV1beta1Model(o[0]); |
304 checkGoogleCloudMlV1beta1Model(o[1]); | 368 checkGoogleCloudMlV1beta1Model(o[1]); |
305 } | 369 } |
306 | 370 |
307 core.int buildCounterGoogleCloudMlV1beta1ListModelsResponse = 0; | 371 core.int buildCounterGoogleCloudMlV1beta1ListModelsResponse = 0; |
308 buildGoogleCloudMlV1beta1ListModelsResponse() { | 372 buildGoogleCloudMlV1beta1ListModelsResponse() { |
309 var o = new api.GoogleCloudMlV1beta1ListModelsResponse(); | 373 var o = new api.GoogleCloudMlV1beta1ListModelsResponse(); |
310 buildCounterGoogleCloudMlV1beta1ListModelsResponse++; | 374 buildCounterGoogleCloudMlV1beta1ListModelsResponse++; |
311 if (buildCounterGoogleCloudMlV1beta1ListModelsResponse < 3) { | 375 if (buildCounterGoogleCloudMlV1beta1ListModelsResponse < 3) { |
312 o.models = buildUnnamed3136(); | 376 o.models = buildUnnamed3226(); |
313 o.nextPageToken = "foo"; | 377 o.nextPageToken = "foo"; |
314 } | 378 } |
315 buildCounterGoogleCloudMlV1beta1ListModelsResponse--; | 379 buildCounterGoogleCloudMlV1beta1ListModelsResponse--; |
316 return o; | 380 return o; |
317 } | 381 } |
318 | 382 |
319 checkGoogleCloudMlV1beta1ListModelsResponse(api.GoogleCloudMlV1beta1ListModelsRe
sponse o) { | 383 checkGoogleCloudMlV1beta1ListModelsResponse(api.GoogleCloudMlV1beta1ListModelsRe
sponse o) { |
320 buildCounterGoogleCloudMlV1beta1ListModelsResponse++; | 384 buildCounterGoogleCloudMlV1beta1ListModelsResponse++; |
321 if (buildCounterGoogleCloudMlV1beta1ListModelsResponse < 3) { | 385 if (buildCounterGoogleCloudMlV1beta1ListModelsResponse < 3) { |
322 checkUnnamed3136(o.models); | 386 checkUnnamed3226(o.models); |
323 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 387 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
324 } | 388 } |
325 buildCounterGoogleCloudMlV1beta1ListModelsResponse--; | 389 buildCounterGoogleCloudMlV1beta1ListModelsResponse--; |
326 } | 390 } |
327 | 391 |
328 buildUnnamed3137() { | 392 buildUnnamed3227() { |
329 var o = new core.List<api.GoogleCloudMlV1beta1Version>(); | 393 var o = new core.List<api.GoogleCloudMlV1beta1Version>(); |
330 o.add(buildGoogleCloudMlV1beta1Version()); | 394 o.add(buildGoogleCloudMlV1beta1Version()); |
331 o.add(buildGoogleCloudMlV1beta1Version()); | 395 o.add(buildGoogleCloudMlV1beta1Version()); |
332 return o; | 396 return o; |
333 } | 397 } |
334 | 398 |
335 checkUnnamed3137(core.List<api.GoogleCloudMlV1beta1Version> o) { | 399 checkUnnamed3227(core.List<api.GoogleCloudMlV1beta1Version> o) { |
336 unittest.expect(o, unittest.hasLength(2)); | 400 unittest.expect(o, unittest.hasLength(2)); |
337 checkGoogleCloudMlV1beta1Version(o[0]); | 401 checkGoogleCloudMlV1beta1Version(o[0]); |
338 checkGoogleCloudMlV1beta1Version(o[1]); | 402 checkGoogleCloudMlV1beta1Version(o[1]); |
339 } | 403 } |
340 | 404 |
341 core.int buildCounterGoogleCloudMlV1beta1ListVersionsResponse = 0; | 405 core.int buildCounterGoogleCloudMlV1beta1ListVersionsResponse = 0; |
342 buildGoogleCloudMlV1beta1ListVersionsResponse() { | 406 buildGoogleCloudMlV1beta1ListVersionsResponse() { |
343 var o = new api.GoogleCloudMlV1beta1ListVersionsResponse(); | 407 var o = new api.GoogleCloudMlV1beta1ListVersionsResponse(); |
344 buildCounterGoogleCloudMlV1beta1ListVersionsResponse++; | 408 buildCounterGoogleCloudMlV1beta1ListVersionsResponse++; |
345 if (buildCounterGoogleCloudMlV1beta1ListVersionsResponse < 3) { | 409 if (buildCounterGoogleCloudMlV1beta1ListVersionsResponse < 3) { |
346 o.nextPageToken = "foo"; | 410 o.nextPageToken = "foo"; |
347 o.versions = buildUnnamed3137(); | 411 o.versions = buildUnnamed3227(); |
348 } | 412 } |
349 buildCounterGoogleCloudMlV1beta1ListVersionsResponse--; | 413 buildCounterGoogleCloudMlV1beta1ListVersionsResponse--; |
350 return o; | 414 return o; |
351 } | 415 } |
352 | 416 |
353 checkGoogleCloudMlV1beta1ListVersionsResponse(api.GoogleCloudMlV1beta1ListVersio
nsResponse o) { | 417 checkGoogleCloudMlV1beta1ListVersionsResponse(api.GoogleCloudMlV1beta1ListVersio
nsResponse o) { |
354 buildCounterGoogleCloudMlV1beta1ListVersionsResponse++; | 418 buildCounterGoogleCloudMlV1beta1ListVersionsResponse++; |
355 if (buildCounterGoogleCloudMlV1beta1ListVersionsResponse < 3) { | 419 if (buildCounterGoogleCloudMlV1beta1ListVersionsResponse < 3) { |
356 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 420 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
357 checkUnnamed3137(o.versions); | 421 checkUnnamed3227(o.versions); |
358 } | 422 } |
359 buildCounterGoogleCloudMlV1beta1ListVersionsResponse--; | 423 buildCounterGoogleCloudMlV1beta1ListVersionsResponse--; |
360 } | 424 } |
361 | 425 |
362 buildUnnamed3138() { | 426 buildUnnamed3228() { |
363 var o = new core.List<core.String>(); | 427 var o = new core.List<core.String>(); |
364 o.add("foo"); | 428 o.add("foo"); |
365 o.add("foo"); | 429 o.add("foo"); |
366 return o; | 430 return o; |
367 } | 431 } |
368 | 432 |
369 checkUnnamed3138(core.List<core.String> o) { | 433 checkUnnamed3228(core.List<core.String> o) { |
370 unittest.expect(o, unittest.hasLength(2)); | 434 unittest.expect(o, unittest.hasLength(2)); |
371 unittest.expect(o[0], unittest.equals('foo')); | 435 unittest.expect(o[0], unittest.equals('foo')); |
372 unittest.expect(o[1], unittest.equals('foo')); | 436 unittest.expect(o[1], unittest.equals('foo')); |
373 } | 437 } |
374 | 438 |
375 core.int buildCounterGoogleCloudMlV1beta1Model = 0; | 439 core.int buildCounterGoogleCloudMlV1beta1Model = 0; |
376 buildGoogleCloudMlV1beta1Model() { | 440 buildGoogleCloudMlV1beta1Model() { |
377 var o = new api.GoogleCloudMlV1beta1Model(); | 441 var o = new api.GoogleCloudMlV1beta1Model(); |
378 buildCounterGoogleCloudMlV1beta1Model++; | 442 buildCounterGoogleCloudMlV1beta1Model++; |
379 if (buildCounterGoogleCloudMlV1beta1Model < 3) { | 443 if (buildCounterGoogleCloudMlV1beta1Model < 3) { |
380 o.defaultVersion = buildGoogleCloudMlV1beta1Version(); | 444 o.defaultVersion = buildGoogleCloudMlV1beta1Version(); |
381 o.description = "foo"; | 445 o.description = "foo"; |
382 o.name = "foo"; | 446 o.name = "foo"; |
383 o.regions = buildUnnamed3138(); | 447 o.onlinePredictionLogging = true; |
| 448 o.regions = buildUnnamed3228(); |
384 } | 449 } |
385 buildCounterGoogleCloudMlV1beta1Model--; | 450 buildCounterGoogleCloudMlV1beta1Model--; |
386 return o; | 451 return o; |
387 } | 452 } |
388 | 453 |
389 checkGoogleCloudMlV1beta1Model(api.GoogleCloudMlV1beta1Model o) { | 454 checkGoogleCloudMlV1beta1Model(api.GoogleCloudMlV1beta1Model o) { |
390 buildCounterGoogleCloudMlV1beta1Model++; | 455 buildCounterGoogleCloudMlV1beta1Model++; |
391 if (buildCounterGoogleCloudMlV1beta1Model < 3) { | 456 if (buildCounterGoogleCloudMlV1beta1Model < 3) { |
392 checkGoogleCloudMlV1beta1Version(o.defaultVersion); | 457 checkGoogleCloudMlV1beta1Version(o.defaultVersion); |
393 unittest.expect(o.description, unittest.equals('foo')); | 458 unittest.expect(o.description, unittest.equals('foo')); |
394 unittest.expect(o.name, unittest.equals('foo')); | 459 unittest.expect(o.name, unittest.equals('foo')); |
395 checkUnnamed3138(o.regions); | 460 unittest.expect(o.onlinePredictionLogging, unittest.isTrue); |
| 461 checkUnnamed3228(o.regions); |
396 } | 462 } |
397 buildCounterGoogleCloudMlV1beta1Model--; | 463 buildCounterGoogleCloudMlV1beta1Model--; |
398 } | 464 } |
399 | 465 |
400 core.int buildCounterGoogleCloudMlV1beta1OperationMetadata = 0; | 466 core.int buildCounterGoogleCloudMlV1beta1OperationMetadata = 0; |
401 buildGoogleCloudMlV1beta1OperationMetadata() { | 467 buildGoogleCloudMlV1beta1OperationMetadata() { |
402 var o = new api.GoogleCloudMlV1beta1OperationMetadata(); | 468 var o = new api.GoogleCloudMlV1beta1OperationMetadata(); |
403 buildCounterGoogleCloudMlV1beta1OperationMetadata++; | 469 buildCounterGoogleCloudMlV1beta1OperationMetadata++; |
404 if (buildCounterGoogleCloudMlV1beta1OperationMetadata < 3) { | 470 if (buildCounterGoogleCloudMlV1beta1OperationMetadata < 3) { |
405 o.createTime = "foo"; | 471 o.createTime = "foo"; |
(...skipping 15 matching lines...) Expand all Loading... |
421 unittest.expect(o.endTime, unittest.equals('foo')); | 487 unittest.expect(o.endTime, unittest.equals('foo')); |
422 unittest.expect(o.isCancellationRequested, unittest.isTrue); | 488 unittest.expect(o.isCancellationRequested, unittest.isTrue); |
423 unittest.expect(o.modelName, unittest.equals('foo')); | 489 unittest.expect(o.modelName, unittest.equals('foo')); |
424 unittest.expect(o.operationType, unittest.equals('foo')); | 490 unittest.expect(o.operationType, unittest.equals('foo')); |
425 unittest.expect(o.startTime, unittest.equals('foo')); | 491 unittest.expect(o.startTime, unittest.equals('foo')); |
426 checkGoogleCloudMlV1beta1Version(o.version); | 492 checkGoogleCloudMlV1beta1Version(o.version); |
427 } | 493 } |
428 buildCounterGoogleCloudMlV1beta1OperationMetadata--; | 494 buildCounterGoogleCloudMlV1beta1OperationMetadata--; |
429 } | 495 } |
430 | 496 |
431 buildUnnamed3139() { | 497 buildUnnamed3229() { |
432 var o = new core.List<core.String>(); | 498 var o = new core.List<core.String>(); |
433 o.add("foo"); | 499 o.add("foo"); |
434 o.add("foo"); | 500 o.add("foo"); |
435 return o; | 501 return o; |
436 } | 502 } |
437 | 503 |
438 checkUnnamed3139(core.List<core.String> o) { | 504 checkUnnamed3229(core.List<core.String> o) { |
439 unittest.expect(o, unittest.hasLength(2)); | 505 unittest.expect(o, unittest.hasLength(2)); |
440 unittest.expect(o[0], unittest.equals('foo')); | 506 unittest.expect(o[0], unittest.equals('foo')); |
441 unittest.expect(o[1], unittest.equals('foo')); | 507 unittest.expect(o[1], unittest.equals('foo')); |
442 } | 508 } |
443 | 509 |
444 buildUnnamed3140() { | 510 buildUnnamed3230() { |
445 var o = new core.List<core.double>(); | 511 var o = new core.List<core.double>(); |
446 o.add(42.0); | 512 o.add(42.0); |
447 o.add(42.0); | 513 o.add(42.0); |
448 return o; | 514 return o; |
449 } | 515 } |
450 | 516 |
451 checkUnnamed3140(core.List<core.double> o) { | 517 checkUnnamed3230(core.List<core.double> o) { |
452 unittest.expect(o, unittest.hasLength(2)); | 518 unittest.expect(o, unittest.hasLength(2)); |
453 unittest.expect(o[0], unittest.equals(42.0)); | 519 unittest.expect(o[0], unittest.equals(42.0)); |
454 unittest.expect(o[1], unittest.equals(42.0)); | 520 unittest.expect(o[1], unittest.equals(42.0)); |
455 } | 521 } |
456 | 522 |
457 core.int buildCounterGoogleCloudMlV1beta1ParameterSpec = 0; | 523 core.int buildCounterGoogleCloudMlV1beta1ParameterSpec = 0; |
458 buildGoogleCloudMlV1beta1ParameterSpec() { | 524 buildGoogleCloudMlV1beta1ParameterSpec() { |
459 var o = new api.GoogleCloudMlV1beta1ParameterSpec(); | 525 var o = new api.GoogleCloudMlV1beta1ParameterSpec(); |
460 buildCounterGoogleCloudMlV1beta1ParameterSpec++; | 526 buildCounterGoogleCloudMlV1beta1ParameterSpec++; |
461 if (buildCounterGoogleCloudMlV1beta1ParameterSpec < 3) { | 527 if (buildCounterGoogleCloudMlV1beta1ParameterSpec < 3) { |
462 o.categoricalValues = buildUnnamed3139(); | 528 o.categoricalValues = buildUnnamed3229(); |
463 o.discreteValues = buildUnnamed3140(); | 529 o.discreteValues = buildUnnamed3230(); |
464 o.maxValue = 42.0; | 530 o.maxValue = 42.0; |
465 o.minValue = 42.0; | 531 o.minValue = 42.0; |
466 o.parameterName = "foo"; | 532 o.parameterName = "foo"; |
467 o.scaleType = "foo"; | 533 o.scaleType = "foo"; |
468 o.type = "foo"; | 534 o.type = "foo"; |
469 } | 535 } |
470 buildCounterGoogleCloudMlV1beta1ParameterSpec--; | 536 buildCounterGoogleCloudMlV1beta1ParameterSpec--; |
471 return o; | 537 return o; |
472 } | 538 } |
473 | 539 |
474 checkGoogleCloudMlV1beta1ParameterSpec(api.GoogleCloudMlV1beta1ParameterSpec o)
{ | 540 checkGoogleCloudMlV1beta1ParameterSpec(api.GoogleCloudMlV1beta1ParameterSpec o)
{ |
475 buildCounterGoogleCloudMlV1beta1ParameterSpec++; | 541 buildCounterGoogleCloudMlV1beta1ParameterSpec++; |
476 if (buildCounterGoogleCloudMlV1beta1ParameterSpec < 3) { | 542 if (buildCounterGoogleCloudMlV1beta1ParameterSpec < 3) { |
477 checkUnnamed3139(o.categoricalValues); | 543 checkUnnamed3229(o.categoricalValues); |
478 checkUnnamed3140(o.discreteValues); | 544 checkUnnamed3230(o.discreteValues); |
479 unittest.expect(o.maxValue, unittest.equals(42.0)); | 545 unittest.expect(o.maxValue, unittest.equals(42.0)); |
480 unittest.expect(o.minValue, unittest.equals(42.0)); | 546 unittest.expect(o.minValue, unittest.equals(42.0)); |
481 unittest.expect(o.parameterName, unittest.equals('foo')); | 547 unittest.expect(o.parameterName, unittest.equals('foo')); |
482 unittest.expect(o.scaleType, unittest.equals('foo')); | 548 unittest.expect(o.scaleType, unittest.equals('foo')); |
483 unittest.expect(o.type, unittest.equals('foo')); | 549 unittest.expect(o.type, unittest.equals('foo')); |
484 } | 550 } |
485 buildCounterGoogleCloudMlV1beta1ParameterSpec--; | 551 buildCounterGoogleCloudMlV1beta1ParameterSpec--; |
486 } | 552 } |
487 | 553 |
488 core.int buildCounterGoogleCloudMlV1beta1PredictRequest = 0; | 554 core.int buildCounterGoogleCloudMlV1beta1PredictRequest = 0; |
489 buildGoogleCloudMlV1beta1PredictRequest() { | 555 buildGoogleCloudMlV1beta1PredictRequest() { |
490 var o = new api.GoogleCloudMlV1beta1PredictRequest(); | 556 var o = new api.GoogleCloudMlV1beta1PredictRequest(); |
491 buildCounterGoogleCloudMlV1beta1PredictRequest++; | 557 buildCounterGoogleCloudMlV1beta1PredictRequest++; |
492 if (buildCounterGoogleCloudMlV1beta1PredictRequest < 3) { | 558 if (buildCounterGoogleCloudMlV1beta1PredictRequest < 3) { |
493 o.httpBody = buildGoogleApiHttpBody(); | 559 o.httpBody = buildGoogleApiHttpBody(); |
494 } | 560 } |
495 buildCounterGoogleCloudMlV1beta1PredictRequest--; | 561 buildCounterGoogleCloudMlV1beta1PredictRequest--; |
496 return o; | 562 return o; |
497 } | 563 } |
498 | 564 |
499 checkGoogleCloudMlV1beta1PredictRequest(api.GoogleCloudMlV1beta1PredictRequest o
) { | 565 checkGoogleCloudMlV1beta1PredictRequest(api.GoogleCloudMlV1beta1PredictRequest o
) { |
500 buildCounterGoogleCloudMlV1beta1PredictRequest++; | 566 buildCounterGoogleCloudMlV1beta1PredictRequest++; |
501 if (buildCounterGoogleCloudMlV1beta1PredictRequest < 3) { | 567 if (buildCounterGoogleCloudMlV1beta1PredictRequest < 3) { |
502 checkGoogleApiHttpBody(o.httpBody); | 568 checkGoogleApiHttpBody(o.httpBody); |
503 } | 569 } |
504 buildCounterGoogleCloudMlV1beta1PredictRequest--; | 570 buildCounterGoogleCloudMlV1beta1PredictRequest--; |
505 } | 571 } |
506 | 572 |
507 buildUnnamed3141() { | 573 buildUnnamed3231() { |
508 var o = new core.List<core.String>(); | 574 var o = new core.List<core.String>(); |
509 o.add("foo"); | 575 o.add("foo"); |
510 o.add("foo"); | 576 o.add("foo"); |
511 return o; | 577 return o; |
512 } | 578 } |
513 | 579 |
514 checkUnnamed3141(core.List<core.String> o) { | 580 checkUnnamed3231(core.List<core.String> o) { |
515 unittest.expect(o, unittest.hasLength(2)); | 581 unittest.expect(o, unittest.hasLength(2)); |
516 unittest.expect(o[0], unittest.equals('foo')); | 582 unittest.expect(o[0], unittest.equals('foo')); |
517 unittest.expect(o[1], unittest.equals('foo')); | 583 unittest.expect(o[1], unittest.equals('foo')); |
518 } | 584 } |
519 | 585 |
520 core.int buildCounterGoogleCloudMlV1beta1PredictionInput = 0; | 586 core.int buildCounterGoogleCloudMlV1beta1PredictionInput = 0; |
521 buildGoogleCloudMlV1beta1PredictionInput() { | 587 buildGoogleCloudMlV1beta1PredictionInput() { |
522 var o = new api.GoogleCloudMlV1beta1PredictionInput(); | 588 var o = new api.GoogleCloudMlV1beta1PredictionInput(); |
523 buildCounterGoogleCloudMlV1beta1PredictionInput++; | 589 buildCounterGoogleCloudMlV1beta1PredictionInput++; |
524 if (buildCounterGoogleCloudMlV1beta1PredictionInput < 3) { | 590 if (buildCounterGoogleCloudMlV1beta1PredictionInput < 3) { |
525 o.dataFormat = "foo"; | 591 o.dataFormat = "foo"; |
526 o.inputPaths = buildUnnamed3141(); | 592 o.inputPaths = buildUnnamed3231(); |
527 o.maxWorkerCount = "foo"; | 593 o.maxWorkerCount = "foo"; |
528 o.modelName = "foo"; | 594 o.modelName = "foo"; |
529 o.outputPath = "foo"; | 595 o.outputPath = "foo"; |
530 o.region = "foo"; | 596 o.region = "foo"; |
531 o.runtimeVersion = "foo"; | 597 o.runtimeVersion = "foo"; |
| 598 o.uri = "foo"; |
532 o.versionName = "foo"; | 599 o.versionName = "foo"; |
533 } | 600 } |
534 buildCounterGoogleCloudMlV1beta1PredictionInput--; | 601 buildCounterGoogleCloudMlV1beta1PredictionInput--; |
535 return o; | 602 return o; |
536 } | 603 } |
537 | 604 |
538 checkGoogleCloudMlV1beta1PredictionInput(api.GoogleCloudMlV1beta1PredictionInput
o) { | 605 checkGoogleCloudMlV1beta1PredictionInput(api.GoogleCloudMlV1beta1PredictionInput
o) { |
539 buildCounterGoogleCloudMlV1beta1PredictionInput++; | 606 buildCounterGoogleCloudMlV1beta1PredictionInput++; |
540 if (buildCounterGoogleCloudMlV1beta1PredictionInput < 3) { | 607 if (buildCounterGoogleCloudMlV1beta1PredictionInput < 3) { |
541 unittest.expect(o.dataFormat, unittest.equals('foo')); | 608 unittest.expect(o.dataFormat, unittest.equals('foo')); |
542 checkUnnamed3141(o.inputPaths); | 609 checkUnnamed3231(o.inputPaths); |
543 unittest.expect(o.maxWorkerCount, unittest.equals('foo')); | 610 unittest.expect(o.maxWorkerCount, unittest.equals('foo')); |
544 unittest.expect(o.modelName, unittest.equals('foo')); | 611 unittest.expect(o.modelName, unittest.equals('foo')); |
545 unittest.expect(o.outputPath, unittest.equals('foo')); | 612 unittest.expect(o.outputPath, unittest.equals('foo')); |
546 unittest.expect(o.region, unittest.equals('foo')); | 613 unittest.expect(o.region, unittest.equals('foo')); |
547 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 614 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 615 unittest.expect(o.uri, unittest.equals('foo')); |
548 unittest.expect(o.versionName, unittest.equals('foo')); | 616 unittest.expect(o.versionName, unittest.equals('foo')); |
549 } | 617 } |
550 buildCounterGoogleCloudMlV1beta1PredictionInput--; | 618 buildCounterGoogleCloudMlV1beta1PredictionInput--; |
551 } | 619 } |
552 | 620 |
553 core.int buildCounterGoogleCloudMlV1beta1PredictionOutput = 0; | 621 core.int buildCounterGoogleCloudMlV1beta1PredictionOutput = 0; |
554 buildGoogleCloudMlV1beta1PredictionOutput() { | 622 buildGoogleCloudMlV1beta1PredictionOutput() { |
555 var o = new api.GoogleCloudMlV1beta1PredictionOutput(); | 623 var o = new api.GoogleCloudMlV1beta1PredictionOutput(); |
556 buildCounterGoogleCloudMlV1beta1PredictionOutput++; | 624 buildCounterGoogleCloudMlV1beta1PredictionOutput++; |
557 if (buildCounterGoogleCloudMlV1beta1PredictionOutput < 3) { | 625 if (buildCounterGoogleCloudMlV1beta1PredictionOutput < 3) { |
(...skipping 27 matching lines...) Expand all Loading... |
585 return o; | 653 return o; |
586 } | 654 } |
587 | 655 |
588 checkGoogleCloudMlV1beta1SetDefaultVersionRequest(api.GoogleCloudMlV1beta1SetDef
aultVersionRequest o) { | 656 checkGoogleCloudMlV1beta1SetDefaultVersionRequest(api.GoogleCloudMlV1beta1SetDef
aultVersionRequest o) { |
589 buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest++; | 657 buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest++; |
590 if (buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest < 3) { | 658 if (buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest < 3) { |
591 } | 659 } |
592 buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest--; | 660 buildCounterGoogleCloudMlV1beta1SetDefaultVersionRequest--; |
593 } | 661 } |
594 | 662 |
595 buildUnnamed3142() { | 663 buildUnnamed3232() { |
596 var o = new core.List<core.String>(); | 664 var o = new core.List<core.String>(); |
597 o.add("foo"); | 665 o.add("foo"); |
598 o.add("foo"); | 666 o.add("foo"); |
599 return o; | 667 return o; |
600 } | 668 } |
601 | 669 |
602 checkUnnamed3142(core.List<core.String> o) { | 670 checkUnnamed3232(core.List<core.String> o) { |
603 unittest.expect(o, unittest.hasLength(2)); | 671 unittest.expect(o, unittest.hasLength(2)); |
604 unittest.expect(o[0], unittest.equals('foo')); | 672 unittest.expect(o[0], unittest.equals('foo')); |
605 unittest.expect(o[1], unittest.equals('foo')); | 673 unittest.expect(o[1], unittest.equals('foo')); |
606 } | 674 } |
607 | 675 |
608 buildUnnamed3143() { | 676 buildUnnamed3233() { |
609 var o = new core.List<core.String>(); | 677 var o = new core.List<core.String>(); |
610 o.add("foo"); | 678 o.add("foo"); |
611 o.add("foo"); | 679 o.add("foo"); |
612 return o; | 680 return o; |
613 } | 681 } |
614 | 682 |
615 checkUnnamed3143(core.List<core.String> o) { | 683 checkUnnamed3233(core.List<core.String> o) { |
616 unittest.expect(o, unittest.hasLength(2)); | 684 unittest.expect(o, unittest.hasLength(2)); |
617 unittest.expect(o[0], unittest.equals('foo')); | 685 unittest.expect(o[0], unittest.equals('foo')); |
618 unittest.expect(o[1], unittest.equals('foo')); | 686 unittest.expect(o[1], unittest.equals('foo')); |
619 } | 687 } |
620 | 688 |
621 core.int buildCounterGoogleCloudMlV1beta1TrainingInput = 0; | 689 core.int buildCounterGoogleCloudMlV1beta1TrainingInput = 0; |
622 buildGoogleCloudMlV1beta1TrainingInput() { | 690 buildGoogleCloudMlV1beta1TrainingInput() { |
623 var o = new api.GoogleCloudMlV1beta1TrainingInput(); | 691 var o = new api.GoogleCloudMlV1beta1TrainingInput(); |
624 buildCounterGoogleCloudMlV1beta1TrainingInput++; | 692 buildCounterGoogleCloudMlV1beta1TrainingInput++; |
625 if (buildCounterGoogleCloudMlV1beta1TrainingInput < 3) { | 693 if (buildCounterGoogleCloudMlV1beta1TrainingInput < 3) { |
626 o.args = buildUnnamed3142(); | 694 o.args = buildUnnamed3232(); |
627 o.hyperparameters = buildGoogleCloudMlV1beta1HyperparameterSpec(); | 695 o.hyperparameters = buildGoogleCloudMlV1beta1HyperparameterSpec(); |
| 696 o.jobDir = "foo"; |
628 o.masterType = "foo"; | 697 o.masterType = "foo"; |
629 o.packageUris = buildUnnamed3143(); | 698 o.packageUris = buildUnnamed3233(); |
630 o.parameterServerCount = "foo"; | 699 o.parameterServerCount = "foo"; |
631 o.parameterServerType = "foo"; | 700 o.parameterServerType = "foo"; |
632 o.pythonModule = "foo"; | 701 o.pythonModule = "foo"; |
633 o.region = "foo"; | 702 o.region = "foo"; |
634 o.runtimeVersion = "foo"; | 703 o.runtimeVersion = "foo"; |
635 o.scaleTier = "foo"; | 704 o.scaleTier = "foo"; |
636 o.workerCount = "foo"; | 705 o.workerCount = "foo"; |
637 o.workerType = "foo"; | 706 o.workerType = "foo"; |
638 } | 707 } |
639 buildCounterGoogleCloudMlV1beta1TrainingInput--; | 708 buildCounterGoogleCloudMlV1beta1TrainingInput--; |
640 return o; | 709 return o; |
641 } | 710 } |
642 | 711 |
643 checkGoogleCloudMlV1beta1TrainingInput(api.GoogleCloudMlV1beta1TrainingInput o)
{ | 712 checkGoogleCloudMlV1beta1TrainingInput(api.GoogleCloudMlV1beta1TrainingInput o)
{ |
644 buildCounterGoogleCloudMlV1beta1TrainingInput++; | 713 buildCounterGoogleCloudMlV1beta1TrainingInput++; |
645 if (buildCounterGoogleCloudMlV1beta1TrainingInput < 3) { | 714 if (buildCounterGoogleCloudMlV1beta1TrainingInput < 3) { |
646 checkUnnamed3142(o.args); | 715 checkUnnamed3232(o.args); |
647 checkGoogleCloudMlV1beta1HyperparameterSpec(o.hyperparameters); | 716 checkGoogleCloudMlV1beta1HyperparameterSpec(o.hyperparameters); |
| 717 unittest.expect(o.jobDir, unittest.equals('foo')); |
648 unittest.expect(o.masterType, unittest.equals('foo')); | 718 unittest.expect(o.masterType, unittest.equals('foo')); |
649 checkUnnamed3143(o.packageUris); | 719 checkUnnamed3233(o.packageUris); |
650 unittest.expect(o.parameterServerCount, unittest.equals('foo')); | 720 unittest.expect(o.parameterServerCount, unittest.equals('foo')); |
651 unittest.expect(o.parameterServerType, unittest.equals('foo')); | 721 unittest.expect(o.parameterServerType, unittest.equals('foo')); |
652 unittest.expect(o.pythonModule, unittest.equals('foo')); | 722 unittest.expect(o.pythonModule, unittest.equals('foo')); |
653 unittest.expect(o.region, unittest.equals('foo')); | 723 unittest.expect(o.region, unittest.equals('foo')); |
654 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 724 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
655 unittest.expect(o.scaleTier, unittest.equals('foo')); | 725 unittest.expect(o.scaleTier, unittest.equals('foo')); |
656 unittest.expect(o.workerCount, unittest.equals('foo')); | 726 unittest.expect(o.workerCount, unittest.equals('foo')); |
657 unittest.expect(o.workerType, unittest.equals('foo')); | 727 unittest.expect(o.workerType, unittest.equals('foo')); |
658 } | 728 } |
659 buildCounterGoogleCloudMlV1beta1TrainingInput--; | 729 buildCounterGoogleCloudMlV1beta1TrainingInput--; |
660 } | 730 } |
661 | 731 |
662 buildUnnamed3144() { | 732 buildUnnamed3234() { |
663 var o = new core.List<api.GoogleCloudMlV1beta1HyperparameterOutput>(); | 733 var o = new core.List<api.GoogleCloudMlV1beta1HyperparameterOutput>(); |
664 o.add(buildGoogleCloudMlV1beta1HyperparameterOutput()); | 734 o.add(buildGoogleCloudMlV1beta1HyperparameterOutput()); |
665 o.add(buildGoogleCloudMlV1beta1HyperparameterOutput()); | 735 o.add(buildGoogleCloudMlV1beta1HyperparameterOutput()); |
666 return o; | 736 return o; |
667 } | 737 } |
668 | 738 |
669 checkUnnamed3144(core.List<api.GoogleCloudMlV1beta1HyperparameterOutput> o) { | 739 checkUnnamed3234(core.List<api.GoogleCloudMlV1beta1HyperparameterOutput> o) { |
670 unittest.expect(o, unittest.hasLength(2)); | 740 unittest.expect(o, unittest.hasLength(2)); |
671 checkGoogleCloudMlV1beta1HyperparameterOutput(o[0]); | 741 checkGoogleCloudMlV1beta1HyperparameterOutput(o[0]); |
672 checkGoogleCloudMlV1beta1HyperparameterOutput(o[1]); | 742 checkGoogleCloudMlV1beta1HyperparameterOutput(o[1]); |
673 } | 743 } |
674 | 744 |
675 core.int buildCounterGoogleCloudMlV1beta1TrainingOutput = 0; | 745 core.int buildCounterGoogleCloudMlV1beta1TrainingOutput = 0; |
676 buildGoogleCloudMlV1beta1TrainingOutput() { | 746 buildGoogleCloudMlV1beta1TrainingOutput() { |
677 var o = new api.GoogleCloudMlV1beta1TrainingOutput(); | 747 var o = new api.GoogleCloudMlV1beta1TrainingOutput(); |
678 buildCounterGoogleCloudMlV1beta1TrainingOutput++; | 748 buildCounterGoogleCloudMlV1beta1TrainingOutput++; |
679 if (buildCounterGoogleCloudMlV1beta1TrainingOutput < 3) { | 749 if (buildCounterGoogleCloudMlV1beta1TrainingOutput < 3) { |
680 o.completedTrialCount = "foo"; | 750 o.completedTrialCount = "foo"; |
681 o.consumedMLUnits = 42.0; | 751 o.consumedMLUnits = 42.0; |
682 o.isHyperparameterTuningJob = true; | 752 o.isHyperparameterTuningJob = true; |
683 o.trials = buildUnnamed3144(); | 753 o.trials = buildUnnamed3234(); |
684 } | 754 } |
685 buildCounterGoogleCloudMlV1beta1TrainingOutput--; | 755 buildCounterGoogleCloudMlV1beta1TrainingOutput--; |
686 return o; | 756 return o; |
687 } | 757 } |
688 | 758 |
689 checkGoogleCloudMlV1beta1TrainingOutput(api.GoogleCloudMlV1beta1TrainingOutput o
) { | 759 checkGoogleCloudMlV1beta1TrainingOutput(api.GoogleCloudMlV1beta1TrainingOutput o
) { |
690 buildCounterGoogleCloudMlV1beta1TrainingOutput++; | 760 buildCounterGoogleCloudMlV1beta1TrainingOutput++; |
691 if (buildCounterGoogleCloudMlV1beta1TrainingOutput < 3) { | 761 if (buildCounterGoogleCloudMlV1beta1TrainingOutput < 3) { |
692 unittest.expect(o.completedTrialCount, unittest.equals('foo')); | 762 unittest.expect(o.completedTrialCount, unittest.equals('foo')); |
693 unittest.expect(o.consumedMLUnits, unittest.equals(42.0)); | 763 unittest.expect(o.consumedMLUnits, unittest.equals(42.0)); |
694 unittest.expect(o.isHyperparameterTuningJob, unittest.isTrue); | 764 unittest.expect(o.isHyperparameterTuningJob, unittest.isTrue); |
695 checkUnnamed3144(o.trials); | 765 checkUnnamed3234(o.trials); |
696 } | 766 } |
697 buildCounterGoogleCloudMlV1beta1TrainingOutput--; | 767 buildCounterGoogleCloudMlV1beta1TrainingOutput--; |
698 } | 768 } |
699 | 769 |
700 core.int buildCounterGoogleCloudMlV1beta1Version = 0; | 770 core.int buildCounterGoogleCloudMlV1beta1Version = 0; |
701 buildGoogleCloudMlV1beta1Version() { | 771 buildGoogleCloudMlV1beta1Version() { |
702 var o = new api.GoogleCloudMlV1beta1Version(); | 772 var o = new api.GoogleCloudMlV1beta1Version(); |
703 buildCounterGoogleCloudMlV1beta1Version++; | 773 buildCounterGoogleCloudMlV1beta1Version++; |
704 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 774 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
705 o.createTime = "foo"; | 775 o.createTime = "foo"; |
706 o.deploymentUri = "foo"; | 776 o.deploymentUri = "foo"; |
707 o.description = "foo"; | 777 o.description = "foo"; |
708 o.isDefault = true; | 778 o.isDefault = true; |
709 o.lastUseTime = "foo"; | 779 o.lastUseTime = "foo"; |
710 o.name = "foo"; | 780 o.name = "foo"; |
711 o.onlinePredictionLogging = true; | |
712 o.runtimeVersion = "foo"; | 781 o.runtimeVersion = "foo"; |
713 } | 782 } |
714 buildCounterGoogleCloudMlV1beta1Version--; | 783 buildCounterGoogleCloudMlV1beta1Version--; |
715 return o; | 784 return o; |
716 } | 785 } |
717 | 786 |
718 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { | 787 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { |
719 buildCounterGoogleCloudMlV1beta1Version++; | 788 buildCounterGoogleCloudMlV1beta1Version++; |
720 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 789 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
721 unittest.expect(o.createTime, unittest.equals('foo')); | 790 unittest.expect(o.createTime, unittest.equals('foo')); |
722 unittest.expect(o.deploymentUri, unittest.equals('foo')); | 791 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
723 unittest.expect(o.description, unittest.equals('foo')); | 792 unittest.expect(o.description, unittest.equals('foo')); |
724 unittest.expect(o.isDefault, unittest.isTrue); | 793 unittest.expect(o.isDefault, unittest.isTrue); |
725 unittest.expect(o.lastUseTime, unittest.equals('foo')); | 794 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
726 unittest.expect(o.name, unittest.equals('foo')); | 795 unittest.expect(o.name, unittest.equals('foo')); |
727 unittest.expect(o.onlinePredictionLogging, unittest.isTrue); | |
728 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 796 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
729 } | 797 } |
730 buildCounterGoogleCloudMlV1beta1Version--; | 798 buildCounterGoogleCloudMlV1beta1Version--; |
731 } | 799 } |
732 | 800 |
733 buildUnnamed3145() { | 801 buildUnnamed3235() { |
734 var o = new core.List<api.GoogleLongrunningOperation>(); | 802 var o = new core.List<api.GoogleLongrunningOperation>(); |
735 o.add(buildGoogleLongrunningOperation()); | 803 o.add(buildGoogleLongrunningOperation()); |
736 o.add(buildGoogleLongrunningOperation()); | 804 o.add(buildGoogleLongrunningOperation()); |
737 return o; | 805 return o; |
738 } | 806 } |
739 | 807 |
740 checkUnnamed3145(core.List<api.GoogleLongrunningOperation> o) { | 808 checkUnnamed3235(core.List<api.GoogleLongrunningOperation> o) { |
741 unittest.expect(o, unittest.hasLength(2)); | 809 unittest.expect(o, unittest.hasLength(2)); |
742 checkGoogleLongrunningOperation(o[0]); | 810 checkGoogleLongrunningOperation(o[0]); |
743 checkGoogleLongrunningOperation(o[1]); | 811 checkGoogleLongrunningOperation(o[1]); |
744 } | 812 } |
745 | 813 |
746 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; | 814 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; |
747 buildGoogleLongrunningListOperationsResponse() { | 815 buildGoogleLongrunningListOperationsResponse() { |
748 var o = new api.GoogleLongrunningListOperationsResponse(); | 816 var o = new api.GoogleLongrunningListOperationsResponse(); |
749 buildCounterGoogleLongrunningListOperationsResponse++; | 817 buildCounterGoogleLongrunningListOperationsResponse++; |
750 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 818 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
751 o.nextPageToken = "foo"; | 819 o.nextPageToken = "foo"; |
752 o.operations = buildUnnamed3145(); | 820 o.operations = buildUnnamed3235(); |
753 } | 821 } |
754 buildCounterGoogleLongrunningListOperationsResponse--; | 822 buildCounterGoogleLongrunningListOperationsResponse--; |
755 return o; | 823 return o; |
756 } | 824 } |
757 | 825 |
758 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { | 826 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { |
759 buildCounterGoogleLongrunningListOperationsResponse++; | 827 buildCounterGoogleLongrunningListOperationsResponse++; |
760 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 828 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
761 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 829 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
762 checkUnnamed3145(o.operations); | 830 checkUnnamed3235(o.operations); |
763 } | 831 } |
764 buildCounterGoogleLongrunningListOperationsResponse--; | 832 buildCounterGoogleLongrunningListOperationsResponse--; |
765 } | 833 } |
766 | 834 |
767 buildUnnamed3146() { | 835 buildUnnamed3236() { |
768 var o = new core.Map<core.String, core.Object>(); | 836 var o = new core.Map<core.String, core.Object>(); |
769 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 837 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
770 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 838 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
771 return o; | 839 return o; |
772 } | 840 } |
773 | 841 |
774 checkUnnamed3146(core.Map<core.String, core.Object> o) { | 842 checkUnnamed3236(core.Map<core.String, core.Object> o) { |
775 unittest.expect(o, unittest.hasLength(2)); | 843 unittest.expect(o, unittest.hasLength(2)); |
776 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 844 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
777 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 845 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
778 } | 846 } |
779 | 847 |
780 buildUnnamed3147() { | 848 buildUnnamed3237() { |
781 var o = new core.Map<core.String, core.Object>(); | 849 var o = new core.Map<core.String, core.Object>(); |
782 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 850 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
783 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 851 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
784 return o; | 852 return o; |
785 } | 853 } |
786 | 854 |
787 checkUnnamed3147(core.Map<core.String, core.Object> o) { | 855 checkUnnamed3237(core.Map<core.String, core.Object> o) { |
788 unittest.expect(o, unittest.hasLength(2)); | 856 unittest.expect(o, unittest.hasLength(2)); |
789 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')); | 857 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')); |
790 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')); | 858 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')); |
791 } | 859 } |
792 | 860 |
793 core.int buildCounterGoogleLongrunningOperation = 0; | 861 core.int buildCounterGoogleLongrunningOperation = 0; |
794 buildGoogleLongrunningOperation() { | 862 buildGoogleLongrunningOperation() { |
795 var o = new api.GoogleLongrunningOperation(); | 863 var o = new api.GoogleLongrunningOperation(); |
796 buildCounterGoogleLongrunningOperation++; | 864 buildCounterGoogleLongrunningOperation++; |
797 if (buildCounterGoogleLongrunningOperation < 3) { | 865 if (buildCounterGoogleLongrunningOperation < 3) { |
798 o.done = true; | 866 o.done = true; |
799 o.error = buildGoogleRpcStatus(); | 867 o.error = buildGoogleRpcStatus(); |
800 o.metadata = buildUnnamed3146(); | 868 o.metadata = buildUnnamed3236(); |
801 o.name = "foo"; | 869 o.name = "foo"; |
802 o.response = buildUnnamed3147(); | 870 o.response = buildUnnamed3237(); |
803 } | 871 } |
804 buildCounterGoogleLongrunningOperation--; | 872 buildCounterGoogleLongrunningOperation--; |
805 return o; | 873 return o; |
806 } | 874 } |
807 | 875 |
808 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { | 876 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { |
809 buildCounterGoogleLongrunningOperation++; | 877 buildCounterGoogleLongrunningOperation++; |
810 if (buildCounterGoogleLongrunningOperation < 3) { | 878 if (buildCounterGoogleLongrunningOperation < 3) { |
811 unittest.expect(o.done, unittest.isTrue); | 879 unittest.expect(o.done, unittest.isTrue); |
812 checkGoogleRpcStatus(o.error); | 880 checkGoogleRpcStatus(o.error); |
813 checkUnnamed3146(o.metadata); | 881 checkUnnamed3236(o.metadata); |
814 unittest.expect(o.name, unittest.equals('foo')); | 882 unittest.expect(o.name, unittest.equals('foo')); |
815 checkUnnamed3147(o.response); | 883 checkUnnamed3237(o.response); |
816 } | 884 } |
817 buildCounterGoogleLongrunningOperation--; | 885 buildCounterGoogleLongrunningOperation--; |
818 } | 886 } |
819 | 887 |
820 core.int buildCounterGoogleProtobufEmpty = 0; | 888 core.int buildCounterGoogleProtobufEmpty = 0; |
821 buildGoogleProtobufEmpty() { | 889 buildGoogleProtobufEmpty() { |
822 var o = new api.GoogleProtobufEmpty(); | 890 var o = new api.GoogleProtobufEmpty(); |
823 buildCounterGoogleProtobufEmpty++; | 891 buildCounterGoogleProtobufEmpty++; |
824 if (buildCounterGoogleProtobufEmpty < 3) { | 892 if (buildCounterGoogleProtobufEmpty < 3) { |
825 } | 893 } |
826 buildCounterGoogleProtobufEmpty--; | 894 buildCounterGoogleProtobufEmpty--; |
827 return o; | 895 return o; |
828 } | 896 } |
829 | 897 |
830 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { | 898 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { |
831 buildCounterGoogleProtobufEmpty++; | 899 buildCounterGoogleProtobufEmpty++; |
832 if (buildCounterGoogleProtobufEmpty < 3) { | 900 if (buildCounterGoogleProtobufEmpty < 3) { |
833 } | 901 } |
834 buildCounterGoogleProtobufEmpty--; | 902 buildCounterGoogleProtobufEmpty--; |
835 } | 903 } |
836 | 904 |
837 buildUnnamed3148() { | 905 buildUnnamed3238() { |
838 var o = new core.Map<core.String, core.Object>(); | 906 var o = new core.Map<core.String, core.Object>(); |
839 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 907 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
840 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 908 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
841 return o; | 909 return o; |
842 } | 910 } |
843 | 911 |
844 checkUnnamed3148(core.Map<core.String, core.Object> o) { | 912 checkUnnamed3238(core.Map<core.String, core.Object> o) { |
845 unittest.expect(o, unittest.hasLength(2)); | 913 unittest.expect(o, unittest.hasLength(2)); |
846 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')); | 914 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')); |
847 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')); | 915 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')); |
848 } | 916 } |
849 | 917 |
850 buildUnnamed3149() { | 918 buildUnnamed3239() { |
851 var o = new core.List<core.Map<core.String, core.Object>>(); | 919 var o = new core.List<core.Map<core.String, core.Object>>(); |
852 o.add(buildUnnamed3148()); | 920 o.add(buildUnnamed3238()); |
853 o.add(buildUnnamed3148()); | 921 o.add(buildUnnamed3238()); |
854 return o; | 922 return o; |
855 } | 923 } |
856 | 924 |
857 checkUnnamed3149(core.List<core.Map<core.String, core.Object>> o) { | 925 checkUnnamed3239(core.List<core.Map<core.String, core.Object>> o) { |
858 unittest.expect(o, unittest.hasLength(2)); | 926 unittest.expect(o, unittest.hasLength(2)); |
859 checkUnnamed3148(o[0]); | 927 checkUnnamed3238(o[0]); |
860 checkUnnamed3148(o[1]); | 928 checkUnnamed3238(o[1]); |
861 } | 929 } |
862 | 930 |
863 core.int buildCounterGoogleRpcStatus = 0; | 931 core.int buildCounterGoogleRpcStatus = 0; |
864 buildGoogleRpcStatus() { | 932 buildGoogleRpcStatus() { |
865 var o = new api.GoogleRpcStatus(); | 933 var o = new api.GoogleRpcStatus(); |
866 buildCounterGoogleRpcStatus++; | 934 buildCounterGoogleRpcStatus++; |
867 if (buildCounterGoogleRpcStatus < 3) { | 935 if (buildCounterGoogleRpcStatus < 3) { |
868 o.code = 42; | 936 o.code = 42; |
869 o.details = buildUnnamed3149(); | 937 o.details = buildUnnamed3239(); |
870 o.message = "foo"; | 938 o.message = "foo"; |
871 } | 939 } |
872 buildCounterGoogleRpcStatus--; | 940 buildCounterGoogleRpcStatus--; |
873 return o; | 941 return o; |
874 } | 942 } |
875 | 943 |
876 checkGoogleRpcStatus(api.GoogleRpcStatus o) { | 944 checkGoogleRpcStatus(api.GoogleRpcStatus o) { |
877 buildCounterGoogleRpcStatus++; | 945 buildCounterGoogleRpcStatus++; |
878 if (buildCounterGoogleRpcStatus < 3) { | 946 if (buildCounterGoogleRpcStatus < 3) { |
879 unittest.expect(o.code, unittest.equals(42)); | 947 unittest.expect(o.code, unittest.equals(42)); |
880 checkUnnamed3149(o.details); | 948 checkUnnamed3239(o.details); |
881 unittest.expect(o.message, unittest.equals('foo')); | 949 unittest.expect(o.message, unittest.equals('foo')); |
882 } | 950 } |
883 buildCounterGoogleRpcStatus--; | 951 buildCounterGoogleRpcStatus--; |
884 } | 952 } |
885 | 953 |
886 | 954 |
887 main() { | 955 main() { |
888 unittest.group("obj-schema-GoogleApiHttpBody", () { | 956 unittest.group("obj-schema-GoogleApiHttpBody", () { |
889 unittest.test("to-json--from-json", () { | 957 unittest.test("to-json--from-json", () { |
890 var o = buildGoogleApiHttpBody(); | 958 var o = buildGoogleApiHttpBody(); |
891 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); | 959 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); |
892 checkGoogleApiHttpBody(od); | 960 checkGoogleApiHttpBody(od); |
893 }); | 961 }); |
894 }); | 962 }); |
895 | 963 |
896 | 964 |
| 965 unittest.group("obj-schema-GoogleCloudMlV1OperationMetadata", () { |
| 966 unittest.test("to-json--from-json", () { |
| 967 var o = buildGoogleCloudMlV1OperationMetadata(); |
| 968 var od = new api.GoogleCloudMlV1OperationMetadata.fromJson(o.toJson()); |
| 969 checkGoogleCloudMlV1OperationMetadata(od); |
| 970 }); |
| 971 }); |
| 972 |
| 973 |
| 974 unittest.group("obj-schema-GoogleCloudMlV1Version", () { |
| 975 unittest.test("to-json--from-json", () { |
| 976 var o = buildGoogleCloudMlV1Version(); |
| 977 var od = new api.GoogleCloudMlV1Version.fromJson(o.toJson()); |
| 978 checkGoogleCloudMlV1Version(od); |
| 979 }); |
| 980 }); |
| 981 |
| 982 |
897 unittest.group("obj-schema-GoogleCloudMlV1beta1HyperparameterOutputHyperparame
terMetric", () { | 983 unittest.group("obj-schema-GoogleCloudMlV1beta1HyperparameterOutputHyperparame
terMetric", () { |
898 unittest.test("to-json--from-json", () { | 984 unittest.test("to-json--from-json", () { |
899 var o = buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(
); | 985 var o = buildGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(
); |
900 var od = new api.GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMet
ric.fromJson(o.toJson()); | 986 var od = new api.GoogleCloudMlV1beta1HyperparameterOutputHyperparameterMet
ric.fromJson(o.toJson()); |
901 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(od); | 987 checkGoogleCloudMlV1beta1HyperparameterOutputHyperparameterMetric(od); |
902 }); | 988 }); |
903 }); | 989 }); |
904 | 990 |
905 | 991 |
906 unittest.group("obj-schema-GoogleCloudMlV1beta1CancelJobRequest", () { | 992 unittest.group("obj-schema-GoogleCloudMlV1beta1CancelJobRequest", () { |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Job
response) { | 1427 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Job
response) { |
1342 checkGoogleCloudMlV1beta1Job(response); | 1428 checkGoogleCloudMlV1beta1Job(response); |
1343 }))); | 1429 }))); |
1344 }); | 1430 }); |
1345 | 1431 |
1346 unittest.test("method--list", () { | 1432 unittest.test("method--list", () { |
1347 | 1433 |
1348 var mock = new HttpServerMock(); | 1434 var mock = new HttpServerMock(); |
1349 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 1435 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
1350 var arg_parent = "foo"; | 1436 var arg_parent = "foo"; |
1351 var arg_pageSize = 42; | |
1352 var arg_filter = "foo"; | 1437 var arg_filter = "foo"; |
1353 var arg_pageToken = "foo"; | 1438 var arg_pageToken = "foo"; |
| 1439 var arg_pageSize = 42; |
1354 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1440 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1355 var path = (req.url).path; | 1441 var path = (req.url).path; |
1356 var pathOffset = 0; | 1442 var pathOffset = 0; |
1357 var index; | 1443 var index; |
1358 var subPart; | 1444 var subPart; |
1359 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1360 pathOffset += 1; | 1446 pathOffset += 1; |
1361 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1447 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1362 pathOffset += 8; | 1448 pathOffset += 8; |
1363 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1449 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1364 | 1450 |
1365 var query = (req.url).query; | 1451 var query = (req.url).query; |
1366 var queryOffset = 0; | 1452 var queryOffset = 0; |
1367 var queryMap = {}; | 1453 var queryMap = {}; |
1368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1369 parseBool(n) { | 1455 parseBool(n) { |
1370 if (n == "true") return true; | 1456 if (n == "true") return true; |
1371 if (n == "false") return false; | 1457 if (n == "false") return false; |
1372 if (n == null) return null; | 1458 if (n == null) return null; |
1373 throw new core.ArgumentError("Invalid boolean: $n"); | 1459 throw new core.ArgumentError("Invalid boolean: $n"); |
1374 } | 1460 } |
1375 if (query.length > 0) { | 1461 if (query.length > 0) { |
1376 for (var part in query.split("&")) { | 1462 for (var part in query.split("&")) { |
1377 var keyvalue = part.split("="); | 1463 var keyvalue = part.split("="); |
1378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1379 } | 1465 } |
1380 } | 1466 } |
1381 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1382 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1467 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1383 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1468 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1469 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1384 | 1470 |
1385 | 1471 |
1386 var h = { | 1472 var h = { |
1387 "content-type" : "application/json; charset=utf-8", | 1473 "content-type" : "application/json; charset=utf-8", |
1388 }; | 1474 }; |
1389 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListJobsResponse
()); | 1475 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListJobsResponse
()); |
1390 return new async.Future.value(stringResponse(200, h, resp)); | 1476 return new async.Future.value(stringResponse(200, h, resp)); |
1391 }), true); | 1477 }), true); |
1392 res.list(arg_parent, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListJobsRes
ponse response) { | 1478 res.list(arg_parent, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListJobsRes
ponse response) { |
1393 checkGoogleCloudMlV1beta1ListJobsResponse(response); | 1479 checkGoogleCloudMlV1beta1ListJobsResponse(response); |
1394 }))); | 1480 }))); |
1395 }); | 1481 }); |
1396 | 1482 |
1397 }); | 1483 }); |
1398 | 1484 |
1399 | 1485 |
1400 unittest.group("resource-ProjectsModelsResourceApi", () { | 1486 unittest.group("resource-ProjectsModelsResourceApi", () { |
1401 unittest.test("method--create", () { | 1487 unittest.test("method--create", () { |
1402 | 1488 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Mode
l response) { | 1621 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Mode
l response) { |
1536 checkGoogleCloudMlV1beta1Model(response); | 1622 checkGoogleCloudMlV1beta1Model(response); |
1537 }))); | 1623 }))); |
1538 }); | 1624 }); |
1539 | 1625 |
1540 unittest.test("method--list", () { | 1626 unittest.test("method--list", () { |
1541 | 1627 |
1542 var mock = new HttpServerMock(); | 1628 var mock = new HttpServerMock(); |
1543 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 1629 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
1544 var arg_parent = "foo"; | 1630 var arg_parent = "foo"; |
| 1631 var arg_pageToken = "foo"; |
1545 var arg_pageSize = 42; | 1632 var arg_pageSize = 42; |
1546 var arg_pageToken = "foo"; | |
1547 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1633 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1548 var path = (req.url).path; | 1634 var path = (req.url).path; |
1549 var pathOffset = 0; | 1635 var pathOffset = 0; |
1550 var index; | 1636 var index; |
1551 var subPart; | 1637 var subPart; |
1552 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1638 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1553 pathOffset += 1; | 1639 pathOffset += 1; |
1554 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1640 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1555 pathOffset += 8; | 1641 pathOffset += 8; |
1556 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1642 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1557 | 1643 |
1558 var query = (req.url).query; | 1644 var query = (req.url).query; |
1559 var queryOffset = 0; | 1645 var queryOffset = 0; |
1560 var queryMap = {}; | 1646 var queryMap = {}; |
1561 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1647 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1562 parseBool(n) { | 1648 parseBool(n) { |
1563 if (n == "true") return true; | 1649 if (n == "true") return true; |
1564 if (n == "false") return false; | 1650 if (n == "false") return false; |
1565 if (n == null) return null; | 1651 if (n == null) return null; |
1566 throw new core.ArgumentError("Invalid boolean: $n"); | 1652 throw new core.ArgumentError("Invalid boolean: $n"); |
1567 } | 1653 } |
1568 if (query.length > 0) { | 1654 if (query.length > 0) { |
1569 for (var part in query.split("&")) { | 1655 for (var part in query.split("&")) { |
1570 var keyvalue = part.split("="); | 1656 var keyvalue = part.split("="); |
1571 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1657 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1572 } | 1658 } |
1573 } | 1659 } |
| 1660 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1574 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1661 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1575 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1576 | 1662 |
1577 | 1663 |
1578 var h = { | 1664 var h = { |
1579 "content-type" : "application/json; charset=utf-8", | 1665 "content-type" : "application/json; charset=utf-8", |
1580 }; | 1666 }; |
1581 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListModelsRespon
se()); | 1667 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListModelsRespon
se()); |
1582 return new async.Future.value(stringResponse(200, h, resp)); | 1668 return new async.Future.value(stringResponse(200, h, resp)); |
1583 }), true); | 1669 }), true); |
1584 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListModelsResponse response) { | 1670 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListModelsResponse response) { |
1585 checkGoogleCloudMlV1beta1ListModelsResponse(response); | 1671 checkGoogleCloudMlV1beta1ListModelsResponse(response); |
1586 }))); | 1672 }))); |
1587 }); | 1673 }); |
1588 | 1674 |
1589 }); | 1675 }); |
1590 | 1676 |
1591 | 1677 |
1592 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { | 1678 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { |
1593 unittest.test("method--create", () { | 1679 unittest.test("method--create", () { |
1594 | 1680 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Vers
ion response) { | 1813 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1beta1Vers
ion response) { |
1728 checkGoogleCloudMlV1beta1Version(response); | 1814 checkGoogleCloudMlV1beta1Version(response); |
1729 }))); | 1815 }))); |
1730 }); | 1816 }); |
1731 | 1817 |
1732 unittest.test("method--list", () { | 1818 unittest.test("method--list", () { |
1733 | 1819 |
1734 var mock = new HttpServerMock(); | 1820 var mock = new HttpServerMock(); |
1735 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1821 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
1736 var arg_parent = "foo"; | 1822 var arg_parent = "foo"; |
| 1823 var arg_pageToken = "foo"; |
1737 var arg_pageSize = 42; | 1824 var arg_pageSize = 42; |
1738 var arg_pageToken = "foo"; | |
1739 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1825 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1740 var path = (req.url).path; | 1826 var path = (req.url).path; |
1741 var pathOffset = 0; | 1827 var pathOffset = 0; |
1742 var index; | 1828 var index; |
1743 var subPart; | 1829 var subPart; |
1744 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1830 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1745 pathOffset += 1; | 1831 pathOffset += 1; |
1746 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 1832 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1747 pathOffset += 8; | 1833 pathOffset += 8; |
1748 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1834 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1749 | 1835 |
1750 var query = (req.url).query; | 1836 var query = (req.url).query; |
1751 var queryOffset = 0; | 1837 var queryOffset = 0; |
1752 var queryMap = {}; | 1838 var queryMap = {}; |
1753 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1839 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1754 parseBool(n) { | 1840 parseBool(n) { |
1755 if (n == "true") return true; | 1841 if (n == "true") return true; |
1756 if (n == "false") return false; | 1842 if (n == "false") return false; |
1757 if (n == null) return null; | 1843 if (n == null) return null; |
1758 throw new core.ArgumentError("Invalid boolean: $n"); | 1844 throw new core.ArgumentError("Invalid boolean: $n"); |
1759 } | 1845 } |
1760 if (query.length > 0) { | 1846 if (query.length > 0) { |
1761 for (var part in query.split("&")) { | 1847 for (var part in query.split("&")) { |
1762 var keyvalue = part.split("="); | 1848 var keyvalue = part.split("="); |
1763 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1849 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1764 } | 1850 } |
1765 } | 1851 } |
| 1852 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1766 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1853 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
1767 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1768 | 1854 |
1769 | 1855 |
1770 var h = { | 1856 var h = { |
1771 "content-type" : "application/json; charset=utf-8", | 1857 "content-type" : "application/json; charset=utf-8", |
1772 }; | 1858 }; |
1773 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListVersionsResp
onse()); | 1859 var resp = convert.JSON.encode(buildGoogleCloudMlV1beta1ListVersionsResp
onse()); |
1774 return new async.Future.value(stringResponse(200, h, resp)); | 1860 return new async.Future.value(stringResponse(200, h, resp)); |
1775 }), true); | 1861 }), true); |
1776 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListVersionsResponse response)
{ | 1862 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.GoogleCloudMlV1beta1ListVersionsResponse response)
{ |
1777 checkGoogleCloudMlV1beta1ListVersionsResponse(response); | 1863 checkGoogleCloudMlV1beta1ListVersionsResponse(response); |
1778 }))); | 1864 }))); |
1779 }); | 1865 }); |
1780 | 1866 |
1781 unittest.test("method--setDefault", () { | 1867 unittest.test("method--setDefault", () { |
1782 | 1868 |
1783 var mock = new HttpServerMock(); | 1869 var mock = new HttpServerMock(); |
1784 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1870 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
1785 var arg_request = buildGoogleCloudMlV1beta1SetDefaultVersionRequest(); | 1871 var arg_request = buildGoogleCloudMlV1beta1SetDefaultVersionRequest(); |
1786 var arg_name = "foo"; | 1872 var arg_name = "foo"; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 res.get(arg_name).then(unittest.expectAsync(((api.GoogleLongrunningOperati
on response) { | 2050 res.get(arg_name).then(unittest.expectAsync(((api.GoogleLongrunningOperati
on response) { |
1965 checkGoogleLongrunningOperation(response); | 2051 checkGoogleLongrunningOperation(response); |
1966 }))); | 2052 }))); |
1967 }); | 2053 }); |
1968 | 2054 |
1969 unittest.test("method--list", () { | 2055 unittest.test("method--list", () { |
1970 | 2056 |
1971 var mock = new HttpServerMock(); | 2057 var mock = new HttpServerMock(); |
1972 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; | 2058 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; |
1973 var arg_name = "foo"; | 2059 var arg_name = "foo"; |
1974 var arg_pageSize = 42; | |
1975 var arg_filter = "foo"; | 2060 var arg_filter = "foo"; |
1976 var arg_pageToken = "foo"; | 2061 var arg_pageToken = "foo"; |
| 2062 var arg_pageSize = 42; |
1977 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1978 var path = (req.url).path; | 2064 var path = (req.url).path; |
1979 var pathOffset = 0; | 2065 var pathOffset = 0; |
1980 var index; | 2066 var index; |
1981 var subPart; | 2067 var subPart; |
1982 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2068 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1983 pathOffset += 1; | 2069 pathOffset += 1; |
1984 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); | 2070 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1beta1/")); |
1985 pathOffset += 8; | 2071 pathOffset += 8; |
1986 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2072 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1987 | 2073 |
1988 var query = (req.url).query; | 2074 var query = (req.url).query; |
1989 var queryOffset = 0; | 2075 var queryOffset = 0; |
1990 var queryMap = {}; | 2076 var queryMap = {}; |
1991 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2077 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1992 parseBool(n) { | 2078 parseBool(n) { |
1993 if (n == "true") return true; | 2079 if (n == "true") return true; |
1994 if (n == "false") return false; | 2080 if (n == "false") return false; |
1995 if (n == null) return null; | 2081 if (n == null) return null; |
1996 throw new core.ArgumentError("Invalid boolean: $n"); | 2082 throw new core.ArgumentError("Invalid boolean: $n"); |
1997 } | 2083 } |
1998 if (query.length > 0) { | 2084 if (query.length > 0) { |
1999 for (var part in query.split("&")) { | 2085 for (var part in query.split("&")) { |
2000 var keyvalue = part.split("="); | 2086 var keyvalue = part.split("="); |
2001 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2087 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2002 } | 2088 } |
2003 } | 2089 } |
2004 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
2005 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2090 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2006 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2091 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2092 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2007 | 2093 |
2008 | 2094 |
2009 var h = { | 2095 var h = { |
2010 "content-type" : "application/json; charset=utf-8", | 2096 "content-type" : "application/json; charset=utf-8", |
2011 }; | 2097 }; |
2012 var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsRespo
nse()); | 2098 var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsRespo
nse()); |
2013 return new async.Future.value(stringResponse(200, h, resp)); | 2099 return new async.Future.value(stringResponse(200, h, resp)); |
2014 }), true); | 2100 }), true); |
2015 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.GoogleLongrunningListOperationsRe
sponse response) { | 2101 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync(((api.GoogleLongrunningListOperationsRe
sponse response) { |
2016 checkGoogleLongrunningListOperationsResponse(response); | 2102 checkGoogleLongrunningListOperationsResponse(response); |
2017 }))); | 2103 }))); |
2018 }); | 2104 }); |
2019 | 2105 |
2020 }); | 2106 }); |
2021 | 2107 |
2022 | 2108 |
2023 } | 2109 } |
2024 | 2110 |
OLD | NEW |