| 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:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis/ml/v1.dart' as api; | 12 import 'package:googleapis/ml/v1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed0() { |
| 55 var o = new core.Map<core.String, core.Object>(); |
| 56 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 57 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 58 return o; |
| 59 } |
| 60 |
| 61 checkUnnamed0(core.Map<core.String, core.Object> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 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')); |
| 64 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')); |
| 65 } |
| 66 |
| 67 buildUnnamed1() { |
| 68 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 69 o.add(buildUnnamed0()); |
| 70 o.add(buildUnnamed0()); |
| 71 return o; |
| 72 } |
| 73 |
| 74 checkUnnamed1(core.List<core.Map<core.String, core.Object>> o) { |
| 75 unittest.expect(o, unittest.hasLength(2)); |
| 76 checkUnnamed0(o[0]); |
| 77 checkUnnamed0(o[1]); |
| 78 } |
| 79 |
| 54 core.int buildCounterGoogleApiHttpBody = 0; | 80 core.int buildCounterGoogleApiHttpBody = 0; |
| 55 buildGoogleApiHttpBody() { | 81 buildGoogleApiHttpBody() { |
| 56 var o = new api.GoogleApiHttpBody(); | 82 var o = new api.GoogleApiHttpBody(); |
| 57 buildCounterGoogleApiHttpBody++; | 83 buildCounterGoogleApiHttpBody++; |
| 58 if (buildCounterGoogleApiHttpBody < 3) { | 84 if (buildCounterGoogleApiHttpBody < 3) { |
| 59 o.contentType = "foo"; | 85 o.contentType = "foo"; |
| 60 o.data = "foo"; | 86 o.data = "foo"; |
| 87 o.extensions = buildUnnamed1(); |
| 61 } | 88 } |
| 62 buildCounterGoogleApiHttpBody--; | 89 buildCounterGoogleApiHttpBody--; |
| 63 return o; | 90 return o; |
| 64 } | 91 } |
| 65 | 92 |
| 66 checkGoogleApiHttpBody(api.GoogleApiHttpBody o) { | 93 checkGoogleApiHttpBody(api.GoogleApiHttpBody o) { |
| 67 buildCounterGoogleApiHttpBody++; | 94 buildCounterGoogleApiHttpBody++; |
| 68 if (buildCounterGoogleApiHttpBody < 3) { | 95 if (buildCounterGoogleApiHttpBody < 3) { |
| 69 unittest.expect(o.contentType, unittest.equals('foo')); | 96 unittest.expect(o.contentType, unittest.equals('foo')); |
| 70 unittest.expect(o.data, unittest.equals('foo')); | 97 unittest.expect(o.data, unittest.equals('foo')); |
| 98 checkUnnamed1(o.extensions); |
| 71 } | 99 } |
| 72 buildCounterGoogleApiHttpBody--; | 100 buildCounterGoogleApiHttpBody--; |
| 73 } | 101 } |
| 74 | 102 |
| 75 core.int buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric = 0
; | 103 core.int buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric = 0
; |
| 76 buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric() { | 104 buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric() { |
| 77 var o = new api.GoogleCloudMlV1HyperparameterOutputHyperparameterMetric(); | 105 var o = new api.GoogleCloudMlV1HyperparameterOutputHyperparameterMetric(); |
| 78 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric++; | 106 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric++; |
| 79 if (buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric < 3) { | 107 if (buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric < 3) { |
| 80 o.objectiveValue = 42.0; | 108 o.objectiveValue = 42.0; |
| 81 o.trainingStep = "foo"; | 109 o.trainingStep = "foo"; |
| 82 } | 110 } |
| 83 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric--; | 111 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric--; |
| 84 return o; | 112 return o; |
| 85 } | 113 } |
| 86 | 114 |
| 87 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(api.GoogleCloudMlV1
HyperparameterOutputHyperparameterMetric o) { | 115 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(api.GoogleCloudMlV1
HyperparameterOutputHyperparameterMetric o) { |
| 88 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric++; | 116 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric++; |
| 89 if (buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric < 3) { | 117 if (buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric < 3) { |
| 90 unittest.expect(o.objectiveValue, unittest.equals(42.0)); | 118 unittest.expect(o.objectiveValue, unittest.equals(42.0)); |
| 91 unittest.expect(o.trainingStep, unittest.equals('foo')); | 119 unittest.expect(o.trainingStep, unittest.equals('foo')); |
| 92 } | 120 } |
| 93 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric--; | 121 buildCounterGoogleCloudMlV1HyperparameterOutputHyperparameterMetric--; |
| 94 } | 122 } |
| 95 | 123 |
| 124 core.int buildCounterGoogleCloudMlV1AutomaticScaling = 0; |
| 125 buildGoogleCloudMlV1AutomaticScaling() { |
| 126 var o = new api.GoogleCloudMlV1AutomaticScaling(); |
| 127 buildCounterGoogleCloudMlV1AutomaticScaling++; |
| 128 if (buildCounterGoogleCloudMlV1AutomaticScaling < 3) { |
| 129 o.minNodes = 42; |
| 130 } |
| 131 buildCounterGoogleCloudMlV1AutomaticScaling--; |
| 132 return o; |
| 133 } |
| 134 |
| 135 checkGoogleCloudMlV1AutomaticScaling(api.GoogleCloudMlV1AutomaticScaling o) { |
| 136 buildCounterGoogleCloudMlV1AutomaticScaling++; |
| 137 if (buildCounterGoogleCloudMlV1AutomaticScaling < 3) { |
| 138 unittest.expect(o.minNodes, unittest.equals(42)); |
| 139 } |
| 140 buildCounterGoogleCloudMlV1AutomaticScaling--; |
| 141 } |
| 142 |
| 96 core.int buildCounterGoogleCloudMlV1CancelJobRequest = 0; | 143 core.int buildCounterGoogleCloudMlV1CancelJobRequest = 0; |
| 97 buildGoogleCloudMlV1CancelJobRequest() { | 144 buildGoogleCloudMlV1CancelJobRequest() { |
| 98 var o = new api.GoogleCloudMlV1CancelJobRequest(); | 145 var o = new api.GoogleCloudMlV1CancelJobRequest(); |
| 99 buildCounterGoogleCloudMlV1CancelJobRequest++; | 146 buildCounterGoogleCloudMlV1CancelJobRequest++; |
| 100 if (buildCounterGoogleCloudMlV1CancelJobRequest < 3) { | 147 if (buildCounterGoogleCloudMlV1CancelJobRequest < 3) { |
| 101 } | 148 } |
| 102 buildCounterGoogleCloudMlV1CancelJobRequest--; | 149 buildCounterGoogleCloudMlV1CancelJobRequest--; |
| 103 return o; | 150 return o; |
| 104 } | 151 } |
| 105 | 152 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 124 | 171 |
| 125 checkGoogleCloudMlV1GetConfigResponse(api.GoogleCloudMlV1GetConfigResponse o) { | 172 checkGoogleCloudMlV1GetConfigResponse(api.GoogleCloudMlV1GetConfigResponse o) { |
| 126 buildCounterGoogleCloudMlV1GetConfigResponse++; | 173 buildCounterGoogleCloudMlV1GetConfigResponse++; |
| 127 if (buildCounterGoogleCloudMlV1GetConfigResponse < 3) { | 174 if (buildCounterGoogleCloudMlV1GetConfigResponse < 3) { |
| 128 unittest.expect(o.serviceAccount, unittest.equals('foo')); | 175 unittest.expect(o.serviceAccount, unittest.equals('foo')); |
| 129 unittest.expect(o.serviceAccountProject, unittest.equals('foo')); | 176 unittest.expect(o.serviceAccountProject, unittest.equals('foo')); |
| 130 } | 177 } |
| 131 buildCounterGoogleCloudMlV1GetConfigResponse--; | 178 buildCounterGoogleCloudMlV1GetConfigResponse--; |
| 132 } | 179 } |
| 133 | 180 |
| 134 buildUnnamed0() { | 181 buildUnnamed2() { |
| 135 var o = new core.List<api.GoogleCloudMlV1HyperparameterOutputHyperparameterMet
ric>(); | 182 var o = new core.List<api.GoogleCloudMlV1HyperparameterOutputHyperparameterMet
ric>(); |
| 136 o.add(buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric()); | 183 o.add(buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric()); |
| 137 o.add(buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric()); | 184 o.add(buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric()); |
| 138 return o; | 185 return o; |
| 139 } | 186 } |
| 140 | 187 |
| 141 checkUnnamed0(core.List<api.GoogleCloudMlV1HyperparameterOutputHyperparameterMet
ric> o) { | 188 checkUnnamed2(core.List<api.GoogleCloudMlV1HyperparameterOutputHyperparameterMet
ric> o) { |
| 142 unittest.expect(o, unittest.hasLength(2)); | 189 unittest.expect(o, unittest.hasLength(2)); |
| 143 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o[0]); | 190 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o[0]); |
| 144 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o[1]); | 191 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o[1]); |
| 145 } | 192 } |
| 146 | 193 |
| 147 buildUnnamed1() { | 194 buildUnnamed3() { |
| 148 var o = new core.Map<core.String, core.String>(); | 195 var o = new core.Map<core.String, core.String>(); |
| 149 o["x"] = "foo"; | 196 o["x"] = "foo"; |
| 150 o["y"] = "foo"; | 197 o["y"] = "foo"; |
| 151 return o; | 198 return o; |
| 152 } | 199 } |
| 153 | 200 |
| 154 checkUnnamed1(core.Map<core.String, core.String> o) { | 201 checkUnnamed3(core.Map<core.String, core.String> o) { |
| 155 unittest.expect(o, unittest.hasLength(2)); | 202 unittest.expect(o, unittest.hasLength(2)); |
| 156 unittest.expect(o["x"], unittest.equals('foo')); | 203 unittest.expect(o["x"], unittest.equals('foo')); |
| 157 unittest.expect(o["y"], unittest.equals('foo')); | 204 unittest.expect(o["y"], unittest.equals('foo')); |
| 158 } | 205 } |
| 159 | 206 |
| 160 core.int buildCounterGoogleCloudMlV1HyperparameterOutput = 0; | 207 core.int buildCounterGoogleCloudMlV1HyperparameterOutput = 0; |
| 161 buildGoogleCloudMlV1HyperparameterOutput() { | 208 buildGoogleCloudMlV1HyperparameterOutput() { |
| 162 var o = new api.GoogleCloudMlV1HyperparameterOutput(); | 209 var o = new api.GoogleCloudMlV1HyperparameterOutput(); |
| 163 buildCounterGoogleCloudMlV1HyperparameterOutput++; | 210 buildCounterGoogleCloudMlV1HyperparameterOutput++; |
| 164 if (buildCounterGoogleCloudMlV1HyperparameterOutput < 3) { | 211 if (buildCounterGoogleCloudMlV1HyperparameterOutput < 3) { |
| 165 o.allMetrics = buildUnnamed0(); | 212 o.allMetrics = buildUnnamed2(); |
| 166 o.finalMetric = buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric
(); | 213 o.finalMetric = buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric
(); |
| 167 o.hyperparameters = buildUnnamed1(); | 214 o.hyperparameters = buildUnnamed3(); |
| 168 o.trialId = "foo"; | 215 o.trialId = "foo"; |
| 169 } | 216 } |
| 170 buildCounterGoogleCloudMlV1HyperparameterOutput--; | 217 buildCounterGoogleCloudMlV1HyperparameterOutput--; |
| 171 return o; | 218 return o; |
| 172 } | 219 } |
| 173 | 220 |
| 174 checkGoogleCloudMlV1HyperparameterOutput(api.GoogleCloudMlV1HyperparameterOutput
o) { | 221 checkGoogleCloudMlV1HyperparameterOutput(api.GoogleCloudMlV1HyperparameterOutput
o) { |
| 175 buildCounterGoogleCloudMlV1HyperparameterOutput++; | 222 buildCounterGoogleCloudMlV1HyperparameterOutput++; |
| 176 if (buildCounterGoogleCloudMlV1HyperparameterOutput < 3) { | 223 if (buildCounterGoogleCloudMlV1HyperparameterOutput < 3) { |
| 177 checkUnnamed0(o.allMetrics); | 224 checkUnnamed2(o.allMetrics); |
| 178 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o.finalMetric); | 225 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(o.finalMetric); |
| 179 checkUnnamed1(o.hyperparameters); | 226 checkUnnamed3(o.hyperparameters); |
| 180 unittest.expect(o.trialId, unittest.equals('foo')); | 227 unittest.expect(o.trialId, unittest.equals('foo')); |
| 181 } | 228 } |
| 182 buildCounterGoogleCloudMlV1HyperparameterOutput--; | 229 buildCounterGoogleCloudMlV1HyperparameterOutput--; |
| 183 } | 230 } |
| 184 | 231 |
| 185 buildUnnamed2() { | 232 buildUnnamed4() { |
| 186 var o = new core.List<api.GoogleCloudMlV1ParameterSpec>(); | 233 var o = new core.List<api.GoogleCloudMlV1ParameterSpec>(); |
| 187 o.add(buildGoogleCloudMlV1ParameterSpec()); | 234 o.add(buildGoogleCloudMlV1ParameterSpec()); |
| 188 o.add(buildGoogleCloudMlV1ParameterSpec()); | 235 o.add(buildGoogleCloudMlV1ParameterSpec()); |
| 189 return o; | 236 return o; |
| 190 } | 237 } |
| 191 | 238 |
| 192 checkUnnamed2(core.List<api.GoogleCloudMlV1ParameterSpec> o) { | 239 checkUnnamed4(core.List<api.GoogleCloudMlV1ParameterSpec> o) { |
| 193 unittest.expect(o, unittest.hasLength(2)); | 240 unittest.expect(o, unittest.hasLength(2)); |
| 194 checkGoogleCloudMlV1ParameterSpec(o[0]); | 241 checkGoogleCloudMlV1ParameterSpec(o[0]); |
| 195 checkGoogleCloudMlV1ParameterSpec(o[1]); | 242 checkGoogleCloudMlV1ParameterSpec(o[1]); |
| 196 } | 243 } |
| 197 | 244 |
| 198 core.int buildCounterGoogleCloudMlV1HyperparameterSpec = 0; | 245 core.int buildCounterGoogleCloudMlV1HyperparameterSpec = 0; |
| 199 buildGoogleCloudMlV1HyperparameterSpec() { | 246 buildGoogleCloudMlV1HyperparameterSpec() { |
| 200 var o = new api.GoogleCloudMlV1HyperparameterSpec(); | 247 var o = new api.GoogleCloudMlV1HyperparameterSpec(); |
| 201 buildCounterGoogleCloudMlV1HyperparameterSpec++; | 248 buildCounterGoogleCloudMlV1HyperparameterSpec++; |
| 202 if (buildCounterGoogleCloudMlV1HyperparameterSpec < 3) { | 249 if (buildCounterGoogleCloudMlV1HyperparameterSpec < 3) { |
| 203 o.goal = "foo"; | 250 o.goal = "foo"; |
| 204 o.hyperparameterMetricTag = "foo"; | 251 o.hyperparameterMetricTag = "foo"; |
| 205 o.maxParallelTrials = 42; | 252 o.maxParallelTrials = 42; |
| 206 o.maxTrials = 42; | 253 o.maxTrials = 42; |
| 207 o.params = buildUnnamed2(); | 254 o.params = buildUnnamed4(); |
| 208 } | 255 } |
| 209 buildCounterGoogleCloudMlV1HyperparameterSpec--; | 256 buildCounterGoogleCloudMlV1HyperparameterSpec--; |
| 210 return o; | 257 return o; |
| 211 } | 258 } |
| 212 | 259 |
| 213 checkGoogleCloudMlV1HyperparameterSpec(api.GoogleCloudMlV1HyperparameterSpec o)
{ | 260 checkGoogleCloudMlV1HyperparameterSpec(api.GoogleCloudMlV1HyperparameterSpec o)
{ |
| 214 buildCounterGoogleCloudMlV1HyperparameterSpec++; | 261 buildCounterGoogleCloudMlV1HyperparameterSpec++; |
| 215 if (buildCounterGoogleCloudMlV1HyperparameterSpec < 3) { | 262 if (buildCounterGoogleCloudMlV1HyperparameterSpec < 3) { |
| 216 unittest.expect(o.goal, unittest.equals('foo')); | 263 unittest.expect(o.goal, unittest.equals('foo')); |
| 217 unittest.expect(o.hyperparameterMetricTag, unittest.equals('foo')); | 264 unittest.expect(o.hyperparameterMetricTag, unittest.equals('foo')); |
| 218 unittest.expect(o.maxParallelTrials, unittest.equals(42)); | 265 unittest.expect(o.maxParallelTrials, unittest.equals(42)); |
| 219 unittest.expect(o.maxTrials, unittest.equals(42)); | 266 unittest.expect(o.maxTrials, unittest.equals(42)); |
| 220 checkUnnamed2(o.params); | 267 checkUnnamed4(o.params); |
| 221 } | 268 } |
| 222 buildCounterGoogleCloudMlV1HyperparameterSpec--; | 269 buildCounterGoogleCloudMlV1HyperparameterSpec--; |
| 223 } | 270 } |
| 224 | 271 |
| 225 core.int buildCounterGoogleCloudMlV1Job = 0; | 272 core.int buildCounterGoogleCloudMlV1Job = 0; |
| 226 buildGoogleCloudMlV1Job() { | 273 buildGoogleCloudMlV1Job() { |
| 227 var o = new api.GoogleCloudMlV1Job(); | 274 var o = new api.GoogleCloudMlV1Job(); |
| 228 buildCounterGoogleCloudMlV1Job++; | 275 buildCounterGoogleCloudMlV1Job++; |
| 229 if (buildCounterGoogleCloudMlV1Job < 3) { | 276 if (buildCounterGoogleCloudMlV1Job < 3) { |
| 230 o.createTime = "foo"; | 277 o.createTime = "foo"; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 252 checkGoogleCloudMlV1PredictionInput(o.predictionInput); | 299 checkGoogleCloudMlV1PredictionInput(o.predictionInput); |
| 253 checkGoogleCloudMlV1PredictionOutput(o.predictionOutput); | 300 checkGoogleCloudMlV1PredictionOutput(o.predictionOutput); |
| 254 unittest.expect(o.startTime, unittest.equals('foo')); | 301 unittest.expect(o.startTime, unittest.equals('foo')); |
| 255 unittest.expect(o.state, unittest.equals('foo')); | 302 unittest.expect(o.state, unittest.equals('foo')); |
| 256 checkGoogleCloudMlV1TrainingInput(o.trainingInput); | 303 checkGoogleCloudMlV1TrainingInput(o.trainingInput); |
| 257 checkGoogleCloudMlV1TrainingOutput(o.trainingOutput); | 304 checkGoogleCloudMlV1TrainingOutput(o.trainingOutput); |
| 258 } | 305 } |
| 259 buildCounterGoogleCloudMlV1Job--; | 306 buildCounterGoogleCloudMlV1Job--; |
| 260 } | 307 } |
| 261 | 308 |
| 262 buildUnnamed3() { | 309 buildUnnamed5() { |
| 263 var o = new core.List<api.GoogleCloudMlV1Job>(); | 310 var o = new core.List<api.GoogleCloudMlV1Job>(); |
| 264 o.add(buildGoogleCloudMlV1Job()); | 311 o.add(buildGoogleCloudMlV1Job()); |
| 265 o.add(buildGoogleCloudMlV1Job()); | 312 o.add(buildGoogleCloudMlV1Job()); |
| 266 return o; | 313 return o; |
| 267 } | 314 } |
| 268 | 315 |
| 269 checkUnnamed3(core.List<api.GoogleCloudMlV1Job> o) { | 316 checkUnnamed5(core.List<api.GoogleCloudMlV1Job> o) { |
| 270 unittest.expect(o, unittest.hasLength(2)); | 317 unittest.expect(o, unittest.hasLength(2)); |
| 271 checkGoogleCloudMlV1Job(o[0]); | 318 checkGoogleCloudMlV1Job(o[0]); |
| 272 checkGoogleCloudMlV1Job(o[1]); | 319 checkGoogleCloudMlV1Job(o[1]); |
| 273 } | 320 } |
| 274 | 321 |
| 275 core.int buildCounterGoogleCloudMlV1ListJobsResponse = 0; | 322 core.int buildCounterGoogleCloudMlV1ListJobsResponse = 0; |
| 276 buildGoogleCloudMlV1ListJobsResponse() { | 323 buildGoogleCloudMlV1ListJobsResponse() { |
| 277 var o = new api.GoogleCloudMlV1ListJobsResponse(); | 324 var o = new api.GoogleCloudMlV1ListJobsResponse(); |
| 278 buildCounterGoogleCloudMlV1ListJobsResponse++; | 325 buildCounterGoogleCloudMlV1ListJobsResponse++; |
| 279 if (buildCounterGoogleCloudMlV1ListJobsResponse < 3) { | 326 if (buildCounterGoogleCloudMlV1ListJobsResponse < 3) { |
| 280 o.jobs = buildUnnamed3(); | 327 o.jobs = buildUnnamed5(); |
| 281 o.nextPageToken = "foo"; | 328 o.nextPageToken = "foo"; |
| 282 } | 329 } |
| 283 buildCounterGoogleCloudMlV1ListJobsResponse--; | 330 buildCounterGoogleCloudMlV1ListJobsResponse--; |
| 284 return o; | 331 return o; |
| 285 } | 332 } |
| 286 | 333 |
| 287 checkGoogleCloudMlV1ListJobsResponse(api.GoogleCloudMlV1ListJobsResponse o) { | 334 checkGoogleCloudMlV1ListJobsResponse(api.GoogleCloudMlV1ListJobsResponse o) { |
| 288 buildCounterGoogleCloudMlV1ListJobsResponse++; | 335 buildCounterGoogleCloudMlV1ListJobsResponse++; |
| 289 if (buildCounterGoogleCloudMlV1ListJobsResponse < 3) { | 336 if (buildCounterGoogleCloudMlV1ListJobsResponse < 3) { |
| 290 checkUnnamed3(o.jobs); | 337 checkUnnamed5(o.jobs); |
| 291 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 338 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 292 } | 339 } |
| 293 buildCounterGoogleCloudMlV1ListJobsResponse--; | 340 buildCounterGoogleCloudMlV1ListJobsResponse--; |
| 294 } | 341 } |
| 295 | 342 |
| 296 buildUnnamed4() { | 343 buildUnnamed6() { |
| 297 var o = new core.List<api.GoogleCloudMlV1Model>(); | 344 var o = new core.List<api.GoogleCloudMlV1Model>(); |
| 298 o.add(buildGoogleCloudMlV1Model()); | 345 o.add(buildGoogleCloudMlV1Model()); |
| 299 o.add(buildGoogleCloudMlV1Model()); | 346 o.add(buildGoogleCloudMlV1Model()); |
| 300 return o; | 347 return o; |
| 301 } | 348 } |
| 302 | 349 |
| 303 checkUnnamed4(core.List<api.GoogleCloudMlV1Model> o) { | 350 checkUnnamed6(core.List<api.GoogleCloudMlV1Model> o) { |
| 304 unittest.expect(o, unittest.hasLength(2)); | 351 unittest.expect(o, unittest.hasLength(2)); |
| 305 checkGoogleCloudMlV1Model(o[0]); | 352 checkGoogleCloudMlV1Model(o[0]); |
| 306 checkGoogleCloudMlV1Model(o[1]); | 353 checkGoogleCloudMlV1Model(o[1]); |
| 307 } | 354 } |
| 308 | 355 |
| 309 core.int buildCounterGoogleCloudMlV1ListModelsResponse = 0; | 356 core.int buildCounterGoogleCloudMlV1ListModelsResponse = 0; |
| 310 buildGoogleCloudMlV1ListModelsResponse() { | 357 buildGoogleCloudMlV1ListModelsResponse() { |
| 311 var o = new api.GoogleCloudMlV1ListModelsResponse(); | 358 var o = new api.GoogleCloudMlV1ListModelsResponse(); |
| 312 buildCounterGoogleCloudMlV1ListModelsResponse++; | 359 buildCounterGoogleCloudMlV1ListModelsResponse++; |
| 313 if (buildCounterGoogleCloudMlV1ListModelsResponse < 3) { | 360 if (buildCounterGoogleCloudMlV1ListModelsResponse < 3) { |
| 314 o.models = buildUnnamed4(); | 361 o.models = buildUnnamed6(); |
| 315 o.nextPageToken = "foo"; | 362 o.nextPageToken = "foo"; |
| 316 } | 363 } |
| 317 buildCounterGoogleCloudMlV1ListModelsResponse--; | 364 buildCounterGoogleCloudMlV1ListModelsResponse--; |
| 318 return o; | 365 return o; |
| 319 } | 366 } |
| 320 | 367 |
| 321 checkGoogleCloudMlV1ListModelsResponse(api.GoogleCloudMlV1ListModelsResponse o)
{ | 368 checkGoogleCloudMlV1ListModelsResponse(api.GoogleCloudMlV1ListModelsResponse o)
{ |
| 322 buildCounterGoogleCloudMlV1ListModelsResponse++; | 369 buildCounterGoogleCloudMlV1ListModelsResponse++; |
| 323 if (buildCounterGoogleCloudMlV1ListModelsResponse < 3) { | 370 if (buildCounterGoogleCloudMlV1ListModelsResponse < 3) { |
| 324 checkUnnamed4(o.models); | 371 checkUnnamed6(o.models); |
| 325 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 372 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 326 } | 373 } |
| 327 buildCounterGoogleCloudMlV1ListModelsResponse--; | 374 buildCounterGoogleCloudMlV1ListModelsResponse--; |
| 328 } | 375 } |
| 329 | 376 |
| 330 buildUnnamed5() { | 377 buildUnnamed7() { |
| 331 var o = new core.List<api.GoogleCloudMlV1Version>(); | 378 var o = new core.List<api.GoogleCloudMlV1Version>(); |
| 332 o.add(buildGoogleCloudMlV1Version()); | 379 o.add(buildGoogleCloudMlV1Version()); |
| 333 o.add(buildGoogleCloudMlV1Version()); | 380 o.add(buildGoogleCloudMlV1Version()); |
| 334 return o; | 381 return o; |
| 335 } | 382 } |
| 336 | 383 |
| 337 checkUnnamed5(core.List<api.GoogleCloudMlV1Version> o) { | 384 checkUnnamed7(core.List<api.GoogleCloudMlV1Version> o) { |
| 338 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
| 339 checkGoogleCloudMlV1Version(o[0]); | 386 checkGoogleCloudMlV1Version(o[0]); |
| 340 checkGoogleCloudMlV1Version(o[1]); | 387 checkGoogleCloudMlV1Version(o[1]); |
| 341 } | 388 } |
| 342 | 389 |
| 343 core.int buildCounterGoogleCloudMlV1ListVersionsResponse = 0; | 390 core.int buildCounterGoogleCloudMlV1ListVersionsResponse = 0; |
| 344 buildGoogleCloudMlV1ListVersionsResponse() { | 391 buildGoogleCloudMlV1ListVersionsResponse() { |
| 345 var o = new api.GoogleCloudMlV1ListVersionsResponse(); | 392 var o = new api.GoogleCloudMlV1ListVersionsResponse(); |
| 346 buildCounterGoogleCloudMlV1ListVersionsResponse++; | 393 buildCounterGoogleCloudMlV1ListVersionsResponse++; |
| 347 if (buildCounterGoogleCloudMlV1ListVersionsResponse < 3) { | 394 if (buildCounterGoogleCloudMlV1ListVersionsResponse < 3) { |
| 348 o.nextPageToken = "foo"; | 395 o.nextPageToken = "foo"; |
| 349 o.versions = buildUnnamed5(); | 396 o.versions = buildUnnamed7(); |
| 350 } | 397 } |
| 351 buildCounterGoogleCloudMlV1ListVersionsResponse--; | 398 buildCounterGoogleCloudMlV1ListVersionsResponse--; |
| 352 return o; | 399 return o; |
| 353 } | 400 } |
| 354 | 401 |
| 355 checkGoogleCloudMlV1ListVersionsResponse(api.GoogleCloudMlV1ListVersionsResponse
o) { | 402 checkGoogleCloudMlV1ListVersionsResponse(api.GoogleCloudMlV1ListVersionsResponse
o) { |
| 356 buildCounterGoogleCloudMlV1ListVersionsResponse++; | 403 buildCounterGoogleCloudMlV1ListVersionsResponse++; |
| 357 if (buildCounterGoogleCloudMlV1ListVersionsResponse < 3) { | 404 if (buildCounterGoogleCloudMlV1ListVersionsResponse < 3) { |
| 358 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 405 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 359 checkUnnamed5(o.versions); | 406 checkUnnamed7(o.versions); |
| 360 } | 407 } |
| 361 buildCounterGoogleCloudMlV1ListVersionsResponse--; | 408 buildCounterGoogleCloudMlV1ListVersionsResponse--; |
| 362 } | 409 } |
| 363 | 410 |
| 364 core.int buildCounterGoogleCloudMlV1ManualScaling = 0; | 411 core.int buildCounterGoogleCloudMlV1ManualScaling = 0; |
| 365 buildGoogleCloudMlV1ManualScaling() { | 412 buildGoogleCloudMlV1ManualScaling() { |
| 366 var o = new api.GoogleCloudMlV1ManualScaling(); | 413 var o = new api.GoogleCloudMlV1ManualScaling(); |
| 367 buildCounterGoogleCloudMlV1ManualScaling++; | 414 buildCounterGoogleCloudMlV1ManualScaling++; |
| 368 if (buildCounterGoogleCloudMlV1ManualScaling < 3) { | 415 if (buildCounterGoogleCloudMlV1ManualScaling < 3) { |
| 369 o.nodes = 42; | 416 o.nodes = 42; |
| 370 } | 417 } |
| 371 buildCounterGoogleCloudMlV1ManualScaling--; | 418 buildCounterGoogleCloudMlV1ManualScaling--; |
| 372 return o; | 419 return o; |
| 373 } | 420 } |
| 374 | 421 |
| 375 checkGoogleCloudMlV1ManualScaling(api.GoogleCloudMlV1ManualScaling o) { | 422 checkGoogleCloudMlV1ManualScaling(api.GoogleCloudMlV1ManualScaling o) { |
| 376 buildCounterGoogleCloudMlV1ManualScaling++; | 423 buildCounterGoogleCloudMlV1ManualScaling++; |
| 377 if (buildCounterGoogleCloudMlV1ManualScaling < 3) { | 424 if (buildCounterGoogleCloudMlV1ManualScaling < 3) { |
| 378 unittest.expect(o.nodes, unittest.equals(42)); | 425 unittest.expect(o.nodes, unittest.equals(42)); |
| 379 } | 426 } |
| 380 buildCounterGoogleCloudMlV1ManualScaling--; | 427 buildCounterGoogleCloudMlV1ManualScaling--; |
| 381 } | 428 } |
| 382 | 429 |
| 383 buildUnnamed6() { | 430 buildUnnamed8() { |
| 384 var o = new core.List<core.String>(); | 431 var o = new core.List<core.String>(); |
| 385 o.add("foo"); | 432 o.add("foo"); |
| 386 o.add("foo"); | 433 o.add("foo"); |
| 387 return o; | 434 return o; |
| 388 } | 435 } |
| 389 | 436 |
| 390 checkUnnamed6(core.List<core.String> o) { | 437 checkUnnamed8(core.List<core.String> o) { |
| 391 unittest.expect(o, unittest.hasLength(2)); | 438 unittest.expect(o, unittest.hasLength(2)); |
| 392 unittest.expect(o[0], unittest.equals('foo')); | 439 unittest.expect(o[0], unittest.equals('foo')); |
| 393 unittest.expect(o[1], unittest.equals('foo')); | 440 unittest.expect(o[1], unittest.equals('foo')); |
| 394 } | 441 } |
| 395 | 442 |
| 396 core.int buildCounterGoogleCloudMlV1Model = 0; | 443 core.int buildCounterGoogleCloudMlV1Model = 0; |
| 397 buildGoogleCloudMlV1Model() { | 444 buildGoogleCloudMlV1Model() { |
| 398 var o = new api.GoogleCloudMlV1Model(); | 445 var o = new api.GoogleCloudMlV1Model(); |
| 399 buildCounterGoogleCloudMlV1Model++; | 446 buildCounterGoogleCloudMlV1Model++; |
| 400 if (buildCounterGoogleCloudMlV1Model < 3) { | 447 if (buildCounterGoogleCloudMlV1Model < 3) { |
| 401 o.defaultVersion = buildGoogleCloudMlV1Version(); | 448 o.defaultVersion = buildGoogleCloudMlV1Version(); |
| 402 o.description = "foo"; | 449 o.description = "foo"; |
| 403 o.name = "foo"; | 450 o.name = "foo"; |
| 404 o.onlinePredictionLogging = true; | 451 o.onlinePredictionLogging = true; |
| 405 o.regions = buildUnnamed6(); | 452 o.regions = buildUnnamed8(); |
| 406 } | 453 } |
| 407 buildCounterGoogleCloudMlV1Model--; | 454 buildCounterGoogleCloudMlV1Model--; |
| 408 return o; | 455 return o; |
| 409 } | 456 } |
| 410 | 457 |
| 411 checkGoogleCloudMlV1Model(api.GoogleCloudMlV1Model o) { | 458 checkGoogleCloudMlV1Model(api.GoogleCloudMlV1Model o) { |
| 412 buildCounterGoogleCloudMlV1Model++; | 459 buildCounterGoogleCloudMlV1Model++; |
| 413 if (buildCounterGoogleCloudMlV1Model < 3) { | 460 if (buildCounterGoogleCloudMlV1Model < 3) { |
| 414 checkGoogleCloudMlV1Version(o.defaultVersion); | 461 checkGoogleCloudMlV1Version(o.defaultVersion); |
| 415 unittest.expect(o.description, unittest.equals('foo')); | 462 unittest.expect(o.description, unittest.equals('foo')); |
| 416 unittest.expect(o.name, unittest.equals('foo')); | 463 unittest.expect(o.name, unittest.equals('foo')); |
| 417 unittest.expect(o.onlinePredictionLogging, unittest.isTrue); | 464 unittest.expect(o.onlinePredictionLogging, unittest.isTrue); |
| 418 checkUnnamed6(o.regions); | 465 checkUnnamed8(o.regions); |
| 419 } | 466 } |
| 420 buildCounterGoogleCloudMlV1Model--; | 467 buildCounterGoogleCloudMlV1Model--; |
| 421 } | 468 } |
| 422 | 469 |
| 423 core.int buildCounterGoogleCloudMlV1OperationMetadata = 0; | 470 core.int buildCounterGoogleCloudMlV1OperationMetadata = 0; |
| 424 buildGoogleCloudMlV1OperationMetadata() { | 471 buildGoogleCloudMlV1OperationMetadata() { |
| 425 var o = new api.GoogleCloudMlV1OperationMetadata(); | 472 var o = new api.GoogleCloudMlV1OperationMetadata(); |
| 426 buildCounterGoogleCloudMlV1OperationMetadata++; | 473 buildCounterGoogleCloudMlV1OperationMetadata++; |
| 427 if (buildCounterGoogleCloudMlV1OperationMetadata < 3) { | 474 if (buildCounterGoogleCloudMlV1OperationMetadata < 3) { |
| 428 o.createTime = "foo"; | 475 o.createTime = "foo"; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 444 unittest.expect(o.endTime, unittest.equals('foo')); | 491 unittest.expect(o.endTime, unittest.equals('foo')); |
| 445 unittest.expect(o.isCancellationRequested, unittest.isTrue); | 492 unittest.expect(o.isCancellationRequested, unittest.isTrue); |
| 446 unittest.expect(o.modelName, unittest.equals('foo')); | 493 unittest.expect(o.modelName, unittest.equals('foo')); |
| 447 unittest.expect(o.operationType, unittest.equals('foo')); | 494 unittest.expect(o.operationType, unittest.equals('foo')); |
| 448 unittest.expect(o.startTime, unittest.equals('foo')); | 495 unittest.expect(o.startTime, unittest.equals('foo')); |
| 449 checkGoogleCloudMlV1Version(o.version); | 496 checkGoogleCloudMlV1Version(o.version); |
| 450 } | 497 } |
| 451 buildCounterGoogleCloudMlV1OperationMetadata--; | 498 buildCounterGoogleCloudMlV1OperationMetadata--; |
| 452 } | 499 } |
| 453 | 500 |
| 454 buildUnnamed7() { | 501 buildUnnamed9() { |
| 455 var o = new core.List<core.String>(); | 502 var o = new core.List<core.String>(); |
| 456 o.add("foo"); | 503 o.add("foo"); |
| 457 o.add("foo"); | 504 o.add("foo"); |
| 458 return o; | 505 return o; |
| 459 } | 506 } |
| 460 | 507 |
| 461 checkUnnamed7(core.List<core.String> o) { | 508 checkUnnamed9(core.List<core.String> o) { |
| 462 unittest.expect(o, unittest.hasLength(2)); | 509 unittest.expect(o, unittest.hasLength(2)); |
| 463 unittest.expect(o[0], unittest.equals('foo')); | 510 unittest.expect(o[0], unittest.equals('foo')); |
| 464 unittest.expect(o[1], unittest.equals('foo')); | 511 unittest.expect(o[1], unittest.equals('foo')); |
| 465 } | 512 } |
| 466 | 513 |
| 467 buildUnnamed8() { | 514 buildUnnamed10() { |
| 468 var o = new core.List<core.double>(); | 515 var o = new core.List<core.double>(); |
| 469 o.add(42.0); | 516 o.add(42.0); |
| 470 o.add(42.0); | 517 o.add(42.0); |
| 471 return o; | 518 return o; |
| 472 } | 519 } |
| 473 | 520 |
| 474 checkUnnamed8(core.List<core.double> o) { | 521 checkUnnamed10(core.List<core.double> o) { |
| 475 unittest.expect(o, unittest.hasLength(2)); | 522 unittest.expect(o, unittest.hasLength(2)); |
| 476 unittest.expect(o[0], unittest.equals(42.0)); | 523 unittest.expect(o[0], unittest.equals(42.0)); |
| 477 unittest.expect(o[1], unittest.equals(42.0)); | 524 unittest.expect(o[1], unittest.equals(42.0)); |
| 478 } | 525 } |
| 479 | 526 |
| 480 core.int buildCounterGoogleCloudMlV1ParameterSpec = 0; | 527 core.int buildCounterGoogleCloudMlV1ParameterSpec = 0; |
| 481 buildGoogleCloudMlV1ParameterSpec() { | 528 buildGoogleCloudMlV1ParameterSpec() { |
| 482 var o = new api.GoogleCloudMlV1ParameterSpec(); | 529 var o = new api.GoogleCloudMlV1ParameterSpec(); |
| 483 buildCounterGoogleCloudMlV1ParameterSpec++; | 530 buildCounterGoogleCloudMlV1ParameterSpec++; |
| 484 if (buildCounterGoogleCloudMlV1ParameterSpec < 3) { | 531 if (buildCounterGoogleCloudMlV1ParameterSpec < 3) { |
| 485 o.categoricalValues = buildUnnamed7(); | 532 o.categoricalValues = buildUnnamed9(); |
| 486 o.discreteValues = buildUnnamed8(); | 533 o.discreteValues = buildUnnamed10(); |
| 487 o.maxValue = 42.0; | 534 o.maxValue = 42.0; |
| 488 o.minValue = 42.0; | 535 o.minValue = 42.0; |
| 489 o.parameterName = "foo"; | 536 o.parameterName = "foo"; |
| 490 o.scaleType = "foo"; | 537 o.scaleType = "foo"; |
| 491 o.type = "foo"; | 538 o.type = "foo"; |
| 492 } | 539 } |
| 493 buildCounterGoogleCloudMlV1ParameterSpec--; | 540 buildCounterGoogleCloudMlV1ParameterSpec--; |
| 494 return o; | 541 return o; |
| 495 } | 542 } |
| 496 | 543 |
| 497 checkGoogleCloudMlV1ParameterSpec(api.GoogleCloudMlV1ParameterSpec o) { | 544 checkGoogleCloudMlV1ParameterSpec(api.GoogleCloudMlV1ParameterSpec o) { |
| 498 buildCounterGoogleCloudMlV1ParameterSpec++; | 545 buildCounterGoogleCloudMlV1ParameterSpec++; |
| 499 if (buildCounterGoogleCloudMlV1ParameterSpec < 3) { | 546 if (buildCounterGoogleCloudMlV1ParameterSpec < 3) { |
| 500 checkUnnamed7(o.categoricalValues); | 547 checkUnnamed9(o.categoricalValues); |
| 501 checkUnnamed8(o.discreteValues); | 548 checkUnnamed10(o.discreteValues); |
| 502 unittest.expect(o.maxValue, unittest.equals(42.0)); | 549 unittest.expect(o.maxValue, unittest.equals(42.0)); |
| 503 unittest.expect(o.minValue, unittest.equals(42.0)); | 550 unittest.expect(o.minValue, unittest.equals(42.0)); |
| 504 unittest.expect(o.parameterName, unittest.equals('foo')); | 551 unittest.expect(o.parameterName, unittest.equals('foo')); |
| 505 unittest.expect(o.scaleType, unittest.equals('foo')); | 552 unittest.expect(o.scaleType, unittest.equals('foo')); |
| 506 unittest.expect(o.type, unittest.equals('foo')); | 553 unittest.expect(o.type, unittest.equals('foo')); |
| 507 } | 554 } |
| 508 buildCounterGoogleCloudMlV1ParameterSpec--; | 555 buildCounterGoogleCloudMlV1ParameterSpec--; |
| 509 } | 556 } |
| 510 | 557 |
| 511 core.int buildCounterGoogleCloudMlV1PredictRequest = 0; | 558 core.int buildCounterGoogleCloudMlV1PredictRequest = 0; |
| 512 buildGoogleCloudMlV1PredictRequest() { | 559 buildGoogleCloudMlV1PredictRequest() { |
| 513 var o = new api.GoogleCloudMlV1PredictRequest(); | 560 var o = new api.GoogleCloudMlV1PredictRequest(); |
| 514 buildCounterGoogleCloudMlV1PredictRequest++; | 561 buildCounterGoogleCloudMlV1PredictRequest++; |
| 515 if (buildCounterGoogleCloudMlV1PredictRequest < 3) { | 562 if (buildCounterGoogleCloudMlV1PredictRequest < 3) { |
| 516 o.httpBody = buildGoogleApiHttpBody(); | 563 o.httpBody = buildGoogleApiHttpBody(); |
| 517 } | 564 } |
| 518 buildCounterGoogleCloudMlV1PredictRequest--; | 565 buildCounterGoogleCloudMlV1PredictRequest--; |
| 519 return o; | 566 return o; |
| 520 } | 567 } |
| 521 | 568 |
| 522 checkGoogleCloudMlV1PredictRequest(api.GoogleCloudMlV1PredictRequest o) { | 569 checkGoogleCloudMlV1PredictRequest(api.GoogleCloudMlV1PredictRequest o) { |
| 523 buildCounterGoogleCloudMlV1PredictRequest++; | 570 buildCounterGoogleCloudMlV1PredictRequest++; |
| 524 if (buildCounterGoogleCloudMlV1PredictRequest < 3) { | 571 if (buildCounterGoogleCloudMlV1PredictRequest < 3) { |
| 525 checkGoogleApiHttpBody(o.httpBody); | 572 checkGoogleApiHttpBody(o.httpBody); |
| 526 } | 573 } |
| 527 buildCounterGoogleCloudMlV1PredictRequest--; | 574 buildCounterGoogleCloudMlV1PredictRequest--; |
| 528 } | 575 } |
| 529 | 576 |
| 530 buildUnnamed9() { | 577 buildUnnamed11() { |
| 531 var o = new core.List<core.String>(); | 578 var o = new core.List<core.String>(); |
| 532 o.add("foo"); | 579 o.add("foo"); |
| 533 o.add("foo"); | 580 o.add("foo"); |
| 534 return o; | 581 return o; |
| 535 } | 582 } |
| 536 | 583 |
| 537 checkUnnamed9(core.List<core.String> o) { | 584 checkUnnamed11(core.List<core.String> o) { |
| 538 unittest.expect(o, unittest.hasLength(2)); | 585 unittest.expect(o, unittest.hasLength(2)); |
| 539 unittest.expect(o[0], unittest.equals('foo')); | 586 unittest.expect(o[0], unittest.equals('foo')); |
| 540 unittest.expect(o[1], unittest.equals('foo')); | 587 unittest.expect(o[1], unittest.equals('foo')); |
| 541 } | 588 } |
| 542 | 589 |
| 543 core.int buildCounterGoogleCloudMlV1PredictionInput = 0; | 590 core.int buildCounterGoogleCloudMlV1PredictionInput = 0; |
| 544 buildGoogleCloudMlV1PredictionInput() { | 591 buildGoogleCloudMlV1PredictionInput() { |
| 545 var o = new api.GoogleCloudMlV1PredictionInput(); | 592 var o = new api.GoogleCloudMlV1PredictionInput(); |
| 546 buildCounterGoogleCloudMlV1PredictionInput++; | 593 buildCounterGoogleCloudMlV1PredictionInput++; |
| 547 if (buildCounterGoogleCloudMlV1PredictionInput < 3) { | 594 if (buildCounterGoogleCloudMlV1PredictionInput < 3) { |
| 548 o.dataFormat = "foo"; | 595 o.dataFormat = "foo"; |
| 549 o.inputPaths = buildUnnamed9(); | 596 o.inputPaths = buildUnnamed11(); |
| 550 o.maxWorkerCount = "foo"; | 597 o.maxWorkerCount = "foo"; |
| 551 o.modelName = "foo"; | 598 o.modelName = "foo"; |
| 552 o.outputPath = "foo"; | 599 o.outputPath = "foo"; |
| 553 o.region = "foo"; | 600 o.region = "foo"; |
| 554 o.runtimeVersion = "foo"; | 601 o.runtimeVersion = "foo"; |
| 555 o.uri = "foo"; | 602 o.uri = "foo"; |
| 556 o.versionName = "foo"; | 603 o.versionName = "foo"; |
| 557 } | 604 } |
| 558 buildCounterGoogleCloudMlV1PredictionInput--; | 605 buildCounterGoogleCloudMlV1PredictionInput--; |
| 559 return o; | 606 return o; |
| 560 } | 607 } |
| 561 | 608 |
| 562 checkGoogleCloudMlV1PredictionInput(api.GoogleCloudMlV1PredictionInput o) { | 609 checkGoogleCloudMlV1PredictionInput(api.GoogleCloudMlV1PredictionInput o) { |
| 563 buildCounterGoogleCloudMlV1PredictionInput++; | 610 buildCounterGoogleCloudMlV1PredictionInput++; |
| 564 if (buildCounterGoogleCloudMlV1PredictionInput < 3) { | 611 if (buildCounterGoogleCloudMlV1PredictionInput < 3) { |
| 565 unittest.expect(o.dataFormat, unittest.equals('foo')); | 612 unittest.expect(o.dataFormat, unittest.equals('foo')); |
| 566 checkUnnamed9(o.inputPaths); | 613 checkUnnamed11(o.inputPaths); |
| 567 unittest.expect(o.maxWorkerCount, unittest.equals('foo')); | 614 unittest.expect(o.maxWorkerCount, unittest.equals('foo')); |
| 568 unittest.expect(o.modelName, unittest.equals('foo')); | 615 unittest.expect(o.modelName, unittest.equals('foo')); |
| 569 unittest.expect(o.outputPath, unittest.equals('foo')); | 616 unittest.expect(o.outputPath, unittest.equals('foo')); |
| 570 unittest.expect(o.region, unittest.equals('foo')); | 617 unittest.expect(o.region, unittest.equals('foo')); |
| 571 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 618 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 572 unittest.expect(o.uri, unittest.equals('foo')); | 619 unittest.expect(o.uri, unittest.equals('foo')); |
| 573 unittest.expect(o.versionName, unittest.equals('foo')); | 620 unittest.expect(o.versionName, unittest.equals('foo')); |
| 574 } | 621 } |
| 575 buildCounterGoogleCloudMlV1PredictionInput--; | 622 buildCounterGoogleCloudMlV1PredictionInput--; |
| 576 } | 623 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 return o; | 657 return o; |
| 611 } | 658 } |
| 612 | 659 |
| 613 checkGoogleCloudMlV1SetDefaultVersionRequest(api.GoogleCloudMlV1SetDefaultVersio
nRequest o) { | 660 checkGoogleCloudMlV1SetDefaultVersionRequest(api.GoogleCloudMlV1SetDefaultVersio
nRequest o) { |
| 614 buildCounterGoogleCloudMlV1SetDefaultVersionRequest++; | 661 buildCounterGoogleCloudMlV1SetDefaultVersionRequest++; |
| 615 if (buildCounterGoogleCloudMlV1SetDefaultVersionRequest < 3) { | 662 if (buildCounterGoogleCloudMlV1SetDefaultVersionRequest < 3) { |
| 616 } | 663 } |
| 617 buildCounterGoogleCloudMlV1SetDefaultVersionRequest--; | 664 buildCounterGoogleCloudMlV1SetDefaultVersionRequest--; |
| 618 } | 665 } |
| 619 | 666 |
| 620 buildUnnamed10() { | 667 buildUnnamed12() { |
| 621 var o = new core.List<core.String>(); | 668 var o = new core.List<core.String>(); |
| 622 o.add("foo"); | 669 o.add("foo"); |
| 623 o.add("foo"); | 670 o.add("foo"); |
| 624 return o; | 671 return o; |
| 625 } | 672 } |
| 626 | 673 |
| 627 checkUnnamed10(core.List<core.String> o) { | 674 checkUnnamed12(core.List<core.String> o) { |
| 628 unittest.expect(o, unittest.hasLength(2)); | 675 unittest.expect(o, unittest.hasLength(2)); |
| 629 unittest.expect(o[0], unittest.equals('foo')); | 676 unittest.expect(o[0], unittest.equals('foo')); |
| 630 unittest.expect(o[1], unittest.equals('foo')); | 677 unittest.expect(o[1], unittest.equals('foo')); |
| 631 } | 678 } |
| 632 | 679 |
| 633 buildUnnamed11() { | 680 buildUnnamed13() { |
| 634 var o = new core.List<core.String>(); | 681 var o = new core.List<core.String>(); |
| 635 o.add("foo"); | 682 o.add("foo"); |
| 636 o.add("foo"); | 683 o.add("foo"); |
| 637 return o; | 684 return o; |
| 638 } | 685 } |
| 639 | 686 |
| 640 checkUnnamed11(core.List<core.String> o) { | 687 checkUnnamed13(core.List<core.String> o) { |
| 641 unittest.expect(o, unittest.hasLength(2)); | 688 unittest.expect(o, unittest.hasLength(2)); |
| 642 unittest.expect(o[0], unittest.equals('foo')); | 689 unittest.expect(o[0], unittest.equals('foo')); |
| 643 unittest.expect(o[1], unittest.equals('foo')); | 690 unittest.expect(o[1], unittest.equals('foo')); |
| 644 } | 691 } |
| 645 | 692 |
| 646 core.int buildCounterGoogleCloudMlV1TrainingInput = 0; | 693 core.int buildCounterGoogleCloudMlV1TrainingInput = 0; |
| 647 buildGoogleCloudMlV1TrainingInput() { | 694 buildGoogleCloudMlV1TrainingInput() { |
| 648 var o = new api.GoogleCloudMlV1TrainingInput(); | 695 var o = new api.GoogleCloudMlV1TrainingInput(); |
| 649 buildCounterGoogleCloudMlV1TrainingInput++; | 696 buildCounterGoogleCloudMlV1TrainingInput++; |
| 650 if (buildCounterGoogleCloudMlV1TrainingInput < 3) { | 697 if (buildCounterGoogleCloudMlV1TrainingInput < 3) { |
| 651 o.args = buildUnnamed10(); | 698 o.args = buildUnnamed12(); |
| 652 o.hyperparameters = buildGoogleCloudMlV1HyperparameterSpec(); | 699 o.hyperparameters = buildGoogleCloudMlV1HyperparameterSpec(); |
| 653 o.jobDir = "foo"; | 700 o.jobDir = "foo"; |
| 654 o.masterType = "foo"; | 701 o.masterType = "foo"; |
| 655 o.packageUris = buildUnnamed11(); | 702 o.packageUris = buildUnnamed13(); |
| 656 o.parameterServerCount = "foo"; | 703 o.parameterServerCount = "foo"; |
| 657 o.parameterServerType = "foo"; | 704 o.parameterServerType = "foo"; |
| 658 o.pythonModule = "foo"; | 705 o.pythonModule = "foo"; |
| 659 o.region = "foo"; | 706 o.region = "foo"; |
| 660 o.runtimeVersion = "foo"; | 707 o.runtimeVersion = "foo"; |
| 661 o.scaleTier = "foo"; | 708 o.scaleTier = "foo"; |
| 662 o.workerCount = "foo"; | 709 o.workerCount = "foo"; |
| 663 o.workerType = "foo"; | 710 o.workerType = "foo"; |
| 664 } | 711 } |
| 665 buildCounterGoogleCloudMlV1TrainingInput--; | 712 buildCounterGoogleCloudMlV1TrainingInput--; |
| 666 return o; | 713 return o; |
| 667 } | 714 } |
| 668 | 715 |
| 669 checkGoogleCloudMlV1TrainingInput(api.GoogleCloudMlV1TrainingInput o) { | 716 checkGoogleCloudMlV1TrainingInput(api.GoogleCloudMlV1TrainingInput o) { |
| 670 buildCounterGoogleCloudMlV1TrainingInput++; | 717 buildCounterGoogleCloudMlV1TrainingInput++; |
| 671 if (buildCounterGoogleCloudMlV1TrainingInput < 3) { | 718 if (buildCounterGoogleCloudMlV1TrainingInput < 3) { |
| 672 checkUnnamed10(o.args); | 719 checkUnnamed12(o.args); |
| 673 checkGoogleCloudMlV1HyperparameterSpec(o.hyperparameters); | 720 checkGoogleCloudMlV1HyperparameterSpec(o.hyperparameters); |
| 674 unittest.expect(o.jobDir, unittest.equals('foo')); | 721 unittest.expect(o.jobDir, unittest.equals('foo')); |
| 675 unittest.expect(o.masterType, unittest.equals('foo')); | 722 unittest.expect(o.masterType, unittest.equals('foo')); |
| 676 checkUnnamed11(o.packageUris); | 723 checkUnnamed13(o.packageUris); |
| 677 unittest.expect(o.parameterServerCount, unittest.equals('foo')); | 724 unittest.expect(o.parameterServerCount, unittest.equals('foo')); |
| 678 unittest.expect(o.parameterServerType, unittest.equals('foo')); | 725 unittest.expect(o.parameterServerType, unittest.equals('foo')); |
| 679 unittest.expect(o.pythonModule, unittest.equals('foo')); | 726 unittest.expect(o.pythonModule, unittest.equals('foo')); |
| 680 unittest.expect(o.region, unittest.equals('foo')); | 727 unittest.expect(o.region, unittest.equals('foo')); |
| 681 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 728 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 682 unittest.expect(o.scaleTier, unittest.equals('foo')); | 729 unittest.expect(o.scaleTier, unittest.equals('foo')); |
| 683 unittest.expect(o.workerCount, unittest.equals('foo')); | 730 unittest.expect(o.workerCount, unittest.equals('foo')); |
| 684 unittest.expect(o.workerType, unittest.equals('foo')); | 731 unittest.expect(o.workerType, unittest.equals('foo')); |
| 685 } | 732 } |
| 686 buildCounterGoogleCloudMlV1TrainingInput--; | 733 buildCounterGoogleCloudMlV1TrainingInput--; |
| 687 } | 734 } |
| 688 | 735 |
| 689 buildUnnamed12() { | 736 buildUnnamed14() { |
| 690 var o = new core.List<api.GoogleCloudMlV1HyperparameterOutput>(); | 737 var o = new core.List<api.GoogleCloudMlV1HyperparameterOutput>(); |
| 691 o.add(buildGoogleCloudMlV1HyperparameterOutput()); | 738 o.add(buildGoogleCloudMlV1HyperparameterOutput()); |
| 692 o.add(buildGoogleCloudMlV1HyperparameterOutput()); | 739 o.add(buildGoogleCloudMlV1HyperparameterOutput()); |
| 693 return o; | 740 return o; |
| 694 } | 741 } |
| 695 | 742 |
| 696 checkUnnamed12(core.List<api.GoogleCloudMlV1HyperparameterOutput> o) { | 743 checkUnnamed14(core.List<api.GoogleCloudMlV1HyperparameterOutput> o) { |
| 697 unittest.expect(o, unittest.hasLength(2)); | 744 unittest.expect(o, unittest.hasLength(2)); |
| 698 checkGoogleCloudMlV1HyperparameterOutput(o[0]); | 745 checkGoogleCloudMlV1HyperparameterOutput(o[0]); |
| 699 checkGoogleCloudMlV1HyperparameterOutput(o[1]); | 746 checkGoogleCloudMlV1HyperparameterOutput(o[1]); |
| 700 } | 747 } |
| 701 | 748 |
| 702 core.int buildCounterGoogleCloudMlV1TrainingOutput = 0; | 749 core.int buildCounterGoogleCloudMlV1TrainingOutput = 0; |
| 703 buildGoogleCloudMlV1TrainingOutput() { | 750 buildGoogleCloudMlV1TrainingOutput() { |
| 704 var o = new api.GoogleCloudMlV1TrainingOutput(); | 751 var o = new api.GoogleCloudMlV1TrainingOutput(); |
| 705 buildCounterGoogleCloudMlV1TrainingOutput++; | 752 buildCounterGoogleCloudMlV1TrainingOutput++; |
| 706 if (buildCounterGoogleCloudMlV1TrainingOutput < 3) { | 753 if (buildCounterGoogleCloudMlV1TrainingOutput < 3) { |
| 707 o.completedTrialCount = "foo"; | 754 o.completedTrialCount = "foo"; |
| 708 o.consumedMLUnits = 42.0; | 755 o.consumedMLUnits = 42.0; |
| 709 o.isHyperparameterTuningJob = true; | 756 o.isHyperparameterTuningJob = true; |
| 710 o.trials = buildUnnamed12(); | 757 o.trials = buildUnnamed14(); |
| 711 } | 758 } |
| 712 buildCounterGoogleCloudMlV1TrainingOutput--; | 759 buildCounterGoogleCloudMlV1TrainingOutput--; |
| 713 return o; | 760 return o; |
| 714 } | 761 } |
| 715 | 762 |
| 716 checkGoogleCloudMlV1TrainingOutput(api.GoogleCloudMlV1TrainingOutput o) { | 763 checkGoogleCloudMlV1TrainingOutput(api.GoogleCloudMlV1TrainingOutput o) { |
| 717 buildCounterGoogleCloudMlV1TrainingOutput++; | 764 buildCounterGoogleCloudMlV1TrainingOutput++; |
| 718 if (buildCounterGoogleCloudMlV1TrainingOutput < 3) { | 765 if (buildCounterGoogleCloudMlV1TrainingOutput < 3) { |
| 719 unittest.expect(o.completedTrialCount, unittest.equals('foo')); | 766 unittest.expect(o.completedTrialCount, unittest.equals('foo')); |
| 720 unittest.expect(o.consumedMLUnits, unittest.equals(42.0)); | 767 unittest.expect(o.consumedMLUnits, unittest.equals(42.0)); |
| 721 unittest.expect(o.isHyperparameterTuningJob, unittest.isTrue); | 768 unittest.expect(o.isHyperparameterTuningJob, unittest.isTrue); |
| 722 checkUnnamed12(o.trials); | 769 checkUnnamed14(o.trials); |
| 723 } | 770 } |
| 724 buildCounterGoogleCloudMlV1TrainingOutput--; | 771 buildCounterGoogleCloudMlV1TrainingOutput--; |
| 725 } | 772 } |
| 726 | 773 |
| 727 core.int buildCounterGoogleCloudMlV1Version = 0; | 774 core.int buildCounterGoogleCloudMlV1Version = 0; |
| 728 buildGoogleCloudMlV1Version() { | 775 buildGoogleCloudMlV1Version() { |
| 729 var o = new api.GoogleCloudMlV1Version(); | 776 var o = new api.GoogleCloudMlV1Version(); |
| 730 buildCounterGoogleCloudMlV1Version++; | 777 buildCounterGoogleCloudMlV1Version++; |
| 731 if (buildCounterGoogleCloudMlV1Version < 3) { | 778 if (buildCounterGoogleCloudMlV1Version < 3) { |
| 779 o.automaticScaling = buildGoogleCloudMlV1AutomaticScaling(); |
| 732 o.createTime = "foo"; | 780 o.createTime = "foo"; |
| 733 o.deploymentUri = "foo"; | 781 o.deploymentUri = "foo"; |
| 734 o.description = "foo"; | 782 o.description = "foo"; |
| 735 o.isDefault = true; | 783 o.isDefault = true; |
| 736 o.lastUseTime = "foo"; | 784 o.lastUseTime = "foo"; |
| 737 o.manualScaling = buildGoogleCloudMlV1ManualScaling(); | 785 o.manualScaling = buildGoogleCloudMlV1ManualScaling(); |
| 738 o.name = "foo"; | 786 o.name = "foo"; |
| 739 o.runtimeVersion = "foo"; | 787 o.runtimeVersion = "foo"; |
| 740 } | 788 } |
| 741 buildCounterGoogleCloudMlV1Version--; | 789 buildCounterGoogleCloudMlV1Version--; |
| 742 return o; | 790 return o; |
| 743 } | 791 } |
| 744 | 792 |
| 745 checkGoogleCloudMlV1Version(api.GoogleCloudMlV1Version o) { | 793 checkGoogleCloudMlV1Version(api.GoogleCloudMlV1Version o) { |
| 746 buildCounterGoogleCloudMlV1Version++; | 794 buildCounterGoogleCloudMlV1Version++; |
| 747 if (buildCounterGoogleCloudMlV1Version < 3) { | 795 if (buildCounterGoogleCloudMlV1Version < 3) { |
| 796 checkGoogleCloudMlV1AutomaticScaling(o.automaticScaling); |
| 748 unittest.expect(o.createTime, unittest.equals('foo')); | 797 unittest.expect(o.createTime, unittest.equals('foo')); |
| 749 unittest.expect(o.deploymentUri, unittest.equals('foo')); | 798 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
| 750 unittest.expect(o.description, unittest.equals('foo')); | 799 unittest.expect(o.description, unittest.equals('foo')); |
| 751 unittest.expect(o.isDefault, unittest.isTrue); | 800 unittest.expect(o.isDefault, unittest.isTrue); |
| 752 unittest.expect(o.lastUseTime, unittest.equals('foo')); | 801 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
| 753 checkGoogleCloudMlV1ManualScaling(o.manualScaling); | 802 checkGoogleCloudMlV1ManualScaling(o.manualScaling); |
| 754 unittest.expect(o.name, unittest.equals('foo')); | 803 unittest.expect(o.name, unittest.equals('foo')); |
| 755 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 804 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 756 } | 805 } |
| 757 buildCounterGoogleCloudMlV1Version--; | 806 buildCounterGoogleCloudMlV1Version--; |
| 758 } | 807 } |
| 759 | 808 |
| 809 core.int buildCounterGoogleCloudMlV1beta1AutomaticScaling = 0; |
| 810 buildGoogleCloudMlV1beta1AutomaticScaling() { |
| 811 var o = new api.GoogleCloudMlV1beta1AutomaticScaling(); |
| 812 buildCounterGoogleCloudMlV1beta1AutomaticScaling++; |
| 813 if (buildCounterGoogleCloudMlV1beta1AutomaticScaling < 3) { |
| 814 o.minNodes = 42; |
| 815 } |
| 816 buildCounterGoogleCloudMlV1beta1AutomaticScaling--; |
| 817 return o; |
| 818 } |
| 819 |
| 820 checkGoogleCloudMlV1beta1AutomaticScaling(api.GoogleCloudMlV1beta1AutomaticScali
ng o) { |
| 821 buildCounterGoogleCloudMlV1beta1AutomaticScaling++; |
| 822 if (buildCounterGoogleCloudMlV1beta1AutomaticScaling < 3) { |
| 823 unittest.expect(o.minNodes, unittest.equals(42)); |
| 824 } |
| 825 buildCounterGoogleCloudMlV1beta1AutomaticScaling--; |
| 826 } |
| 827 |
| 760 core.int buildCounterGoogleCloudMlV1beta1ManualScaling = 0; | 828 core.int buildCounterGoogleCloudMlV1beta1ManualScaling = 0; |
| 761 buildGoogleCloudMlV1beta1ManualScaling() { | 829 buildGoogleCloudMlV1beta1ManualScaling() { |
| 762 var o = new api.GoogleCloudMlV1beta1ManualScaling(); | 830 var o = new api.GoogleCloudMlV1beta1ManualScaling(); |
| 763 buildCounterGoogleCloudMlV1beta1ManualScaling++; | 831 buildCounterGoogleCloudMlV1beta1ManualScaling++; |
| 764 if (buildCounterGoogleCloudMlV1beta1ManualScaling < 3) { | 832 if (buildCounterGoogleCloudMlV1beta1ManualScaling < 3) { |
| 765 o.nodes = 42; | 833 o.nodes = 42; |
| 766 } | 834 } |
| 767 buildCounterGoogleCloudMlV1beta1ManualScaling--; | 835 buildCounterGoogleCloudMlV1beta1ManualScaling--; |
| 768 return o; | 836 return o; |
| 769 } | 837 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 checkGoogleCloudMlV1beta1Version(o.version); | 873 checkGoogleCloudMlV1beta1Version(o.version); |
| 806 } | 874 } |
| 807 buildCounterGoogleCloudMlV1beta1OperationMetadata--; | 875 buildCounterGoogleCloudMlV1beta1OperationMetadata--; |
| 808 } | 876 } |
| 809 | 877 |
| 810 core.int buildCounterGoogleCloudMlV1beta1Version = 0; | 878 core.int buildCounterGoogleCloudMlV1beta1Version = 0; |
| 811 buildGoogleCloudMlV1beta1Version() { | 879 buildGoogleCloudMlV1beta1Version() { |
| 812 var o = new api.GoogleCloudMlV1beta1Version(); | 880 var o = new api.GoogleCloudMlV1beta1Version(); |
| 813 buildCounterGoogleCloudMlV1beta1Version++; | 881 buildCounterGoogleCloudMlV1beta1Version++; |
| 814 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 882 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
| 883 o.automaticScaling = buildGoogleCloudMlV1beta1AutomaticScaling(); |
| 815 o.createTime = "foo"; | 884 o.createTime = "foo"; |
| 816 o.deploymentUri = "foo"; | 885 o.deploymentUri = "foo"; |
| 817 o.description = "foo"; | 886 o.description = "foo"; |
| 818 o.isDefault = true; | 887 o.isDefault = true; |
| 819 o.lastUseTime = "foo"; | 888 o.lastUseTime = "foo"; |
| 820 o.manualScaling = buildGoogleCloudMlV1beta1ManualScaling(); | 889 o.manualScaling = buildGoogleCloudMlV1beta1ManualScaling(); |
| 821 o.name = "foo"; | 890 o.name = "foo"; |
| 822 o.runtimeVersion = "foo"; | 891 o.runtimeVersion = "foo"; |
| 823 } | 892 } |
| 824 buildCounterGoogleCloudMlV1beta1Version--; | 893 buildCounterGoogleCloudMlV1beta1Version--; |
| 825 return o; | 894 return o; |
| 826 } | 895 } |
| 827 | 896 |
| 828 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { | 897 checkGoogleCloudMlV1beta1Version(api.GoogleCloudMlV1beta1Version o) { |
| 829 buildCounterGoogleCloudMlV1beta1Version++; | 898 buildCounterGoogleCloudMlV1beta1Version++; |
| 830 if (buildCounterGoogleCloudMlV1beta1Version < 3) { | 899 if (buildCounterGoogleCloudMlV1beta1Version < 3) { |
| 900 checkGoogleCloudMlV1beta1AutomaticScaling(o.automaticScaling); |
| 831 unittest.expect(o.createTime, unittest.equals('foo')); | 901 unittest.expect(o.createTime, unittest.equals('foo')); |
| 832 unittest.expect(o.deploymentUri, unittest.equals('foo')); | 902 unittest.expect(o.deploymentUri, unittest.equals('foo')); |
| 833 unittest.expect(o.description, unittest.equals('foo')); | 903 unittest.expect(o.description, unittest.equals('foo')); |
| 834 unittest.expect(o.isDefault, unittest.isTrue); | 904 unittest.expect(o.isDefault, unittest.isTrue); |
| 835 unittest.expect(o.lastUseTime, unittest.equals('foo')); | 905 unittest.expect(o.lastUseTime, unittest.equals('foo')); |
| 836 checkGoogleCloudMlV1beta1ManualScaling(o.manualScaling); | 906 checkGoogleCloudMlV1beta1ManualScaling(o.manualScaling); |
| 837 unittest.expect(o.name, unittest.equals('foo')); | 907 unittest.expect(o.name, unittest.equals('foo')); |
| 838 unittest.expect(o.runtimeVersion, unittest.equals('foo')); | 908 unittest.expect(o.runtimeVersion, unittest.equals('foo')); |
| 839 } | 909 } |
| 840 buildCounterGoogleCloudMlV1beta1Version--; | 910 buildCounterGoogleCloudMlV1beta1Version--; |
| 841 } | 911 } |
| 842 | 912 |
| 843 buildUnnamed13() { | 913 buildUnnamed15() { |
| 844 var o = new core.List<api.GoogleLongrunningOperation>(); | 914 var o = new core.List<api.GoogleLongrunningOperation>(); |
| 845 o.add(buildGoogleLongrunningOperation()); | 915 o.add(buildGoogleLongrunningOperation()); |
| 846 o.add(buildGoogleLongrunningOperation()); | 916 o.add(buildGoogleLongrunningOperation()); |
| 847 return o; | 917 return o; |
| 848 } | 918 } |
| 849 | 919 |
| 850 checkUnnamed13(core.List<api.GoogleLongrunningOperation> o) { | 920 checkUnnamed15(core.List<api.GoogleLongrunningOperation> o) { |
| 851 unittest.expect(o, unittest.hasLength(2)); | 921 unittest.expect(o, unittest.hasLength(2)); |
| 852 checkGoogleLongrunningOperation(o[0]); | 922 checkGoogleLongrunningOperation(o[0]); |
| 853 checkGoogleLongrunningOperation(o[1]); | 923 checkGoogleLongrunningOperation(o[1]); |
| 854 } | 924 } |
| 855 | 925 |
| 856 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; | 926 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; |
| 857 buildGoogleLongrunningListOperationsResponse() { | 927 buildGoogleLongrunningListOperationsResponse() { |
| 858 var o = new api.GoogleLongrunningListOperationsResponse(); | 928 var o = new api.GoogleLongrunningListOperationsResponse(); |
| 859 buildCounterGoogleLongrunningListOperationsResponse++; | 929 buildCounterGoogleLongrunningListOperationsResponse++; |
| 860 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 930 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
| 861 o.nextPageToken = "foo"; | 931 o.nextPageToken = "foo"; |
| 862 o.operations = buildUnnamed13(); | 932 o.operations = buildUnnamed15(); |
| 863 } | 933 } |
| 864 buildCounterGoogleLongrunningListOperationsResponse--; | 934 buildCounterGoogleLongrunningListOperationsResponse--; |
| 865 return o; | 935 return o; |
| 866 } | 936 } |
| 867 | 937 |
| 868 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { | 938 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations
Response o) { |
| 869 buildCounterGoogleLongrunningListOperationsResponse++; | 939 buildCounterGoogleLongrunningListOperationsResponse++; |
| 870 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { | 940 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
| 871 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 941 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 872 checkUnnamed13(o.operations); | 942 checkUnnamed15(o.operations); |
| 873 } | 943 } |
| 874 buildCounterGoogleLongrunningListOperationsResponse--; | 944 buildCounterGoogleLongrunningListOperationsResponse--; |
| 875 } | 945 } |
| 876 | 946 |
| 877 buildUnnamed14() { | 947 buildUnnamed16() { |
| 878 var o = new core.Map<core.String, core.Object>(); | 948 var o = new core.Map<core.String, core.Object>(); |
| 879 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 949 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 880 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 950 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 881 return o; | 951 return o; |
| 882 } | 952 } |
| 883 | 953 |
| 884 checkUnnamed14(core.Map<core.String, core.Object> o) { | 954 checkUnnamed16(core.Map<core.String, core.Object> o) { |
| 885 unittest.expect(o, unittest.hasLength(2)); | 955 unittest.expect(o, unittest.hasLength(2)); |
| 886 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')); | 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')); |
| 887 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')); | 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')); |
| 888 } | 958 } |
| 889 | 959 |
| 890 buildUnnamed15() { | 960 buildUnnamed17() { |
| 891 var o = new core.Map<core.String, core.Object>(); | 961 var o = new core.Map<core.String, core.Object>(); |
| 892 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 962 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 893 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 963 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 894 return o; | 964 return o; |
| 895 } | 965 } |
| 896 | 966 |
| 897 checkUnnamed15(core.Map<core.String, core.Object> o) { | 967 checkUnnamed17(core.Map<core.String, core.Object> o) { |
| 898 unittest.expect(o, unittest.hasLength(2)); | 968 unittest.expect(o, unittest.hasLength(2)); |
| 899 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')); | 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')); |
| 900 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')); | 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')); |
| 901 } | 971 } |
| 902 | 972 |
| 903 core.int buildCounterGoogleLongrunningOperation = 0; | 973 core.int buildCounterGoogleLongrunningOperation = 0; |
| 904 buildGoogleLongrunningOperation() { | 974 buildGoogleLongrunningOperation() { |
| 905 var o = new api.GoogleLongrunningOperation(); | 975 var o = new api.GoogleLongrunningOperation(); |
| 906 buildCounterGoogleLongrunningOperation++; | 976 buildCounterGoogleLongrunningOperation++; |
| 907 if (buildCounterGoogleLongrunningOperation < 3) { | 977 if (buildCounterGoogleLongrunningOperation < 3) { |
| 908 o.done = true; | 978 o.done = true; |
| 909 o.error = buildGoogleRpcStatus(); | 979 o.error = buildGoogleRpcStatus(); |
| 910 o.metadata = buildUnnamed14(); | 980 o.metadata = buildUnnamed16(); |
| 911 o.name = "foo"; | 981 o.name = "foo"; |
| 912 o.response = buildUnnamed15(); | 982 o.response = buildUnnamed17(); |
| 913 } | 983 } |
| 914 buildCounterGoogleLongrunningOperation--; | 984 buildCounterGoogleLongrunningOperation--; |
| 915 return o; | 985 return o; |
| 916 } | 986 } |
| 917 | 987 |
| 918 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { | 988 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { |
| 919 buildCounterGoogleLongrunningOperation++; | 989 buildCounterGoogleLongrunningOperation++; |
| 920 if (buildCounterGoogleLongrunningOperation < 3) { | 990 if (buildCounterGoogleLongrunningOperation < 3) { |
| 921 unittest.expect(o.done, unittest.isTrue); | 991 unittest.expect(o.done, unittest.isTrue); |
| 922 checkGoogleRpcStatus(o.error); | 992 checkGoogleRpcStatus(o.error); |
| 923 checkUnnamed14(o.metadata); | 993 checkUnnamed16(o.metadata); |
| 924 unittest.expect(o.name, unittest.equals('foo')); | 994 unittest.expect(o.name, unittest.equals('foo')); |
| 925 checkUnnamed15(o.response); | 995 checkUnnamed17(o.response); |
| 926 } | 996 } |
| 927 buildCounterGoogleLongrunningOperation--; | 997 buildCounterGoogleLongrunningOperation--; |
| 928 } | 998 } |
| 929 | 999 |
| 930 core.int buildCounterGoogleProtobufEmpty = 0; | 1000 core.int buildCounterGoogleProtobufEmpty = 0; |
| 931 buildGoogleProtobufEmpty() { | 1001 buildGoogleProtobufEmpty() { |
| 932 var o = new api.GoogleProtobufEmpty(); | 1002 var o = new api.GoogleProtobufEmpty(); |
| 933 buildCounterGoogleProtobufEmpty++; | 1003 buildCounterGoogleProtobufEmpty++; |
| 934 if (buildCounterGoogleProtobufEmpty < 3) { | 1004 if (buildCounterGoogleProtobufEmpty < 3) { |
| 935 } | 1005 } |
| 936 buildCounterGoogleProtobufEmpty--; | 1006 buildCounterGoogleProtobufEmpty--; |
| 937 return o; | 1007 return o; |
| 938 } | 1008 } |
| 939 | 1009 |
| 940 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { | 1010 checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { |
| 941 buildCounterGoogleProtobufEmpty++; | 1011 buildCounterGoogleProtobufEmpty++; |
| 942 if (buildCounterGoogleProtobufEmpty < 3) { | 1012 if (buildCounterGoogleProtobufEmpty < 3) { |
| 943 } | 1013 } |
| 944 buildCounterGoogleProtobufEmpty--; | 1014 buildCounterGoogleProtobufEmpty--; |
| 945 } | 1015 } |
| 946 | 1016 |
| 947 buildUnnamed16() { | 1017 buildUnnamed18() { |
| 948 var o = new core.Map<core.String, core.Object>(); | 1018 var o = new core.Map<core.String, core.Object>(); |
| 949 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1019 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 950 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1020 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 951 return o; | 1021 return o; |
| 952 } | 1022 } |
| 953 | 1023 |
| 954 checkUnnamed16(core.Map<core.String, core.Object> o) { | 1024 checkUnnamed18(core.Map<core.String, core.Object> o) { |
| 955 unittest.expect(o, unittest.hasLength(2)); | 1025 unittest.expect(o, unittest.hasLength(2)); |
| 956 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')); | 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')); |
| 957 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')); | 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')); |
| 958 } | 1028 } |
| 959 | 1029 |
| 960 buildUnnamed17() { | 1030 buildUnnamed19() { |
| 961 var o = new core.List<core.Map<core.String, core.Object>>(); | 1031 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 962 o.add(buildUnnamed16()); | 1032 o.add(buildUnnamed18()); |
| 963 o.add(buildUnnamed16()); | 1033 o.add(buildUnnamed18()); |
| 964 return o; | 1034 return o; |
| 965 } | 1035 } |
| 966 | 1036 |
| 967 checkUnnamed17(core.List<core.Map<core.String, core.Object>> o) { | 1037 checkUnnamed19(core.List<core.Map<core.String, core.Object>> o) { |
| 968 unittest.expect(o, unittest.hasLength(2)); | 1038 unittest.expect(o, unittest.hasLength(2)); |
| 969 checkUnnamed16(o[0]); | 1039 checkUnnamed18(o[0]); |
| 970 checkUnnamed16(o[1]); | 1040 checkUnnamed18(o[1]); |
| 971 } | 1041 } |
| 972 | 1042 |
| 973 core.int buildCounterGoogleRpcStatus = 0; | 1043 core.int buildCounterGoogleRpcStatus = 0; |
| 974 buildGoogleRpcStatus() { | 1044 buildGoogleRpcStatus() { |
| 975 var o = new api.GoogleRpcStatus(); | 1045 var o = new api.GoogleRpcStatus(); |
| 976 buildCounterGoogleRpcStatus++; | 1046 buildCounterGoogleRpcStatus++; |
| 977 if (buildCounterGoogleRpcStatus < 3) { | 1047 if (buildCounterGoogleRpcStatus < 3) { |
| 978 o.code = 42; | 1048 o.code = 42; |
| 979 o.details = buildUnnamed17(); | 1049 o.details = buildUnnamed19(); |
| 980 o.message = "foo"; | 1050 o.message = "foo"; |
| 981 } | 1051 } |
| 982 buildCounterGoogleRpcStatus--; | 1052 buildCounterGoogleRpcStatus--; |
| 983 return o; | 1053 return o; |
| 984 } | 1054 } |
| 985 | 1055 |
| 986 checkGoogleRpcStatus(api.GoogleRpcStatus o) { | 1056 checkGoogleRpcStatus(api.GoogleRpcStatus o) { |
| 987 buildCounterGoogleRpcStatus++; | 1057 buildCounterGoogleRpcStatus++; |
| 988 if (buildCounterGoogleRpcStatus < 3) { | 1058 if (buildCounterGoogleRpcStatus < 3) { |
| 989 unittest.expect(o.code, unittest.equals(42)); | 1059 unittest.expect(o.code, unittest.equals(42)); |
| 990 checkUnnamed17(o.details); | 1060 checkUnnamed19(o.details); |
| 991 unittest.expect(o.message, unittest.equals('foo')); | 1061 unittest.expect(o.message, unittest.equals('foo')); |
| 992 } | 1062 } |
| 993 buildCounterGoogleRpcStatus--; | 1063 buildCounterGoogleRpcStatus--; |
| 994 } | 1064 } |
| 995 | 1065 |
| 996 | 1066 |
| 997 main() { | 1067 main() { |
| 998 unittest.group("obj-schema-GoogleApiHttpBody", () { | 1068 unittest.group("obj-schema-GoogleApiHttpBody", () { |
| 999 unittest.test("to-json--from-json", () { | 1069 unittest.test("to-json--from-json", () { |
| 1000 var o = buildGoogleApiHttpBody(); | 1070 var o = buildGoogleApiHttpBody(); |
| 1001 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); | 1071 var od = new api.GoogleApiHttpBody.fromJson(o.toJson()); |
| 1002 checkGoogleApiHttpBody(od); | 1072 checkGoogleApiHttpBody(od); |
| 1003 }); | 1073 }); |
| 1004 }); | 1074 }); |
| 1005 | 1075 |
| 1006 | 1076 |
| 1007 unittest.group("obj-schema-GoogleCloudMlV1HyperparameterOutputHyperparameterMe
tric", () { | 1077 unittest.group("obj-schema-GoogleCloudMlV1HyperparameterOutputHyperparameterMe
tric", () { |
| 1008 unittest.test("to-json--from-json", () { | 1078 unittest.test("to-json--from-json", () { |
| 1009 var o = buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(); | 1079 var o = buildGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(); |
| 1010 var od = new api.GoogleCloudMlV1HyperparameterOutputHyperparameterMetric.f
romJson(o.toJson()); | 1080 var od = new api.GoogleCloudMlV1HyperparameterOutputHyperparameterMetric.f
romJson(o.toJson()); |
| 1011 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(od); | 1081 checkGoogleCloudMlV1HyperparameterOutputHyperparameterMetric(od); |
| 1012 }); | 1082 }); |
| 1013 }); | 1083 }); |
| 1014 | 1084 |
| 1015 | 1085 |
| 1086 unittest.group("obj-schema-GoogleCloudMlV1AutomaticScaling", () { |
| 1087 unittest.test("to-json--from-json", () { |
| 1088 var o = buildGoogleCloudMlV1AutomaticScaling(); |
| 1089 var od = new api.GoogleCloudMlV1AutomaticScaling.fromJson(o.toJson()); |
| 1090 checkGoogleCloudMlV1AutomaticScaling(od); |
| 1091 }); |
| 1092 }); |
| 1093 |
| 1094 |
| 1016 unittest.group("obj-schema-GoogleCloudMlV1CancelJobRequest", () { | 1095 unittest.group("obj-schema-GoogleCloudMlV1CancelJobRequest", () { |
| 1017 unittest.test("to-json--from-json", () { | 1096 unittest.test("to-json--from-json", () { |
| 1018 var o = buildGoogleCloudMlV1CancelJobRequest(); | 1097 var o = buildGoogleCloudMlV1CancelJobRequest(); |
| 1019 var od = new api.GoogleCloudMlV1CancelJobRequest.fromJson(o.toJson()); | 1098 var od = new api.GoogleCloudMlV1CancelJobRequest.fromJson(o.toJson()); |
| 1020 checkGoogleCloudMlV1CancelJobRequest(od); | 1099 checkGoogleCloudMlV1CancelJobRequest(od); |
| 1021 }); | 1100 }); |
| 1022 }); | 1101 }); |
| 1023 | 1102 |
| 1024 | 1103 |
| 1025 unittest.group("obj-schema-GoogleCloudMlV1GetConfigResponse", () { | 1104 unittest.group("obj-schema-GoogleCloudMlV1GetConfigResponse", () { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 | 1256 |
| 1178 unittest.group("obj-schema-GoogleCloudMlV1Version", () { | 1257 unittest.group("obj-schema-GoogleCloudMlV1Version", () { |
| 1179 unittest.test("to-json--from-json", () { | 1258 unittest.test("to-json--from-json", () { |
| 1180 var o = buildGoogleCloudMlV1Version(); | 1259 var o = buildGoogleCloudMlV1Version(); |
| 1181 var od = new api.GoogleCloudMlV1Version.fromJson(o.toJson()); | 1260 var od = new api.GoogleCloudMlV1Version.fromJson(o.toJson()); |
| 1182 checkGoogleCloudMlV1Version(od); | 1261 checkGoogleCloudMlV1Version(od); |
| 1183 }); | 1262 }); |
| 1184 }); | 1263 }); |
| 1185 | 1264 |
| 1186 | 1265 |
| 1266 unittest.group("obj-schema-GoogleCloudMlV1beta1AutomaticScaling", () { |
| 1267 unittest.test("to-json--from-json", () { |
| 1268 var o = buildGoogleCloudMlV1beta1AutomaticScaling(); |
| 1269 var od = new api.GoogleCloudMlV1beta1AutomaticScaling.fromJson(o.toJson())
; |
| 1270 checkGoogleCloudMlV1beta1AutomaticScaling(od); |
| 1271 }); |
| 1272 }); |
| 1273 |
| 1274 |
| 1187 unittest.group("obj-schema-GoogleCloudMlV1beta1ManualScaling", () { | 1275 unittest.group("obj-schema-GoogleCloudMlV1beta1ManualScaling", () { |
| 1188 unittest.test("to-json--from-json", () { | 1276 unittest.test("to-json--from-json", () { |
| 1189 var o = buildGoogleCloudMlV1beta1ManualScaling(); | 1277 var o = buildGoogleCloudMlV1beta1ManualScaling(); |
| 1190 var od = new api.GoogleCloudMlV1beta1ManualScaling.fromJson(o.toJson()); | 1278 var od = new api.GoogleCloudMlV1beta1ManualScaling.fromJson(o.toJson()); |
| 1191 checkGoogleCloudMlV1beta1ManualScaling(od); | 1279 checkGoogleCloudMlV1beta1ManualScaling(od); |
| 1192 }); | 1280 }); |
| 1193 }); | 1281 }); |
| 1194 | 1282 |
| 1195 | 1283 |
| 1196 unittest.group("obj-schema-GoogleCloudMlV1beta1OperationMetadata", () { | 1284 unittest.group("obj-schema-GoogleCloudMlV1beta1OperationMetadata", () { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 }); | 1334 }); |
| 1247 }); | 1335 }); |
| 1248 | 1336 |
| 1249 | 1337 |
| 1250 unittest.group("resource-ProjectsResourceApi", () { | 1338 unittest.group("resource-ProjectsResourceApi", () { |
| 1251 unittest.test("method--getConfig", () { | 1339 unittest.test("method--getConfig", () { |
| 1252 | 1340 |
| 1253 var mock = new HttpServerMock(); | 1341 var mock = new HttpServerMock(); |
| 1254 api.ProjectsResourceApi res = new api.MlApi(mock).projects; | 1342 api.ProjectsResourceApi res = new api.MlApi(mock).projects; |
| 1255 var arg_name = "foo"; | 1343 var arg_name = "foo"; |
| 1256 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1344 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1257 var path = (req.url).path; | 1345 var path = (req.url).path; |
| 1258 var pathOffset = 0; | 1346 var pathOffset = 0; |
| 1259 var index; | 1347 var index; |
| 1260 var subPart; | 1348 var subPart; |
| 1261 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1262 pathOffset += 1; | 1350 pathOffset += 1; |
| 1263 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1351 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1264 pathOffset += 3; | 1352 pathOffset += 3; |
| 1265 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1353 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1266 | 1354 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1281 } | 1369 } |
| 1282 } | 1370 } |
| 1283 | 1371 |
| 1284 | 1372 |
| 1285 var h = { | 1373 var h = { |
| 1286 "content-type" : "application/json; charset=utf-8", | 1374 "content-type" : "application/json; charset=utf-8", |
| 1287 }; | 1375 }; |
| 1288 var resp = convert.JSON.encode(buildGoogleCloudMlV1GetConfigResponse()); | 1376 var resp = convert.JSON.encode(buildGoogleCloudMlV1GetConfigResponse()); |
| 1289 return new async.Future.value(stringResponse(200, h, resp)); | 1377 return new async.Future.value(stringResponse(200, h, resp)); |
| 1290 }), true); | 1378 }), true); |
| 1291 res.getConfig(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1Get
ConfigResponse response) { | 1379 res.getConfig(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Ge
tConfigResponse response) { |
| 1292 checkGoogleCloudMlV1GetConfigResponse(response); | 1380 checkGoogleCloudMlV1GetConfigResponse(response); |
| 1293 }))); | 1381 }))); |
| 1294 }); | 1382 }); |
| 1295 | 1383 |
| 1296 unittest.test("method--predict", () { | 1384 unittest.test("method--predict", () { |
| 1297 | 1385 |
| 1298 var mock = new HttpServerMock(); | 1386 var mock = new HttpServerMock(); |
| 1299 api.ProjectsResourceApi res = new api.MlApi(mock).projects; | 1387 api.ProjectsResourceApi res = new api.MlApi(mock).projects; |
| 1300 var arg_request = buildGoogleCloudMlV1PredictRequest(); | 1388 var arg_request = buildGoogleCloudMlV1PredictRequest(); |
| 1301 var arg_name = "foo"; | 1389 var arg_name = "foo"; |
| 1302 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1390 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1303 var obj = new api.GoogleCloudMlV1PredictRequest.fromJson(json); | 1391 var obj = new api.GoogleCloudMlV1PredictRequest.fromJson(json); |
| 1304 checkGoogleCloudMlV1PredictRequest(obj); | 1392 checkGoogleCloudMlV1PredictRequest(obj); |
| 1305 | 1393 |
| 1306 var path = (req.url).path; | 1394 var path = (req.url).path; |
| 1307 var pathOffset = 0; | 1395 var pathOffset = 0; |
| 1308 var index; | 1396 var index; |
| 1309 var subPart; | 1397 var subPart; |
| 1310 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1398 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1311 pathOffset += 1; | 1399 pathOffset += 1; |
| 1312 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1400 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1330 } | 1418 } |
| 1331 } | 1419 } |
| 1332 | 1420 |
| 1333 | 1421 |
| 1334 var h = { | 1422 var h = { |
| 1335 "content-type" : "application/json; charset=utf-8", | 1423 "content-type" : "application/json; charset=utf-8", |
| 1336 }; | 1424 }; |
| 1337 var resp = convert.JSON.encode(buildGoogleApiHttpBody()); | 1425 var resp = convert.JSON.encode(buildGoogleApiHttpBody()); |
| 1338 return new async.Future.value(stringResponse(200, h, resp)); | 1426 return new async.Future.value(stringResponse(200, h, resp)); |
| 1339 }), true); | 1427 }), true); |
| 1340 res.predict(arg_request, arg_name).then(unittest.expectAsync(((api.GoogleA
piHttpBody response) { | 1428 res.predict(arg_request, arg_name).then(unittest.expectAsync1(((api.Google
ApiHttpBody response) { |
| 1341 checkGoogleApiHttpBody(response); | 1429 checkGoogleApiHttpBody(response); |
| 1342 }))); | 1430 }))); |
| 1343 }); | 1431 }); |
| 1344 | 1432 |
| 1345 }); | 1433 }); |
| 1346 | 1434 |
| 1347 | 1435 |
| 1348 unittest.group("resource-ProjectsJobsResourceApi", () { | 1436 unittest.group("resource-ProjectsJobsResourceApi", () { |
| 1349 unittest.test("method--cancel", () { | 1437 unittest.test("method--cancel", () { |
| 1350 | 1438 |
| 1351 var mock = new HttpServerMock(); | 1439 var mock = new HttpServerMock(); |
| 1352 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 1440 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
| 1353 var arg_request = buildGoogleCloudMlV1CancelJobRequest(); | 1441 var arg_request = buildGoogleCloudMlV1CancelJobRequest(); |
| 1354 var arg_name = "foo"; | 1442 var arg_name = "foo"; |
| 1355 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1443 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1356 var obj = new api.GoogleCloudMlV1CancelJobRequest.fromJson(json); | 1444 var obj = new api.GoogleCloudMlV1CancelJobRequest.fromJson(json); |
| 1357 checkGoogleCloudMlV1CancelJobRequest(obj); | 1445 checkGoogleCloudMlV1CancelJobRequest(obj); |
| 1358 | 1446 |
| 1359 var path = (req.url).path; | 1447 var path = (req.url).path; |
| 1360 var pathOffset = 0; | 1448 var pathOffset = 0; |
| 1361 var index; | 1449 var index; |
| 1362 var subPart; | 1450 var subPart; |
| 1363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1364 pathOffset += 1; | 1452 pathOffset += 1; |
| 1365 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1453 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1383 } | 1471 } |
| 1384 } | 1472 } |
| 1385 | 1473 |
| 1386 | 1474 |
| 1387 var h = { | 1475 var h = { |
| 1388 "content-type" : "application/json; charset=utf-8", | 1476 "content-type" : "application/json; charset=utf-8", |
| 1389 }; | 1477 }; |
| 1390 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); | 1478 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); |
| 1391 return new async.Future.value(stringResponse(200, h, resp)); | 1479 return new async.Future.value(stringResponse(200, h, resp)); |
| 1392 }), true); | 1480 }), true); |
| 1393 res.cancel(arg_request, arg_name).then(unittest.expectAsync(((api.GooglePr
otobufEmpty response) { | 1481 res.cancel(arg_request, arg_name).then(unittest.expectAsync1(((api.GoogleP
rotobufEmpty response) { |
| 1394 checkGoogleProtobufEmpty(response); | 1482 checkGoogleProtobufEmpty(response); |
| 1395 }))); | 1483 }))); |
| 1396 }); | 1484 }); |
| 1397 | 1485 |
| 1398 unittest.test("method--create", () { | 1486 unittest.test("method--create", () { |
| 1399 | 1487 |
| 1400 var mock = new HttpServerMock(); | 1488 var mock = new HttpServerMock(); |
| 1401 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 1489 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
| 1402 var arg_request = buildGoogleCloudMlV1Job(); | 1490 var arg_request = buildGoogleCloudMlV1Job(); |
| 1403 var arg_parent = "foo"; | 1491 var arg_parent = "foo"; |
| 1404 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1492 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1405 var obj = new api.GoogleCloudMlV1Job.fromJson(json); | 1493 var obj = new api.GoogleCloudMlV1Job.fromJson(json); |
| 1406 checkGoogleCloudMlV1Job(obj); | 1494 checkGoogleCloudMlV1Job(obj); |
| 1407 | 1495 |
| 1408 var path = (req.url).path; | 1496 var path = (req.url).path; |
| 1409 var pathOffset = 0; | 1497 var pathOffset = 0; |
| 1410 var index; | 1498 var index; |
| 1411 var subPart; | 1499 var subPart; |
| 1412 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1413 pathOffset += 1; | 1501 pathOffset += 1; |
| 1414 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1502 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1432 } | 1520 } |
| 1433 } | 1521 } |
| 1434 | 1522 |
| 1435 | 1523 |
| 1436 var h = { | 1524 var h = { |
| 1437 "content-type" : "application/json; charset=utf-8", | 1525 "content-type" : "application/json; charset=utf-8", |
| 1438 }; | 1526 }; |
| 1439 var resp = convert.JSON.encode(buildGoogleCloudMlV1Job()); | 1527 var resp = convert.JSON.encode(buildGoogleCloudMlV1Job()); |
| 1440 return new async.Future.value(stringResponse(200, h, resp)); | 1528 return new async.Future.value(stringResponse(200, h, resp)); |
| 1441 }), true); | 1529 }), true); |
| 1442 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Google
CloudMlV1Job response) { | 1530 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Googl
eCloudMlV1Job response) { |
| 1443 checkGoogleCloudMlV1Job(response); | 1531 checkGoogleCloudMlV1Job(response); |
| 1444 }))); | 1532 }))); |
| 1445 }); | 1533 }); |
| 1446 | 1534 |
| 1447 unittest.test("method--get", () { | 1535 unittest.test("method--get", () { |
| 1448 | 1536 |
| 1449 var mock = new HttpServerMock(); | 1537 var mock = new HttpServerMock(); |
| 1450 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 1538 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
| 1451 var arg_name = "foo"; | 1539 var arg_name = "foo"; |
| 1452 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1540 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1453 var path = (req.url).path; | 1541 var path = (req.url).path; |
| 1454 var pathOffset = 0; | 1542 var pathOffset = 0; |
| 1455 var index; | 1543 var index; |
| 1456 var subPart; | 1544 var subPart; |
| 1457 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1458 pathOffset += 1; | 1546 pathOffset += 1; |
| 1459 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1547 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1460 pathOffset += 3; | 1548 pathOffset += 3; |
| 1461 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1549 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1462 | 1550 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1477 } | 1565 } |
| 1478 } | 1566 } |
| 1479 | 1567 |
| 1480 | 1568 |
| 1481 var h = { | 1569 var h = { |
| 1482 "content-type" : "application/json; charset=utf-8", | 1570 "content-type" : "application/json; charset=utf-8", |
| 1483 }; | 1571 }; |
| 1484 var resp = convert.JSON.encode(buildGoogleCloudMlV1Job()); | 1572 var resp = convert.JSON.encode(buildGoogleCloudMlV1Job()); |
| 1485 return new async.Future.value(stringResponse(200, h, resp)); | 1573 return new async.Future.value(stringResponse(200, h, resp)); |
| 1486 }), true); | 1574 }), true); |
| 1487 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1Job respo
nse) { | 1575 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Job resp
onse) { |
| 1488 checkGoogleCloudMlV1Job(response); | 1576 checkGoogleCloudMlV1Job(response); |
| 1489 }))); | 1577 }))); |
| 1490 }); | 1578 }); |
| 1491 | 1579 |
| 1492 unittest.test("method--list", () { | 1580 unittest.test("method--list", () { |
| 1493 | 1581 |
| 1494 var mock = new HttpServerMock(); | 1582 var mock = new HttpServerMock(); |
| 1495 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; | 1583 api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs; |
| 1496 var arg_parent = "foo"; | 1584 var arg_parent = "foo"; |
| 1585 var arg_filter = "foo"; |
| 1497 var arg_pageToken = "foo"; | 1586 var arg_pageToken = "foo"; |
| 1498 var arg_pageSize = 42; | 1587 var arg_pageSize = 42; |
| 1499 var arg_filter = "foo"; | 1588 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1500 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1501 var path = (req.url).path; | 1589 var path = (req.url).path; |
| 1502 var pathOffset = 0; | 1590 var pathOffset = 0; |
| 1503 var index; | 1591 var index; |
| 1504 var subPart; | 1592 var subPart; |
| 1505 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1593 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1506 pathOffset += 1; | 1594 pathOffset += 1; |
| 1507 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1595 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1508 pathOffset += 3; | 1596 pathOffset += 3; |
| 1509 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1597 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1510 | 1598 |
| 1511 var query = (req.url).query; | 1599 var query = (req.url).query; |
| 1512 var queryOffset = 0; | 1600 var queryOffset = 0; |
| 1513 var queryMap = {}; | 1601 var queryMap = {}; |
| 1514 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1602 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1515 parseBool(n) { | 1603 parseBool(n) { |
| 1516 if (n == "true") return true; | 1604 if (n == "true") return true; |
| 1517 if (n == "false") return false; | 1605 if (n == "false") return false; |
| 1518 if (n == null) return null; | 1606 if (n == null) return null; |
| 1519 throw new core.ArgumentError("Invalid boolean: $n"); | 1607 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1520 } | 1608 } |
| 1521 if (query.length > 0) { | 1609 if (query.length > 0) { |
| 1522 for (var part in query.split("&")) { | 1610 for (var part in query.split("&")) { |
| 1523 var keyvalue = part.split("="); | 1611 var keyvalue = part.split("="); |
| 1524 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1525 } | 1613 } |
| 1526 } | 1614 } |
| 1615 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1527 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1616 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1528 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1617 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1529 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 1530 | 1618 |
| 1531 | 1619 |
| 1532 var h = { | 1620 var h = { |
| 1533 "content-type" : "application/json; charset=utf-8", | 1621 "content-type" : "application/json; charset=utf-8", |
| 1534 }; | 1622 }; |
| 1535 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListJobsResponse()); | 1623 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListJobsResponse()); |
| 1536 return new async.Future.value(stringResponse(200, h, resp)); | 1624 return new async.Future.value(stringResponse(200, h, resp)); |
| 1537 }), true); | 1625 }), true); |
| 1538 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize, fil
ter: arg_filter).then(unittest.expectAsync(((api.GoogleCloudMlV1ListJobsResponse
response) { | 1626 res.list(arg_parent, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.GoogleCloudMlV1ListJobsRespons
e response) { |
| 1539 checkGoogleCloudMlV1ListJobsResponse(response); | 1627 checkGoogleCloudMlV1ListJobsResponse(response); |
| 1540 }))); | 1628 }))); |
| 1541 }); | 1629 }); |
| 1542 | 1630 |
| 1543 }); | 1631 }); |
| 1544 | 1632 |
| 1545 | 1633 |
| 1546 unittest.group("resource-ProjectsModelsResourceApi", () { | 1634 unittest.group("resource-ProjectsModelsResourceApi", () { |
| 1547 unittest.test("method--create", () { | 1635 unittest.test("method--create", () { |
| 1548 | 1636 |
| 1549 var mock = new HttpServerMock(); | 1637 var mock = new HttpServerMock(); |
| 1550 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 1638 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 1551 var arg_request = buildGoogleCloudMlV1Model(); | 1639 var arg_request = buildGoogleCloudMlV1Model(); |
| 1552 var arg_parent = "foo"; | 1640 var arg_parent = "foo"; |
| 1553 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1641 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1554 var obj = new api.GoogleCloudMlV1Model.fromJson(json); | 1642 var obj = new api.GoogleCloudMlV1Model.fromJson(json); |
| 1555 checkGoogleCloudMlV1Model(obj); | 1643 checkGoogleCloudMlV1Model(obj); |
| 1556 | 1644 |
| 1557 var path = (req.url).path; | 1645 var path = (req.url).path; |
| 1558 var pathOffset = 0; | 1646 var pathOffset = 0; |
| 1559 var index; | 1647 var index; |
| 1560 var subPart; | 1648 var subPart; |
| 1561 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1649 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1562 pathOffset += 1; | 1650 pathOffset += 1; |
| 1563 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1651 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1581 } | 1669 } |
| 1582 } | 1670 } |
| 1583 | 1671 |
| 1584 | 1672 |
| 1585 var h = { | 1673 var h = { |
| 1586 "content-type" : "application/json; charset=utf-8", | 1674 "content-type" : "application/json; charset=utf-8", |
| 1587 }; | 1675 }; |
| 1588 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); | 1676 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); |
| 1589 return new async.Future.value(stringResponse(200, h, resp)); | 1677 return new async.Future.value(stringResponse(200, h, resp)); |
| 1590 }), true); | 1678 }), true); |
| 1591 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Google
CloudMlV1Model response) { | 1679 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Googl
eCloudMlV1Model response) { |
| 1592 checkGoogleCloudMlV1Model(response); | 1680 checkGoogleCloudMlV1Model(response); |
| 1593 }))); | 1681 }))); |
| 1594 }); | 1682 }); |
| 1595 | 1683 |
| 1596 unittest.test("method--delete", () { | 1684 unittest.test("method--delete", () { |
| 1597 | 1685 |
| 1598 var mock = new HttpServerMock(); | 1686 var mock = new HttpServerMock(); |
| 1599 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 1687 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 1600 var arg_name = "foo"; | 1688 var arg_name = "foo"; |
| 1601 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1689 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1602 var path = (req.url).path; | 1690 var path = (req.url).path; |
| 1603 var pathOffset = 0; | 1691 var pathOffset = 0; |
| 1604 var index; | 1692 var index; |
| 1605 var subPart; | 1693 var subPart; |
| 1606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1694 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1607 pathOffset += 1; | 1695 pathOffset += 1; |
| 1608 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1696 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1609 pathOffset += 3; | 1697 pathOffset += 3; |
| 1610 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1698 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1611 | 1699 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1626 } | 1714 } |
| 1627 } | 1715 } |
| 1628 | 1716 |
| 1629 | 1717 |
| 1630 var h = { | 1718 var h = { |
| 1631 "content-type" : "application/json; charset=utf-8", | 1719 "content-type" : "application/json; charset=utf-8", |
| 1632 }; | 1720 }; |
| 1633 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); | 1721 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); |
| 1634 return new async.Future.value(stringResponse(200, h, resp)); | 1722 return new async.Future.value(stringResponse(200, h, resp)); |
| 1635 }), true); | 1723 }), true); |
| 1636 res.delete(arg_name).then(unittest.expectAsync(((api.GoogleLongrunningOper
ation response) { | 1724 res.delete(arg_name).then(unittest.expectAsync1(((api.GoogleLongrunningOpe
ration response) { |
| 1637 checkGoogleLongrunningOperation(response); | 1725 checkGoogleLongrunningOperation(response); |
| 1638 }))); | 1726 }))); |
| 1639 }); | 1727 }); |
| 1640 | 1728 |
| 1641 unittest.test("method--get", () { | 1729 unittest.test("method--get", () { |
| 1642 | 1730 |
| 1643 var mock = new HttpServerMock(); | 1731 var mock = new HttpServerMock(); |
| 1644 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 1732 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 1645 var arg_name = "foo"; | 1733 var arg_name = "foo"; |
| 1646 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1734 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1647 var path = (req.url).path; | 1735 var path = (req.url).path; |
| 1648 var pathOffset = 0; | 1736 var pathOffset = 0; |
| 1649 var index; | 1737 var index; |
| 1650 var subPart; | 1738 var subPart; |
| 1651 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1652 pathOffset += 1; | 1740 pathOffset += 1; |
| 1653 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1741 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1654 pathOffset += 3; | 1742 pathOffset += 3; |
| 1655 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1743 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1656 | 1744 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1671 } | 1759 } |
| 1672 } | 1760 } |
| 1673 | 1761 |
| 1674 | 1762 |
| 1675 var h = { | 1763 var h = { |
| 1676 "content-type" : "application/json; charset=utf-8", | 1764 "content-type" : "application/json; charset=utf-8", |
| 1677 }; | 1765 }; |
| 1678 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); | 1766 var resp = convert.JSON.encode(buildGoogleCloudMlV1Model()); |
| 1679 return new async.Future.value(stringResponse(200, h, resp)); | 1767 return new async.Future.value(stringResponse(200, h, resp)); |
| 1680 }), true); | 1768 }), true); |
| 1681 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1Model res
ponse) { | 1769 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Model re
sponse) { |
| 1682 checkGoogleCloudMlV1Model(response); | 1770 checkGoogleCloudMlV1Model(response); |
| 1683 }))); | 1771 }))); |
| 1684 }); | 1772 }); |
| 1685 | 1773 |
| 1686 unittest.test("method--list", () { | 1774 unittest.test("method--list", () { |
| 1687 | 1775 |
| 1688 var mock = new HttpServerMock(); | 1776 var mock = new HttpServerMock(); |
| 1689 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; | 1777 api.ProjectsModelsResourceApi res = new api.MlApi(mock).projects.models; |
| 1690 var arg_parent = "foo"; | 1778 var arg_parent = "foo"; |
| 1691 var arg_pageToken = "foo"; | 1779 var arg_pageToken = "foo"; |
| 1692 var arg_pageSize = 42; | 1780 var arg_pageSize = 42; |
| 1693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1781 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1694 var path = (req.url).path; | 1782 var path = (req.url).path; |
| 1695 var pathOffset = 0; | 1783 var pathOffset = 0; |
| 1696 var index; | 1784 var index; |
| 1697 var subPart; | 1785 var subPart; |
| 1698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1786 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1699 pathOffset += 1; | 1787 pathOffset += 1; |
| 1700 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1788 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1701 pathOffset += 3; | 1789 pathOffset += 3; |
| 1702 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1790 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1703 | 1791 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1720 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1808 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1721 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1809 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1722 | 1810 |
| 1723 | 1811 |
| 1724 var h = { | 1812 var h = { |
| 1725 "content-type" : "application/json; charset=utf-8", | 1813 "content-type" : "application/json; charset=utf-8", |
| 1726 }; | 1814 }; |
| 1727 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListModelsResponse())
; | 1815 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListModelsResponse())
; |
| 1728 return new async.Future.value(stringResponse(200, h, resp)); | 1816 return new async.Future.value(stringResponse(200, h, resp)); |
| 1729 }), true); | 1817 }), true); |
| 1730 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync(((api.GoogleCloudMlV1ListModelsResponse response) { | 1818 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.GoogleCloudMlV1ListModelsResponse response) { |
| 1731 checkGoogleCloudMlV1ListModelsResponse(response); | 1819 checkGoogleCloudMlV1ListModelsResponse(response); |
| 1732 }))); | 1820 }))); |
| 1733 }); | 1821 }); |
| 1734 | 1822 |
| 1735 }); | 1823 }); |
| 1736 | 1824 |
| 1737 | 1825 |
| 1738 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { | 1826 unittest.group("resource-ProjectsModelsVersionsResourceApi", () { |
| 1739 unittest.test("method--create", () { | 1827 unittest.test("method--create", () { |
| 1740 | 1828 |
| 1741 var mock = new HttpServerMock(); | 1829 var mock = new HttpServerMock(); |
| 1742 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1830 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
| 1743 var arg_request = buildGoogleCloudMlV1Version(); | 1831 var arg_request = buildGoogleCloudMlV1Version(); |
| 1744 var arg_parent = "foo"; | 1832 var arg_parent = "foo"; |
| 1745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1833 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1746 var obj = new api.GoogleCloudMlV1Version.fromJson(json); | 1834 var obj = new api.GoogleCloudMlV1Version.fromJson(json); |
| 1747 checkGoogleCloudMlV1Version(obj); | 1835 checkGoogleCloudMlV1Version(obj); |
| 1748 | 1836 |
| 1749 var path = (req.url).path; | 1837 var path = (req.url).path; |
| 1750 var pathOffset = 0; | 1838 var pathOffset = 0; |
| 1751 var index; | 1839 var index; |
| 1752 var subPart; | 1840 var subPart; |
| 1753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1841 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1754 pathOffset += 1; | 1842 pathOffset += 1; |
| 1755 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1843 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1773 } | 1861 } |
| 1774 } | 1862 } |
| 1775 | 1863 |
| 1776 | 1864 |
| 1777 var h = { | 1865 var h = { |
| 1778 "content-type" : "application/json; charset=utf-8", | 1866 "content-type" : "application/json; charset=utf-8", |
| 1779 }; | 1867 }; |
| 1780 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); | 1868 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); |
| 1781 return new async.Future.value(stringResponse(200, h, resp)); | 1869 return new async.Future.value(stringResponse(200, h, resp)); |
| 1782 }), true); | 1870 }), true); |
| 1783 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Google
LongrunningOperation response) { | 1871 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Googl
eLongrunningOperation response) { |
| 1784 checkGoogleLongrunningOperation(response); | 1872 checkGoogleLongrunningOperation(response); |
| 1785 }))); | 1873 }))); |
| 1786 }); | 1874 }); |
| 1787 | 1875 |
| 1788 unittest.test("method--delete", () { | 1876 unittest.test("method--delete", () { |
| 1789 | 1877 |
| 1790 var mock = new HttpServerMock(); | 1878 var mock = new HttpServerMock(); |
| 1791 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1879 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
| 1792 var arg_name = "foo"; | 1880 var arg_name = "foo"; |
| 1793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1881 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1794 var path = (req.url).path; | 1882 var path = (req.url).path; |
| 1795 var pathOffset = 0; | 1883 var pathOffset = 0; |
| 1796 var index; | 1884 var index; |
| 1797 var subPart; | 1885 var subPart; |
| 1798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1799 pathOffset += 1; | 1887 pathOffset += 1; |
| 1800 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1888 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1801 pathOffset += 3; | 1889 pathOffset += 3; |
| 1802 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1890 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1803 | 1891 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1818 } | 1906 } |
| 1819 } | 1907 } |
| 1820 | 1908 |
| 1821 | 1909 |
| 1822 var h = { | 1910 var h = { |
| 1823 "content-type" : "application/json; charset=utf-8", | 1911 "content-type" : "application/json; charset=utf-8", |
| 1824 }; | 1912 }; |
| 1825 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); | 1913 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); |
| 1826 return new async.Future.value(stringResponse(200, h, resp)); | 1914 return new async.Future.value(stringResponse(200, h, resp)); |
| 1827 }), true); | 1915 }), true); |
| 1828 res.delete(arg_name).then(unittest.expectAsync(((api.GoogleLongrunningOper
ation response) { | 1916 res.delete(arg_name).then(unittest.expectAsync1(((api.GoogleLongrunningOpe
ration response) { |
| 1829 checkGoogleLongrunningOperation(response); | 1917 checkGoogleLongrunningOperation(response); |
| 1830 }))); | 1918 }))); |
| 1831 }); | 1919 }); |
| 1832 | 1920 |
| 1833 unittest.test("method--get", () { | 1921 unittest.test("method--get", () { |
| 1834 | 1922 |
| 1835 var mock = new HttpServerMock(); | 1923 var mock = new HttpServerMock(); |
| 1836 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1924 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
| 1837 var arg_name = "foo"; | 1925 var arg_name = "foo"; |
| 1838 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1926 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1839 var path = (req.url).path; | 1927 var path = (req.url).path; |
| 1840 var pathOffset = 0; | 1928 var pathOffset = 0; |
| 1841 var index; | 1929 var index; |
| 1842 var subPart; | 1930 var subPart; |
| 1843 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1844 pathOffset += 1; | 1932 pathOffset += 1; |
| 1845 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1933 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1846 pathOffset += 3; | 1934 pathOffset += 3; |
| 1847 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1935 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1848 | 1936 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1863 } | 1951 } |
| 1864 } | 1952 } |
| 1865 | 1953 |
| 1866 | 1954 |
| 1867 var h = { | 1955 var h = { |
| 1868 "content-type" : "application/json; charset=utf-8", | 1956 "content-type" : "application/json; charset=utf-8", |
| 1869 }; | 1957 }; |
| 1870 var resp = convert.JSON.encode(buildGoogleCloudMlV1Version()); | 1958 var resp = convert.JSON.encode(buildGoogleCloudMlV1Version()); |
| 1871 return new async.Future.value(stringResponse(200, h, resp)); | 1959 return new async.Future.value(stringResponse(200, h, resp)); |
| 1872 }), true); | 1960 }), true); |
| 1873 res.get(arg_name).then(unittest.expectAsync(((api.GoogleCloudMlV1Version r
esponse) { | 1961 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleCloudMlV1Version
response) { |
| 1874 checkGoogleCloudMlV1Version(response); | 1962 checkGoogleCloudMlV1Version(response); |
| 1875 }))); | 1963 }))); |
| 1876 }); | 1964 }); |
| 1877 | 1965 |
| 1878 unittest.test("method--list", () { | 1966 unittest.test("method--list", () { |
| 1879 | 1967 |
| 1880 var mock = new HttpServerMock(); | 1968 var mock = new HttpServerMock(); |
| 1881 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 1969 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
| 1882 var arg_parent = "foo"; | 1970 var arg_parent = "foo"; |
| 1971 var arg_pageToken = "foo"; |
| 1883 var arg_pageSize = 42; | 1972 var arg_pageSize = 42; |
| 1884 var arg_pageToken = "foo"; | 1973 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1885 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1886 var path = (req.url).path; | 1974 var path = (req.url).path; |
| 1887 var pathOffset = 0; | 1975 var pathOffset = 0; |
| 1888 var index; | 1976 var index; |
| 1889 var subPart; | 1977 var subPart; |
| 1890 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1978 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1891 pathOffset += 1; | 1979 pathOffset += 1; |
| 1892 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1980 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1893 pathOffset += 3; | 1981 pathOffset += 3; |
| 1894 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1982 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1895 | 1983 |
| 1896 var query = (req.url).query; | 1984 var query = (req.url).query; |
| 1897 var queryOffset = 0; | 1985 var queryOffset = 0; |
| 1898 var queryMap = {}; | 1986 var queryMap = {}; |
| 1899 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1987 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1900 parseBool(n) { | 1988 parseBool(n) { |
| 1901 if (n == "true") return true; | 1989 if (n == "true") return true; |
| 1902 if (n == "false") return false; | 1990 if (n == "false") return false; |
| 1903 if (n == null) return null; | 1991 if (n == null) return null; |
| 1904 throw new core.ArgumentError("Invalid boolean: $n"); | 1992 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1905 } | 1993 } |
| 1906 if (query.length > 0) { | 1994 if (query.length > 0) { |
| 1907 for (var part in query.split("&")) { | 1995 for (var part in query.split("&")) { |
| 1908 var keyvalue = part.split("="); | 1996 var keyvalue = part.split("="); |
| 1909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1997 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1910 } | 1998 } |
| 1911 } | 1999 } |
| 2000 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1912 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2001 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1913 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 1914 | 2002 |
| 1915 | 2003 |
| 1916 var h = { | 2004 var h = { |
| 1917 "content-type" : "application/json; charset=utf-8", | 2005 "content-type" : "application/json; charset=utf-8", |
| 1918 }; | 2006 }; |
| 1919 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListVersionsResponse(
)); | 2007 var resp = convert.JSON.encode(buildGoogleCloudMlV1ListVersionsResponse(
)); |
| 1920 return new async.Future.value(stringResponse(200, h, resp)); | 2008 return new async.Future.value(stringResponse(200, h, resp)); |
| 1921 }), true); | 2009 }), true); |
| 1922 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.GoogleCloudMlV1ListVersionsResponse response) { | 2010 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.GoogleCloudMlV1ListVersionsResponse response) { |
| 1923 checkGoogleCloudMlV1ListVersionsResponse(response); | 2011 checkGoogleCloudMlV1ListVersionsResponse(response); |
| 1924 }))); | 2012 }))); |
| 1925 }); | 2013 }); |
| 1926 | 2014 |
| 1927 unittest.test("method--setDefault", () { | 2015 unittest.test("method--setDefault", () { |
| 1928 | 2016 |
| 1929 var mock = new HttpServerMock(); | 2017 var mock = new HttpServerMock(); |
| 1930 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; | 2018 api.ProjectsModelsVersionsResourceApi res = new api.MlApi(mock).projects.m
odels.versions; |
| 1931 var arg_request = buildGoogleCloudMlV1SetDefaultVersionRequest(); | 2019 var arg_request = buildGoogleCloudMlV1SetDefaultVersionRequest(); |
| 1932 var arg_name = "foo"; | 2020 var arg_name = "foo"; |
| 1933 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2021 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1934 var obj = new api.GoogleCloudMlV1SetDefaultVersionRequest.fromJson(json)
; | 2022 var obj = new api.GoogleCloudMlV1SetDefaultVersionRequest.fromJson(json)
; |
| 1935 checkGoogleCloudMlV1SetDefaultVersionRequest(obj); | 2023 checkGoogleCloudMlV1SetDefaultVersionRequest(obj); |
| 1936 | 2024 |
| 1937 var path = (req.url).path; | 2025 var path = (req.url).path; |
| 1938 var pathOffset = 0; | 2026 var pathOffset = 0; |
| 1939 var index; | 2027 var index; |
| 1940 var subPart; | 2028 var subPart; |
| 1941 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2029 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1942 pathOffset += 1; | 2030 pathOffset += 1; |
| 1943 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2031 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1961 } | 2049 } |
| 1962 } | 2050 } |
| 1963 | 2051 |
| 1964 | 2052 |
| 1965 var h = { | 2053 var h = { |
| 1966 "content-type" : "application/json; charset=utf-8", | 2054 "content-type" : "application/json; charset=utf-8", |
| 1967 }; | 2055 }; |
| 1968 var resp = convert.JSON.encode(buildGoogleCloudMlV1Version()); | 2056 var resp = convert.JSON.encode(buildGoogleCloudMlV1Version()); |
| 1969 return new async.Future.value(stringResponse(200, h, resp)); | 2057 return new async.Future.value(stringResponse(200, h, resp)); |
| 1970 }), true); | 2058 }), true); |
| 1971 res.setDefault(arg_request, arg_name).then(unittest.expectAsync(((api.Goog
leCloudMlV1Version response) { | 2059 res.setDefault(arg_request, arg_name).then(unittest.expectAsync1(((api.Goo
gleCloudMlV1Version response) { |
| 1972 checkGoogleCloudMlV1Version(response); | 2060 checkGoogleCloudMlV1Version(response); |
| 1973 }))); | 2061 }))); |
| 1974 }); | 2062 }); |
| 1975 | 2063 |
| 1976 }); | 2064 }); |
| 1977 | 2065 |
| 1978 | 2066 |
| 1979 unittest.group("resource-ProjectsOperationsResourceApi", () { | 2067 unittest.group("resource-ProjectsOperationsResourceApi", () { |
| 1980 unittest.test("method--cancel", () { | 2068 unittest.test("method--cancel", () { |
| 1981 | 2069 |
| 1982 var mock = new HttpServerMock(); | 2070 var mock = new HttpServerMock(); |
| 1983 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; | 2071 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; |
| 1984 var arg_name = "foo"; | 2072 var arg_name = "foo"; |
| 1985 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2073 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1986 var path = (req.url).path; | 2074 var path = (req.url).path; |
| 1987 var pathOffset = 0; | 2075 var pathOffset = 0; |
| 1988 var index; | 2076 var index; |
| 1989 var subPart; | 2077 var subPart; |
| 1990 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2078 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1991 pathOffset += 1; | 2079 pathOffset += 1; |
| 1992 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2080 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1993 pathOffset += 3; | 2081 pathOffset += 3; |
| 1994 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2082 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1995 | 2083 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2010 } | 2098 } |
| 2011 } | 2099 } |
| 2012 | 2100 |
| 2013 | 2101 |
| 2014 var h = { | 2102 var h = { |
| 2015 "content-type" : "application/json; charset=utf-8", | 2103 "content-type" : "application/json; charset=utf-8", |
| 2016 }; | 2104 }; |
| 2017 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); | 2105 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); |
| 2018 return new async.Future.value(stringResponse(200, h, resp)); | 2106 return new async.Future.value(stringResponse(200, h, resp)); |
| 2019 }), true); | 2107 }), true); |
| 2020 res.cancel(arg_name).then(unittest.expectAsync(((api.GoogleProtobufEmpty r
esponse) { | 2108 res.cancel(arg_name).then(unittest.expectAsync1(((api.GoogleProtobufEmpty
response) { |
| 2021 checkGoogleProtobufEmpty(response); | 2109 checkGoogleProtobufEmpty(response); |
| 2022 }))); | 2110 }))); |
| 2023 }); | 2111 }); |
| 2024 | 2112 |
| 2025 unittest.test("method--delete", () { | 2113 unittest.test("method--delete", () { |
| 2026 | 2114 |
| 2027 var mock = new HttpServerMock(); | 2115 var mock = new HttpServerMock(); |
| 2028 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; | 2116 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; |
| 2029 var arg_name = "foo"; | 2117 var arg_name = "foo"; |
| 2030 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2118 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2031 var path = (req.url).path; | 2119 var path = (req.url).path; |
| 2032 var pathOffset = 0; | 2120 var pathOffset = 0; |
| 2033 var index; | 2121 var index; |
| 2034 var subPart; | 2122 var subPart; |
| 2035 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2036 pathOffset += 1; | 2124 pathOffset += 1; |
| 2037 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2125 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2038 pathOffset += 3; | 2126 pathOffset += 3; |
| 2039 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2127 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2040 | 2128 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2055 } | 2143 } |
| 2056 } | 2144 } |
| 2057 | 2145 |
| 2058 | 2146 |
| 2059 var h = { | 2147 var h = { |
| 2060 "content-type" : "application/json; charset=utf-8", | 2148 "content-type" : "application/json; charset=utf-8", |
| 2061 }; | 2149 }; |
| 2062 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); | 2150 var resp = convert.JSON.encode(buildGoogleProtobufEmpty()); |
| 2063 return new async.Future.value(stringResponse(200, h, resp)); | 2151 return new async.Future.value(stringResponse(200, h, resp)); |
| 2064 }), true); | 2152 }), true); |
| 2065 res.delete(arg_name).then(unittest.expectAsync(((api.GoogleProtobufEmpty r
esponse) { | 2153 res.delete(arg_name).then(unittest.expectAsync1(((api.GoogleProtobufEmpty
response) { |
| 2066 checkGoogleProtobufEmpty(response); | 2154 checkGoogleProtobufEmpty(response); |
| 2067 }))); | 2155 }))); |
| 2068 }); | 2156 }); |
| 2069 | 2157 |
| 2070 unittest.test("method--get", () { | 2158 unittest.test("method--get", () { |
| 2071 | 2159 |
| 2072 var mock = new HttpServerMock(); | 2160 var mock = new HttpServerMock(); |
| 2073 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; | 2161 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; |
| 2074 var arg_name = "foo"; | 2162 var arg_name = "foo"; |
| 2075 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2163 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2076 var path = (req.url).path; | 2164 var path = (req.url).path; |
| 2077 var pathOffset = 0; | 2165 var pathOffset = 0; |
| 2078 var index; | 2166 var index; |
| 2079 var subPart; | 2167 var subPart; |
| 2080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2081 pathOffset += 1; | 2169 pathOffset += 1; |
| 2082 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2170 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2083 pathOffset += 3; | 2171 pathOffset += 3; |
| 2084 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2172 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2085 | 2173 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2100 } | 2188 } |
| 2101 } | 2189 } |
| 2102 | 2190 |
| 2103 | 2191 |
| 2104 var h = { | 2192 var h = { |
| 2105 "content-type" : "application/json; charset=utf-8", | 2193 "content-type" : "application/json; charset=utf-8", |
| 2106 }; | 2194 }; |
| 2107 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); | 2195 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); |
| 2108 return new async.Future.value(stringResponse(200, h, resp)); | 2196 return new async.Future.value(stringResponse(200, h, resp)); |
| 2109 }), true); | 2197 }), true); |
| 2110 res.get(arg_name).then(unittest.expectAsync(((api.GoogleLongrunningOperati
on response) { | 2198 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleLongrunningOperat
ion response) { |
| 2111 checkGoogleLongrunningOperation(response); | 2199 checkGoogleLongrunningOperation(response); |
| 2112 }))); | 2200 }))); |
| 2113 }); | 2201 }); |
| 2114 | 2202 |
| 2115 unittest.test("method--list", () { | 2203 unittest.test("method--list", () { |
| 2116 | 2204 |
| 2117 var mock = new HttpServerMock(); | 2205 var mock = new HttpServerMock(); |
| 2118 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; | 2206 api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.opera
tions; |
| 2119 var arg_name = "foo"; | 2207 var arg_name = "foo"; |
| 2120 var arg_pageSize = 42; | |
| 2121 var arg_filter = "foo"; | 2208 var arg_filter = "foo"; |
| 2122 var arg_pageToken = "foo"; | 2209 var arg_pageToken = "foo"; |
| 2123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2210 var arg_pageSize = 42; |
| 2211 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2124 var path = (req.url).path; | 2212 var path = (req.url).path; |
| 2125 var pathOffset = 0; | 2213 var pathOffset = 0; |
| 2126 var index; | 2214 var index; |
| 2127 var subPart; | 2215 var subPart; |
| 2128 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2216 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2129 pathOffset += 1; | 2217 pathOffset += 1; |
| 2130 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2218 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2131 pathOffset += 3; | 2219 pathOffset += 3; |
| 2132 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2220 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2133 | 2221 |
| 2134 var query = (req.url).query; | 2222 var query = (req.url).query; |
| 2135 var queryOffset = 0; | 2223 var queryOffset = 0; |
| 2136 var queryMap = {}; | 2224 var queryMap = {}; |
| 2137 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2225 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2138 parseBool(n) { | 2226 parseBool(n) { |
| 2139 if (n == "true") return true; | 2227 if (n == "true") return true; |
| 2140 if (n == "false") return false; | 2228 if (n == "false") return false; |
| 2141 if (n == null) return null; | 2229 if (n == null) return null; |
| 2142 throw new core.ArgumentError("Invalid boolean: $n"); | 2230 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2143 } | 2231 } |
| 2144 if (query.length > 0) { | 2232 if (query.length > 0) { |
| 2145 for (var part in query.split("&")) { | 2233 for (var part in query.split("&")) { |
| 2146 var keyvalue = part.split("="); | 2234 var keyvalue = part.split("="); |
| 2147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2235 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2148 } | 2236 } |
| 2149 } | 2237 } |
| 2150 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2151 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2238 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 2152 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2239 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2240 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2153 | 2241 |
| 2154 | 2242 |
| 2155 var h = { | 2243 var h = { |
| 2156 "content-type" : "application/json; charset=utf-8", | 2244 "content-type" : "application/json; charset=utf-8", |
| 2157 }; | 2245 }; |
| 2158 var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsRespo
nse()); | 2246 var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsRespo
nse()); |
| 2159 return new async.Future.value(stringResponse(200, h, resp)); | 2247 return new async.Future.value(stringResponse(200, h, resp)); |
| 2160 }), true); | 2248 }), true); |
| 2161 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.GoogleLongrunningListOperationsRe
sponse response) { | 2249 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsR
esponse response) { |
| 2162 checkGoogleLongrunningListOperationsResponse(response); | 2250 checkGoogleLongrunningListOperationsResponse(response); |
| 2163 }))); | 2251 }))); |
| 2164 }); | 2252 }); |
| 2165 | 2253 |
| 2166 }); | 2254 }); |
| 2167 | 2255 |
| 2168 | 2256 |
| 2169 } | 2257 } |
| 2170 | 2258 |
| OLD | NEW |