| OLD | NEW |
| 1 library googleapis.dataproc.v1.test; | 1 library googleapis.dataproc.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | 4 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
| 7 | 6 |
| 8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
| 11 | 9 |
| 12 import 'package:googleapis/dataproc/v1.dart' as api; | 10 import 'package:googleapis/dataproc/v1.dart' as api; |
| 13 | 11 |
| 14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 13 core.Function _callback; |
| 16 core.bool _expectJson; | 14 core.bool _expectJson; |
| 17 | 15 |
| 18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 17 _callback = callback; |
| 20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
| 21 } | 19 } |
| 22 | 20 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { | 22 if (_expectJson) { |
| 25 return request.finalize() | 23 return request |
| 24 .finalize() |
| 26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
| 27 .join('') | 26 .join('') |
| 28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); | 29 return _callback(request, null); |
| 31 } else { | 30 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } | 32 } |
| 34 }); | 33 }); |
| 35 } else { | 34 } else { |
| 36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
| 37 if (stream == null) { | 36 if (stream == null) { |
| 38 return _callback(request, []); | 37 return _callback(request, []); |
| 39 } else { | 38 } else { |
| 40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 40 return _callback(request, data); |
| 42 }); | 41 }); |
| 43 } | 42 } |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 51 } |
| 53 | 52 |
| 54 core.int buildCounterAcceleratorConfig = 0; | 53 core.int buildCounterAcceleratorConfig = 0; |
| 55 buildAcceleratorConfig() { | 54 buildAcceleratorConfig() { |
| 56 var o = new api.AcceleratorConfig(); | 55 var o = new api.AcceleratorConfig(); |
| 57 buildCounterAcceleratorConfig++; | 56 buildCounterAcceleratorConfig++; |
| 58 if (buildCounterAcceleratorConfig < 3) { | 57 if (buildCounterAcceleratorConfig < 3) { |
| 59 o.acceleratorCount = 42; | 58 o.acceleratorCount = 42; |
| 60 o.acceleratorTypeUri = "foo"; | 59 o.acceleratorTypeUri = "foo"; |
| 61 } | 60 } |
| 62 buildCounterAcceleratorConfig--; | 61 buildCounterAcceleratorConfig--; |
| 63 return o; | 62 return o; |
| 64 } | 63 } |
| 65 | 64 |
| 66 checkAcceleratorConfig(api.AcceleratorConfig o) { | 65 checkAcceleratorConfig(api.AcceleratorConfig o) { |
| 67 buildCounterAcceleratorConfig++; | 66 buildCounterAcceleratorConfig++; |
| 68 if (buildCounterAcceleratorConfig < 3) { | 67 if (buildCounterAcceleratorConfig < 3) { |
| 69 unittest.expect(o.acceleratorCount, unittest.equals(42)); | 68 unittest.expect(o.acceleratorCount, unittest.equals(42)); |
| 70 unittest.expect(o.acceleratorTypeUri, unittest.equals('foo')); | 69 unittest.expect(o.acceleratorTypeUri, unittest.equals('foo')); |
| 71 } | 70 } |
| 72 buildCounterAcceleratorConfig--; | 71 buildCounterAcceleratorConfig--; |
| 73 } | 72 } |
| 74 | 73 |
| 75 core.int buildCounterCancelJobRequest = 0; | 74 core.int buildCounterCancelJobRequest = 0; |
| 76 buildCancelJobRequest() { | 75 buildCancelJobRequest() { |
| 77 var o = new api.CancelJobRequest(); | 76 var o = new api.CancelJobRequest(); |
| 78 buildCounterCancelJobRequest++; | 77 buildCounterCancelJobRequest++; |
| 79 if (buildCounterCancelJobRequest < 3) { | 78 if (buildCounterCancelJobRequest < 3) {} |
| 80 } | |
| 81 buildCounterCancelJobRequest--; | 79 buildCounterCancelJobRequest--; |
| 82 return o; | 80 return o; |
| 83 } | 81 } |
| 84 | 82 |
| 85 checkCancelJobRequest(api.CancelJobRequest o) { | 83 checkCancelJobRequest(api.CancelJobRequest o) { |
| 86 buildCounterCancelJobRequest++; | 84 buildCounterCancelJobRequest++; |
| 87 if (buildCounterCancelJobRequest < 3) { | 85 if (buildCounterCancelJobRequest < 3) {} |
| 88 } | |
| 89 buildCounterCancelJobRequest--; | 86 buildCounterCancelJobRequest--; |
| 90 } | 87 } |
| 91 | 88 |
| 92 buildUnnamed512() { | 89 buildUnnamed511() { |
| 93 var o = new core.Map<core.String, core.String>(); | 90 var o = new core.Map<core.String, core.String>(); |
| 94 o["x"] = "foo"; | 91 o["x"] = "foo"; |
| 95 o["y"] = "foo"; | 92 o["y"] = "foo"; |
| 96 return o; | 93 return o; |
| 97 } | 94 } |
| 98 | 95 |
| 99 checkUnnamed512(core.Map<core.String, core.String> o) { | 96 checkUnnamed511(core.Map<core.String, core.String> o) { |
| 100 unittest.expect(o, unittest.hasLength(2)); | 97 unittest.expect(o, unittest.hasLength(2)); |
| 101 unittest.expect(o["x"], unittest.equals('foo')); | 98 unittest.expect(o["x"], unittest.equals('foo')); |
| 102 unittest.expect(o["y"], unittest.equals('foo')); | 99 unittest.expect(o["y"], unittest.equals('foo')); |
| 103 } | 100 } |
| 104 | 101 |
| 105 buildUnnamed513() { | 102 buildUnnamed512() { |
| 106 var o = new core.List<api.ClusterStatus>(); | 103 var o = new core.List<api.ClusterStatus>(); |
| 107 o.add(buildClusterStatus()); | 104 o.add(buildClusterStatus()); |
| 108 o.add(buildClusterStatus()); | 105 o.add(buildClusterStatus()); |
| 109 return o; | 106 return o; |
| 110 } | 107 } |
| 111 | 108 |
| 112 checkUnnamed513(core.List<api.ClusterStatus> o) { | 109 checkUnnamed512(core.List<api.ClusterStatus> o) { |
| 113 unittest.expect(o, unittest.hasLength(2)); | 110 unittest.expect(o, unittest.hasLength(2)); |
| 114 checkClusterStatus(o[0]); | 111 checkClusterStatus(o[0]); |
| 115 checkClusterStatus(o[1]); | 112 checkClusterStatus(o[1]); |
| 116 } | 113 } |
| 117 | 114 |
| 118 core.int buildCounterCluster = 0; | 115 core.int buildCounterCluster = 0; |
| 119 buildCluster() { | 116 buildCluster() { |
| 120 var o = new api.Cluster(); | 117 var o = new api.Cluster(); |
| 121 buildCounterCluster++; | 118 buildCounterCluster++; |
| 122 if (buildCounterCluster < 3) { | 119 if (buildCounterCluster < 3) { |
| 123 o.clusterName = "foo"; | 120 o.clusterName = "foo"; |
| 124 o.clusterUuid = "foo"; | 121 o.clusterUuid = "foo"; |
| 125 o.config = buildClusterConfig(); | 122 o.config = buildClusterConfig(); |
| 126 o.labels = buildUnnamed512(); | 123 o.labels = buildUnnamed511(); |
| 127 o.metrics = buildClusterMetrics(); | 124 o.metrics = buildClusterMetrics(); |
| 128 o.projectId = "foo"; | 125 o.projectId = "foo"; |
| 129 o.status = buildClusterStatus(); | 126 o.status = buildClusterStatus(); |
| 130 o.statusHistory = buildUnnamed513(); | 127 o.statusHistory = buildUnnamed512(); |
| 131 } | 128 } |
| 132 buildCounterCluster--; | 129 buildCounterCluster--; |
| 133 return o; | 130 return o; |
| 134 } | 131 } |
| 135 | 132 |
| 136 checkCluster(api.Cluster o) { | 133 checkCluster(api.Cluster o) { |
| 137 buildCounterCluster++; | 134 buildCounterCluster++; |
| 138 if (buildCounterCluster < 3) { | 135 if (buildCounterCluster < 3) { |
| 139 unittest.expect(o.clusterName, unittest.equals('foo')); | 136 unittest.expect(o.clusterName, unittest.equals('foo')); |
| 140 unittest.expect(o.clusterUuid, unittest.equals('foo')); | 137 unittest.expect(o.clusterUuid, unittest.equals('foo')); |
| 141 checkClusterConfig(o.config); | 138 checkClusterConfig(o.config); |
| 142 checkUnnamed512(o.labels); | 139 checkUnnamed511(o.labels); |
| 143 checkClusterMetrics(o.metrics); | 140 checkClusterMetrics(o.metrics); |
| 144 unittest.expect(o.projectId, unittest.equals('foo')); | 141 unittest.expect(o.projectId, unittest.equals('foo')); |
| 145 checkClusterStatus(o.status); | 142 checkClusterStatus(o.status); |
| 146 checkUnnamed513(o.statusHistory); | 143 checkUnnamed512(o.statusHistory); |
| 147 } | 144 } |
| 148 buildCounterCluster--; | 145 buildCounterCluster--; |
| 149 } | 146 } |
| 150 | 147 |
| 151 buildUnnamed514() { | 148 buildUnnamed513() { |
| 152 var o = new core.List<api.NodeInitializationAction>(); | 149 var o = new core.List<api.NodeInitializationAction>(); |
| 153 o.add(buildNodeInitializationAction()); | 150 o.add(buildNodeInitializationAction()); |
| 154 o.add(buildNodeInitializationAction()); | 151 o.add(buildNodeInitializationAction()); |
| 155 return o; | 152 return o; |
| 156 } | 153 } |
| 157 | 154 |
| 158 checkUnnamed514(core.List<api.NodeInitializationAction> o) { | 155 checkUnnamed513(core.List<api.NodeInitializationAction> o) { |
| 159 unittest.expect(o, unittest.hasLength(2)); | 156 unittest.expect(o, unittest.hasLength(2)); |
| 160 checkNodeInitializationAction(o[0]); | 157 checkNodeInitializationAction(o[0]); |
| 161 checkNodeInitializationAction(o[1]); | 158 checkNodeInitializationAction(o[1]); |
| 162 } | 159 } |
| 163 | 160 |
| 164 core.int buildCounterClusterConfig = 0; | 161 core.int buildCounterClusterConfig = 0; |
| 165 buildClusterConfig() { | 162 buildClusterConfig() { |
| 166 var o = new api.ClusterConfig(); | 163 var o = new api.ClusterConfig(); |
| 167 buildCounterClusterConfig++; | 164 buildCounterClusterConfig++; |
| 168 if (buildCounterClusterConfig < 3) { | 165 if (buildCounterClusterConfig < 3) { |
| 169 o.configBucket = "foo"; | 166 o.configBucket = "foo"; |
| 170 o.gceClusterConfig = buildGceClusterConfig(); | 167 o.gceClusterConfig = buildGceClusterConfig(); |
| 171 o.initializationActions = buildUnnamed514(); | 168 o.initializationActions = buildUnnamed513(); |
| 172 o.masterConfig = buildInstanceGroupConfig(); | 169 o.masterConfig = buildInstanceGroupConfig(); |
| 173 o.secondaryWorkerConfig = buildInstanceGroupConfig(); | 170 o.secondaryWorkerConfig = buildInstanceGroupConfig(); |
| 174 o.softwareConfig = buildSoftwareConfig(); | 171 o.softwareConfig = buildSoftwareConfig(); |
| 175 o.workerConfig = buildInstanceGroupConfig(); | 172 o.workerConfig = buildInstanceGroupConfig(); |
| 176 } | 173 } |
| 177 buildCounterClusterConfig--; | 174 buildCounterClusterConfig--; |
| 178 return o; | 175 return o; |
| 179 } | 176 } |
| 180 | 177 |
| 181 checkClusterConfig(api.ClusterConfig o) { | 178 checkClusterConfig(api.ClusterConfig o) { |
| 182 buildCounterClusterConfig++; | 179 buildCounterClusterConfig++; |
| 183 if (buildCounterClusterConfig < 3) { | 180 if (buildCounterClusterConfig < 3) { |
| 184 unittest.expect(o.configBucket, unittest.equals('foo')); | 181 unittest.expect(o.configBucket, unittest.equals('foo')); |
| 185 checkGceClusterConfig(o.gceClusterConfig); | 182 checkGceClusterConfig(o.gceClusterConfig); |
| 186 checkUnnamed514(o.initializationActions); | 183 checkUnnamed513(o.initializationActions); |
| 187 checkInstanceGroupConfig(o.masterConfig); | 184 checkInstanceGroupConfig(o.masterConfig); |
| 188 checkInstanceGroupConfig(o.secondaryWorkerConfig); | 185 checkInstanceGroupConfig(o.secondaryWorkerConfig); |
| 189 checkSoftwareConfig(o.softwareConfig); | 186 checkSoftwareConfig(o.softwareConfig); |
| 190 checkInstanceGroupConfig(o.workerConfig); | 187 checkInstanceGroupConfig(o.workerConfig); |
| 191 } | 188 } |
| 192 buildCounterClusterConfig--; | 189 buildCounterClusterConfig--; |
| 193 } | 190 } |
| 194 | 191 |
| 192 buildUnnamed514() { |
| 193 var o = new core.Map<core.String, core.String>(); |
| 194 o["x"] = "foo"; |
| 195 o["y"] = "foo"; |
| 196 return o; |
| 197 } |
| 198 |
| 199 checkUnnamed514(core.Map<core.String, core.String> o) { |
| 200 unittest.expect(o, unittest.hasLength(2)); |
| 201 unittest.expect(o["x"], unittest.equals('foo')); |
| 202 unittest.expect(o["y"], unittest.equals('foo')); |
| 203 } |
| 204 |
| 195 buildUnnamed515() { | 205 buildUnnamed515() { |
| 196 var o = new core.Map<core.String, core.String>(); | 206 var o = new core.Map<core.String, core.String>(); |
| 197 o["x"] = "foo"; | 207 o["x"] = "foo"; |
| 198 o["y"] = "foo"; | 208 o["y"] = "foo"; |
| 199 return o; | 209 return o; |
| 200 } | 210 } |
| 201 | 211 |
| 202 checkUnnamed515(core.Map<core.String, core.String> o) { | 212 checkUnnamed515(core.Map<core.String, core.String> o) { |
| 203 unittest.expect(o, unittest.hasLength(2)); | 213 unittest.expect(o, unittest.hasLength(2)); |
| 204 unittest.expect(o["x"], unittest.equals('foo')); | 214 unittest.expect(o["x"], unittest.equals('foo')); |
| 205 unittest.expect(o["y"], unittest.equals('foo')); | 215 unittest.expect(o["y"], unittest.equals('foo')); |
| 206 } | |
| 207 | |
| 208 buildUnnamed516() { | |
| 209 var o = new core.Map<core.String, core.String>(); | |
| 210 o["x"] = "foo"; | |
| 211 o["y"] = "foo"; | |
| 212 return o; | |
| 213 } | |
| 214 | |
| 215 checkUnnamed516(core.Map<core.String, core.String> o) { | |
| 216 unittest.expect(o, unittest.hasLength(2)); | |
| 217 unittest.expect(o["x"], unittest.equals('foo')); | |
| 218 unittest.expect(o["y"], unittest.equals('foo')); | |
| 219 } | 216 } |
| 220 | 217 |
| 221 core.int buildCounterClusterMetrics = 0; | 218 core.int buildCounterClusterMetrics = 0; |
| 222 buildClusterMetrics() { | 219 buildClusterMetrics() { |
| 223 var o = new api.ClusterMetrics(); | 220 var o = new api.ClusterMetrics(); |
| 224 buildCounterClusterMetrics++; | 221 buildCounterClusterMetrics++; |
| 225 if (buildCounterClusterMetrics < 3) { | 222 if (buildCounterClusterMetrics < 3) { |
| 226 o.hdfsMetrics = buildUnnamed515(); | 223 o.hdfsMetrics = buildUnnamed514(); |
| 227 o.yarnMetrics = buildUnnamed516(); | 224 o.yarnMetrics = buildUnnamed515(); |
| 228 } | 225 } |
| 229 buildCounterClusterMetrics--; | 226 buildCounterClusterMetrics--; |
| 230 return o; | 227 return o; |
| 231 } | 228 } |
| 232 | 229 |
| 233 checkClusterMetrics(api.ClusterMetrics o) { | 230 checkClusterMetrics(api.ClusterMetrics o) { |
| 234 buildCounterClusterMetrics++; | 231 buildCounterClusterMetrics++; |
| 235 if (buildCounterClusterMetrics < 3) { | 232 if (buildCounterClusterMetrics < 3) { |
| 236 checkUnnamed515(o.hdfsMetrics); | 233 checkUnnamed514(o.hdfsMetrics); |
| 237 checkUnnamed516(o.yarnMetrics); | 234 checkUnnamed515(o.yarnMetrics); |
| 238 } | 235 } |
| 239 buildCounterClusterMetrics--; | 236 buildCounterClusterMetrics--; |
| 240 } | 237 } |
| 241 | 238 |
| 242 buildUnnamed517() { | 239 buildUnnamed516() { |
| 243 var o = new core.Map<core.String, core.String>(); | 240 var o = new core.Map<core.String, core.String>(); |
| 244 o["x"] = "foo"; | 241 o["x"] = "foo"; |
| 245 o["y"] = "foo"; | 242 o["y"] = "foo"; |
| 246 return o; | 243 return o; |
| 247 } | 244 } |
| 248 | 245 |
| 249 checkUnnamed517(core.Map<core.String, core.String> o) { | 246 checkUnnamed516(core.Map<core.String, core.String> o) { |
| 250 unittest.expect(o, unittest.hasLength(2)); | 247 unittest.expect(o, unittest.hasLength(2)); |
| 251 unittest.expect(o["x"], unittest.equals('foo')); | 248 unittest.expect(o["x"], unittest.equals('foo')); |
| 252 unittest.expect(o["y"], unittest.equals('foo')); | 249 unittest.expect(o["y"], unittest.equals('foo')); |
| 253 } | 250 } |
| 254 | 251 |
| 255 buildUnnamed518() { | 252 buildUnnamed517() { |
| 256 var o = new core.List<api.ClusterOperationStatus>(); | 253 var o = new core.List<api.ClusterOperationStatus>(); |
| 257 o.add(buildClusterOperationStatus()); | 254 o.add(buildClusterOperationStatus()); |
| 258 o.add(buildClusterOperationStatus()); | 255 o.add(buildClusterOperationStatus()); |
| 259 return o; | 256 return o; |
| 260 } | 257 } |
| 261 | 258 |
| 262 checkUnnamed518(core.List<api.ClusterOperationStatus> o) { | 259 checkUnnamed517(core.List<api.ClusterOperationStatus> o) { |
| 263 unittest.expect(o, unittest.hasLength(2)); | 260 unittest.expect(o, unittest.hasLength(2)); |
| 264 checkClusterOperationStatus(o[0]); | 261 checkClusterOperationStatus(o[0]); |
| 265 checkClusterOperationStatus(o[1]); | 262 checkClusterOperationStatus(o[1]); |
| 266 } | 263 } |
| 267 | 264 |
| 268 buildUnnamed519() { | 265 buildUnnamed518() { |
| 269 var o = new core.List<core.String>(); | 266 var o = new core.List<core.String>(); |
| 270 o.add("foo"); | 267 o.add("foo"); |
| 271 o.add("foo"); | 268 o.add("foo"); |
| 272 return o; | 269 return o; |
| 273 } | 270 } |
| 274 | 271 |
| 275 checkUnnamed519(core.List<core.String> o) { | 272 checkUnnamed518(core.List<core.String> o) { |
| 276 unittest.expect(o, unittest.hasLength(2)); | 273 unittest.expect(o, unittest.hasLength(2)); |
| 277 unittest.expect(o[0], unittest.equals('foo')); | 274 unittest.expect(o[0], unittest.equals('foo')); |
| 278 unittest.expect(o[1], unittest.equals('foo')); | 275 unittest.expect(o[1], unittest.equals('foo')); |
| 279 } | 276 } |
| 280 | 277 |
| 281 core.int buildCounterClusterOperationMetadata = 0; | 278 core.int buildCounterClusterOperationMetadata = 0; |
| 282 buildClusterOperationMetadata() { | 279 buildClusterOperationMetadata() { |
| 283 var o = new api.ClusterOperationMetadata(); | 280 var o = new api.ClusterOperationMetadata(); |
| 284 buildCounterClusterOperationMetadata++; | 281 buildCounterClusterOperationMetadata++; |
| 285 if (buildCounterClusterOperationMetadata < 3) { | 282 if (buildCounterClusterOperationMetadata < 3) { |
| 286 o.clusterName = "foo"; | 283 o.clusterName = "foo"; |
| 287 o.clusterUuid = "foo"; | 284 o.clusterUuid = "foo"; |
| 288 o.description = "foo"; | 285 o.description = "foo"; |
| 289 o.labels = buildUnnamed517(); | 286 o.labels = buildUnnamed516(); |
| 290 o.operationType = "foo"; | 287 o.operationType = "foo"; |
| 291 o.status = buildClusterOperationStatus(); | 288 o.status = buildClusterOperationStatus(); |
| 292 o.statusHistory = buildUnnamed518(); | 289 o.statusHistory = buildUnnamed517(); |
| 293 o.warnings = buildUnnamed519(); | 290 o.warnings = buildUnnamed518(); |
| 294 } | 291 } |
| 295 buildCounterClusterOperationMetadata--; | 292 buildCounterClusterOperationMetadata--; |
| 296 return o; | 293 return o; |
| 297 } | 294 } |
| 298 | 295 |
| 299 checkClusterOperationMetadata(api.ClusterOperationMetadata o) { | 296 checkClusterOperationMetadata(api.ClusterOperationMetadata o) { |
| 300 buildCounterClusterOperationMetadata++; | 297 buildCounterClusterOperationMetadata++; |
| 301 if (buildCounterClusterOperationMetadata < 3) { | 298 if (buildCounterClusterOperationMetadata < 3) { |
| 302 unittest.expect(o.clusterName, unittest.equals('foo')); | 299 unittest.expect(o.clusterName, unittest.equals('foo')); |
| 303 unittest.expect(o.clusterUuid, unittest.equals('foo')); | 300 unittest.expect(o.clusterUuid, unittest.equals('foo')); |
| 304 unittest.expect(o.description, unittest.equals('foo')); | 301 unittest.expect(o.description, unittest.equals('foo')); |
| 305 checkUnnamed517(o.labels); | 302 checkUnnamed516(o.labels); |
| 306 unittest.expect(o.operationType, unittest.equals('foo')); | 303 unittest.expect(o.operationType, unittest.equals('foo')); |
| 307 checkClusterOperationStatus(o.status); | 304 checkClusterOperationStatus(o.status); |
| 308 checkUnnamed518(o.statusHistory); | 305 checkUnnamed517(o.statusHistory); |
| 309 checkUnnamed519(o.warnings); | 306 checkUnnamed518(o.warnings); |
| 310 } | 307 } |
| 311 buildCounterClusterOperationMetadata--; | 308 buildCounterClusterOperationMetadata--; |
| 312 } | 309 } |
| 313 | 310 |
| 314 core.int buildCounterClusterOperationStatus = 0; | 311 core.int buildCounterClusterOperationStatus = 0; |
| 315 buildClusterOperationStatus() { | 312 buildClusterOperationStatus() { |
| 316 var o = new api.ClusterOperationStatus(); | 313 var o = new api.ClusterOperationStatus(); |
| 317 buildCounterClusterOperationStatus++; | 314 buildCounterClusterOperationStatus++; |
| 318 if (buildCounterClusterOperationStatus < 3) { | 315 if (buildCounterClusterOperationStatus < 3) { |
| 319 o.details = "foo"; | 316 o.details = "foo"; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 unittest.expect(o.stateStartTime, unittest.equals('foo')); | 355 unittest.expect(o.stateStartTime, unittest.equals('foo')); |
| 359 unittest.expect(o.substate, unittest.equals('foo')); | 356 unittest.expect(o.substate, unittest.equals('foo')); |
| 360 } | 357 } |
| 361 buildCounterClusterStatus--; | 358 buildCounterClusterStatus--; |
| 362 } | 359 } |
| 363 | 360 |
| 364 core.int buildCounterDiagnoseClusterRequest = 0; | 361 core.int buildCounterDiagnoseClusterRequest = 0; |
| 365 buildDiagnoseClusterRequest() { | 362 buildDiagnoseClusterRequest() { |
| 366 var o = new api.DiagnoseClusterRequest(); | 363 var o = new api.DiagnoseClusterRequest(); |
| 367 buildCounterDiagnoseClusterRequest++; | 364 buildCounterDiagnoseClusterRequest++; |
| 368 if (buildCounterDiagnoseClusterRequest < 3) { | 365 if (buildCounterDiagnoseClusterRequest < 3) {} |
| 369 } | |
| 370 buildCounterDiagnoseClusterRequest--; | 366 buildCounterDiagnoseClusterRequest--; |
| 371 return o; | 367 return o; |
| 372 } | 368 } |
| 373 | 369 |
| 374 checkDiagnoseClusterRequest(api.DiagnoseClusterRequest o) { | 370 checkDiagnoseClusterRequest(api.DiagnoseClusterRequest o) { |
| 375 buildCounterDiagnoseClusterRequest++; | 371 buildCounterDiagnoseClusterRequest++; |
| 376 if (buildCounterDiagnoseClusterRequest < 3) { | 372 if (buildCounterDiagnoseClusterRequest < 3) {} |
| 377 } | |
| 378 buildCounterDiagnoseClusterRequest--; | 373 buildCounterDiagnoseClusterRequest--; |
| 379 } | 374 } |
| 380 | 375 |
| 381 core.int buildCounterDiagnoseClusterResults = 0; | 376 core.int buildCounterDiagnoseClusterResults = 0; |
| 382 buildDiagnoseClusterResults() { | 377 buildDiagnoseClusterResults() { |
| 383 var o = new api.DiagnoseClusterResults(); | 378 var o = new api.DiagnoseClusterResults(); |
| 384 buildCounterDiagnoseClusterResults++; | 379 buildCounterDiagnoseClusterResults++; |
| 385 if (buildCounterDiagnoseClusterResults < 3) { | 380 if (buildCounterDiagnoseClusterResults < 3) { |
| 386 o.outputUri = "foo"; | 381 o.outputUri = "foo"; |
| 387 } | 382 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 415 unittest.expect(o.bootDiskSizeGb, unittest.equals(42)); | 410 unittest.expect(o.bootDiskSizeGb, unittest.equals(42)); |
| 416 unittest.expect(o.numLocalSsds, unittest.equals(42)); | 411 unittest.expect(o.numLocalSsds, unittest.equals(42)); |
| 417 } | 412 } |
| 418 buildCounterDiskConfig--; | 413 buildCounterDiskConfig--; |
| 419 } | 414 } |
| 420 | 415 |
| 421 core.int buildCounterEmpty = 0; | 416 core.int buildCounterEmpty = 0; |
| 422 buildEmpty() { | 417 buildEmpty() { |
| 423 var o = new api.Empty(); | 418 var o = new api.Empty(); |
| 424 buildCounterEmpty++; | 419 buildCounterEmpty++; |
| 425 if (buildCounterEmpty < 3) { | 420 if (buildCounterEmpty < 3) {} |
| 426 } | |
| 427 buildCounterEmpty--; | 421 buildCounterEmpty--; |
| 428 return o; | 422 return o; |
| 429 } | 423 } |
| 430 | 424 |
| 431 checkEmpty(api.Empty o) { | 425 checkEmpty(api.Empty o) { |
| 432 buildCounterEmpty++; | 426 buildCounterEmpty++; |
| 433 if (buildCounterEmpty < 3) { | 427 if (buildCounterEmpty < 3) {} |
| 434 } | |
| 435 buildCounterEmpty--; | 428 buildCounterEmpty--; |
| 436 } | 429 } |
| 437 | 430 |
| 438 buildUnnamed520() { | 431 buildUnnamed519() { |
| 439 var o = new core.Map<core.String, core.String>(); | 432 var o = new core.Map<core.String, core.String>(); |
| 440 o["x"] = "foo"; | 433 o["x"] = "foo"; |
| 441 o["y"] = "foo"; | 434 o["y"] = "foo"; |
| 442 return o; | 435 return o; |
| 443 } | 436 } |
| 444 | 437 |
| 445 checkUnnamed520(core.Map<core.String, core.String> o) { | 438 checkUnnamed519(core.Map<core.String, core.String> o) { |
| 446 unittest.expect(o, unittest.hasLength(2)); | 439 unittest.expect(o, unittest.hasLength(2)); |
| 447 unittest.expect(o["x"], unittest.equals('foo')); | 440 unittest.expect(o["x"], unittest.equals('foo')); |
| 448 unittest.expect(o["y"], unittest.equals('foo')); | 441 unittest.expect(o["y"], unittest.equals('foo')); |
| 449 } | 442 } |
| 450 | 443 |
| 444 buildUnnamed520() { |
| 445 var o = new core.List<core.String>(); |
| 446 o.add("foo"); |
| 447 o.add("foo"); |
| 448 return o; |
| 449 } |
| 450 |
| 451 checkUnnamed520(core.List<core.String> o) { |
| 452 unittest.expect(o, unittest.hasLength(2)); |
| 453 unittest.expect(o[0], unittest.equals('foo')); |
| 454 unittest.expect(o[1], unittest.equals('foo')); |
| 455 } |
| 456 |
| 451 buildUnnamed521() { | 457 buildUnnamed521() { |
| 452 var o = new core.List<core.String>(); | 458 var o = new core.List<core.String>(); |
| 453 o.add("foo"); | 459 o.add("foo"); |
| 454 o.add("foo"); | 460 o.add("foo"); |
| 455 return o; | 461 return o; |
| 456 } | 462 } |
| 457 | 463 |
| 458 checkUnnamed521(core.List<core.String> o) { | 464 checkUnnamed521(core.List<core.String> o) { |
| 459 unittest.expect(o, unittest.hasLength(2)); | 465 unittest.expect(o, unittest.hasLength(2)); |
| 460 unittest.expect(o[0], unittest.equals('foo')); | 466 unittest.expect(o[0], unittest.equals('foo')); |
| 461 unittest.expect(o[1], unittest.equals('foo')); | 467 unittest.expect(o[1], unittest.equals('foo')); |
| 462 } | |
| 463 | |
| 464 buildUnnamed522() { | |
| 465 var o = new core.List<core.String>(); | |
| 466 o.add("foo"); | |
| 467 o.add("foo"); | |
| 468 return o; | |
| 469 } | |
| 470 | |
| 471 checkUnnamed522(core.List<core.String> o) { | |
| 472 unittest.expect(o, unittest.hasLength(2)); | |
| 473 unittest.expect(o[0], unittest.equals('foo')); | |
| 474 unittest.expect(o[1], unittest.equals('foo')); | |
| 475 } | 468 } |
| 476 | 469 |
| 477 core.int buildCounterGceClusterConfig = 0; | 470 core.int buildCounterGceClusterConfig = 0; |
| 478 buildGceClusterConfig() { | 471 buildGceClusterConfig() { |
| 479 var o = new api.GceClusterConfig(); | 472 var o = new api.GceClusterConfig(); |
| 480 buildCounterGceClusterConfig++; | 473 buildCounterGceClusterConfig++; |
| 481 if (buildCounterGceClusterConfig < 3) { | 474 if (buildCounterGceClusterConfig < 3) { |
| 482 o.internalIpOnly = true; | 475 o.internalIpOnly = true; |
| 483 o.metadata = buildUnnamed520(); | 476 o.metadata = buildUnnamed519(); |
| 484 o.networkUri = "foo"; | 477 o.networkUri = "foo"; |
| 485 o.serviceAccount = "foo"; | 478 o.serviceAccount = "foo"; |
| 486 o.serviceAccountScopes = buildUnnamed521(); | 479 o.serviceAccountScopes = buildUnnamed520(); |
| 487 o.subnetworkUri = "foo"; | 480 o.subnetworkUri = "foo"; |
| 488 o.tags = buildUnnamed522(); | 481 o.tags = buildUnnamed521(); |
| 489 o.zoneUri = "foo"; | 482 o.zoneUri = "foo"; |
| 490 } | 483 } |
| 491 buildCounterGceClusterConfig--; | 484 buildCounterGceClusterConfig--; |
| 492 return o; | 485 return o; |
| 493 } | 486 } |
| 494 | 487 |
| 495 checkGceClusterConfig(api.GceClusterConfig o) { | 488 checkGceClusterConfig(api.GceClusterConfig o) { |
| 496 buildCounterGceClusterConfig++; | 489 buildCounterGceClusterConfig++; |
| 497 if (buildCounterGceClusterConfig < 3) { | 490 if (buildCounterGceClusterConfig < 3) { |
| 498 unittest.expect(o.internalIpOnly, unittest.isTrue); | 491 unittest.expect(o.internalIpOnly, unittest.isTrue); |
| 499 checkUnnamed520(o.metadata); | 492 checkUnnamed519(o.metadata); |
| 500 unittest.expect(o.networkUri, unittest.equals('foo')); | 493 unittest.expect(o.networkUri, unittest.equals('foo')); |
| 501 unittest.expect(o.serviceAccount, unittest.equals('foo')); | 494 unittest.expect(o.serviceAccount, unittest.equals('foo')); |
| 502 checkUnnamed521(o.serviceAccountScopes); | 495 checkUnnamed520(o.serviceAccountScopes); |
| 503 unittest.expect(o.subnetworkUri, unittest.equals('foo')); | 496 unittest.expect(o.subnetworkUri, unittest.equals('foo')); |
| 504 checkUnnamed522(o.tags); | 497 checkUnnamed521(o.tags); |
| 505 unittest.expect(o.zoneUri, unittest.equals('foo')); | 498 unittest.expect(o.zoneUri, unittest.equals('foo')); |
| 506 } | 499 } |
| 507 buildCounterGceClusterConfig--; | 500 buildCounterGceClusterConfig--; |
| 508 } | 501 } |
| 509 | 502 |
| 503 buildUnnamed522() { |
| 504 var o = new core.List<core.String>(); |
| 505 o.add("foo"); |
| 506 o.add("foo"); |
| 507 return o; |
| 508 } |
| 509 |
| 510 checkUnnamed522(core.List<core.String> o) { |
| 511 unittest.expect(o, unittest.hasLength(2)); |
| 512 unittest.expect(o[0], unittest.equals('foo')); |
| 513 unittest.expect(o[1], unittest.equals('foo')); |
| 514 } |
| 515 |
| 510 buildUnnamed523() { | 516 buildUnnamed523() { |
| 511 var o = new core.List<core.String>(); | 517 var o = new core.List<core.String>(); |
| 512 o.add("foo"); | 518 o.add("foo"); |
| 513 o.add("foo"); | 519 o.add("foo"); |
| 514 return o; | 520 return o; |
| 515 } | 521 } |
| 516 | 522 |
| 517 checkUnnamed523(core.List<core.String> o) { | 523 checkUnnamed523(core.List<core.String> o) { |
| 518 unittest.expect(o, unittest.hasLength(2)); | 524 unittest.expect(o, unittest.hasLength(2)); |
| 519 unittest.expect(o[0], unittest.equals('foo')); | 525 unittest.expect(o[0], unittest.equals('foo')); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 540 return o; | 546 return o; |
| 541 } | 547 } |
| 542 | 548 |
| 543 checkUnnamed525(core.List<core.String> o) { | 549 checkUnnamed525(core.List<core.String> o) { |
| 544 unittest.expect(o, unittest.hasLength(2)); | 550 unittest.expect(o, unittest.hasLength(2)); |
| 545 unittest.expect(o[0], unittest.equals('foo')); | 551 unittest.expect(o[0], unittest.equals('foo')); |
| 546 unittest.expect(o[1], unittest.equals('foo')); | 552 unittest.expect(o[1], unittest.equals('foo')); |
| 547 } | 553 } |
| 548 | 554 |
| 549 buildUnnamed526() { | 555 buildUnnamed526() { |
| 550 var o = new core.List<core.String>(); | |
| 551 o.add("foo"); | |
| 552 o.add("foo"); | |
| 553 return o; | |
| 554 } | |
| 555 | |
| 556 checkUnnamed526(core.List<core.String> o) { | |
| 557 unittest.expect(o, unittest.hasLength(2)); | |
| 558 unittest.expect(o[0], unittest.equals('foo')); | |
| 559 unittest.expect(o[1], unittest.equals('foo')); | |
| 560 } | |
| 561 | |
| 562 buildUnnamed527() { | |
| 563 var o = new core.Map<core.String, core.String>(); | 556 var o = new core.Map<core.String, core.String>(); |
| 564 o["x"] = "foo"; | 557 o["x"] = "foo"; |
| 565 o["y"] = "foo"; | 558 o["y"] = "foo"; |
| 566 return o; | 559 return o; |
| 567 } | 560 } |
| 568 | 561 |
| 569 checkUnnamed527(core.Map<core.String, core.String> o) { | 562 checkUnnamed526(core.Map<core.String, core.String> o) { |
| 570 unittest.expect(o, unittest.hasLength(2)); | 563 unittest.expect(o, unittest.hasLength(2)); |
| 571 unittest.expect(o["x"], unittest.equals('foo')); | 564 unittest.expect(o["x"], unittest.equals('foo')); |
| 572 unittest.expect(o["y"], unittest.equals('foo')); | 565 unittest.expect(o["y"], unittest.equals('foo')); |
| 573 } | 566 } |
| 574 | 567 |
| 575 core.int buildCounterHadoopJob = 0; | 568 core.int buildCounterHadoopJob = 0; |
| 576 buildHadoopJob() { | 569 buildHadoopJob() { |
| 577 var o = new api.HadoopJob(); | 570 var o = new api.HadoopJob(); |
| 578 buildCounterHadoopJob++; | 571 buildCounterHadoopJob++; |
| 579 if (buildCounterHadoopJob < 3) { | 572 if (buildCounterHadoopJob < 3) { |
| 580 o.archiveUris = buildUnnamed523(); | 573 o.archiveUris = buildUnnamed522(); |
| 581 o.args = buildUnnamed524(); | 574 o.args = buildUnnamed523(); |
| 582 o.fileUris = buildUnnamed525(); | 575 o.fileUris = buildUnnamed524(); |
| 583 o.jarFileUris = buildUnnamed526(); | 576 o.jarFileUris = buildUnnamed525(); |
| 584 o.loggingConfig = buildLoggingConfig(); | 577 o.loggingConfig = buildLoggingConfig(); |
| 585 o.mainClass = "foo"; | 578 o.mainClass = "foo"; |
| 586 o.mainJarFileUri = "foo"; | 579 o.mainJarFileUri = "foo"; |
| 587 o.properties = buildUnnamed527(); | 580 o.properties = buildUnnamed526(); |
| 588 } | 581 } |
| 589 buildCounterHadoopJob--; | 582 buildCounterHadoopJob--; |
| 590 return o; | 583 return o; |
| 591 } | 584 } |
| 592 | 585 |
| 593 checkHadoopJob(api.HadoopJob o) { | 586 checkHadoopJob(api.HadoopJob o) { |
| 594 buildCounterHadoopJob++; | 587 buildCounterHadoopJob++; |
| 595 if (buildCounterHadoopJob < 3) { | 588 if (buildCounterHadoopJob < 3) { |
| 596 checkUnnamed523(o.archiveUris); | 589 checkUnnamed522(o.archiveUris); |
| 597 checkUnnamed524(o.args); | 590 checkUnnamed523(o.args); |
| 598 checkUnnamed525(o.fileUris); | 591 checkUnnamed524(o.fileUris); |
| 599 checkUnnamed526(o.jarFileUris); | 592 checkUnnamed525(o.jarFileUris); |
| 600 checkLoggingConfig(o.loggingConfig); | 593 checkLoggingConfig(o.loggingConfig); |
| 601 unittest.expect(o.mainClass, unittest.equals('foo')); | 594 unittest.expect(o.mainClass, unittest.equals('foo')); |
| 602 unittest.expect(o.mainJarFileUri, unittest.equals('foo')); | 595 unittest.expect(o.mainJarFileUri, unittest.equals('foo')); |
| 603 checkUnnamed527(o.properties); | 596 checkUnnamed526(o.properties); |
| 604 } | 597 } |
| 605 buildCounterHadoopJob--; | 598 buildCounterHadoopJob--; |
| 606 } | 599 } |
| 607 | 600 |
| 608 buildUnnamed528() { | 601 buildUnnamed527() { |
| 609 var o = new core.List<core.String>(); | 602 var o = new core.List<core.String>(); |
| 610 o.add("foo"); | 603 o.add("foo"); |
| 611 o.add("foo"); | 604 o.add("foo"); |
| 612 return o; | 605 return o; |
| 613 } | 606 } |
| 614 | 607 |
| 615 checkUnnamed528(core.List<core.String> o) { | 608 checkUnnamed527(core.List<core.String> o) { |
| 616 unittest.expect(o, unittest.hasLength(2)); | 609 unittest.expect(o, unittest.hasLength(2)); |
| 617 unittest.expect(o[0], unittest.equals('foo')); | 610 unittest.expect(o[0], unittest.equals('foo')); |
| 618 unittest.expect(o[1], unittest.equals('foo')); | 611 unittest.expect(o[1], unittest.equals('foo')); |
| 619 } | 612 } |
| 620 | 613 |
| 614 buildUnnamed528() { |
| 615 var o = new core.Map<core.String, core.String>(); |
| 616 o["x"] = "foo"; |
| 617 o["y"] = "foo"; |
| 618 return o; |
| 619 } |
| 620 |
| 621 checkUnnamed528(core.Map<core.String, core.String> o) { |
| 622 unittest.expect(o, unittest.hasLength(2)); |
| 623 unittest.expect(o["x"], unittest.equals('foo')); |
| 624 unittest.expect(o["y"], unittest.equals('foo')); |
| 625 } |
| 626 |
| 621 buildUnnamed529() { | 627 buildUnnamed529() { |
| 622 var o = new core.Map<core.String, core.String>(); | 628 var o = new core.Map<core.String, core.String>(); |
| 623 o["x"] = "foo"; | 629 o["x"] = "foo"; |
| 624 o["y"] = "foo"; | 630 o["y"] = "foo"; |
| 625 return o; | 631 return o; |
| 626 } | 632 } |
| 627 | 633 |
| 628 checkUnnamed529(core.Map<core.String, core.String> o) { | 634 checkUnnamed529(core.Map<core.String, core.String> o) { |
| 629 unittest.expect(o, unittest.hasLength(2)); | 635 unittest.expect(o, unittest.hasLength(2)); |
| 630 unittest.expect(o["x"], unittest.equals('foo')); | 636 unittest.expect(o["x"], unittest.equals('foo')); |
| 631 unittest.expect(o["y"], unittest.equals('foo')); | 637 unittest.expect(o["y"], unittest.equals('foo')); |
| 632 } | |
| 633 | |
| 634 buildUnnamed530() { | |
| 635 var o = new core.Map<core.String, core.String>(); | |
| 636 o["x"] = "foo"; | |
| 637 o["y"] = "foo"; | |
| 638 return o; | |
| 639 } | |
| 640 | |
| 641 checkUnnamed530(core.Map<core.String, core.String> o) { | |
| 642 unittest.expect(o, unittest.hasLength(2)); | |
| 643 unittest.expect(o["x"], unittest.equals('foo')); | |
| 644 unittest.expect(o["y"], unittest.equals('foo')); | |
| 645 } | 638 } |
| 646 | 639 |
| 647 core.int buildCounterHiveJob = 0; | 640 core.int buildCounterHiveJob = 0; |
| 648 buildHiveJob() { | 641 buildHiveJob() { |
| 649 var o = new api.HiveJob(); | 642 var o = new api.HiveJob(); |
| 650 buildCounterHiveJob++; | 643 buildCounterHiveJob++; |
| 651 if (buildCounterHiveJob < 3) { | 644 if (buildCounterHiveJob < 3) { |
| 652 o.continueOnFailure = true; | 645 o.continueOnFailure = true; |
| 653 o.jarFileUris = buildUnnamed528(); | 646 o.jarFileUris = buildUnnamed527(); |
| 654 o.properties = buildUnnamed529(); | 647 o.properties = buildUnnamed528(); |
| 655 o.queryFileUri = "foo"; | 648 o.queryFileUri = "foo"; |
| 656 o.queryList = buildQueryList(); | 649 o.queryList = buildQueryList(); |
| 657 o.scriptVariables = buildUnnamed530(); | 650 o.scriptVariables = buildUnnamed529(); |
| 658 } | 651 } |
| 659 buildCounterHiveJob--; | 652 buildCounterHiveJob--; |
| 660 return o; | 653 return o; |
| 661 } | 654 } |
| 662 | 655 |
| 663 checkHiveJob(api.HiveJob o) { | 656 checkHiveJob(api.HiveJob o) { |
| 664 buildCounterHiveJob++; | 657 buildCounterHiveJob++; |
| 665 if (buildCounterHiveJob < 3) { | 658 if (buildCounterHiveJob < 3) { |
| 666 unittest.expect(o.continueOnFailure, unittest.isTrue); | 659 unittest.expect(o.continueOnFailure, unittest.isTrue); |
| 667 checkUnnamed528(o.jarFileUris); | 660 checkUnnamed527(o.jarFileUris); |
| 668 checkUnnamed529(o.properties); | 661 checkUnnamed528(o.properties); |
| 669 unittest.expect(o.queryFileUri, unittest.equals('foo')); | 662 unittest.expect(o.queryFileUri, unittest.equals('foo')); |
| 670 checkQueryList(o.queryList); | 663 checkQueryList(o.queryList); |
| 671 checkUnnamed530(o.scriptVariables); | 664 checkUnnamed529(o.scriptVariables); |
| 672 } | 665 } |
| 673 buildCounterHiveJob--; | 666 buildCounterHiveJob--; |
| 674 } | 667 } |
| 675 | 668 |
| 676 buildUnnamed531() { | 669 buildUnnamed530() { |
| 677 var o = new core.List<api.AcceleratorConfig>(); | 670 var o = new core.List<api.AcceleratorConfig>(); |
| 678 o.add(buildAcceleratorConfig()); | 671 o.add(buildAcceleratorConfig()); |
| 679 o.add(buildAcceleratorConfig()); | 672 o.add(buildAcceleratorConfig()); |
| 680 return o; | 673 return o; |
| 681 } | 674 } |
| 682 | 675 |
| 683 checkUnnamed531(core.List<api.AcceleratorConfig> o) { | 676 checkUnnamed530(core.List<api.AcceleratorConfig> o) { |
| 684 unittest.expect(o, unittest.hasLength(2)); | 677 unittest.expect(o, unittest.hasLength(2)); |
| 685 checkAcceleratorConfig(o[0]); | 678 checkAcceleratorConfig(o[0]); |
| 686 checkAcceleratorConfig(o[1]); | 679 checkAcceleratorConfig(o[1]); |
| 687 } | 680 } |
| 688 | 681 |
| 689 buildUnnamed532() { | 682 buildUnnamed531() { |
| 690 var o = new core.List<core.String>(); | 683 var o = new core.List<core.String>(); |
| 691 o.add("foo"); | 684 o.add("foo"); |
| 692 o.add("foo"); | 685 o.add("foo"); |
| 693 return o; | 686 return o; |
| 694 } | 687 } |
| 695 | 688 |
| 696 checkUnnamed532(core.List<core.String> o) { | 689 checkUnnamed531(core.List<core.String> o) { |
| 697 unittest.expect(o, unittest.hasLength(2)); | 690 unittest.expect(o, unittest.hasLength(2)); |
| 698 unittest.expect(o[0], unittest.equals('foo')); | 691 unittest.expect(o[0], unittest.equals('foo')); |
| 699 unittest.expect(o[1], unittest.equals('foo')); | 692 unittest.expect(o[1], unittest.equals('foo')); |
| 700 } | 693 } |
| 701 | 694 |
| 702 core.int buildCounterInstanceGroupConfig = 0; | 695 core.int buildCounterInstanceGroupConfig = 0; |
| 703 buildInstanceGroupConfig() { | 696 buildInstanceGroupConfig() { |
| 704 var o = new api.InstanceGroupConfig(); | 697 var o = new api.InstanceGroupConfig(); |
| 705 buildCounterInstanceGroupConfig++; | 698 buildCounterInstanceGroupConfig++; |
| 706 if (buildCounterInstanceGroupConfig < 3) { | 699 if (buildCounterInstanceGroupConfig < 3) { |
| 707 o.accelerators = buildUnnamed531(); | 700 o.accelerators = buildUnnamed530(); |
| 708 o.diskConfig = buildDiskConfig(); | 701 o.diskConfig = buildDiskConfig(); |
| 709 o.imageUri = "foo"; | 702 o.imageUri = "foo"; |
| 710 o.instanceNames = buildUnnamed532(); | 703 o.instanceNames = buildUnnamed531(); |
| 711 o.isPreemptible = true; | 704 o.isPreemptible = true; |
| 712 o.machineTypeUri = "foo"; | 705 o.machineTypeUri = "foo"; |
| 713 o.managedGroupConfig = buildManagedGroupConfig(); | 706 o.managedGroupConfig = buildManagedGroupConfig(); |
| 714 o.numInstances = 42; | 707 o.numInstances = 42; |
| 715 } | 708 } |
| 716 buildCounterInstanceGroupConfig--; | 709 buildCounterInstanceGroupConfig--; |
| 717 return o; | 710 return o; |
| 718 } | 711 } |
| 719 | 712 |
| 720 checkInstanceGroupConfig(api.InstanceGroupConfig o) { | 713 checkInstanceGroupConfig(api.InstanceGroupConfig o) { |
| 721 buildCounterInstanceGroupConfig++; | 714 buildCounterInstanceGroupConfig++; |
| 722 if (buildCounterInstanceGroupConfig < 3) { | 715 if (buildCounterInstanceGroupConfig < 3) { |
| 723 checkUnnamed531(o.accelerators); | 716 checkUnnamed530(o.accelerators); |
| 724 checkDiskConfig(o.diskConfig); | 717 checkDiskConfig(o.diskConfig); |
| 725 unittest.expect(o.imageUri, unittest.equals('foo')); | 718 unittest.expect(o.imageUri, unittest.equals('foo')); |
| 726 checkUnnamed532(o.instanceNames); | 719 checkUnnamed531(o.instanceNames); |
| 727 unittest.expect(o.isPreemptible, unittest.isTrue); | 720 unittest.expect(o.isPreemptible, unittest.isTrue); |
| 728 unittest.expect(o.machineTypeUri, unittest.equals('foo')); | 721 unittest.expect(o.machineTypeUri, unittest.equals('foo')); |
| 729 checkManagedGroupConfig(o.managedGroupConfig); | 722 checkManagedGroupConfig(o.managedGroupConfig); |
| 730 unittest.expect(o.numInstances, unittest.equals(42)); | 723 unittest.expect(o.numInstances, unittest.equals(42)); |
| 731 } | 724 } |
| 732 buildCounterInstanceGroupConfig--; | 725 buildCounterInstanceGroupConfig--; |
| 733 } | 726 } |
| 734 | 727 |
| 735 buildUnnamed533() { | 728 buildUnnamed532() { |
| 736 var o = new core.Map<core.String, core.String>(); | 729 var o = new core.Map<core.String, core.String>(); |
| 737 o["x"] = "foo"; | 730 o["x"] = "foo"; |
| 738 o["y"] = "foo"; | 731 o["y"] = "foo"; |
| 739 return o; | 732 return o; |
| 740 } | 733 } |
| 741 | 734 |
| 742 checkUnnamed533(core.Map<core.String, core.String> o) { | 735 checkUnnamed532(core.Map<core.String, core.String> o) { |
| 743 unittest.expect(o, unittest.hasLength(2)); | 736 unittest.expect(o, unittest.hasLength(2)); |
| 744 unittest.expect(o["x"], unittest.equals('foo')); | 737 unittest.expect(o["x"], unittest.equals('foo')); |
| 745 unittest.expect(o["y"], unittest.equals('foo')); | 738 unittest.expect(o["y"], unittest.equals('foo')); |
| 746 } | 739 } |
| 747 | 740 |
| 748 buildUnnamed534() { | 741 buildUnnamed533() { |
| 749 var o = new core.List<api.JobStatus>(); | 742 var o = new core.List<api.JobStatus>(); |
| 750 o.add(buildJobStatus()); | 743 o.add(buildJobStatus()); |
| 751 o.add(buildJobStatus()); | 744 o.add(buildJobStatus()); |
| 752 return o; | 745 return o; |
| 753 } | 746 } |
| 754 | 747 |
| 755 checkUnnamed534(core.List<api.JobStatus> o) { | 748 checkUnnamed533(core.List<api.JobStatus> o) { |
| 756 unittest.expect(o, unittest.hasLength(2)); | 749 unittest.expect(o, unittest.hasLength(2)); |
| 757 checkJobStatus(o[0]); | 750 checkJobStatus(o[0]); |
| 758 checkJobStatus(o[1]); | 751 checkJobStatus(o[1]); |
| 759 } | 752 } |
| 760 | 753 |
| 761 buildUnnamed535() { | 754 buildUnnamed534() { |
| 762 var o = new core.List<api.YarnApplication>(); | 755 var o = new core.List<api.YarnApplication>(); |
| 763 o.add(buildYarnApplication()); | 756 o.add(buildYarnApplication()); |
| 764 o.add(buildYarnApplication()); | 757 o.add(buildYarnApplication()); |
| 765 return o; | 758 return o; |
| 766 } | 759 } |
| 767 | 760 |
| 768 checkUnnamed535(core.List<api.YarnApplication> o) { | 761 checkUnnamed534(core.List<api.YarnApplication> o) { |
| 769 unittest.expect(o, unittest.hasLength(2)); | 762 unittest.expect(o, unittest.hasLength(2)); |
| 770 checkYarnApplication(o[0]); | 763 checkYarnApplication(o[0]); |
| 771 checkYarnApplication(o[1]); | 764 checkYarnApplication(o[1]); |
| 772 } | 765 } |
| 773 | 766 |
| 774 core.int buildCounterJob = 0; | 767 core.int buildCounterJob = 0; |
| 775 buildJob() { | 768 buildJob() { |
| 776 var o = new api.Job(); | 769 var o = new api.Job(); |
| 777 buildCounterJob++; | 770 buildCounterJob++; |
| 778 if (buildCounterJob < 3) { | 771 if (buildCounterJob < 3) { |
| 779 o.driverControlFilesUri = "foo"; | 772 o.driverControlFilesUri = "foo"; |
| 780 o.driverOutputResourceUri = "foo"; | 773 o.driverOutputResourceUri = "foo"; |
| 781 o.hadoopJob = buildHadoopJob(); | 774 o.hadoopJob = buildHadoopJob(); |
| 782 o.hiveJob = buildHiveJob(); | 775 o.hiveJob = buildHiveJob(); |
| 783 o.labels = buildUnnamed533(); | 776 o.labels = buildUnnamed532(); |
| 784 o.pigJob = buildPigJob(); | 777 o.pigJob = buildPigJob(); |
| 785 o.placement = buildJobPlacement(); | 778 o.placement = buildJobPlacement(); |
| 786 o.pysparkJob = buildPySparkJob(); | 779 o.pysparkJob = buildPySparkJob(); |
| 787 o.reference = buildJobReference(); | 780 o.reference = buildJobReference(); |
| 788 o.scheduling = buildJobScheduling(); | 781 o.scheduling = buildJobScheduling(); |
| 789 o.sparkJob = buildSparkJob(); | 782 o.sparkJob = buildSparkJob(); |
| 790 o.sparkSqlJob = buildSparkSqlJob(); | 783 o.sparkSqlJob = buildSparkSqlJob(); |
| 791 o.status = buildJobStatus(); | 784 o.status = buildJobStatus(); |
| 792 o.statusHistory = buildUnnamed534(); | 785 o.statusHistory = buildUnnamed533(); |
| 793 o.yarnApplications = buildUnnamed535(); | 786 o.yarnApplications = buildUnnamed534(); |
| 794 } | 787 } |
| 795 buildCounterJob--; | 788 buildCounterJob--; |
| 796 return o; | 789 return o; |
| 797 } | 790 } |
| 798 | 791 |
| 799 checkJob(api.Job o) { | 792 checkJob(api.Job o) { |
| 800 buildCounterJob++; | 793 buildCounterJob++; |
| 801 if (buildCounterJob < 3) { | 794 if (buildCounterJob < 3) { |
| 802 unittest.expect(o.driverControlFilesUri, unittest.equals('foo')); | 795 unittest.expect(o.driverControlFilesUri, unittest.equals('foo')); |
| 803 unittest.expect(o.driverOutputResourceUri, unittest.equals('foo')); | 796 unittest.expect(o.driverOutputResourceUri, unittest.equals('foo')); |
| 804 checkHadoopJob(o.hadoopJob); | 797 checkHadoopJob(o.hadoopJob); |
| 805 checkHiveJob(o.hiveJob); | 798 checkHiveJob(o.hiveJob); |
| 806 checkUnnamed533(o.labels); | 799 checkUnnamed532(o.labels); |
| 807 checkPigJob(o.pigJob); | 800 checkPigJob(o.pigJob); |
| 808 checkJobPlacement(o.placement); | 801 checkJobPlacement(o.placement); |
| 809 checkPySparkJob(o.pysparkJob); | 802 checkPySparkJob(o.pysparkJob); |
| 810 checkJobReference(o.reference); | 803 checkJobReference(o.reference); |
| 811 checkJobScheduling(o.scheduling); | 804 checkJobScheduling(o.scheduling); |
| 812 checkSparkJob(o.sparkJob); | 805 checkSparkJob(o.sparkJob); |
| 813 checkSparkSqlJob(o.sparkSqlJob); | 806 checkSparkSqlJob(o.sparkSqlJob); |
| 814 checkJobStatus(o.status); | 807 checkJobStatus(o.status); |
| 815 checkUnnamed534(o.statusHistory); | 808 checkUnnamed533(o.statusHistory); |
| 816 checkUnnamed535(o.yarnApplications); | 809 checkUnnamed534(o.yarnApplications); |
| 817 } | 810 } |
| 818 buildCounterJob--; | 811 buildCounterJob--; |
| 819 } | 812 } |
| 820 | 813 |
| 821 core.int buildCounterJobPlacement = 0; | 814 core.int buildCounterJobPlacement = 0; |
| 822 buildJobPlacement() { | 815 buildJobPlacement() { |
| 823 var o = new api.JobPlacement(); | 816 var o = new api.JobPlacement(); |
| 824 buildCounterJobPlacement++; | 817 buildCounterJobPlacement++; |
| 825 if (buildCounterJobPlacement < 3) { | 818 if (buildCounterJobPlacement < 3) { |
| 826 o.clusterName = "foo"; | 819 o.clusterName = "foo"; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 buildCounterJobStatus++; | 890 buildCounterJobStatus++; |
| 898 if (buildCounterJobStatus < 3) { | 891 if (buildCounterJobStatus < 3) { |
| 899 unittest.expect(o.details, unittest.equals('foo')); | 892 unittest.expect(o.details, unittest.equals('foo')); |
| 900 unittest.expect(o.state, unittest.equals('foo')); | 893 unittest.expect(o.state, unittest.equals('foo')); |
| 901 unittest.expect(o.stateStartTime, unittest.equals('foo')); | 894 unittest.expect(o.stateStartTime, unittest.equals('foo')); |
| 902 unittest.expect(o.substate, unittest.equals('foo')); | 895 unittest.expect(o.substate, unittest.equals('foo')); |
| 903 } | 896 } |
| 904 buildCounterJobStatus--; | 897 buildCounterJobStatus--; |
| 905 } | 898 } |
| 906 | 899 |
| 907 buildUnnamed536() { | 900 buildUnnamed535() { |
| 908 var o = new core.List<api.Cluster>(); | 901 var o = new core.List<api.Cluster>(); |
| 909 o.add(buildCluster()); | 902 o.add(buildCluster()); |
| 910 o.add(buildCluster()); | 903 o.add(buildCluster()); |
| 911 return o; | 904 return o; |
| 912 } | 905 } |
| 913 | 906 |
| 914 checkUnnamed536(core.List<api.Cluster> o) { | 907 checkUnnamed535(core.List<api.Cluster> o) { |
| 915 unittest.expect(o, unittest.hasLength(2)); | 908 unittest.expect(o, unittest.hasLength(2)); |
| 916 checkCluster(o[0]); | 909 checkCluster(o[0]); |
| 917 checkCluster(o[1]); | 910 checkCluster(o[1]); |
| 918 } | 911 } |
| 919 | 912 |
| 920 core.int buildCounterListClustersResponse = 0; | 913 core.int buildCounterListClustersResponse = 0; |
| 921 buildListClustersResponse() { | 914 buildListClustersResponse() { |
| 922 var o = new api.ListClustersResponse(); | 915 var o = new api.ListClustersResponse(); |
| 923 buildCounterListClustersResponse++; | 916 buildCounterListClustersResponse++; |
| 924 if (buildCounterListClustersResponse < 3) { | 917 if (buildCounterListClustersResponse < 3) { |
| 925 o.clusters = buildUnnamed536(); | 918 o.clusters = buildUnnamed535(); |
| 926 o.nextPageToken = "foo"; | 919 o.nextPageToken = "foo"; |
| 927 } | 920 } |
| 928 buildCounterListClustersResponse--; | 921 buildCounterListClustersResponse--; |
| 929 return o; | 922 return o; |
| 930 } | 923 } |
| 931 | 924 |
| 932 checkListClustersResponse(api.ListClustersResponse o) { | 925 checkListClustersResponse(api.ListClustersResponse o) { |
| 933 buildCounterListClustersResponse++; | 926 buildCounterListClustersResponse++; |
| 934 if (buildCounterListClustersResponse < 3) { | 927 if (buildCounterListClustersResponse < 3) { |
| 935 checkUnnamed536(o.clusters); | 928 checkUnnamed535(o.clusters); |
| 936 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 929 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 937 } | 930 } |
| 938 buildCounterListClustersResponse--; | 931 buildCounterListClustersResponse--; |
| 939 } | 932 } |
| 940 | 933 |
| 941 buildUnnamed537() { | 934 buildUnnamed536() { |
| 942 var o = new core.List<api.Job>(); | 935 var o = new core.List<api.Job>(); |
| 943 o.add(buildJob()); | 936 o.add(buildJob()); |
| 944 o.add(buildJob()); | 937 o.add(buildJob()); |
| 945 return o; | 938 return o; |
| 946 } | 939 } |
| 947 | 940 |
| 948 checkUnnamed537(core.List<api.Job> o) { | 941 checkUnnamed536(core.List<api.Job> o) { |
| 949 unittest.expect(o, unittest.hasLength(2)); | 942 unittest.expect(o, unittest.hasLength(2)); |
| 950 checkJob(o[0]); | 943 checkJob(o[0]); |
| 951 checkJob(o[1]); | 944 checkJob(o[1]); |
| 952 } | 945 } |
| 953 | 946 |
| 954 core.int buildCounterListJobsResponse = 0; | 947 core.int buildCounterListJobsResponse = 0; |
| 955 buildListJobsResponse() { | 948 buildListJobsResponse() { |
| 956 var o = new api.ListJobsResponse(); | 949 var o = new api.ListJobsResponse(); |
| 957 buildCounterListJobsResponse++; | 950 buildCounterListJobsResponse++; |
| 958 if (buildCounterListJobsResponse < 3) { | 951 if (buildCounterListJobsResponse < 3) { |
| 959 o.jobs = buildUnnamed537(); | 952 o.jobs = buildUnnamed536(); |
| 960 o.nextPageToken = "foo"; | 953 o.nextPageToken = "foo"; |
| 961 } | 954 } |
| 962 buildCounterListJobsResponse--; | 955 buildCounterListJobsResponse--; |
| 963 return o; | 956 return o; |
| 964 } | 957 } |
| 965 | 958 |
| 966 checkListJobsResponse(api.ListJobsResponse o) { | 959 checkListJobsResponse(api.ListJobsResponse o) { |
| 967 buildCounterListJobsResponse++; | 960 buildCounterListJobsResponse++; |
| 968 if (buildCounterListJobsResponse < 3) { | 961 if (buildCounterListJobsResponse < 3) { |
| 969 checkUnnamed537(o.jobs); | 962 checkUnnamed536(o.jobs); |
| 970 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 963 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 971 } | 964 } |
| 972 buildCounterListJobsResponse--; | 965 buildCounterListJobsResponse--; |
| 973 } | 966 } |
| 974 | 967 |
| 975 buildUnnamed538() { | 968 buildUnnamed537() { |
| 976 var o = new core.List<api.Operation>(); | 969 var o = new core.List<api.Operation>(); |
| 977 o.add(buildOperation()); | 970 o.add(buildOperation()); |
| 978 o.add(buildOperation()); | 971 o.add(buildOperation()); |
| 979 return o; | 972 return o; |
| 980 } | 973 } |
| 981 | 974 |
| 982 checkUnnamed538(core.List<api.Operation> o) { | 975 checkUnnamed537(core.List<api.Operation> o) { |
| 983 unittest.expect(o, unittest.hasLength(2)); | 976 unittest.expect(o, unittest.hasLength(2)); |
| 984 checkOperation(o[0]); | 977 checkOperation(o[0]); |
| 985 checkOperation(o[1]); | 978 checkOperation(o[1]); |
| 986 } | 979 } |
| 987 | 980 |
| 988 core.int buildCounterListOperationsResponse = 0; | 981 core.int buildCounterListOperationsResponse = 0; |
| 989 buildListOperationsResponse() { | 982 buildListOperationsResponse() { |
| 990 var o = new api.ListOperationsResponse(); | 983 var o = new api.ListOperationsResponse(); |
| 991 buildCounterListOperationsResponse++; | 984 buildCounterListOperationsResponse++; |
| 992 if (buildCounterListOperationsResponse < 3) { | 985 if (buildCounterListOperationsResponse < 3) { |
| 993 o.nextPageToken = "foo"; | 986 o.nextPageToken = "foo"; |
| 994 o.operations = buildUnnamed538(); | 987 o.operations = buildUnnamed537(); |
| 995 } | 988 } |
| 996 buildCounterListOperationsResponse--; | 989 buildCounterListOperationsResponse--; |
| 997 return o; | 990 return o; |
| 998 } | 991 } |
| 999 | 992 |
| 1000 checkListOperationsResponse(api.ListOperationsResponse o) { | 993 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 1001 buildCounterListOperationsResponse++; | 994 buildCounterListOperationsResponse++; |
| 1002 if (buildCounterListOperationsResponse < 3) { | 995 if (buildCounterListOperationsResponse < 3) { |
| 1003 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 996 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1004 checkUnnamed538(o.operations); | 997 checkUnnamed537(o.operations); |
| 1005 } | 998 } |
| 1006 buildCounterListOperationsResponse--; | 999 buildCounterListOperationsResponse--; |
| 1007 } | 1000 } |
| 1008 | 1001 |
| 1009 buildUnnamed539() { | 1002 buildUnnamed538() { |
| 1010 var o = new core.Map<core.String, core.String>(); | 1003 var o = new core.Map<core.String, core.String>(); |
| 1011 o["x"] = "foo"; | 1004 o["x"] = "foo"; |
| 1012 o["y"] = "foo"; | 1005 o["y"] = "foo"; |
| 1013 return o; | 1006 return o; |
| 1014 } | 1007 } |
| 1015 | 1008 |
| 1016 checkUnnamed539(core.Map<core.String, core.String> o) { | 1009 checkUnnamed538(core.Map<core.String, core.String> o) { |
| 1017 unittest.expect(o, unittest.hasLength(2)); | 1010 unittest.expect(o, unittest.hasLength(2)); |
| 1018 unittest.expect(o["x"], unittest.equals('foo')); | 1011 unittest.expect(o["x"], unittest.equals('foo')); |
| 1019 unittest.expect(o["y"], unittest.equals('foo')); | 1012 unittest.expect(o["y"], unittest.equals('foo')); |
| 1020 } | 1013 } |
| 1021 | 1014 |
| 1022 core.int buildCounterLoggingConfig = 0; | 1015 core.int buildCounterLoggingConfig = 0; |
| 1023 buildLoggingConfig() { | 1016 buildLoggingConfig() { |
| 1024 var o = new api.LoggingConfig(); | 1017 var o = new api.LoggingConfig(); |
| 1025 buildCounterLoggingConfig++; | 1018 buildCounterLoggingConfig++; |
| 1026 if (buildCounterLoggingConfig < 3) { | 1019 if (buildCounterLoggingConfig < 3) { |
| 1027 o.driverLogLevels = buildUnnamed539(); | 1020 o.driverLogLevels = buildUnnamed538(); |
| 1028 } | 1021 } |
| 1029 buildCounterLoggingConfig--; | 1022 buildCounterLoggingConfig--; |
| 1030 return o; | 1023 return o; |
| 1031 } | 1024 } |
| 1032 | 1025 |
| 1033 checkLoggingConfig(api.LoggingConfig o) { | 1026 checkLoggingConfig(api.LoggingConfig o) { |
| 1034 buildCounterLoggingConfig++; | 1027 buildCounterLoggingConfig++; |
| 1035 if (buildCounterLoggingConfig < 3) { | 1028 if (buildCounterLoggingConfig < 3) { |
| 1036 checkUnnamed539(o.driverLogLevels); | 1029 checkUnnamed538(o.driverLogLevels); |
| 1037 } | 1030 } |
| 1038 buildCounterLoggingConfig--; | 1031 buildCounterLoggingConfig--; |
| 1039 } | 1032 } |
| 1040 | 1033 |
| 1041 core.int buildCounterManagedGroupConfig = 0; | 1034 core.int buildCounterManagedGroupConfig = 0; |
| 1042 buildManagedGroupConfig() { | 1035 buildManagedGroupConfig() { |
| 1043 var o = new api.ManagedGroupConfig(); | 1036 var o = new api.ManagedGroupConfig(); |
| 1044 buildCounterManagedGroupConfig++; | 1037 buildCounterManagedGroupConfig++; |
| 1045 if (buildCounterManagedGroupConfig < 3) { | 1038 if (buildCounterManagedGroupConfig < 3) { |
| 1046 o.instanceGroupManagerName = "foo"; | 1039 o.instanceGroupManagerName = "foo"; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1073 | 1066 |
| 1074 checkNodeInitializationAction(api.NodeInitializationAction o) { | 1067 checkNodeInitializationAction(api.NodeInitializationAction o) { |
| 1075 buildCounterNodeInitializationAction++; | 1068 buildCounterNodeInitializationAction++; |
| 1076 if (buildCounterNodeInitializationAction < 3) { | 1069 if (buildCounterNodeInitializationAction < 3) { |
| 1077 unittest.expect(o.executableFile, unittest.equals('foo')); | 1070 unittest.expect(o.executableFile, unittest.equals('foo')); |
| 1078 unittest.expect(o.executionTimeout, unittest.equals('foo')); | 1071 unittest.expect(o.executionTimeout, unittest.equals('foo')); |
| 1079 } | 1072 } |
| 1080 buildCounterNodeInitializationAction--; | 1073 buildCounterNodeInitializationAction--; |
| 1081 } | 1074 } |
| 1082 | 1075 |
| 1076 buildUnnamed539() { |
| 1077 var o = new core.Map<core.String, core.Object>(); |
| 1078 o["x"] = { |
| 1079 'list': [1, 2, 3], |
| 1080 'bool': true, |
| 1081 'string': 'foo' |
| 1082 }; |
| 1083 o["y"] = { |
| 1084 'list': [1, 2, 3], |
| 1085 'bool': true, |
| 1086 'string': 'foo' |
| 1087 }; |
| 1088 return o; |
| 1089 } |
| 1090 |
| 1091 checkUnnamed539(core.Map<core.String, core.Object> o) { |
| 1092 unittest.expect(o, unittest.hasLength(2)); |
| 1093 var casted1 = (o["x"]) as core.Map; |
| 1094 unittest.expect(casted1, unittest.hasLength(3)); |
| 1095 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 1096 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 1097 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 1098 var casted2 = (o["y"]) as core.Map; |
| 1099 unittest.expect(casted2, unittest.hasLength(3)); |
| 1100 unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 1101 unittest.expect(casted2["bool"], unittest.equals(true)); |
| 1102 unittest.expect(casted2["string"], unittest.equals('foo')); |
| 1103 } |
| 1104 |
| 1083 buildUnnamed540() { | 1105 buildUnnamed540() { |
| 1084 var o = new core.Map<core.String, core.Object>(); | 1106 var o = new core.Map<core.String, core.Object>(); |
| 1085 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1107 o["x"] = { |
| 1086 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1108 'list': [1, 2, 3], |
| 1109 'bool': true, |
| 1110 'string': 'foo' |
| 1111 }; |
| 1112 o["y"] = { |
| 1113 'list': [1, 2, 3], |
| 1114 'bool': true, |
| 1115 'string': 'foo' |
| 1116 }; |
| 1087 return o; | 1117 return o; |
| 1088 } | 1118 } |
| 1089 | 1119 |
| 1090 checkUnnamed540(core.Map<core.String, core.Object> o) { | 1120 checkUnnamed540(core.Map<core.String, core.Object> o) { |
| 1091 unittest.expect(o, unittest.hasLength(2)); | 1121 unittest.expect(o, unittest.hasLength(2)); |
| 1092 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')); | 1122 var casted3 = (o["x"]) as core.Map; |
| 1093 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')); | 1123 unittest.expect(casted3, unittest.hasLength(3)); |
| 1094 } | 1124 unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); |
| 1095 | 1125 unittest.expect(casted3["bool"], unittest.equals(true)); |
| 1096 buildUnnamed541() { | 1126 unittest.expect(casted3["string"], unittest.equals('foo')); |
| 1097 var o = new core.Map<core.String, core.Object>(); | 1127 var casted4 = (o["y"]) as core.Map; |
| 1098 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1128 unittest.expect(casted4, unittest.hasLength(3)); |
| 1099 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1129 unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); |
| 1100 return o; | 1130 unittest.expect(casted4["bool"], unittest.equals(true)); |
| 1101 } | 1131 unittest.expect(casted4["string"], unittest.equals('foo')); |
| 1102 | |
| 1103 checkUnnamed541(core.Map<core.String, core.Object> o) { | |
| 1104 unittest.expect(o, unittest.hasLength(2)); | |
| 1105 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')); | |
| 1106 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')); | |
| 1107 } | 1132 } |
| 1108 | 1133 |
| 1109 core.int buildCounterOperation = 0; | 1134 core.int buildCounterOperation = 0; |
| 1110 buildOperation() { | 1135 buildOperation() { |
| 1111 var o = new api.Operation(); | 1136 var o = new api.Operation(); |
| 1112 buildCounterOperation++; | 1137 buildCounterOperation++; |
| 1113 if (buildCounterOperation < 3) { | 1138 if (buildCounterOperation < 3) { |
| 1114 o.done = true; | 1139 o.done = true; |
| 1115 o.error = buildStatus(); | 1140 o.error = buildStatus(); |
| 1116 o.metadata = buildUnnamed540(); | 1141 o.metadata = buildUnnamed539(); |
| 1117 o.name = "foo"; | 1142 o.name = "foo"; |
| 1118 o.response = buildUnnamed541(); | 1143 o.response = buildUnnamed540(); |
| 1119 } | 1144 } |
| 1120 buildCounterOperation--; | 1145 buildCounterOperation--; |
| 1121 return o; | 1146 return o; |
| 1122 } | 1147 } |
| 1123 | 1148 |
| 1124 checkOperation(api.Operation o) { | 1149 checkOperation(api.Operation o) { |
| 1125 buildCounterOperation++; | 1150 buildCounterOperation++; |
| 1126 if (buildCounterOperation < 3) { | 1151 if (buildCounterOperation < 3) { |
| 1127 unittest.expect(o.done, unittest.isTrue); | 1152 unittest.expect(o.done, unittest.isTrue); |
| 1128 checkStatus(o.error); | 1153 checkStatus(o.error); |
| 1129 checkUnnamed540(o.metadata); | 1154 checkUnnamed539(o.metadata); |
| 1130 unittest.expect(o.name, unittest.equals('foo')); | 1155 unittest.expect(o.name, unittest.equals('foo')); |
| 1131 checkUnnamed541(o.response); | 1156 checkUnnamed540(o.response); |
| 1132 } | 1157 } |
| 1133 buildCounterOperation--; | 1158 buildCounterOperation--; |
| 1134 } | 1159 } |
| 1135 | 1160 |
| 1136 buildUnnamed542() { | 1161 buildUnnamed541() { |
| 1137 var o = new core.List<core.String>(); | 1162 var o = new core.List<core.String>(); |
| 1138 o.add("foo"); | 1163 o.add("foo"); |
| 1139 o.add("foo"); | 1164 o.add("foo"); |
| 1140 return o; | 1165 return o; |
| 1141 } | 1166 } |
| 1142 | 1167 |
| 1143 checkUnnamed542(core.List<core.String> o) { | 1168 checkUnnamed541(core.List<core.String> o) { |
| 1144 unittest.expect(o, unittest.hasLength(2)); | 1169 unittest.expect(o, unittest.hasLength(2)); |
| 1145 unittest.expect(o[0], unittest.equals('foo')); | 1170 unittest.expect(o[0], unittest.equals('foo')); |
| 1146 unittest.expect(o[1], unittest.equals('foo')); | 1171 unittest.expect(o[1], unittest.equals('foo')); |
| 1147 } | 1172 } |
| 1148 | 1173 |
| 1174 buildUnnamed542() { |
| 1175 var o = new core.Map<core.String, core.String>(); |
| 1176 o["x"] = "foo"; |
| 1177 o["y"] = "foo"; |
| 1178 return o; |
| 1179 } |
| 1180 |
| 1181 checkUnnamed542(core.Map<core.String, core.String> o) { |
| 1182 unittest.expect(o, unittest.hasLength(2)); |
| 1183 unittest.expect(o["x"], unittest.equals('foo')); |
| 1184 unittest.expect(o["y"], unittest.equals('foo')); |
| 1185 } |
| 1186 |
| 1149 buildUnnamed543() { | 1187 buildUnnamed543() { |
| 1150 var o = new core.Map<core.String, core.String>(); | 1188 var o = new core.Map<core.String, core.String>(); |
| 1151 o["x"] = "foo"; | 1189 o["x"] = "foo"; |
| 1152 o["y"] = "foo"; | 1190 o["y"] = "foo"; |
| 1153 return o; | 1191 return o; |
| 1154 } | 1192 } |
| 1155 | 1193 |
| 1156 checkUnnamed543(core.Map<core.String, core.String> o) { | 1194 checkUnnamed543(core.Map<core.String, core.String> o) { |
| 1157 unittest.expect(o, unittest.hasLength(2)); | 1195 unittest.expect(o, unittest.hasLength(2)); |
| 1158 unittest.expect(o["x"], unittest.equals('foo')); | 1196 unittest.expect(o["x"], unittest.equals('foo')); |
| 1159 unittest.expect(o["y"], unittest.equals('foo')); | 1197 unittest.expect(o["y"], unittest.equals('foo')); |
| 1160 } | |
| 1161 | |
| 1162 buildUnnamed544() { | |
| 1163 var o = new core.Map<core.String, core.String>(); | |
| 1164 o["x"] = "foo"; | |
| 1165 o["y"] = "foo"; | |
| 1166 return o; | |
| 1167 } | |
| 1168 | |
| 1169 checkUnnamed544(core.Map<core.String, core.String> o) { | |
| 1170 unittest.expect(o, unittest.hasLength(2)); | |
| 1171 unittest.expect(o["x"], unittest.equals('foo')); | |
| 1172 unittest.expect(o["y"], unittest.equals('foo')); | |
| 1173 } | 1198 } |
| 1174 | 1199 |
| 1175 core.int buildCounterPigJob = 0; | 1200 core.int buildCounterPigJob = 0; |
| 1176 buildPigJob() { | 1201 buildPigJob() { |
| 1177 var o = new api.PigJob(); | 1202 var o = new api.PigJob(); |
| 1178 buildCounterPigJob++; | 1203 buildCounterPigJob++; |
| 1179 if (buildCounterPigJob < 3) { | 1204 if (buildCounterPigJob < 3) { |
| 1180 o.continueOnFailure = true; | 1205 o.continueOnFailure = true; |
| 1181 o.jarFileUris = buildUnnamed542(); | 1206 o.jarFileUris = buildUnnamed541(); |
| 1182 o.loggingConfig = buildLoggingConfig(); | 1207 o.loggingConfig = buildLoggingConfig(); |
| 1183 o.properties = buildUnnamed543(); | 1208 o.properties = buildUnnamed542(); |
| 1184 o.queryFileUri = "foo"; | 1209 o.queryFileUri = "foo"; |
| 1185 o.queryList = buildQueryList(); | 1210 o.queryList = buildQueryList(); |
| 1186 o.scriptVariables = buildUnnamed544(); | 1211 o.scriptVariables = buildUnnamed543(); |
| 1187 } | 1212 } |
| 1188 buildCounterPigJob--; | 1213 buildCounterPigJob--; |
| 1189 return o; | 1214 return o; |
| 1190 } | 1215 } |
| 1191 | 1216 |
| 1192 checkPigJob(api.PigJob o) { | 1217 checkPigJob(api.PigJob o) { |
| 1193 buildCounterPigJob++; | 1218 buildCounterPigJob++; |
| 1194 if (buildCounterPigJob < 3) { | 1219 if (buildCounterPigJob < 3) { |
| 1195 unittest.expect(o.continueOnFailure, unittest.isTrue); | 1220 unittest.expect(o.continueOnFailure, unittest.isTrue); |
| 1196 checkUnnamed542(o.jarFileUris); | 1221 checkUnnamed541(o.jarFileUris); |
| 1197 checkLoggingConfig(o.loggingConfig); | 1222 checkLoggingConfig(o.loggingConfig); |
| 1198 checkUnnamed543(o.properties); | 1223 checkUnnamed542(o.properties); |
| 1199 unittest.expect(o.queryFileUri, unittest.equals('foo')); | 1224 unittest.expect(o.queryFileUri, unittest.equals('foo')); |
| 1200 checkQueryList(o.queryList); | 1225 checkQueryList(o.queryList); |
| 1201 checkUnnamed544(o.scriptVariables); | 1226 checkUnnamed543(o.scriptVariables); |
| 1202 } | 1227 } |
| 1203 buildCounterPigJob--; | 1228 buildCounterPigJob--; |
| 1204 } | 1229 } |
| 1205 | 1230 |
| 1231 buildUnnamed544() { |
| 1232 var o = new core.List<core.String>(); |
| 1233 o.add("foo"); |
| 1234 o.add("foo"); |
| 1235 return o; |
| 1236 } |
| 1237 |
| 1238 checkUnnamed544(core.List<core.String> o) { |
| 1239 unittest.expect(o, unittest.hasLength(2)); |
| 1240 unittest.expect(o[0], unittest.equals('foo')); |
| 1241 unittest.expect(o[1], unittest.equals('foo')); |
| 1242 } |
| 1243 |
| 1206 buildUnnamed545() { | 1244 buildUnnamed545() { |
| 1207 var o = new core.List<core.String>(); | 1245 var o = new core.List<core.String>(); |
| 1208 o.add("foo"); | 1246 o.add("foo"); |
| 1209 o.add("foo"); | 1247 o.add("foo"); |
| 1210 return o; | 1248 return o; |
| 1211 } | 1249 } |
| 1212 | 1250 |
| 1213 checkUnnamed545(core.List<core.String> o) { | 1251 checkUnnamed545(core.List<core.String> o) { |
| 1214 unittest.expect(o, unittest.hasLength(2)); | 1252 unittest.expect(o, unittest.hasLength(2)); |
| 1215 unittest.expect(o[0], unittest.equals('foo')); | 1253 unittest.expect(o[0], unittest.equals('foo')); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1236 return o; | 1274 return o; |
| 1237 } | 1275 } |
| 1238 | 1276 |
| 1239 checkUnnamed547(core.List<core.String> o) { | 1277 checkUnnamed547(core.List<core.String> o) { |
| 1240 unittest.expect(o, unittest.hasLength(2)); | 1278 unittest.expect(o, unittest.hasLength(2)); |
| 1241 unittest.expect(o[0], unittest.equals('foo')); | 1279 unittest.expect(o[0], unittest.equals('foo')); |
| 1242 unittest.expect(o[1], unittest.equals('foo')); | 1280 unittest.expect(o[1], unittest.equals('foo')); |
| 1243 } | 1281 } |
| 1244 | 1282 |
| 1245 buildUnnamed548() { | 1283 buildUnnamed548() { |
| 1284 var o = new core.Map<core.String, core.String>(); |
| 1285 o["x"] = "foo"; |
| 1286 o["y"] = "foo"; |
| 1287 return o; |
| 1288 } |
| 1289 |
| 1290 checkUnnamed548(core.Map<core.String, core.String> o) { |
| 1291 unittest.expect(o, unittest.hasLength(2)); |
| 1292 unittest.expect(o["x"], unittest.equals('foo')); |
| 1293 unittest.expect(o["y"], unittest.equals('foo')); |
| 1294 } |
| 1295 |
| 1296 buildUnnamed549() { |
| 1246 var o = new core.List<core.String>(); | 1297 var o = new core.List<core.String>(); |
| 1247 o.add("foo"); | 1298 o.add("foo"); |
| 1248 o.add("foo"); | 1299 o.add("foo"); |
| 1249 return o; | 1300 return o; |
| 1250 } | 1301 } |
| 1251 | 1302 |
| 1252 checkUnnamed548(core.List<core.String> o) { | 1303 checkUnnamed549(core.List<core.String> o) { |
| 1253 unittest.expect(o, unittest.hasLength(2)); | 1304 unittest.expect(o, unittest.hasLength(2)); |
| 1254 unittest.expect(o[0], unittest.equals('foo')); | 1305 unittest.expect(o[0], unittest.equals('foo')); |
| 1255 unittest.expect(o[1], unittest.equals('foo')); | 1306 unittest.expect(o[1], unittest.equals('foo')); |
| 1256 } | |
| 1257 | |
| 1258 buildUnnamed549() { | |
| 1259 var o = new core.Map<core.String, core.String>(); | |
| 1260 o["x"] = "foo"; | |
| 1261 o["y"] = "foo"; | |
| 1262 return o; | |
| 1263 } | |
| 1264 | |
| 1265 checkUnnamed549(core.Map<core.String, core.String> o) { | |
| 1266 unittest.expect(o, unittest.hasLength(2)); | |
| 1267 unittest.expect(o["x"], unittest.equals('foo')); | |
| 1268 unittest.expect(o["y"], unittest.equals('foo')); | |
| 1269 } | |
| 1270 | |
| 1271 buildUnnamed550() { | |
| 1272 var o = new core.List<core.String>(); | |
| 1273 o.add("foo"); | |
| 1274 o.add("foo"); | |
| 1275 return o; | |
| 1276 } | |
| 1277 | |
| 1278 checkUnnamed550(core.List<core.String> o) { | |
| 1279 unittest.expect(o, unittest.hasLength(2)); | |
| 1280 unittest.expect(o[0], unittest.equals('foo')); | |
| 1281 unittest.expect(o[1], unittest.equals('foo')); | |
| 1282 } | 1307 } |
| 1283 | 1308 |
| 1284 core.int buildCounterPySparkJob = 0; | 1309 core.int buildCounterPySparkJob = 0; |
| 1285 buildPySparkJob() { | 1310 buildPySparkJob() { |
| 1286 var o = new api.PySparkJob(); | 1311 var o = new api.PySparkJob(); |
| 1287 buildCounterPySparkJob++; | 1312 buildCounterPySparkJob++; |
| 1288 if (buildCounterPySparkJob < 3) { | 1313 if (buildCounterPySparkJob < 3) { |
| 1289 o.archiveUris = buildUnnamed545(); | 1314 o.archiveUris = buildUnnamed544(); |
| 1290 o.args = buildUnnamed546(); | 1315 o.args = buildUnnamed545(); |
| 1291 o.fileUris = buildUnnamed547(); | 1316 o.fileUris = buildUnnamed546(); |
| 1292 o.jarFileUris = buildUnnamed548(); | 1317 o.jarFileUris = buildUnnamed547(); |
| 1293 o.loggingConfig = buildLoggingConfig(); | 1318 o.loggingConfig = buildLoggingConfig(); |
| 1294 o.mainPythonFileUri = "foo"; | 1319 o.mainPythonFileUri = "foo"; |
| 1295 o.properties = buildUnnamed549(); | 1320 o.properties = buildUnnamed548(); |
| 1296 o.pythonFileUris = buildUnnamed550(); | 1321 o.pythonFileUris = buildUnnamed549(); |
| 1297 } | 1322 } |
| 1298 buildCounterPySparkJob--; | 1323 buildCounterPySparkJob--; |
| 1299 return o; | 1324 return o; |
| 1300 } | 1325 } |
| 1301 | 1326 |
| 1302 checkPySparkJob(api.PySparkJob o) { | 1327 checkPySparkJob(api.PySparkJob o) { |
| 1303 buildCounterPySparkJob++; | 1328 buildCounterPySparkJob++; |
| 1304 if (buildCounterPySparkJob < 3) { | 1329 if (buildCounterPySparkJob < 3) { |
| 1305 checkUnnamed545(o.archiveUris); | 1330 checkUnnamed544(o.archiveUris); |
| 1306 checkUnnamed546(o.args); | 1331 checkUnnamed545(o.args); |
| 1307 checkUnnamed547(o.fileUris); | 1332 checkUnnamed546(o.fileUris); |
| 1308 checkUnnamed548(o.jarFileUris); | 1333 checkUnnamed547(o.jarFileUris); |
| 1309 checkLoggingConfig(o.loggingConfig); | 1334 checkLoggingConfig(o.loggingConfig); |
| 1310 unittest.expect(o.mainPythonFileUri, unittest.equals('foo')); | 1335 unittest.expect(o.mainPythonFileUri, unittest.equals('foo')); |
| 1311 checkUnnamed549(o.properties); | 1336 checkUnnamed548(o.properties); |
| 1312 checkUnnamed550(o.pythonFileUris); | 1337 checkUnnamed549(o.pythonFileUris); |
| 1313 } | 1338 } |
| 1314 buildCounterPySparkJob--; | 1339 buildCounterPySparkJob--; |
| 1315 } | 1340 } |
| 1316 | 1341 |
| 1317 buildUnnamed551() { | 1342 buildUnnamed550() { |
| 1318 var o = new core.List<core.String>(); | 1343 var o = new core.List<core.String>(); |
| 1319 o.add("foo"); | 1344 o.add("foo"); |
| 1320 o.add("foo"); | 1345 o.add("foo"); |
| 1321 return o; | 1346 return o; |
| 1322 } | 1347 } |
| 1323 | 1348 |
| 1324 checkUnnamed551(core.List<core.String> o) { | 1349 checkUnnamed550(core.List<core.String> o) { |
| 1325 unittest.expect(o, unittest.hasLength(2)); | 1350 unittest.expect(o, unittest.hasLength(2)); |
| 1326 unittest.expect(o[0], unittest.equals('foo')); | 1351 unittest.expect(o[0], unittest.equals('foo')); |
| 1327 unittest.expect(o[1], unittest.equals('foo')); | 1352 unittest.expect(o[1], unittest.equals('foo')); |
| 1328 } | 1353 } |
| 1329 | 1354 |
| 1330 core.int buildCounterQueryList = 0; | 1355 core.int buildCounterQueryList = 0; |
| 1331 buildQueryList() { | 1356 buildQueryList() { |
| 1332 var o = new api.QueryList(); | 1357 var o = new api.QueryList(); |
| 1333 buildCounterQueryList++; | 1358 buildCounterQueryList++; |
| 1334 if (buildCounterQueryList < 3) { | 1359 if (buildCounterQueryList < 3) { |
| 1335 o.queries = buildUnnamed551(); | 1360 o.queries = buildUnnamed550(); |
| 1336 } | 1361 } |
| 1337 buildCounterQueryList--; | 1362 buildCounterQueryList--; |
| 1338 return o; | 1363 return o; |
| 1339 } | 1364 } |
| 1340 | 1365 |
| 1341 checkQueryList(api.QueryList o) { | 1366 checkQueryList(api.QueryList o) { |
| 1342 buildCounterQueryList++; | 1367 buildCounterQueryList++; |
| 1343 if (buildCounterQueryList < 3) { | 1368 if (buildCounterQueryList < 3) { |
| 1344 checkUnnamed551(o.queries); | 1369 checkUnnamed550(o.queries); |
| 1345 } | 1370 } |
| 1346 buildCounterQueryList--; | 1371 buildCounterQueryList--; |
| 1347 } | 1372 } |
| 1348 | 1373 |
| 1349 buildUnnamed552() { | 1374 buildUnnamed551() { |
| 1350 var o = new core.Map<core.String, core.String>(); | 1375 var o = new core.Map<core.String, core.String>(); |
| 1351 o["x"] = "foo"; | 1376 o["x"] = "foo"; |
| 1352 o["y"] = "foo"; | 1377 o["y"] = "foo"; |
| 1353 return o; | 1378 return o; |
| 1354 } | 1379 } |
| 1355 | 1380 |
| 1356 checkUnnamed552(core.Map<core.String, core.String> o) { | 1381 checkUnnamed551(core.Map<core.String, core.String> o) { |
| 1357 unittest.expect(o, unittest.hasLength(2)); | 1382 unittest.expect(o, unittest.hasLength(2)); |
| 1358 unittest.expect(o["x"], unittest.equals('foo')); | 1383 unittest.expect(o["x"], unittest.equals('foo')); |
| 1359 unittest.expect(o["y"], unittest.equals('foo')); | 1384 unittest.expect(o["y"], unittest.equals('foo')); |
| 1360 } | 1385 } |
| 1361 | 1386 |
| 1362 core.int buildCounterSoftwareConfig = 0; | 1387 core.int buildCounterSoftwareConfig = 0; |
| 1363 buildSoftwareConfig() { | 1388 buildSoftwareConfig() { |
| 1364 var o = new api.SoftwareConfig(); | 1389 var o = new api.SoftwareConfig(); |
| 1365 buildCounterSoftwareConfig++; | 1390 buildCounterSoftwareConfig++; |
| 1366 if (buildCounterSoftwareConfig < 3) { | 1391 if (buildCounterSoftwareConfig < 3) { |
| 1367 o.imageVersion = "foo"; | 1392 o.imageVersion = "foo"; |
| 1368 o.properties = buildUnnamed552(); | 1393 o.properties = buildUnnamed551(); |
| 1369 } | 1394 } |
| 1370 buildCounterSoftwareConfig--; | 1395 buildCounterSoftwareConfig--; |
| 1371 return o; | 1396 return o; |
| 1372 } | 1397 } |
| 1373 | 1398 |
| 1374 checkSoftwareConfig(api.SoftwareConfig o) { | 1399 checkSoftwareConfig(api.SoftwareConfig o) { |
| 1375 buildCounterSoftwareConfig++; | 1400 buildCounterSoftwareConfig++; |
| 1376 if (buildCounterSoftwareConfig < 3) { | 1401 if (buildCounterSoftwareConfig < 3) { |
| 1377 unittest.expect(o.imageVersion, unittest.equals('foo')); | 1402 unittest.expect(o.imageVersion, unittest.equals('foo')); |
| 1378 checkUnnamed552(o.properties); | 1403 checkUnnamed551(o.properties); |
| 1379 } | 1404 } |
| 1380 buildCounterSoftwareConfig--; | 1405 buildCounterSoftwareConfig--; |
| 1381 } | 1406 } |
| 1382 | 1407 |
| 1408 buildUnnamed552() { |
| 1409 var o = new core.List<core.String>(); |
| 1410 o.add("foo"); |
| 1411 o.add("foo"); |
| 1412 return o; |
| 1413 } |
| 1414 |
| 1415 checkUnnamed552(core.List<core.String> o) { |
| 1416 unittest.expect(o, unittest.hasLength(2)); |
| 1417 unittest.expect(o[0], unittest.equals('foo')); |
| 1418 unittest.expect(o[1], unittest.equals('foo')); |
| 1419 } |
| 1420 |
| 1383 buildUnnamed553() { | 1421 buildUnnamed553() { |
| 1384 var o = new core.List<core.String>(); | 1422 var o = new core.List<core.String>(); |
| 1385 o.add("foo"); | 1423 o.add("foo"); |
| 1386 o.add("foo"); | 1424 o.add("foo"); |
| 1387 return o; | 1425 return o; |
| 1388 } | 1426 } |
| 1389 | 1427 |
| 1390 checkUnnamed553(core.List<core.String> o) { | 1428 checkUnnamed553(core.List<core.String> o) { |
| 1391 unittest.expect(o, unittest.hasLength(2)); | 1429 unittest.expect(o, unittest.hasLength(2)); |
| 1392 unittest.expect(o[0], unittest.equals('foo')); | 1430 unittest.expect(o[0], unittest.equals('foo')); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1413 return o; | 1451 return o; |
| 1414 } | 1452 } |
| 1415 | 1453 |
| 1416 checkUnnamed555(core.List<core.String> o) { | 1454 checkUnnamed555(core.List<core.String> o) { |
| 1417 unittest.expect(o, unittest.hasLength(2)); | 1455 unittest.expect(o, unittest.hasLength(2)); |
| 1418 unittest.expect(o[0], unittest.equals('foo')); | 1456 unittest.expect(o[0], unittest.equals('foo')); |
| 1419 unittest.expect(o[1], unittest.equals('foo')); | 1457 unittest.expect(o[1], unittest.equals('foo')); |
| 1420 } | 1458 } |
| 1421 | 1459 |
| 1422 buildUnnamed556() { | 1460 buildUnnamed556() { |
| 1423 var o = new core.List<core.String>(); | |
| 1424 o.add("foo"); | |
| 1425 o.add("foo"); | |
| 1426 return o; | |
| 1427 } | |
| 1428 | |
| 1429 checkUnnamed556(core.List<core.String> o) { | |
| 1430 unittest.expect(o, unittest.hasLength(2)); | |
| 1431 unittest.expect(o[0], unittest.equals('foo')); | |
| 1432 unittest.expect(o[1], unittest.equals('foo')); | |
| 1433 } | |
| 1434 | |
| 1435 buildUnnamed557() { | |
| 1436 var o = new core.Map<core.String, core.String>(); | 1461 var o = new core.Map<core.String, core.String>(); |
| 1437 o["x"] = "foo"; | 1462 o["x"] = "foo"; |
| 1438 o["y"] = "foo"; | 1463 o["y"] = "foo"; |
| 1439 return o; | 1464 return o; |
| 1440 } | 1465 } |
| 1441 | 1466 |
| 1442 checkUnnamed557(core.Map<core.String, core.String> o) { | 1467 checkUnnamed556(core.Map<core.String, core.String> o) { |
| 1443 unittest.expect(o, unittest.hasLength(2)); | 1468 unittest.expect(o, unittest.hasLength(2)); |
| 1444 unittest.expect(o["x"], unittest.equals('foo')); | 1469 unittest.expect(o["x"], unittest.equals('foo')); |
| 1445 unittest.expect(o["y"], unittest.equals('foo')); | 1470 unittest.expect(o["y"], unittest.equals('foo')); |
| 1446 } | 1471 } |
| 1447 | 1472 |
| 1448 core.int buildCounterSparkJob = 0; | 1473 core.int buildCounterSparkJob = 0; |
| 1449 buildSparkJob() { | 1474 buildSparkJob() { |
| 1450 var o = new api.SparkJob(); | 1475 var o = new api.SparkJob(); |
| 1451 buildCounterSparkJob++; | 1476 buildCounterSparkJob++; |
| 1452 if (buildCounterSparkJob < 3) { | 1477 if (buildCounterSparkJob < 3) { |
| 1453 o.archiveUris = buildUnnamed553(); | 1478 o.archiveUris = buildUnnamed552(); |
| 1454 o.args = buildUnnamed554(); | 1479 o.args = buildUnnamed553(); |
| 1455 o.fileUris = buildUnnamed555(); | 1480 o.fileUris = buildUnnamed554(); |
| 1456 o.jarFileUris = buildUnnamed556(); | 1481 o.jarFileUris = buildUnnamed555(); |
| 1457 o.loggingConfig = buildLoggingConfig(); | 1482 o.loggingConfig = buildLoggingConfig(); |
| 1458 o.mainClass = "foo"; | 1483 o.mainClass = "foo"; |
| 1459 o.mainJarFileUri = "foo"; | 1484 o.mainJarFileUri = "foo"; |
| 1460 o.properties = buildUnnamed557(); | 1485 o.properties = buildUnnamed556(); |
| 1461 } | 1486 } |
| 1462 buildCounterSparkJob--; | 1487 buildCounterSparkJob--; |
| 1463 return o; | 1488 return o; |
| 1464 } | 1489 } |
| 1465 | 1490 |
| 1466 checkSparkJob(api.SparkJob o) { | 1491 checkSparkJob(api.SparkJob o) { |
| 1467 buildCounterSparkJob++; | 1492 buildCounterSparkJob++; |
| 1468 if (buildCounterSparkJob < 3) { | 1493 if (buildCounterSparkJob < 3) { |
| 1469 checkUnnamed553(o.archiveUris); | 1494 checkUnnamed552(o.archiveUris); |
| 1470 checkUnnamed554(o.args); | 1495 checkUnnamed553(o.args); |
| 1471 checkUnnamed555(o.fileUris); | 1496 checkUnnamed554(o.fileUris); |
| 1472 checkUnnamed556(o.jarFileUris); | 1497 checkUnnamed555(o.jarFileUris); |
| 1473 checkLoggingConfig(o.loggingConfig); | 1498 checkLoggingConfig(o.loggingConfig); |
| 1474 unittest.expect(o.mainClass, unittest.equals('foo')); | 1499 unittest.expect(o.mainClass, unittest.equals('foo')); |
| 1475 unittest.expect(o.mainJarFileUri, unittest.equals('foo')); | 1500 unittest.expect(o.mainJarFileUri, unittest.equals('foo')); |
| 1476 checkUnnamed557(o.properties); | 1501 checkUnnamed556(o.properties); |
| 1477 } | 1502 } |
| 1478 buildCounterSparkJob--; | 1503 buildCounterSparkJob--; |
| 1479 } | 1504 } |
| 1480 | 1505 |
| 1481 buildUnnamed558() { | 1506 buildUnnamed557() { |
| 1482 var o = new core.List<core.String>(); | 1507 var o = new core.List<core.String>(); |
| 1483 o.add("foo"); | 1508 o.add("foo"); |
| 1484 o.add("foo"); | 1509 o.add("foo"); |
| 1485 return o; | 1510 return o; |
| 1486 } | 1511 } |
| 1487 | 1512 |
| 1488 checkUnnamed558(core.List<core.String> o) { | 1513 checkUnnamed557(core.List<core.String> o) { |
| 1489 unittest.expect(o, unittest.hasLength(2)); | 1514 unittest.expect(o, unittest.hasLength(2)); |
| 1490 unittest.expect(o[0], unittest.equals('foo')); | 1515 unittest.expect(o[0], unittest.equals('foo')); |
| 1491 unittest.expect(o[1], unittest.equals('foo')); | 1516 unittest.expect(o[1], unittest.equals('foo')); |
| 1492 } | 1517 } |
| 1493 | 1518 |
| 1519 buildUnnamed558() { |
| 1520 var o = new core.Map<core.String, core.String>(); |
| 1521 o["x"] = "foo"; |
| 1522 o["y"] = "foo"; |
| 1523 return o; |
| 1524 } |
| 1525 |
| 1526 checkUnnamed558(core.Map<core.String, core.String> o) { |
| 1527 unittest.expect(o, unittest.hasLength(2)); |
| 1528 unittest.expect(o["x"], unittest.equals('foo')); |
| 1529 unittest.expect(o["y"], unittest.equals('foo')); |
| 1530 } |
| 1531 |
| 1494 buildUnnamed559() { | 1532 buildUnnamed559() { |
| 1495 var o = new core.Map<core.String, core.String>(); | 1533 var o = new core.Map<core.String, core.String>(); |
| 1496 o["x"] = "foo"; | 1534 o["x"] = "foo"; |
| 1497 o["y"] = "foo"; | 1535 o["y"] = "foo"; |
| 1498 return o; | 1536 return o; |
| 1499 } | 1537 } |
| 1500 | 1538 |
| 1501 checkUnnamed559(core.Map<core.String, core.String> o) { | 1539 checkUnnamed559(core.Map<core.String, core.String> o) { |
| 1502 unittest.expect(o, unittest.hasLength(2)); | 1540 unittest.expect(o, unittest.hasLength(2)); |
| 1503 unittest.expect(o["x"], unittest.equals('foo')); | 1541 unittest.expect(o["x"], unittest.equals('foo')); |
| 1504 unittest.expect(o["y"], unittest.equals('foo')); | 1542 unittest.expect(o["y"], unittest.equals('foo')); |
| 1505 } | |
| 1506 | |
| 1507 buildUnnamed560() { | |
| 1508 var o = new core.Map<core.String, core.String>(); | |
| 1509 o["x"] = "foo"; | |
| 1510 o["y"] = "foo"; | |
| 1511 return o; | |
| 1512 } | |
| 1513 | |
| 1514 checkUnnamed560(core.Map<core.String, core.String> o) { | |
| 1515 unittest.expect(o, unittest.hasLength(2)); | |
| 1516 unittest.expect(o["x"], unittest.equals('foo')); | |
| 1517 unittest.expect(o["y"], unittest.equals('foo')); | |
| 1518 } | 1543 } |
| 1519 | 1544 |
| 1520 core.int buildCounterSparkSqlJob = 0; | 1545 core.int buildCounterSparkSqlJob = 0; |
| 1521 buildSparkSqlJob() { | 1546 buildSparkSqlJob() { |
| 1522 var o = new api.SparkSqlJob(); | 1547 var o = new api.SparkSqlJob(); |
| 1523 buildCounterSparkSqlJob++; | 1548 buildCounterSparkSqlJob++; |
| 1524 if (buildCounterSparkSqlJob < 3) { | 1549 if (buildCounterSparkSqlJob < 3) { |
| 1525 o.jarFileUris = buildUnnamed558(); | 1550 o.jarFileUris = buildUnnamed557(); |
| 1526 o.loggingConfig = buildLoggingConfig(); | 1551 o.loggingConfig = buildLoggingConfig(); |
| 1527 o.properties = buildUnnamed559(); | 1552 o.properties = buildUnnamed558(); |
| 1528 o.queryFileUri = "foo"; | 1553 o.queryFileUri = "foo"; |
| 1529 o.queryList = buildQueryList(); | 1554 o.queryList = buildQueryList(); |
| 1530 o.scriptVariables = buildUnnamed560(); | 1555 o.scriptVariables = buildUnnamed559(); |
| 1531 } | 1556 } |
| 1532 buildCounterSparkSqlJob--; | 1557 buildCounterSparkSqlJob--; |
| 1533 return o; | 1558 return o; |
| 1534 } | 1559 } |
| 1535 | 1560 |
| 1536 checkSparkSqlJob(api.SparkSqlJob o) { | 1561 checkSparkSqlJob(api.SparkSqlJob o) { |
| 1537 buildCounterSparkSqlJob++; | 1562 buildCounterSparkSqlJob++; |
| 1538 if (buildCounterSparkSqlJob < 3) { | 1563 if (buildCounterSparkSqlJob < 3) { |
| 1539 checkUnnamed558(o.jarFileUris); | 1564 checkUnnamed557(o.jarFileUris); |
| 1540 checkLoggingConfig(o.loggingConfig); | 1565 checkLoggingConfig(o.loggingConfig); |
| 1541 checkUnnamed559(o.properties); | 1566 checkUnnamed558(o.properties); |
| 1542 unittest.expect(o.queryFileUri, unittest.equals('foo')); | 1567 unittest.expect(o.queryFileUri, unittest.equals('foo')); |
| 1543 checkQueryList(o.queryList); | 1568 checkQueryList(o.queryList); |
| 1544 checkUnnamed560(o.scriptVariables); | 1569 checkUnnamed559(o.scriptVariables); |
| 1545 } | 1570 } |
| 1546 buildCounterSparkSqlJob--; | 1571 buildCounterSparkSqlJob--; |
| 1547 } | 1572 } |
| 1548 | 1573 |
| 1549 buildUnnamed561() { | 1574 buildUnnamed560() { |
| 1550 var o = new core.Map<core.String, core.Object>(); | 1575 var o = new core.Map<core.String, core.Object>(); |
| 1551 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1576 o["x"] = { |
| 1552 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1577 'list': [1, 2, 3], |
| 1578 'bool': true, |
| 1579 'string': 'foo' |
| 1580 }; |
| 1581 o["y"] = { |
| 1582 'list': [1, 2, 3], |
| 1583 'bool': true, |
| 1584 'string': 'foo' |
| 1585 }; |
| 1553 return o; | 1586 return o; |
| 1554 } | 1587 } |
| 1555 | 1588 |
| 1556 checkUnnamed561(core.Map<core.String, core.Object> o) { | 1589 checkUnnamed560(core.Map<core.String, core.Object> o) { |
| 1557 unittest.expect(o, unittest.hasLength(2)); | 1590 unittest.expect(o, unittest.hasLength(2)); |
| 1558 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')); | 1591 var casted5 = (o["x"]) as core.Map; |
| 1559 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')); | 1592 unittest.expect(casted5, unittest.hasLength(3)); |
| 1593 unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); |
| 1594 unittest.expect(casted5["bool"], unittest.equals(true)); |
| 1595 unittest.expect(casted5["string"], unittest.equals('foo')); |
| 1596 var casted6 = (o["y"]) as core.Map; |
| 1597 unittest.expect(casted6, unittest.hasLength(3)); |
| 1598 unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); |
| 1599 unittest.expect(casted6["bool"], unittest.equals(true)); |
| 1600 unittest.expect(casted6["string"], unittest.equals('foo')); |
| 1560 } | 1601 } |
| 1561 | 1602 |
| 1562 buildUnnamed562() { | 1603 buildUnnamed561() { |
| 1563 var o = new core.List<core.Map<core.String, core.Object>>(); | 1604 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1564 o.add(buildUnnamed561()); | 1605 o.add(buildUnnamed560()); |
| 1565 o.add(buildUnnamed561()); | 1606 o.add(buildUnnamed560()); |
| 1566 return o; | 1607 return o; |
| 1567 } | 1608 } |
| 1568 | 1609 |
| 1569 checkUnnamed562(core.List<core.Map<core.String, core.Object>> o) { | 1610 checkUnnamed561(core.List<core.Map<core.String, core.Object>> o) { |
| 1570 unittest.expect(o, unittest.hasLength(2)); | 1611 unittest.expect(o, unittest.hasLength(2)); |
| 1571 checkUnnamed561(o[0]); | 1612 checkUnnamed560(o[0]); |
| 1572 checkUnnamed561(o[1]); | 1613 checkUnnamed560(o[1]); |
| 1573 } | 1614 } |
| 1574 | 1615 |
| 1575 core.int buildCounterStatus = 0; | 1616 core.int buildCounterStatus = 0; |
| 1576 buildStatus() { | 1617 buildStatus() { |
| 1577 var o = new api.Status(); | 1618 var o = new api.Status(); |
| 1578 buildCounterStatus++; | 1619 buildCounterStatus++; |
| 1579 if (buildCounterStatus < 3) { | 1620 if (buildCounterStatus < 3) { |
| 1580 o.code = 42; | 1621 o.code = 42; |
| 1581 o.details = buildUnnamed562(); | 1622 o.details = buildUnnamed561(); |
| 1582 o.message = "foo"; | 1623 o.message = "foo"; |
| 1583 } | 1624 } |
| 1584 buildCounterStatus--; | 1625 buildCounterStatus--; |
| 1585 return o; | 1626 return o; |
| 1586 } | 1627 } |
| 1587 | 1628 |
| 1588 checkStatus(api.Status o) { | 1629 checkStatus(api.Status o) { |
| 1589 buildCounterStatus++; | 1630 buildCounterStatus++; |
| 1590 if (buildCounterStatus < 3) { | 1631 if (buildCounterStatus < 3) { |
| 1591 unittest.expect(o.code, unittest.equals(42)); | 1632 unittest.expect(o.code, unittest.equals(42)); |
| 1592 checkUnnamed562(o.details); | 1633 checkUnnamed561(o.details); |
| 1593 unittest.expect(o.message, unittest.equals('foo')); | 1634 unittest.expect(o.message, unittest.equals('foo')); |
| 1594 } | 1635 } |
| 1595 buildCounterStatus--; | 1636 buildCounterStatus--; |
| 1596 } | 1637 } |
| 1597 | 1638 |
| 1598 core.int buildCounterSubmitJobRequest = 0; | 1639 core.int buildCounterSubmitJobRequest = 0; |
| 1599 buildSubmitJobRequest() { | 1640 buildSubmitJobRequest() { |
| 1600 var o = new api.SubmitJobRequest(); | 1641 var o = new api.SubmitJobRequest(); |
| 1601 buildCounterSubmitJobRequest++; | 1642 buildCounterSubmitJobRequest++; |
| 1602 if (buildCounterSubmitJobRequest < 3) { | 1643 if (buildCounterSubmitJobRequest < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1632 buildCounterYarnApplication++; | 1673 buildCounterYarnApplication++; |
| 1633 if (buildCounterYarnApplication < 3) { | 1674 if (buildCounterYarnApplication < 3) { |
| 1634 unittest.expect(o.name, unittest.equals('foo')); | 1675 unittest.expect(o.name, unittest.equals('foo')); |
| 1635 unittest.expect(o.progress, unittest.equals(42.0)); | 1676 unittest.expect(o.progress, unittest.equals(42.0)); |
| 1636 unittest.expect(o.state, unittest.equals('foo')); | 1677 unittest.expect(o.state, unittest.equals('foo')); |
| 1637 unittest.expect(o.trackingUrl, unittest.equals('foo')); | 1678 unittest.expect(o.trackingUrl, unittest.equals('foo')); |
| 1638 } | 1679 } |
| 1639 buildCounterYarnApplication--; | 1680 buildCounterYarnApplication--; |
| 1640 } | 1681 } |
| 1641 | 1682 |
| 1642 | |
| 1643 main() { | 1683 main() { |
| 1644 unittest.group("obj-schema-AcceleratorConfig", () { | 1684 unittest.group("obj-schema-AcceleratorConfig", () { |
| 1645 unittest.test("to-json--from-json", () { | 1685 unittest.test("to-json--from-json", () { |
| 1646 var o = buildAcceleratorConfig(); | 1686 var o = buildAcceleratorConfig(); |
| 1647 var od = new api.AcceleratorConfig.fromJson(o.toJson()); | 1687 var od = new api.AcceleratorConfig.fromJson(o.toJson()); |
| 1648 checkAcceleratorConfig(od); | 1688 checkAcceleratorConfig(od); |
| 1649 }); | 1689 }); |
| 1650 }); | 1690 }); |
| 1651 | 1691 |
| 1652 | |
| 1653 unittest.group("obj-schema-CancelJobRequest", () { | 1692 unittest.group("obj-schema-CancelJobRequest", () { |
| 1654 unittest.test("to-json--from-json", () { | 1693 unittest.test("to-json--from-json", () { |
| 1655 var o = buildCancelJobRequest(); | 1694 var o = buildCancelJobRequest(); |
| 1656 var od = new api.CancelJobRequest.fromJson(o.toJson()); | 1695 var od = new api.CancelJobRequest.fromJson(o.toJson()); |
| 1657 checkCancelJobRequest(od); | 1696 checkCancelJobRequest(od); |
| 1658 }); | 1697 }); |
| 1659 }); | 1698 }); |
| 1660 | 1699 |
| 1661 | |
| 1662 unittest.group("obj-schema-Cluster", () { | 1700 unittest.group("obj-schema-Cluster", () { |
| 1663 unittest.test("to-json--from-json", () { | 1701 unittest.test("to-json--from-json", () { |
| 1664 var o = buildCluster(); | 1702 var o = buildCluster(); |
| 1665 var od = new api.Cluster.fromJson(o.toJson()); | 1703 var od = new api.Cluster.fromJson(o.toJson()); |
| 1666 checkCluster(od); | 1704 checkCluster(od); |
| 1667 }); | 1705 }); |
| 1668 }); | 1706 }); |
| 1669 | 1707 |
| 1670 | |
| 1671 unittest.group("obj-schema-ClusterConfig", () { | 1708 unittest.group("obj-schema-ClusterConfig", () { |
| 1672 unittest.test("to-json--from-json", () { | 1709 unittest.test("to-json--from-json", () { |
| 1673 var o = buildClusterConfig(); | 1710 var o = buildClusterConfig(); |
| 1674 var od = new api.ClusterConfig.fromJson(o.toJson()); | 1711 var od = new api.ClusterConfig.fromJson(o.toJson()); |
| 1675 checkClusterConfig(od); | 1712 checkClusterConfig(od); |
| 1676 }); | 1713 }); |
| 1677 }); | 1714 }); |
| 1678 | 1715 |
| 1679 | |
| 1680 unittest.group("obj-schema-ClusterMetrics", () { | 1716 unittest.group("obj-schema-ClusterMetrics", () { |
| 1681 unittest.test("to-json--from-json", () { | 1717 unittest.test("to-json--from-json", () { |
| 1682 var o = buildClusterMetrics(); | 1718 var o = buildClusterMetrics(); |
| 1683 var od = new api.ClusterMetrics.fromJson(o.toJson()); | 1719 var od = new api.ClusterMetrics.fromJson(o.toJson()); |
| 1684 checkClusterMetrics(od); | 1720 checkClusterMetrics(od); |
| 1685 }); | 1721 }); |
| 1686 }); | 1722 }); |
| 1687 | 1723 |
| 1688 | |
| 1689 unittest.group("obj-schema-ClusterOperationMetadata", () { | 1724 unittest.group("obj-schema-ClusterOperationMetadata", () { |
| 1690 unittest.test("to-json--from-json", () { | 1725 unittest.test("to-json--from-json", () { |
| 1691 var o = buildClusterOperationMetadata(); | 1726 var o = buildClusterOperationMetadata(); |
| 1692 var od = new api.ClusterOperationMetadata.fromJson(o.toJson()); | 1727 var od = new api.ClusterOperationMetadata.fromJson(o.toJson()); |
| 1693 checkClusterOperationMetadata(od); | 1728 checkClusterOperationMetadata(od); |
| 1694 }); | 1729 }); |
| 1695 }); | 1730 }); |
| 1696 | 1731 |
| 1697 | |
| 1698 unittest.group("obj-schema-ClusterOperationStatus", () { | 1732 unittest.group("obj-schema-ClusterOperationStatus", () { |
| 1699 unittest.test("to-json--from-json", () { | 1733 unittest.test("to-json--from-json", () { |
| 1700 var o = buildClusterOperationStatus(); | 1734 var o = buildClusterOperationStatus(); |
| 1701 var od = new api.ClusterOperationStatus.fromJson(o.toJson()); | 1735 var od = new api.ClusterOperationStatus.fromJson(o.toJson()); |
| 1702 checkClusterOperationStatus(od); | 1736 checkClusterOperationStatus(od); |
| 1703 }); | 1737 }); |
| 1704 }); | 1738 }); |
| 1705 | 1739 |
| 1706 | |
| 1707 unittest.group("obj-schema-ClusterStatus", () { | 1740 unittest.group("obj-schema-ClusterStatus", () { |
| 1708 unittest.test("to-json--from-json", () { | 1741 unittest.test("to-json--from-json", () { |
| 1709 var o = buildClusterStatus(); | 1742 var o = buildClusterStatus(); |
| 1710 var od = new api.ClusterStatus.fromJson(o.toJson()); | 1743 var od = new api.ClusterStatus.fromJson(o.toJson()); |
| 1711 checkClusterStatus(od); | 1744 checkClusterStatus(od); |
| 1712 }); | 1745 }); |
| 1713 }); | 1746 }); |
| 1714 | 1747 |
| 1715 | |
| 1716 unittest.group("obj-schema-DiagnoseClusterRequest", () { | 1748 unittest.group("obj-schema-DiagnoseClusterRequest", () { |
| 1717 unittest.test("to-json--from-json", () { | 1749 unittest.test("to-json--from-json", () { |
| 1718 var o = buildDiagnoseClusterRequest(); | 1750 var o = buildDiagnoseClusterRequest(); |
| 1719 var od = new api.DiagnoseClusterRequest.fromJson(o.toJson()); | 1751 var od = new api.DiagnoseClusterRequest.fromJson(o.toJson()); |
| 1720 checkDiagnoseClusterRequest(od); | 1752 checkDiagnoseClusterRequest(od); |
| 1721 }); | 1753 }); |
| 1722 }); | 1754 }); |
| 1723 | 1755 |
| 1724 | |
| 1725 unittest.group("obj-schema-DiagnoseClusterResults", () { | 1756 unittest.group("obj-schema-DiagnoseClusterResults", () { |
| 1726 unittest.test("to-json--from-json", () { | 1757 unittest.test("to-json--from-json", () { |
| 1727 var o = buildDiagnoseClusterResults(); | 1758 var o = buildDiagnoseClusterResults(); |
| 1728 var od = new api.DiagnoseClusterResults.fromJson(o.toJson()); | 1759 var od = new api.DiagnoseClusterResults.fromJson(o.toJson()); |
| 1729 checkDiagnoseClusterResults(od); | 1760 checkDiagnoseClusterResults(od); |
| 1730 }); | 1761 }); |
| 1731 }); | 1762 }); |
| 1732 | 1763 |
| 1733 | |
| 1734 unittest.group("obj-schema-DiskConfig", () { | 1764 unittest.group("obj-schema-DiskConfig", () { |
| 1735 unittest.test("to-json--from-json", () { | 1765 unittest.test("to-json--from-json", () { |
| 1736 var o = buildDiskConfig(); | 1766 var o = buildDiskConfig(); |
| 1737 var od = new api.DiskConfig.fromJson(o.toJson()); | 1767 var od = new api.DiskConfig.fromJson(o.toJson()); |
| 1738 checkDiskConfig(od); | 1768 checkDiskConfig(od); |
| 1739 }); | 1769 }); |
| 1740 }); | 1770 }); |
| 1741 | 1771 |
| 1742 | |
| 1743 unittest.group("obj-schema-Empty", () { | 1772 unittest.group("obj-schema-Empty", () { |
| 1744 unittest.test("to-json--from-json", () { | 1773 unittest.test("to-json--from-json", () { |
| 1745 var o = buildEmpty(); | 1774 var o = buildEmpty(); |
| 1746 var od = new api.Empty.fromJson(o.toJson()); | 1775 var od = new api.Empty.fromJson(o.toJson()); |
| 1747 checkEmpty(od); | 1776 checkEmpty(od); |
| 1748 }); | 1777 }); |
| 1749 }); | 1778 }); |
| 1750 | 1779 |
| 1751 | |
| 1752 unittest.group("obj-schema-GceClusterConfig", () { | 1780 unittest.group("obj-schema-GceClusterConfig", () { |
| 1753 unittest.test("to-json--from-json", () { | 1781 unittest.test("to-json--from-json", () { |
| 1754 var o = buildGceClusterConfig(); | 1782 var o = buildGceClusterConfig(); |
| 1755 var od = new api.GceClusterConfig.fromJson(o.toJson()); | 1783 var od = new api.GceClusterConfig.fromJson(o.toJson()); |
| 1756 checkGceClusterConfig(od); | 1784 checkGceClusterConfig(od); |
| 1757 }); | 1785 }); |
| 1758 }); | 1786 }); |
| 1759 | 1787 |
| 1760 | |
| 1761 unittest.group("obj-schema-HadoopJob", () { | 1788 unittest.group("obj-schema-HadoopJob", () { |
| 1762 unittest.test("to-json--from-json", () { | 1789 unittest.test("to-json--from-json", () { |
| 1763 var o = buildHadoopJob(); | 1790 var o = buildHadoopJob(); |
| 1764 var od = new api.HadoopJob.fromJson(o.toJson()); | 1791 var od = new api.HadoopJob.fromJson(o.toJson()); |
| 1765 checkHadoopJob(od); | 1792 checkHadoopJob(od); |
| 1766 }); | 1793 }); |
| 1767 }); | 1794 }); |
| 1768 | 1795 |
| 1769 | |
| 1770 unittest.group("obj-schema-HiveJob", () { | 1796 unittest.group("obj-schema-HiveJob", () { |
| 1771 unittest.test("to-json--from-json", () { | 1797 unittest.test("to-json--from-json", () { |
| 1772 var o = buildHiveJob(); | 1798 var o = buildHiveJob(); |
| 1773 var od = new api.HiveJob.fromJson(o.toJson()); | 1799 var od = new api.HiveJob.fromJson(o.toJson()); |
| 1774 checkHiveJob(od); | 1800 checkHiveJob(od); |
| 1775 }); | 1801 }); |
| 1776 }); | 1802 }); |
| 1777 | 1803 |
| 1778 | |
| 1779 unittest.group("obj-schema-InstanceGroupConfig", () { | 1804 unittest.group("obj-schema-InstanceGroupConfig", () { |
| 1780 unittest.test("to-json--from-json", () { | 1805 unittest.test("to-json--from-json", () { |
| 1781 var o = buildInstanceGroupConfig(); | 1806 var o = buildInstanceGroupConfig(); |
| 1782 var od = new api.InstanceGroupConfig.fromJson(o.toJson()); | 1807 var od = new api.InstanceGroupConfig.fromJson(o.toJson()); |
| 1783 checkInstanceGroupConfig(od); | 1808 checkInstanceGroupConfig(od); |
| 1784 }); | 1809 }); |
| 1785 }); | 1810 }); |
| 1786 | 1811 |
| 1787 | |
| 1788 unittest.group("obj-schema-Job", () { | 1812 unittest.group("obj-schema-Job", () { |
| 1789 unittest.test("to-json--from-json", () { | 1813 unittest.test("to-json--from-json", () { |
| 1790 var o = buildJob(); | 1814 var o = buildJob(); |
| 1791 var od = new api.Job.fromJson(o.toJson()); | 1815 var od = new api.Job.fromJson(o.toJson()); |
| 1792 checkJob(od); | 1816 checkJob(od); |
| 1793 }); | 1817 }); |
| 1794 }); | 1818 }); |
| 1795 | 1819 |
| 1796 | |
| 1797 unittest.group("obj-schema-JobPlacement", () { | 1820 unittest.group("obj-schema-JobPlacement", () { |
| 1798 unittest.test("to-json--from-json", () { | 1821 unittest.test("to-json--from-json", () { |
| 1799 var o = buildJobPlacement(); | 1822 var o = buildJobPlacement(); |
| 1800 var od = new api.JobPlacement.fromJson(o.toJson()); | 1823 var od = new api.JobPlacement.fromJson(o.toJson()); |
| 1801 checkJobPlacement(od); | 1824 checkJobPlacement(od); |
| 1802 }); | 1825 }); |
| 1803 }); | 1826 }); |
| 1804 | 1827 |
| 1805 | |
| 1806 unittest.group("obj-schema-JobReference", () { | 1828 unittest.group("obj-schema-JobReference", () { |
| 1807 unittest.test("to-json--from-json", () { | 1829 unittest.test("to-json--from-json", () { |
| 1808 var o = buildJobReference(); | 1830 var o = buildJobReference(); |
| 1809 var od = new api.JobReference.fromJson(o.toJson()); | 1831 var od = new api.JobReference.fromJson(o.toJson()); |
| 1810 checkJobReference(od); | 1832 checkJobReference(od); |
| 1811 }); | 1833 }); |
| 1812 }); | 1834 }); |
| 1813 | 1835 |
| 1814 | |
| 1815 unittest.group("obj-schema-JobScheduling", () { | 1836 unittest.group("obj-schema-JobScheduling", () { |
| 1816 unittest.test("to-json--from-json", () { | 1837 unittest.test("to-json--from-json", () { |
| 1817 var o = buildJobScheduling(); | 1838 var o = buildJobScheduling(); |
| 1818 var od = new api.JobScheduling.fromJson(o.toJson()); | 1839 var od = new api.JobScheduling.fromJson(o.toJson()); |
| 1819 checkJobScheduling(od); | 1840 checkJobScheduling(od); |
| 1820 }); | 1841 }); |
| 1821 }); | 1842 }); |
| 1822 | 1843 |
| 1823 | |
| 1824 unittest.group("obj-schema-JobStatus", () { | 1844 unittest.group("obj-schema-JobStatus", () { |
| 1825 unittest.test("to-json--from-json", () { | 1845 unittest.test("to-json--from-json", () { |
| 1826 var o = buildJobStatus(); | 1846 var o = buildJobStatus(); |
| 1827 var od = new api.JobStatus.fromJson(o.toJson()); | 1847 var od = new api.JobStatus.fromJson(o.toJson()); |
| 1828 checkJobStatus(od); | 1848 checkJobStatus(od); |
| 1829 }); | 1849 }); |
| 1830 }); | 1850 }); |
| 1831 | 1851 |
| 1832 | |
| 1833 unittest.group("obj-schema-ListClustersResponse", () { | 1852 unittest.group("obj-schema-ListClustersResponse", () { |
| 1834 unittest.test("to-json--from-json", () { | 1853 unittest.test("to-json--from-json", () { |
| 1835 var o = buildListClustersResponse(); | 1854 var o = buildListClustersResponse(); |
| 1836 var od = new api.ListClustersResponse.fromJson(o.toJson()); | 1855 var od = new api.ListClustersResponse.fromJson(o.toJson()); |
| 1837 checkListClustersResponse(od); | 1856 checkListClustersResponse(od); |
| 1838 }); | 1857 }); |
| 1839 }); | 1858 }); |
| 1840 | 1859 |
| 1841 | |
| 1842 unittest.group("obj-schema-ListJobsResponse", () { | 1860 unittest.group("obj-schema-ListJobsResponse", () { |
| 1843 unittest.test("to-json--from-json", () { | 1861 unittest.test("to-json--from-json", () { |
| 1844 var o = buildListJobsResponse(); | 1862 var o = buildListJobsResponse(); |
| 1845 var od = new api.ListJobsResponse.fromJson(o.toJson()); | 1863 var od = new api.ListJobsResponse.fromJson(o.toJson()); |
| 1846 checkListJobsResponse(od); | 1864 checkListJobsResponse(od); |
| 1847 }); | 1865 }); |
| 1848 }); | 1866 }); |
| 1849 | 1867 |
| 1850 | |
| 1851 unittest.group("obj-schema-ListOperationsResponse", () { | 1868 unittest.group("obj-schema-ListOperationsResponse", () { |
| 1852 unittest.test("to-json--from-json", () { | 1869 unittest.test("to-json--from-json", () { |
| 1853 var o = buildListOperationsResponse(); | 1870 var o = buildListOperationsResponse(); |
| 1854 var od = new api.ListOperationsResponse.fromJson(o.toJson()); | 1871 var od = new api.ListOperationsResponse.fromJson(o.toJson()); |
| 1855 checkListOperationsResponse(od); | 1872 checkListOperationsResponse(od); |
| 1856 }); | 1873 }); |
| 1857 }); | 1874 }); |
| 1858 | 1875 |
| 1859 | |
| 1860 unittest.group("obj-schema-LoggingConfig", () { | 1876 unittest.group("obj-schema-LoggingConfig", () { |
| 1861 unittest.test("to-json--from-json", () { | 1877 unittest.test("to-json--from-json", () { |
| 1862 var o = buildLoggingConfig(); | 1878 var o = buildLoggingConfig(); |
| 1863 var od = new api.LoggingConfig.fromJson(o.toJson()); | 1879 var od = new api.LoggingConfig.fromJson(o.toJson()); |
| 1864 checkLoggingConfig(od); | 1880 checkLoggingConfig(od); |
| 1865 }); | 1881 }); |
| 1866 }); | 1882 }); |
| 1867 | 1883 |
| 1868 | |
| 1869 unittest.group("obj-schema-ManagedGroupConfig", () { | 1884 unittest.group("obj-schema-ManagedGroupConfig", () { |
| 1870 unittest.test("to-json--from-json", () { | 1885 unittest.test("to-json--from-json", () { |
| 1871 var o = buildManagedGroupConfig(); | 1886 var o = buildManagedGroupConfig(); |
| 1872 var od = new api.ManagedGroupConfig.fromJson(o.toJson()); | 1887 var od = new api.ManagedGroupConfig.fromJson(o.toJson()); |
| 1873 checkManagedGroupConfig(od); | 1888 checkManagedGroupConfig(od); |
| 1874 }); | 1889 }); |
| 1875 }); | 1890 }); |
| 1876 | 1891 |
| 1877 | |
| 1878 unittest.group("obj-schema-NodeInitializationAction", () { | 1892 unittest.group("obj-schema-NodeInitializationAction", () { |
| 1879 unittest.test("to-json--from-json", () { | 1893 unittest.test("to-json--from-json", () { |
| 1880 var o = buildNodeInitializationAction(); | 1894 var o = buildNodeInitializationAction(); |
| 1881 var od = new api.NodeInitializationAction.fromJson(o.toJson()); | 1895 var od = new api.NodeInitializationAction.fromJson(o.toJson()); |
| 1882 checkNodeInitializationAction(od); | 1896 checkNodeInitializationAction(od); |
| 1883 }); | 1897 }); |
| 1884 }); | 1898 }); |
| 1885 | 1899 |
| 1886 | |
| 1887 unittest.group("obj-schema-Operation", () { | 1900 unittest.group("obj-schema-Operation", () { |
| 1888 unittest.test("to-json--from-json", () { | 1901 unittest.test("to-json--from-json", () { |
| 1889 var o = buildOperation(); | 1902 var o = buildOperation(); |
| 1890 var od = new api.Operation.fromJson(o.toJson()); | 1903 var od = new api.Operation.fromJson(o.toJson()); |
| 1891 checkOperation(od); | 1904 checkOperation(od); |
| 1892 }); | 1905 }); |
| 1893 }); | 1906 }); |
| 1894 | 1907 |
| 1895 | |
| 1896 unittest.group("obj-schema-PigJob", () { | 1908 unittest.group("obj-schema-PigJob", () { |
| 1897 unittest.test("to-json--from-json", () { | 1909 unittest.test("to-json--from-json", () { |
| 1898 var o = buildPigJob(); | 1910 var o = buildPigJob(); |
| 1899 var od = new api.PigJob.fromJson(o.toJson()); | 1911 var od = new api.PigJob.fromJson(o.toJson()); |
| 1900 checkPigJob(od); | 1912 checkPigJob(od); |
| 1901 }); | 1913 }); |
| 1902 }); | 1914 }); |
| 1903 | 1915 |
| 1904 | |
| 1905 unittest.group("obj-schema-PySparkJob", () { | 1916 unittest.group("obj-schema-PySparkJob", () { |
| 1906 unittest.test("to-json--from-json", () { | 1917 unittest.test("to-json--from-json", () { |
| 1907 var o = buildPySparkJob(); | 1918 var o = buildPySparkJob(); |
| 1908 var od = new api.PySparkJob.fromJson(o.toJson()); | 1919 var od = new api.PySparkJob.fromJson(o.toJson()); |
| 1909 checkPySparkJob(od); | 1920 checkPySparkJob(od); |
| 1910 }); | 1921 }); |
| 1911 }); | 1922 }); |
| 1912 | 1923 |
| 1913 | |
| 1914 unittest.group("obj-schema-QueryList", () { | 1924 unittest.group("obj-schema-QueryList", () { |
| 1915 unittest.test("to-json--from-json", () { | 1925 unittest.test("to-json--from-json", () { |
| 1916 var o = buildQueryList(); | 1926 var o = buildQueryList(); |
| 1917 var od = new api.QueryList.fromJson(o.toJson()); | 1927 var od = new api.QueryList.fromJson(o.toJson()); |
| 1918 checkQueryList(od); | 1928 checkQueryList(od); |
| 1919 }); | 1929 }); |
| 1920 }); | 1930 }); |
| 1921 | 1931 |
| 1922 | |
| 1923 unittest.group("obj-schema-SoftwareConfig", () { | 1932 unittest.group("obj-schema-SoftwareConfig", () { |
| 1924 unittest.test("to-json--from-json", () { | 1933 unittest.test("to-json--from-json", () { |
| 1925 var o = buildSoftwareConfig(); | 1934 var o = buildSoftwareConfig(); |
| 1926 var od = new api.SoftwareConfig.fromJson(o.toJson()); | 1935 var od = new api.SoftwareConfig.fromJson(o.toJson()); |
| 1927 checkSoftwareConfig(od); | 1936 checkSoftwareConfig(od); |
| 1928 }); | 1937 }); |
| 1929 }); | 1938 }); |
| 1930 | 1939 |
| 1931 | |
| 1932 unittest.group("obj-schema-SparkJob", () { | 1940 unittest.group("obj-schema-SparkJob", () { |
| 1933 unittest.test("to-json--from-json", () { | 1941 unittest.test("to-json--from-json", () { |
| 1934 var o = buildSparkJob(); | 1942 var o = buildSparkJob(); |
| 1935 var od = new api.SparkJob.fromJson(o.toJson()); | 1943 var od = new api.SparkJob.fromJson(o.toJson()); |
| 1936 checkSparkJob(od); | 1944 checkSparkJob(od); |
| 1937 }); | 1945 }); |
| 1938 }); | 1946 }); |
| 1939 | 1947 |
| 1940 | |
| 1941 unittest.group("obj-schema-SparkSqlJob", () { | 1948 unittest.group("obj-schema-SparkSqlJob", () { |
| 1942 unittest.test("to-json--from-json", () { | 1949 unittest.test("to-json--from-json", () { |
| 1943 var o = buildSparkSqlJob(); | 1950 var o = buildSparkSqlJob(); |
| 1944 var od = new api.SparkSqlJob.fromJson(o.toJson()); | 1951 var od = new api.SparkSqlJob.fromJson(o.toJson()); |
| 1945 checkSparkSqlJob(od); | 1952 checkSparkSqlJob(od); |
| 1946 }); | 1953 }); |
| 1947 }); | 1954 }); |
| 1948 | 1955 |
| 1949 | |
| 1950 unittest.group("obj-schema-Status", () { | 1956 unittest.group("obj-schema-Status", () { |
| 1951 unittest.test("to-json--from-json", () { | 1957 unittest.test("to-json--from-json", () { |
| 1952 var o = buildStatus(); | 1958 var o = buildStatus(); |
| 1953 var od = new api.Status.fromJson(o.toJson()); | 1959 var od = new api.Status.fromJson(o.toJson()); |
| 1954 checkStatus(od); | 1960 checkStatus(od); |
| 1955 }); | 1961 }); |
| 1956 }); | 1962 }); |
| 1957 | 1963 |
| 1958 | |
| 1959 unittest.group("obj-schema-SubmitJobRequest", () { | 1964 unittest.group("obj-schema-SubmitJobRequest", () { |
| 1960 unittest.test("to-json--from-json", () { | 1965 unittest.test("to-json--from-json", () { |
| 1961 var o = buildSubmitJobRequest(); | 1966 var o = buildSubmitJobRequest(); |
| 1962 var od = new api.SubmitJobRequest.fromJson(o.toJson()); | 1967 var od = new api.SubmitJobRequest.fromJson(o.toJson()); |
| 1963 checkSubmitJobRequest(od); | 1968 checkSubmitJobRequest(od); |
| 1964 }); | 1969 }); |
| 1965 }); | 1970 }); |
| 1966 | 1971 |
| 1967 | |
| 1968 unittest.group("obj-schema-YarnApplication", () { | 1972 unittest.group("obj-schema-YarnApplication", () { |
| 1969 unittest.test("to-json--from-json", () { | 1973 unittest.test("to-json--from-json", () { |
| 1970 var o = buildYarnApplication(); | 1974 var o = buildYarnApplication(); |
| 1971 var od = new api.YarnApplication.fromJson(o.toJson()); | 1975 var od = new api.YarnApplication.fromJson(o.toJson()); |
| 1972 checkYarnApplication(od); | 1976 checkYarnApplication(od); |
| 1973 }); | 1977 }); |
| 1974 }); | 1978 }); |
| 1975 | 1979 |
| 1976 | |
| 1977 unittest.group("resource-ProjectsRegionsClustersResourceApi", () { | 1980 unittest.group("resource-ProjectsRegionsClustersResourceApi", () { |
| 1978 unittest.test("method--create", () { | 1981 unittest.test("method--create", () { |
| 1979 | |
| 1980 var mock = new HttpServerMock(); | 1982 var mock = new HttpServerMock(); |
| 1981 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 1983 api.ProjectsRegionsClustersResourceApi res = |
| 1984 new api.DataprocApi(mock).projects.regions.clusters; |
| 1982 var arg_request = buildCluster(); | 1985 var arg_request = buildCluster(); |
| 1983 var arg_projectId = "foo"; | 1986 var arg_projectId = "foo"; |
| 1984 var arg_region = "foo"; | 1987 var arg_region = "foo"; |
| 1985 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1988 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1986 var obj = new api.Cluster.fromJson(json); | 1989 var obj = new api.Cluster.fromJson(json); |
| 1987 checkCluster(obj); | 1990 checkCluster(obj); |
| 1988 | 1991 |
| 1989 var path = (req.url).path; | 1992 var path = (req.url).path; |
| 1990 var pathOffset = 0; | 1993 var pathOffset = 0; |
| 1991 var index; | 1994 var index; |
| 1992 var subPart; | 1995 var subPart; |
| 1993 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1996 unittest.expect( |
| 1997 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 1994 pathOffset += 1; | 1998 pathOffset += 1; |
| 1995 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 1999 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2000 unittest.equals("v1/projects/")); |
| 1996 pathOffset += 12; | 2001 pathOffset += 12; |
| 1997 index = path.indexOf("/regions/", pathOffset); | 2002 index = path.indexOf("/regions/", pathOffset); |
| 1998 unittest.expect(index >= 0, unittest.isTrue); | 2003 unittest.expect(index >= 0, unittest.isTrue); |
| 1999 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2004 subPart = |
| 2005 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2000 pathOffset = index; | 2006 pathOffset = index; |
| 2001 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2007 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2002 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2008 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2009 unittest.equals("/regions/")); |
| 2003 pathOffset += 9; | 2010 pathOffset += 9; |
| 2004 index = path.indexOf("/clusters", pathOffset); | 2011 index = path.indexOf("/clusters", pathOffset); |
| 2005 unittest.expect(index >= 0, unittest.isTrue); | 2012 unittest.expect(index >= 0, unittest.isTrue); |
| 2006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2013 subPart = |
| 2014 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2007 pathOffset = index; | 2015 pathOffset = index; |
| 2008 unittest.expect(subPart, unittest.equals("$arg_region")); | 2016 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2009 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clusters")); | 2017 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2018 unittest.equals("/clusters")); |
| 2010 pathOffset += 9; | 2019 pathOffset += 9; |
| 2011 | 2020 |
| 2012 var query = (req.url).query; | 2021 var query = (req.url).query; |
| 2013 var queryOffset = 0; | 2022 var queryOffset = 0; |
| 2014 var queryMap = {}; | 2023 var queryMap = {}; |
| 2015 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2024 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2016 parseBool(n) { | 2025 parseBool(n) { |
| 2017 if (n == "true") return true; | 2026 if (n == "true") return true; |
| 2018 if (n == "false") return false; | 2027 if (n == "false") return false; |
| 2019 if (n == null) return null; | 2028 if (n == null) return null; |
| 2020 throw new core.ArgumentError("Invalid boolean: $n"); | 2029 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2021 } | 2030 } |
| 2031 |
| 2022 if (query.length > 0) { | 2032 if (query.length > 0) { |
| 2023 for (var part in query.split("&")) { | 2033 for (var part in query.split("&")) { |
| 2024 var keyvalue = part.split("="); | 2034 var keyvalue = part.split("="); |
| 2025 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2036 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2026 } | 2037 } |
| 2027 } | 2038 } |
| 2028 | 2039 |
| 2029 | |
| 2030 var h = { | 2040 var h = { |
| 2031 "content-type" : "application/json; charset=utf-8", | 2041 "content-type": "application/json; charset=utf-8", |
| 2032 }; | 2042 }; |
| 2033 var resp = convert.JSON.encode(buildOperation()); | 2043 var resp = convert.JSON.encode(buildOperation()); |
| 2034 return new async.Future.value(stringResponse(200, h, resp)); | 2044 return new async.Future.value(stringResponse(200, h, resp)); |
| 2035 }), true); | 2045 }), true); |
| 2036 res.create(arg_request, arg_projectId, arg_region).then(unittest.expectAsy
nc1(((api.Operation response) { | 2046 res |
| 2047 .create(arg_request, arg_projectId, arg_region) |
| 2048 .then(unittest.expectAsync1(((api.Operation response) { |
| 2037 checkOperation(response); | 2049 checkOperation(response); |
| 2038 }))); | 2050 }))); |
| 2039 }); | 2051 }); |
| 2040 | 2052 |
| 2041 unittest.test("method--delete", () { | 2053 unittest.test("method--delete", () { |
| 2042 | |
| 2043 var mock = new HttpServerMock(); | 2054 var mock = new HttpServerMock(); |
| 2044 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 2055 api.ProjectsRegionsClustersResourceApi res = |
| 2056 new api.DataprocApi(mock).projects.regions.clusters; |
| 2045 var arg_projectId = "foo"; | 2057 var arg_projectId = "foo"; |
| 2046 var arg_region = "foo"; | 2058 var arg_region = "foo"; |
| 2047 var arg_clusterName = "foo"; | 2059 var arg_clusterName = "foo"; |
| 2048 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2060 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2049 var path = (req.url).path; | 2061 var path = (req.url).path; |
| 2050 var pathOffset = 0; | 2062 var pathOffset = 0; |
| 2051 var index; | 2063 var index; |
| 2052 var subPart; | 2064 var subPart; |
| 2053 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2065 unittest.expect( |
| 2066 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2054 pathOffset += 1; | 2067 pathOffset += 1; |
| 2055 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2068 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2069 unittest.equals("v1/projects/")); |
| 2056 pathOffset += 12; | 2070 pathOffset += 12; |
| 2057 index = path.indexOf("/regions/", pathOffset); | 2071 index = path.indexOf("/regions/", pathOffset); |
| 2058 unittest.expect(index >= 0, unittest.isTrue); | 2072 unittest.expect(index >= 0, unittest.isTrue); |
| 2059 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2073 subPart = |
| 2074 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2060 pathOffset = index; | 2075 pathOffset = index; |
| 2061 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2076 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2062 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2077 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2078 unittest.equals("/regions/")); |
| 2063 pathOffset += 9; | 2079 pathOffset += 9; |
| 2064 index = path.indexOf("/clusters/", pathOffset); | 2080 index = path.indexOf("/clusters/", pathOffset); |
| 2065 unittest.expect(index >= 0, unittest.isTrue); | 2081 unittest.expect(index >= 0, unittest.isTrue); |
| 2066 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2082 subPart = |
| 2083 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2067 pathOffset = index; | 2084 pathOffset = index; |
| 2068 unittest.expect(subPart, unittest.equals("$arg_region")); | 2085 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2069 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2086 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 2087 unittest.equals("/clusters/")); |
| 2070 pathOffset += 10; | 2088 pathOffset += 10; |
| 2071 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2089 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2072 pathOffset = path.length; | 2090 pathOffset = path.length; |
| 2073 unittest.expect(subPart, unittest.equals("$arg_clusterName")); | 2091 unittest.expect(subPart, unittest.equals("$arg_clusterName")); |
| 2074 | 2092 |
| 2075 var query = (req.url).query; | 2093 var query = (req.url).query; |
| 2076 var queryOffset = 0; | 2094 var queryOffset = 0; |
| 2077 var queryMap = {}; | 2095 var queryMap = {}; |
| 2078 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2096 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2079 parseBool(n) { | 2097 parseBool(n) { |
| 2080 if (n == "true") return true; | 2098 if (n == "true") return true; |
| 2081 if (n == "false") return false; | 2099 if (n == "false") return false; |
| 2082 if (n == null) return null; | 2100 if (n == null) return null; |
| 2083 throw new core.ArgumentError("Invalid boolean: $n"); | 2101 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2084 } | 2102 } |
| 2103 |
| 2085 if (query.length > 0) { | 2104 if (query.length > 0) { |
| 2086 for (var part in query.split("&")) { | 2105 for (var part in query.split("&")) { |
| 2087 var keyvalue = part.split("="); | 2106 var keyvalue = part.split("="); |
| 2088 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2107 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2108 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2089 } | 2109 } |
| 2090 } | 2110 } |
| 2091 | 2111 |
| 2092 | |
| 2093 var h = { | 2112 var h = { |
| 2094 "content-type" : "application/json; charset=utf-8", | 2113 "content-type": "application/json; charset=utf-8", |
| 2095 }; | 2114 }; |
| 2096 var resp = convert.JSON.encode(buildOperation()); | 2115 var resp = convert.JSON.encode(buildOperation()); |
| 2097 return new async.Future.value(stringResponse(200, h, resp)); | 2116 return new async.Future.value(stringResponse(200, h, resp)); |
| 2098 }), true); | 2117 }), true); |
| 2099 res.delete(arg_projectId, arg_region, arg_clusterName).then(unittest.expec
tAsync1(((api.Operation response) { | 2118 res |
| 2119 .delete(arg_projectId, arg_region, arg_clusterName) |
| 2120 .then(unittest.expectAsync1(((api.Operation response) { |
| 2100 checkOperation(response); | 2121 checkOperation(response); |
| 2101 }))); | 2122 }))); |
| 2102 }); | 2123 }); |
| 2103 | 2124 |
| 2104 unittest.test("method--diagnose", () { | 2125 unittest.test("method--diagnose", () { |
| 2105 | |
| 2106 var mock = new HttpServerMock(); | 2126 var mock = new HttpServerMock(); |
| 2107 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 2127 api.ProjectsRegionsClustersResourceApi res = |
| 2128 new api.DataprocApi(mock).projects.regions.clusters; |
| 2108 var arg_request = buildDiagnoseClusterRequest(); | 2129 var arg_request = buildDiagnoseClusterRequest(); |
| 2109 var arg_projectId = "foo"; | 2130 var arg_projectId = "foo"; |
| 2110 var arg_region = "foo"; | 2131 var arg_region = "foo"; |
| 2111 var arg_clusterName = "foo"; | 2132 var arg_clusterName = "foo"; |
| 2112 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2133 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2113 var obj = new api.DiagnoseClusterRequest.fromJson(json); | 2134 var obj = new api.DiagnoseClusterRequest.fromJson(json); |
| 2114 checkDiagnoseClusterRequest(obj); | 2135 checkDiagnoseClusterRequest(obj); |
| 2115 | 2136 |
| 2116 var path = (req.url).path; | 2137 var path = (req.url).path; |
| 2117 var pathOffset = 0; | 2138 var pathOffset = 0; |
| 2118 var index; | 2139 var index; |
| 2119 var subPart; | 2140 var subPart; |
| 2120 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2141 unittest.expect( |
| 2142 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2121 pathOffset += 1; | 2143 pathOffset += 1; |
| 2122 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2144 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2145 unittest.equals("v1/projects/")); |
| 2123 pathOffset += 12; | 2146 pathOffset += 12; |
| 2124 index = path.indexOf("/regions/", pathOffset); | 2147 index = path.indexOf("/regions/", pathOffset); |
| 2125 unittest.expect(index >= 0, unittest.isTrue); | 2148 unittest.expect(index >= 0, unittest.isTrue); |
| 2126 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2149 subPart = |
| 2150 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2127 pathOffset = index; | 2151 pathOffset = index; |
| 2128 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2152 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2129 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2153 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2154 unittest.equals("/regions/")); |
| 2130 pathOffset += 9; | 2155 pathOffset += 9; |
| 2131 index = path.indexOf("/clusters/", pathOffset); | 2156 index = path.indexOf("/clusters/", pathOffset); |
| 2132 unittest.expect(index >= 0, unittest.isTrue); | 2157 unittest.expect(index >= 0, unittest.isTrue); |
| 2133 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2158 subPart = |
| 2159 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2134 pathOffset = index; | 2160 pathOffset = index; |
| 2135 unittest.expect(subPart, unittest.equals("$arg_region")); | 2161 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2136 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2162 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 2163 unittest.equals("/clusters/")); |
| 2137 pathOffset += 10; | 2164 pathOffset += 10; |
| 2138 index = path.indexOf(":diagnose", pathOffset); | 2165 index = path.indexOf(":diagnose", pathOffset); |
| 2139 unittest.expect(index >= 0, unittest.isTrue); | 2166 unittest.expect(index >= 0, unittest.isTrue); |
| 2140 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2167 subPart = |
| 2168 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2141 pathOffset = index; | 2169 pathOffset = index; |
| 2142 unittest.expect(subPart, unittest.equals("$arg_clusterName")); | 2170 unittest.expect(subPart, unittest.equals("$arg_clusterName")); |
| 2143 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als(":diagnose")); | 2171 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2172 unittest.equals(":diagnose")); |
| 2144 pathOffset += 9; | 2173 pathOffset += 9; |
| 2145 | 2174 |
| 2146 var query = (req.url).query; | 2175 var query = (req.url).query; |
| 2147 var queryOffset = 0; | 2176 var queryOffset = 0; |
| 2148 var queryMap = {}; | 2177 var queryMap = {}; |
| 2149 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2178 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2150 parseBool(n) { | 2179 parseBool(n) { |
| 2151 if (n == "true") return true; | 2180 if (n == "true") return true; |
| 2152 if (n == "false") return false; | 2181 if (n == "false") return false; |
| 2153 if (n == null) return null; | 2182 if (n == null) return null; |
| 2154 throw new core.ArgumentError("Invalid boolean: $n"); | 2183 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2155 } | 2184 } |
| 2185 |
| 2156 if (query.length > 0) { | 2186 if (query.length > 0) { |
| 2157 for (var part in query.split("&")) { | 2187 for (var part in query.split("&")) { |
| 2158 var keyvalue = part.split("="); | 2188 var keyvalue = part.split("="); |
| 2159 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2189 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2190 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2160 } | 2191 } |
| 2161 } | 2192 } |
| 2162 | 2193 |
| 2163 | |
| 2164 var h = { | 2194 var h = { |
| 2165 "content-type" : "application/json; charset=utf-8", | 2195 "content-type": "application/json; charset=utf-8", |
| 2166 }; | 2196 }; |
| 2167 var resp = convert.JSON.encode(buildOperation()); | 2197 var resp = convert.JSON.encode(buildOperation()); |
| 2168 return new async.Future.value(stringResponse(200, h, resp)); | 2198 return new async.Future.value(stringResponse(200, h, resp)); |
| 2169 }), true); | 2199 }), true); |
| 2170 res.diagnose(arg_request, arg_projectId, arg_region, arg_clusterName).then
(unittest.expectAsync1(((api.Operation response) { | 2200 res |
| 2201 .diagnose(arg_request, arg_projectId, arg_region, arg_clusterName) |
| 2202 .then(unittest.expectAsync1(((api.Operation response) { |
| 2171 checkOperation(response); | 2203 checkOperation(response); |
| 2172 }))); | 2204 }))); |
| 2173 }); | 2205 }); |
| 2174 | 2206 |
| 2175 unittest.test("method--get", () { | 2207 unittest.test("method--get", () { |
| 2176 | |
| 2177 var mock = new HttpServerMock(); | 2208 var mock = new HttpServerMock(); |
| 2178 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 2209 api.ProjectsRegionsClustersResourceApi res = |
| 2210 new api.DataprocApi(mock).projects.regions.clusters; |
| 2179 var arg_projectId = "foo"; | 2211 var arg_projectId = "foo"; |
| 2180 var arg_region = "foo"; | 2212 var arg_region = "foo"; |
| 2181 var arg_clusterName = "foo"; | 2213 var arg_clusterName = "foo"; |
| 2182 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2214 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2183 var path = (req.url).path; | 2215 var path = (req.url).path; |
| 2184 var pathOffset = 0; | 2216 var pathOffset = 0; |
| 2185 var index; | 2217 var index; |
| 2186 var subPart; | 2218 var subPart; |
| 2187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2219 unittest.expect( |
| 2220 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2188 pathOffset += 1; | 2221 pathOffset += 1; |
| 2189 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2222 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2223 unittest.equals("v1/projects/")); |
| 2190 pathOffset += 12; | 2224 pathOffset += 12; |
| 2191 index = path.indexOf("/regions/", pathOffset); | 2225 index = path.indexOf("/regions/", pathOffset); |
| 2192 unittest.expect(index >= 0, unittest.isTrue); | 2226 unittest.expect(index >= 0, unittest.isTrue); |
| 2193 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2227 subPart = |
| 2228 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2194 pathOffset = index; | 2229 pathOffset = index; |
| 2195 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2230 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2196 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2231 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2232 unittest.equals("/regions/")); |
| 2197 pathOffset += 9; | 2233 pathOffset += 9; |
| 2198 index = path.indexOf("/clusters/", pathOffset); | 2234 index = path.indexOf("/clusters/", pathOffset); |
| 2199 unittest.expect(index >= 0, unittest.isTrue); | 2235 unittest.expect(index >= 0, unittest.isTrue); |
| 2200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2236 subPart = |
| 2237 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2201 pathOffset = index; | 2238 pathOffset = index; |
| 2202 unittest.expect(subPart, unittest.equals("$arg_region")); | 2239 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2203 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2240 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 2241 unittest.equals("/clusters/")); |
| 2204 pathOffset += 10; | 2242 pathOffset += 10; |
| 2205 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2243 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2206 pathOffset = path.length; | 2244 pathOffset = path.length; |
| 2207 unittest.expect(subPart, unittest.equals("$arg_clusterName")); | 2245 unittest.expect(subPart, unittest.equals("$arg_clusterName")); |
| 2208 | 2246 |
| 2209 var query = (req.url).query; | 2247 var query = (req.url).query; |
| 2210 var queryOffset = 0; | 2248 var queryOffset = 0; |
| 2211 var queryMap = {}; | 2249 var queryMap = {}; |
| 2212 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2250 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2213 parseBool(n) { | 2251 parseBool(n) { |
| 2214 if (n == "true") return true; | 2252 if (n == "true") return true; |
| 2215 if (n == "false") return false; | 2253 if (n == "false") return false; |
| 2216 if (n == null) return null; | 2254 if (n == null) return null; |
| 2217 throw new core.ArgumentError("Invalid boolean: $n"); | 2255 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2218 } | 2256 } |
| 2257 |
| 2219 if (query.length > 0) { | 2258 if (query.length > 0) { |
| 2220 for (var part in query.split("&")) { | 2259 for (var part in query.split("&")) { |
| 2221 var keyvalue = part.split("="); | 2260 var keyvalue = part.split("="); |
| 2222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2262 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2223 } | 2263 } |
| 2224 } | 2264 } |
| 2225 | 2265 |
| 2226 | |
| 2227 var h = { | 2266 var h = { |
| 2228 "content-type" : "application/json; charset=utf-8", | 2267 "content-type": "application/json; charset=utf-8", |
| 2229 }; | 2268 }; |
| 2230 var resp = convert.JSON.encode(buildCluster()); | 2269 var resp = convert.JSON.encode(buildCluster()); |
| 2231 return new async.Future.value(stringResponse(200, h, resp)); | 2270 return new async.Future.value(stringResponse(200, h, resp)); |
| 2232 }), true); | 2271 }), true); |
| 2233 res.get(arg_projectId, arg_region, arg_clusterName).then(unittest.expectAs
ync1(((api.Cluster response) { | 2272 res |
| 2273 .get(arg_projectId, arg_region, arg_clusterName) |
| 2274 .then(unittest.expectAsync1(((api.Cluster response) { |
| 2234 checkCluster(response); | 2275 checkCluster(response); |
| 2235 }))); | 2276 }))); |
| 2236 }); | 2277 }); |
| 2237 | 2278 |
| 2238 unittest.test("method--list", () { | 2279 unittest.test("method--list", () { |
| 2239 | |
| 2240 var mock = new HttpServerMock(); | 2280 var mock = new HttpServerMock(); |
| 2241 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 2281 api.ProjectsRegionsClustersResourceApi res = |
| 2282 new api.DataprocApi(mock).projects.regions.clusters; |
| 2242 var arg_projectId = "foo"; | 2283 var arg_projectId = "foo"; |
| 2243 var arg_region = "foo"; | 2284 var arg_region = "foo"; |
| 2244 var arg_pageSize = 42; | |
| 2245 var arg_filter = "foo"; | 2285 var arg_filter = "foo"; |
| 2246 var arg_pageToken = "foo"; | 2286 var arg_pageToken = "foo"; |
| 2287 var arg_pageSize = 42; |
| 2247 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2248 var path = (req.url).path; | 2289 var path = (req.url).path; |
| 2249 var pathOffset = 0; | 2290 var pathOffset = 0; |
| 2250 var index; | 2291 var index; |
| 2251 var subPart; | 2292 var subPart; |
| 2252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2293 unittest.expect( |
| 2294 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2253 pathOffset += 1; | 2295 pathOffset += 1; |
| 2254 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2296 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2297 unittest.equals("v1/projects/")); |
| 2255 pathOffset += 12; | 2298 pathOffset += 12; |
| 2256 index = path.indexOf("/regions/", pathOffset); | 2299 index = path.indexOf("/regions/", pathOffset); |
| 2257 unittest.expect(index >= 0, unittest.isTrue); | 2300 unittest.expect(index >= 0, unittest.isTrue); |
| 2258 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2301 subPart = |
| 2302 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2259 pathOffset = index; | 2303 pathOffset = index; |
| 2260 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2304 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2261 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2305 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2306 unittest.equals("/regions/")); |
| 2262 pathOffset += 9; | 2307 pathOffset += 9; |
| 2263 index = path.indexOf("/clusters", pathOffset); | 2308 index = path.indexOf("/clusters", pathOffset); |
| 2264 unittest.expect(index >= 0, unittest.isTrue); | 2309 unittest.expect(index >= 0, unittest.isTrue); |
| 2265 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2310 subPart = |
| 2311 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2266 pathOffset = index; | 2312 pathOffset = index; |
| 2267 unittest.expect(subPart, unittest.equals("$arg_region")); | 2313 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2268 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clusters")); | 2314 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2315 unittest.equals("/clusters")); |
| 2269 pathOffset += 9; | 2316 pathOffset += 9; |
| 2270 | 2317 |
| 2271 var query = (req.url).query; | 2318 var query = (req.url).query; |
| 2272 var queryOffset = 0; | 2319 var queryOffset = 0; |
| 2273 var queryMap = {}; | 2320 var queryMap = {}; |
| 2274 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2321 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2275 parseBool(n) { | 2322 parseBool(n) { |
| 2276 if (n == "true") return true; | 2323 if (n == "true") return true; |
| 2277 if (n == "false") return false; | 2324 if (n == "false") return false; |
| 2278 if (n == null) return null; | 2325 if (n == null) return null; |
| 2279 throw new core.ArgumentError("Invalid boolean: $n"); | 2326 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2280 } | 2327 } |
| 2328 |
| 2281 if (query.length > 0) { | 2329 if (query.length > 0) { |
| 2282 for (var part in query.split("&")) { | 2330 for (var part in query.split("&")) { |
| 2283 var keyvalue = part.split("="); | 2331 var keyvalue = part.split("="); |
| 2284 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2332 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2333 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2285 } | 2334 } |
| 2286 } | 2335 } |
| 2287 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2288 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2336 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 2289 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2337 unittest.expect( |
| 2290 | 2338 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2339 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2340 unittest.equals(arg_pageSize)); |
| 2291 | 2341 |
| 2292 var h = { | 2342 var h = { |
| 2293 "content-type" : "application/json; charset=utf-8", | 2343 "content-type": "application/json; charset=utf-8", |
| 2294 }; | 2344 }; |
| 2295 var resp = convert.JSON.encode(buildListClustersResponse()); | 2345 var resp = convert.JSON.encode(buildListClustersResponse()); |
| 2296 return new async.Future.value(stringResponse(200, h, resp)); | 2346 return new async.Future.value(stringResponse(200, h, resp)); |
| 2297 }), true); | 2347 }), true); |
| 2298 res.list(arg_projectId, arg_region, pageSize: arg_pageSize, filter: arg_fi
lter, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListClustersRes
ponse response) { | 2348 res |
| 2349 .list(arg_projectId, arg_region, |
| 2350 filter: arg_filter, |
| 2351 pageToken: arg_pageToken, |
| 2352 pageSize: arg_pageSize) |
| 2353 .then(unittest.expectAsync1(((api.ListClustersResponse response) { |
| 2299 checkListClustersResponse(response); | 2354 checkListClustersResponse(response); |
| 2300 }))); | 2355 }))); |
| 2301 }); | 2356 }); |
| 2302 | 2357 |
| 2303 unittest.test("method--patch", () { | 2358 unittest.test("method--patch", () { |
| 2304 | |
| 2305 var mock = new HttpServerMock(); | 2359 var mock = new HttpServerMock(); |
| 2306 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro
jects.regions.clusters; | 2360 api.ProjectsRegionsClustersResourceApi res = |
| 2361 new api.DataprocApi(mock).projects.regions.clusters; |
| 2307 var arg_request = buildCluster(); | 2362 var arg_request = buildCluster(); |
| 2308 var arg_projectId = "foo"; | 2363 var arg_projectId = "foo"; |
| 2309 var arg_region = "foo"; | 2364 var arg_region = "foo"; |
| 2310 var arg_clusterName = "foo"; | 2365 var arg_clusterName = "foo"; |
| 2311 var arg_updateMask = "foo"; | 2366 var arg_updateMask = "foo"; |
| 2312 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2367 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2313 var obj = new api.Cluster.fromJson(json); | 2368 var obj = new api.Cluster.fromJson(json); |
| 2314 checkCluster(obj); | 2369 checkCluster(obj); |
| 2315 | 2370 |
| 2316 var path = (req.url).path; | 2371 var path = (req.url).path; |
| 2317 var pathOffset = 0; | 2372 var pathOffset = 0; |
| 2318 var index; | 2373 var index; |
| 2319 var subPart; | 2374 var subPart; |
| 2320 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2375 unittest.expect( |
| 2376 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2321 pathOffset += 1; | 2377 pathOffset += 1; |
| 2322 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2378 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2379 unittest.equals("v1/projects/")); |
| 2323 pathOffset += 12; | 2380 pathOffset += 12; |
| 2324 index = path.indexOf("/regions/", pathOffset); | 2381 index = path.indexOf("/regions/", pathOffset); |
| 2325 unittest.expect(index >= 0, unittest.isTrue); | 2382 unittest.expect(index >= 0, unittest.isTrue); |
| 2326 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2383 subPart = |
| 2384 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2327 pathOffset = index; | 2385 pathOffset = index; |
| 2328 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2386 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2329 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2387 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2388 unittest.equals("/regions/")); |
| 2330 pathOffset += 9; | 2389 pathOffset += 9; |
| 2331 index = path.indexOf("/clusters/", pathOffset); | 2390 index = path.indexOf("/clusters/", pathOffset); |
| 2332 unittest.expect(index >= 0, unittest.isTrue); | 2391 unittest.expect(index >= 0, unittest.isTrue); |
| 2333 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2392 subPart = |
| 2393 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2334 pathOffset = index; | 2394 pathOffset = index; |
| 2335 unittest.expect(subPart, unittest.equals("$arg_region")); | 2395 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2336 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/clusters/")); | 2396 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 2397 unittest.equals("/clusters/")); |
| 2337 pathOffset += 10; | 2398 pathOffset += 10; |
| 2338 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2399 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2339 pathOffset = path.length; | 2400 pathOffset = path.length; |
| 2340 unittest.expect(subPart, unittest.equals("$arg_clusterName")); | 2401 unittest.expect(subPart, unittest.equals("$arg_clusterName")); |
| 2341 | 2402 |
| 2342 var query = (req.url).query; | 2403 var query = (req.url).query; |
| 2343 var queryOffset = 0; | 2404 var queryOffset = 0; |
| 2344 var queryMap = {}; | 2405 var queryMap = {}; |
| 2345 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2406 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2346 parseBool(n) { | 2407 parseBool(n) { |
| 2347 if (n == "true") return true; | 2408 if (n == "true") return true; |
| 2348 if (n == "false") return false; | 2409 if (n == "false") return false; |
| 2349 if (n == null) return null; | 2410 if (n == null) return null; |
| 2350 throw new core.ArgumentError("Invalid boolean: $n"); | 2411 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2351 } | 2412 } |
| 2413 |
| 2352 if (query.length > 0) { | 2414 if (query.length > 0) { |
| 2353 for (var part in query.split("&")) { | 2415 for (var part in query.split("&")) { |
| 2354 var keyvalue = part.split("="); | 2416 var keyvalue = part.split("="); |
| 2355 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2417 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2418 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2356 } | 2419 } |
| 2357 } | 2420 } |
| 2358 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2421 unittest.expect( |
| 2359 | 2422 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| 2360 | 2423 |
| 2361 var h = { | 2424 var h = { |
| 2362 "content-type" : "application/json; charset=utf-8", | 2425 "content-type": "application/json; charset=utf-8", |
| 2363 }; | 2426 }; |
| 2364 var resp = convert.JSON.encode(buildOperation()); | 2427 var resp = convert.JSON.encode(buildOperation()); |
| 2365 return new async.Future.value(stringResponse(200, h, resp)); | 2428 return new async.Future.value(stringResponse(200, h, resp)); |
| 2366 }), true); | 2429 }), true); |
| 2367 res.patch(arg_request, arg_projectId, arg_region, arg_clusterName, updateM
ask: arg_updateMask).then(unittest.expectAsync1(((api.Operation response) { | 2430 res |
| 2431 .patch(arg_request, arg_projectId, arg_region, arg_clusterName, |
| 2432 updateMask: arg_updateMask) |
| 2433 .then(unittest.expectAsync1(((api.Operation response) { |
| 2368 checkOperation(response); | 2434 checkOperation(response); |
| 2369 }))); | 2435 }))); |
| 2370 }); | 2436 }); |
| 2371 | |
| 2372 }); | 2437 }); |
| 2373 | 2438 |
| 2374 | |
| 2375 unittest.group("resource-ProjectsRegionsJobsResourceApi", () { | 2439 unittest.group("resource-ProjectsRegionsJobsResourceApi", () { |
| 2376 unittest.test("method--cancel", () { | 2440 unittest.test("method--cancel", () { |
| 2377 | |
| 2378 var mock = new HttpServerMock(); | 2441 var mock = new HttpServerMock(); |
| 2379 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2442 api.ProjectsRegionsJobsResourceApi res = |
| 2443 new api.DataprocApi(mock).projects.regions.jobs; |
| 2380 var arg_request = buildCancelJobRequest(); | 2444 var arg_request = buildCancelJobRequest(); |
| 2381 var arg_projectId = "foo"; | 2445 var arg_projectId = "foo"; |
| 2382 var arg_region = "foo"; | 2446 var arg_region = "foo"; |
| 2383 var arg_jobId = "foo"; | 2447 var arg_jobId = "foo"; |
| 2384 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2448 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2385 var obj = new api.CancelJobRequest.fromJson(json); | 2449 var obj = new api.CancelJobRequest.fromJson(json); |
| 2386 checkCancelJobRequest(obj); | 2450 checkCancelJobRequest(obj); |
| 2387 | 2451 |
| 2388 var path = (req.url).path; | 2452 var path = (req.url).path; |
| 2389 var pathOffset = 0; | 2453 var pathOffset = 0; |
| 2390 var index; | 2454 var index; |
| 2391 var subPart; | 2455 var subPart; |
| 2392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2456 unittest.expect( |
| 2457 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2393 pathOffset += 1; | 2458 pathOffset += 1; |
| 2394 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2459 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2460 unittest.equals("v1/projects/")); |
| 2395 pathOffset += 12; | 2461 pathOffset += 12; |
| 2396 index = path.indexOf("/regions/", pathOffset); | 2462 index = path.indexOf("/regions/", pathOffset); |
| 2397 unittest.expect(index >= 0, unittest.isTrue); | 2463 unittest.expect(index >= 0, unittest.isTrue); |
| 2398 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2464 subPart = |
| 2465 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2399 pathOffset = index; | 2466 pathOffset = index; |
| 2400 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2467 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2401 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2468 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2469 unittest.equals("/regions/")); |
| 2402 pathOffset += 9; | 2470 pathOffset += 9; |
| 2403 index = path.indexOf("/jobs/", pathOffset); | 2471 index = path.indexOf("/jobs/", pathOffset); |
| 2404 unittest.expect(index >= 0, unittest.isTrue); | 2472 unittest.expect(index >= 0, unittest.isTrue); |
| 2405 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2473 subPart = |
| 2474 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2406 pathOffset = index; | 2475 pathOffset = index; |
| 2407 unittest.expect(subPart, unittest.equals("$arg_region")); | 2476 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2408 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | 2477 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2478 unittest.equals("/jobs/")); |
| 2409 pathOffset += 6; | 2479 pathOffset += 6; |
| 2410 index = path.indexOf(":cancel", pathOffset); | 2480 index = path.indexOf(":cancel", pathOffset); |
| 2411 unittest.expect(index >= 0, unittest.isTrue); | 2481 unittest.expect(index >= 0, unittest.isTrue); |
| 2412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2482 subPart = |
| 2483 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2413 pathOffset = index; | 2484 pathOffset = index; |
| 2414 unittest.expect(subPart, unittest.equals("$arg_jobId")); | 2485 unittest.expect(subPart, unittest.equals("$arg_jobId")); |
| 2415 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als(":cancel")); | 2486 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2487 unittest.equals(":cancel")); |
| 2416 pathOffset += 7; | 2488 pathOffset += 7; |
| 2417 | 2489 |
| 2418 var query = (req.url).query; | 2490 var query = (req.url).query; |
| 2419 var queryOffset = 0; | 2491 var queryOffset = 0; |
| 2420 var queryMap = {}; | 2492 var queryMap = {}; |
| 2421 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2493 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2422 parseBool(n) { | 2494 parseBool(n) { |
| 2423 if (n == "true") return true; | 2495 if (n == "true") return true; |
| 2424 if (n == "false") return false; | 2496 if (n == "false") return false; |
| 2425 if (n == null) return null; | 2497 if (n == null) return null; |
| 2426 throw new core.ArgumentError("Invalid boolean: $n"); | 2498 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2427 } | 2499 } |
| 2500 |
| 2428 if (query.length > 0) { | 2501 if (query.length > 0) { |
| 2429 for (var part in query.split("&")) { | 2502 for (var part in query.split("&")) { |
| 2430 var keyvalue = part.split("="); | 2503 var keyvalue = part.split("="); |
| 2431 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2504 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2505 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2432 } | 2506 } |
| 2433 } | 2507 } |
| 2434 | 2508 |
| 2435 | |
| 2436 var h = { | 2509 var h = { |
| 2437 "content-type" : "application/json; charset=utf-8", | 2510 "content-type": "application/json; charset=utf-8", |
| 2438 }; | 2511 }; |
| 2439 var resp = convert.JSON.encode(buildJob()); | 2512 var resp = convert.JSON.encode(buildJob()); |
| 2440 return new async.Future.value(stringResponse(200, h, resp)); | 2513 return new async.Future.value(stringResponse(200, h, resp)); |
| 2441 }), true); | 2514 }), true); |
| 2442 res.cancel(arg_request, arg_projectId, arg_region, arg_jobId).then(unittes
t.expectAsync1(((api.Job response) { | 2515 res |
| 2516 .cancel(arg_request, arg_projectId, arg_region, arg_jobId) |
| 2517 .then(unittest.expectAsync1(((api.Job response) { |
| 2443 checkJob(response); | 2518 checkJob(response); |
| 2444 }))); | 2519 }))); |
| 2445 }); | 2520 }); |
| 2446 | 2521 |
| 2447 unittest.test("method--delete", () { | 2522 unittest.test("method--delete", () { |
| 2448 | |
| 2449 var mock = new HttpServerMock(); | 2523 var mock = new HttpServerMock(); |
| 2450 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2524 api.ProjectsRegionsJobsResourceApi res = |
| 2525 new api.DataprocApi(mock).projects.regions.jobs; |
| 2451 var arg_projectId = "foo"; | 2526 var arg_projectId = "foo"; |
| 2452 var arg_region = "foo"; | 2527 var arg_region = "foo"; |
| 2453 var arg_jobId = "foo"; | 2528 var arg_jobId = "foo"; |
| 2454 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2529 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2455 var path = (req.url).path; | 2530 var path = (req.url).path; |
| 2456 var pathOffset = 0; | 2531 var pathOffset = 0; |
| 2457 var index; | 2532 var index; |
| 2458 var subPart; | 2533 var subPart; |
| 2459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2534 unittest.expect( |
| 2535 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2460 pathOffset += 1; | 2536 pathOffset += 1; |
| 2461 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2537 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2538 unittest.equals("v1/projects/")); |
| 2462 pathOffset += 12; | 2539 pathOffset += 12; |
| 2463 index = path.indexOf("/regions/", pathOffset); | 2540 index = path.indexOf("/regions/", pathOffset); |
| 2464 unittest.expect(index >= 0, unittest.isTrue); | 2541 unittest.expect(index >= 0, unittest.isTrue); |
| 2465 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2542 subPart = |
| 2543 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2466 pathOffset = index; | 2544 pathOffset = index; |
| 2467 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2545 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2468 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2546 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2547 unittest.equals("/regions/")); |
| 2469 pathOffset += 9; | 2548 pathOffset += 9; |
| 2470 index = path.indexOf("/jobs/", pathOffset); | 2549 index = path.indexOf("/jobs/", pathOffset); |
| 2471 unittest.expect(index >= 0, unittest.isTrue); | 2550 unittest.expect(index >= 0, unittest.isTrue); |
| 2472 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2551 subPart = |
| 2552 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2473 pathOffset = index; | 2553 pathOffset = index; |
| 2474 unittest.expect(subPart, unittest.equals("$arg_region")); | 2554 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2475 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | 2555 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2556 unittest.equals("/jobs/")); |
| 2476 pathOffset += 6; | 2557 pathOffset += 6; |
| 2477 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2558 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2478 pathOffset = path.length; | 2559 pathOffset = path.length; |
| 2479 unittest.expect(subPart, unittest.equals("$arg_jobId")); | 2560 unittest.expect(subPart, unittest.equals("$arg_jobId")); |
| 2480 | 2561 |
| 2481 var query = (req.url).query; | 2562 var query = (req.url).query; |
| 2482 var queryOffset = 0; | 2563 var queryOffset = 0; |
| 2483 var queryMap = {}; | 2564 var queryMap = {}; |
| 2484 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2565 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2485 parseBool(n) { | 2566 parseBool(n) { |
| 2486 if (n == "true") return true; | 2567 if (n == "true") return true; |
| 2487 if (n == "false") return false; | 2568 if (n == "false") return false; |
| 2488 if (n == null) return null; | 2569 if (n == null) return null; |
| 2489 throw new core.ArgumentError("Invalid boolean: $n"); | 2570 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2490 } | 2571 } |
| 2572 |
| 2491 if (query.length > 0) { | 2573 if (query.length > 0) { |
| 2492 for (var part in query.split("&")) { | 2574 for (var part in query.split("&")) { |
| 2493 var keyvalue = part.split("="); | 2575 var keyvalue = part.split("="); |
| 2494 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2576 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2577 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2495 } | 2578 } |
| 2496 } | 2579 } |
| 2497 | 2580 |
| 2498 | |
| 2499 var h = { | 2581 var h = { |
| 2500 "content-type" : "application/json; charset=utf-8", | 2582 "content-type": "application/json; charset=utf-8", |
| 2501 }; | 2583 }; |
| 2502 var resp = convert.JSON.encode(buildEmpty()); | 2584 var resp = convert.JSON.encode(buildEmpty()); |
| 2503 return new async.Future.value(stringResponse(200, h, resp)); | 2585 return new async.Future.value(stringResponse(200, h, resp)); |
| 2504 }), true); | 2586 }), true); |
| 2505 res.delete(arg_projectId, arg_region, arg_jobId).then(unittest.expectAsync
1(((api.Empty response) { | 2587 res |
| 2588 .delete(arg_projectId, arg_region, arg_jobId) |
| 2589 .then(unittest.expectAsync1(((api.Empty response) { |
| 2506 checkEmpty(response); | 2590 checkEmpty(response); |
| 2507 }))); | 2591 }))); |
| 2508 }); | 2592 }); |
| 2509 | 2593 |
| 2510 unittest.test("method--get", () { | 2594 unittest.test("method--get", () { |
| 2511 | |
| 2512 var mock = new HttpServerMock(); | 2595 var mock = new HttpServerMock(); |
| 2513 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2596 api.ProjectsRegionsJobsResourceApi res = |
| 2597 new api.DataprocApi(mock).projects.regions.jobs; |
| 2514 var arg_projectId = "foo"; | 2598 var arg_projectId = "foo"; |
| 2515 var arg_region = "foo"; | 2599 var arg_region = "foo"; |
| 2516 var arg_jobId = "foo"; | 2600 var arg_jobId = "foo"; |
| 2517 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2601 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2518 var path = (req.url).path; | 2602 var path = (req.url).path; |
| 2519 var pathOffset = 0; | 2603 var pathOffset = 0; |
| 2520 var index; | 2604 var index; |
| 2521 var subPart; | 2605 var subPart; |
| 2522 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2606 unittest.expect( |
| 2607 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2523 pathOffset += 1; | 2608 pathOffset += 1; |
| 2524 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2609 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2610 unittest.equals("v1/projects/")); |
| 2525 pathOffset += 12; | 2611 pathOffset += 12; |
| 2526 index = path.indexOf("/regions/", pathOffset); | 2612 index = path.indexOf("/regions/", pathOffset); |
| 2527 unittest.expect(index >= 0, unittest.isTrue); | 2613 unittest.expect(index >= 0, unittest.isTrue); |
| 2528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2614 subPart = |
| 2615 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2529 pathOffset = index; | 2616 pathOffset = index; |
| 2530 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2617 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2531 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2618 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2619 unittest.equals("/regions/")); |
| 2532 pathOffset += 9; | 2620 pathOffset += 9; |
| 2533 index = path.indexOf("/jobs/", pathOffset); | 2621 index = path.indexOf("/jobs/", pathOffset); |
| 2534 unittest.expect(index >= 0, unittest.isTrue); | 2622 unittest.expect(index >= 0, unittest.isTrue); |
| 2535 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2623 subPart = |
| 2624 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2536 pathOffset = index; | 2625 pathOffset = index; |
| 2537 unittest.expect(subPart, unittest.equals("$arg_region")); | 2626 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2538 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | 2627 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2628 unittest.equals("/jobs/")); |
| 2539 pathOffset += 6; | 2629 pathOffset += 6; |
| 2540 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2630 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2541 pathOffset = path.length; | 2631 pathOffset = path.length; |
| 2542 unittest.expect(subPart, unittest.equals("$arg_jobId")); | 2632 unittest.expect(subPart, unittest.equals("$arg_jobId")); |
| 2543 | 2633 |
| 2544 var query = (req.url).query; | 2634 var query = (req.url).query; |
| 2545 var queryOffset = 0; | 2635 var queryOffset = 0; |
| 2546 var queryMap = {}; | 2636 var queryMap = {}; |
| 2547 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2637 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2548 parseBool(n) { | 2638 parseBool(n) { |
| 2549 if (n == "true") return true; | 2639 if (n == "true") return true; |
| 2550 if (n == "false") return false; | 2640 if (n == "false") return false; |
| 2551 if (n == null) return null; | 2641 if (n == null) return null; |
| 2552 throw new core.ArgumentError("Invalid boolean: $n"); | 2642 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2553 } | 2643 } |
| 2644 |
| 2554 if (query.length > 0) { | 2645 if (query.length > 0) { |
| 2555 for (var part in query.split("&")) { | 2646 for (var part in query.split("&")) { |
| 2556 var keyvalue = part.split("="); | 2647 var keyvalue = part.split("="); |
| 2557 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2648 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2649 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2558 } | 2650 } |
| 2559 } | 2651 } |
| 2560 | 2652 |
| 2561 | |
| 2562 var h = { | 2653 var h = { |
| 2563 "content-type" : "application/json; charset=utf-8", | 2654 "content-type": "application/json; charset=utf-8", |
| 2564 }; | 2655 }; |
| 2565 var resp = convert.JSON.encode(buildJob()); | 2656 var resp = convert.JSON.encode(buildJob()); |
| 2566 return new async.Future.value(stringResponse(200, h, resp)); | 2657 return new async.Future.value(stringResponse(200, h, resp)); |
| 2567 }), true); | 2658 }), true); |
| 2568 res.get(arg_projectId, arg_region, arg_jobId).then(unittest.expectAsync1((
(api.Job response) { | 2659 res |
| 2660 .get(arg_projectId, arg_region, arg_jobId) |
| 2661 .then(unittest.expectAsync1(((api.Job response) { |
| 2569 checkJob(response); | 2662 checkJob(response); |
| 2570 }))); | 2663 }))); |
| 2571 }); | 2664 }); |
| 2572 | 2665 |
| 2573 unittest.test("method--list", () { | 2666 unittest.test("method--list", () { |
| 2574 | |
| 2575 var mock = new HttpServerMock(); | 2667 var mock = new HttpServerMock(); |
| 2576 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2668 api.ProjectsRegionsJobsResourceApi res = |
| 2669 new api.DataprocApi(mock).projects.regions.jobs; |
| 2577 var arg_projectId = "foo"; | 2670 var arg_projectId = "foo"; |
| 2578 var arg_region = "foo"; | 2671 var arg_region = "foo"; |
| 2579 var arg_filter = "foo"; | |
| 2580 var arg_jobStateMatcher = "foo"; | |
| 2581 var arg_pageToken = "foo"; | 2672 var arg_pageToken = "foo"; |
| 2582 var arg_pageSize = 42; | 2673 var arg_pageSize = 42; |
| 2583 var arg_clusterName = "foo"; | 2674 var arg_clusterName = "foo"; |
| 2675 var arg_filter = "foo"; |
| 2676 var arg_jobStateMatcher = "foo"; |
| 2584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2677 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2585 var path = (req.url).path; | 2678 var path = (req.url).path; |
| 2586 var pathOffset = 0; | 2679 var pathOffset = 0; |
| 2587 var index; | 2680 var index; |
| 2588 var subPart; | 2681 var subPart; |
| 2589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2682 unittest.expect( |
| 2683 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2590 pathOffset += 1; | 2684 pathOffset += 1; |
| 2591 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2685 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2686 unittest.equals("v1/projects/")); |
| 2592 pathOffset += 12; | 2687 pathOffset += 12; |
| 2593 index = path.indexOf("/regions/", pathOffset); | 2688 index = path.indexOf("/regions/", pathOffset); |
| 2594 unittest.expect(index >= 0, unittest.isTrue); | 2689 unittest.expect(index >= 0, unittest.isTrue); |
| 2595 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2690 subPart = |
| 2691 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2596 pathOffset = index; | 2692 pathOffset = index; |
| 2597 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2693 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2598 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2694 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2695 unittest.equals("/regions/")); |
| 2599 pathOffset += 9; | 2696 pathOffset += 9; |
| 2600 index = path.indexOf("/jobs", pathOffset); | 2697 index = path.indexOf("/jobs", pathOffset); |
| 2601 unittest.expect(index >= 0, unittest.isTrue); | 2698 unittest.expect(index >= 0, unittest.isTrue); |
| 2602 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2699 subPart = |
| 2700 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2603 pathOffset = index; | 2701 pathOffset = index; |
| 2604 unittest.expect(subPart, unittest.equals("$arg_region")); | 2702 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2605 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/jobs")); | 2703 unittest.expect(path.substring(pathOffset, pathOffset + 5), |
| 2704 unittest.equals("/jobs")); |
| 2606 pathOffset += 5; | 2705 pathOffset += 5; |
| 2607 | 2706 |
| 2608 var query = (req.url).query; | 2707 var query = (req.url).query; |
| 2609 var queryOffset = 0; | 2708 var queryOffset = 0; |
| 2610 var queryMap = {}; | 2709 var queryMap = {}; |
| 2611 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2710 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2612 parseBool(n) { | 2711 parseBool(n) { |
| 2613 if (n == "true") return true; | 2712 if (n == "true") return true; |
| 2614 if (n == "false") return false; | 2713 if (n == "false") return false; |
| 2615 if (n == null) return null; | 2714 if (n == null) return null; |
| 2616 throw new core.ArgumentError("Invalid boolean: $n"); | 2715 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2617 } | 2716 } |
| 2717 |
| 2618 if (query.length > 0) { | 2718 if (query.length > 0) { |
| 2619 for (var part in query.split("&")) { | 2719 for (var part in query.split("&")) { |
| 2620 var keyvalue = part.split("="); | 2720 var keyvalue = part.split("="); |
| 2621 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2721 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2722 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2622 } | 2723 } |
| 2623 } | 2724 } |
| 2725 unittest.expect( |
| 2726 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2727 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2728 unittest.equals(arg_pageSize)); |
| 2729 unittest.expect( |
| 2730 queryMap["clusterName"].first, unittest.equals(arg_clusterName)); |
| 2624 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2731 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 2625 unittest.expect(queryMap["jobStateMatcher"].first, unittest.equals(arg_j
obStateMatcher)); | 2732 unittest.expect(queryMap["jobStateMatcher"].first, |
| 2626 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2733 unittest.equals(arg_jobStateMatcher)); |
| 2627 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2628 unittest.expect(queryMap["clusterName"].first, unittest.equals(arg_clust
erName)); | |
| 2629 | |
| 2630 | 2734 |
| 2631 var h = { | 2735 var h = { |
| 2632 "content-type" : "application/json; charset=utf-8", | 2736 "content-type": "application/json; charset=utf-8", |
| 2633 }; | 2737 }; |
| 2634 var resp = convert.JSON.encode(buildListJobsResponse()); | 2738 var resp = convert.JSON.encode(buildListJobsResponse()); |
| 2635 return new async.Future.value(stringResponse(200, h, resp)); | 2739 return new async.Future.value(stringResponse(200, h, resp)); |
| 2636 }), true); | 2740 }), true); |
| 2637 res.list(arg_projectId, arg_region, filter: arg_filter, jobStateMatcher: a
rg_jobStateMatcher, pageToken: arg_pageToken, pageSize: arg_pageSize, clusterNam
e: arg_clusterName).then(unittest.expectAsync1(((api.ListJobsResponse response)
{ | 2741 res |
| 2742 .list(arg_projectId, arg_region, |
| 2743 pageToken: arg_pageToken, |
| 2744 pageSize: arg_pageSize, |
| 2745 clusterName: arg_clusterName, |
| 2746 filter: arg_filter, |
| 2747 jobStateMatcher: arg_jobStateMatcher) |
| 2748 .then(unittest.expectAsync1(((api.ListJobsResponse response) { |
| 2638 checkListJobsResponse(response); | 2749 checkListJobsResponse(response); |
| 2639 }))); | 2750 }))); |
| 2640 }); | 2751 }); |
| 2641 | 2752 |
| 2642 unittest.test("method--patch", () { | 2753 unittest.test("method--patch", () { |
| 2643 | |
| 2644 var mock = new HttpServerMock(); | 2754 var mock = new HttpServerMock(); |
| 2645 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2755 api.ProjectsRegionsJobsResourceApi res = |
| 2756 new api.DataprocApi(mock).projects.regions.jobs; |
| 2646 var arg_request = buildJob(); | 2757 var arg_request = buildJob(); |
| 2647 var arg_projectId = "foo"; | 2758 var arg_projectId = "foo"; |
| 2648 var arg_region = "foo"; | 2759 var arg_region = "foo"; |
| 2649 var arg_jobId = "foo"; | 2760 var arg_jobId = "foo"; |
| 2650 var arg_updateMask = "foo"; | 2761 var arg_updateMask = "foo"; |
| 2651 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2652 var obj = new api.Job.fromJson(json); | 2763 var obj = new api.Job.fromJson(json); |
| 2653 checkJob(obj); | 2764 checkJob(obj); |
| 2654 | 2765 |
| 2655 var path = (req.url).path; | 2766 var path = (req.url).path; |
| 2656 var pathOffset = 0; | 2767 var pathOffset = 0; |
| 2657 var index; | 2768 var index; |
| 2658 var subPart; | 2769 var subPart; |
| 2659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2770 unittest.expect( |
| 2771 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2660 pathOffset += 1; | 2772 pathOffset += 1; |
| 2661 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2773 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2774 unittest.equals("v1/projects/")); |
| 2662 pathOffset += 12; | 2775 pathOffset += 12; |
| 2663 index = path.indexOf("/regions/", pathOffset); | 2776 index = path.indexOf("/regions/", pathOffset); |
| 2664 unittest.expect(index >= 0, unittest.isTrue); | 2777 unittest.expect(index >= 0, unittest.isTrue); |
| 2665 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2778 subPart = |
| 2779 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2666 pathOffset = index; | 2780 pathOffset = index; |
| 2667 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2781 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2668 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2782 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2783 unittest.equals("/regions/")); |
| 2669 pathOffset += 9; | 2784 pathOffset += 9; |
| 2670 index = path.indexOf("/jobs/", pathOffset); | 2785 index = path.indexOf("/jobs/", pathOffset); |
| 2671 unittest.expect(index >= 0, unittest.isTrue); | 2786 unittest.expect(index >= 0, unittest.isTrue); |
| 2672 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2787 subPart = |
| 2788 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2673 pathOffset = index; | 2789 pathOffset = index; |
| 2674 unittest.expect(subPart, unittest.equals("$arg_region")); | 2790 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2675 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/jobs/")); | 2791 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2792 unittest.equals("/jobs/")); |
| 2676 pathOffset += 6; | 2793 pathOffset += 6; |
| 2677 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2794 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2678 pathOffset = path.length; | 2795 pathOffset = path.length; |
| 2679 unittest.expect(subPart, unittest.equals("$arg_jobId")); | 2796 unittest.expect(subPart, unittest.equals("$arg_jobId")); |
| 2680 | 2797 |
| 2681 var query = (req.url).query; | 2798 var query = (req.url).query; |
| 2682 var queryOffset = 0; | 2799 var queryOffset = 0; |
| 2683 var queryMap = {}; | 2800 var queryMap = {}; |
| 2684 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2801 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2685 parseBool(n) { | 2802 parseBool(n) { |
| 2686 if (n == "true") return true; | 2803 if (n == "true") return true; |
| 2687 if (n == "false") return false; | 2804 if (n == "false") return false; |
| 2688 if (n == null) return null; | 2805 if (n == null) return null; |
| 2689 throw new core.ArgumentError("Invalid boolean: $n"); | 2806 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2690 } | 2807 } |
| 2808 |
| 2691 if (query.length > 0) { | 2809 if (query.length > 0) { |
| 2692 for (var part in query.split("&")) { | 2810 for (var part in query.split("&")) { |
| 2693 var keyvalue = part.split("="); | 2811 var keyvalue = part.split("="); |
| 2694 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2812 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2813 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2695 } | 2814 } |
| 2696 } | 2815 } |
| 2697 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2816 unittest.expect( |
| 2698 | 2817 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| 2699 | 2818 |
| 2700 var h = { | 2819 var h = { |
| 2701 "content-type" : "application/json; charset=utf-8", | 2820 "content-type": "application/json; charset=utf-8", |
| 2702 }; | 2821 }; |
| 2703 var resp = convert.JSON.encode(buildJob()); | 2822 var resp = convert.JSON.encode(buildJob()); |
| 2704 return new async.Future.value(stringResponse(200, h, resp)); | 2823 return new async.Future.value(stringResponse(200, h, resp)); |
| 2705 }), true); | 2824 }), true); |
| 2706 res.patch(arg_request, arg_projectId, arg_region, arg_jobId, updateMask: a
rg_updateMask).then(unittest.expectAsync1(((api.Job response) { | 2825 res |
| 2826 .patch(arg_request, arg_projectId, arg_region, arg_jobId, |
| 2827 updateMask: arg_updateMask) |
| 2828 .then(unittest.expectAsync1(((api.Job response) { |
| 2707 checkJob(response); | 2829 checkJob(response); |
| 2708 }))); | 2830 }))); |
| 2709 }); | 2831 }); |
| 2710 | 2832 |
| 2711 unittest.test("method--submit", () { | 2833 unittest.test("method--submit", () { |
| 2712 | |
| 2713 var mock = new HttpServerMock(); | 2834 var mock = new HttpServerMock(); |
| 2714 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project
s.regions.jobs; | 2835 api.ProjectsRegionsJobsResourceApi res = |
| 2836 new api.DataprocApi(mock).projects.regions.jobs; |
| 2715 var arg_request = buildSubmitJobRequest(); | 2837 var arg_request = buildSubmitJobRequest(); |
| 2716 var arg_projectId = "foo"; | 2838 var arg_projectId = "foo"; |
| 2717 var arg_region = "foo"; | 2839 var arg_region = "foo"; |
| 2718 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2840 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2719 var obj = new api.SubmitJobRequest.fromJson(json); | 2841 var obj = new api.SubmitJobRequest.fromJson(json); |
| 2720 checkSubmitJobRequest(obj); | 2842 checkSubmitJobRequest(obj); |
| 2721 | 2843 |
| 2722 var path = (req.url).path; | 2844 var path = (req.url).path; |
| 2723 var pathOffset = 0; | 2845 var pathOffset = 0; |
| 2724 var index; | 2846 var index; |
| 2725 var subPart; | 2847 var subPart; |
| 2726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2848 unittest.expect( |
| 2849 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2727 pathOffset += 1; | 2850 pathOffset += 1; |
| 2728 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2851 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2852 unittest.equals("v1/projects/")); |
| 2729 pathOffset += 12; | 2853 pathOffset += 12; |
| 2730 index = path.indexOf("/regions/", pathOffset); | 2854 index = path.indexOf("/regions/", pathOffset); |
| 2731 unittest.expect(index >= 0, unittest.isTrue); | 2855 unittest.expect(index >= 0, unittest.isTrue); |
| 2732 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2856 subPart = |
| 2857 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2733 pathOffset = index; | 2858 pathOffset = index; |
| 2734 unittest.expect(subPart, unittest.equals("$arg_projectId")); | 2859 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 2735 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/regions/")); | 2860 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2861 unittest.equals("/regions/")); |
| 2736 pathOffset += 9; | 2862 pathOffset += 9; |
| 2737 index = path.indexOf("/jobs:submit", pathOffset); | 2863 index = path.indexOf("/jobs:submit", pathOffset); |
| 2738 unittest.expect(index >= 0, unittest.isTrue); | 2864 unittest.expect(index >= 0, unittest.isTrue); |
| 2739 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2865 subPart = |
| 2866 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2740 pathOffset = index; | 2867 pathOffset = index; |
| 2741 unittest.expect(subPart, unittest.equals("$arg_region")); | 2868 unittest.expect(subPart, unittest.equals("$arg_region")); |
| 2742 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/jobs:submit")); | 2869 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2870 unittest.equals("/jobs:submit")); |
| 2743 pathOffset += 12; | 2871 pathOffset += 12; |
| 2744 | 2872 |
| 2745 var query = (req.url).query; | 2873 var query = (req.url).query; |
| 2746 var queryOffset = 0; | 2874 var queryOffset = 0; |
| 2747 var queryMap = {}; | 2875 var queryMap = {}; |
| 2748 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2876 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2749 parseBool(n) { | 2877 parseBool(n) { |
| 2750 if (n == "true") return true; | 2878 if (n == "true") return true; |
| 2751 if (n == "false") return false; | 2879 if (n == "false") return false; |
| 2752 if (n == null) return null; | 2880 if (n == null) return null; |
| 2753 throw new core.ArgumentError("Invalid boolean: $n"); | 2881 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2754 } | 2882 } |
| 2883 |
| 2755 if (query.length > 0) { | 2884 if (query.length > 0) { |
| 2756 for (var part in query.split("&")) { | 2885 for (var part in query.split("&")) { |
| 2757 var keyvalue = part.split("="); | 2886 var keyvalue = part.split("="); |
| 2758 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2887 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2888 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2759 } | 2889 } |
| 2760 } | 2890 } |
| 2761 | 2891 |
| 2762 | |
| 2763 var h = { | 2892 var h = { |
| 2764 "content-type" : "application/json; charset=utf-8", | 2893 "content-type": "application/json; charset=utf-8", |
| 2765 }; | 2894 }; |
| 2766 var resp = convert.JSON.encode(buildJob()); | 2895 var resp = convert.JSON.encode(buildJob()); |
| 2767 return new async.Future.value(stringResponse(200, h, resp)); | 2896 return new async.Future.value(stringResponse(200, h, resp)); |
| 2768 }), true); | 2897 }), true); |
| 2769 res.submit(arg_request, arg_projectId, arg_region).then(unittest.expectAsy
nc1(((api.Job response) { | 2898 res |
| 2899 .submit(arg_request, arg_projectId, arg_region) |
| 2900 .then(unittest.expectAsync1(((api.Job response) { |
| 2770 checkJob(response); | 2901 checkJob(response); |
| 2771 }))); | 2902 }))); |
| 2772 }); | 2903 }); |
| 2773 | |
| 2774 }); | 2904 }); |
| 2775 | 2905 |
| 2776 | |
| 2777 unittest.group("resource-ProjectsRegionsOperationsResourceApi", () { | 2906 unittest.group("resource-ProjectsRegionsOperationsResourceApi", () { |
| 2778 unittest.test("method--cancel", () { | 2907 unittest.test("method--cancel", () { |
| 2779 | |
| 2780 var mock = new HttpServerMock(); | 2908 var mock = new HttpServerMock(); |
| 2781 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p
rojects.regions.operations; | 2909 api.ProjectsRegionsOperationsResourceApi res = |
| 2910 new api.DataprocApi(mock).projects.regions.operations; |
| 2782 var arg_name = "foo"; | 2911 var arg_name = "foo"; |
| 2783 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2912 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2784 var path = (req.url).path; | 2913 var path = (req.url).path; |
| 2785 var pathOffset = 0; | 2914 var pathOffset = 0; |
| 2786 var index; | 2915 var index; |
| 2787 var subPart; | 2916 var subPart; |
| 2788 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2917 unittest.expect( |
| 2918 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2789 pathOffset += 1; | 2919 pathOffset += 1; |
| 2790 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2920 unittest.expect( |
| 2921 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| 2791 pathOffset += 3; | 2922 pathOffset += 3; |
| 2792 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2923 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2793 | 2924 |
| 2794 var query = (req.url).query; | 2925 var query = (req.url).query; |
| 2795 var queryOffset = 0; | 2926 var queryOffset = 0; |
| 2796 var queryMap = {}; | 2927 var queryMap = {}; |
| 2797 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2928 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2798 parseBool(n) { | 2929 parseBool(n) { |
| 2799 if (n == "true") return true; | 2930 if (n == "true") return true; |
| 2800 if (n == "false") return false; | 2931 if (n == "false") return false; |
| 2801 if (n == null) return null; | 2932 if (n == null) return null; |
| 2802 throw new core.ArgumentError("Invalid boolean: $n"); | 2933 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2803 } | 2934 } |
| 2935 |
| 2804 if (query.length > 0) { | 2936 if (query.length > 0) { |
| 2805 for (var part in query.split("&")) { | 2937 for (var part in query.split("&")) { |
| 2806 var keyvalue = part.split("="); | 2938 var keyvalue = part.split("="); |
| 2807 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2939 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2940 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2808 } | 2941 } |
| 2809 } | 2942 } |
| 2810 | 2943 |
| 2811 | |
| 2812 var h = { | 2944 var h = { |
| 2813 "content-type" : "application/json; charset=utf-8", | 2945 "content-type": "application/json; charset=utf-8", |
| 2814 }; | 2946 }; |
| 2815 var resp = convert.JSON.encode(buildEmpty()); | 2947 var resp = convert.JSON.encode(buildEmpty()); |
| 2816 return new async.Future.value(stringResponse(200, h, resp)); | 2948 return new async.Future.value(stringResponse(200, h, resp)); |
| 2817 }), true); | 2949 }), true); |
| 2818 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2950 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 2819 checkEmpty(response); | 2951 checkEmpty(response); |
| 2820 }))); | 2952 }))); |
| 2821 }); | 2953 }); |
| 2822 | 2954 |
| 2823 unittest.test("method--delete", () { | 2955 unittest.test("method--delete", () { |
| 2824 | |
| 2825 var mock = new HttpServerMock(); | 2956 var mock = new HttpServerMock(); |
| 2826 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p
rojects.regions.operations; | 2957 api.ProjectsRegionsOperationsResourceApi res = |
| 2958 new api.DataprocApi(mock).projects.regions.operations; |
| 2827 var arg_name = "foo"; | 2959 var arg_name = "foo"; |
| 2828 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2960 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2829 var path = (req.url).path; | 2961 var path = (req.url).path; |
| 2830 var pathOffset = 0; | 2962 var pathOffset = 0; |
| 2831 var index; | 2963 var index; |
| 2832 var subPart; | 2964 var subPart; |
| 2833 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2965 unittest.expect( |
| 2966 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2834 pathOffset += 1; | 2967 pathOffset += 1; |
| 2835 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2968 unittest.expect( |
| 2969 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| 2836 pathOffset += 3; | 2970 pathOffset += 3; |
| 2837 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2971 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2838 | 2972 |
| 2839 var query = (req.url).query; | 2973 var query = (req.url).query; |
| 2840 var queryOffset = 0; | 2974 var queryOffset = 0; |
| 2841 var queryMap = {}; | 2975 var queryMap = {}; |
| 2842 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2976 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2843 parseBool(n) { | 2977 parseBool(n) { |
| 2844 if (n == "true") return true; | 2978 if (n == "true") return true; |
| 2845 if (n == "false") return false; | 2979 if (n == "false") return false; |
| 2846 if (n == null) return null; | 2980 if (n == null) return null; |
| 2847 throw new core.ArgumentError("Invalid boolean: $n"); | 2981 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2848 } | 2982 } |
| 2983 |
| 2849 if (query.length > 0) { | 2984 if (query.length > 0) { |
| 2850 for (var part in query.split("&")) { | 2985 for (var part in query.split("&")) { |
| 2851 var keyvalue = part.split("="); | 2986 var keyvalue = part.split("="); |
| 2852 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2987 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2988 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2853 } | 2989 } |
| 2854 } | 2990 } |
| 2855 | 2991 |
| 2856 | |
| 2857 var h = { | 2992 var h = { |
| 2858 "content-type" : "application/json; charset=utf-8", | 2993 "content-type": "application/json; charset=utf-8", |
| 2859 }; | 2994 }; |
| 2860 var resp = convert.JSON.encode(buildEmpty()); | 2995 var resp = convert.JSON.encode(buildEmpty()); |
| 2861 return new async.Future.value(stringResponse(200, h, resp)); | 2996 return new async.Future.value(stringResponse(200, h, resp)); |
| 2862 }), true); | 2997 }), true); |
| 2863 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { | 2998 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { |
| 2864 checkEmpty(response); | 2999 checkEmpty(response); |
| 2865 }))); | 3000 }))); |
| 2866 }); | 3001 }); |
| 2867 | 3002 |
| 2868 unittest.test("method--get", () { | 3003 unittest.test("method--get", () { |
| 2869 | |
| 2870 var mock = new HttpServerMock(); | 3004 var mock = new HttpServerMock(); |
| 2871 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p
rojects.regions.operations; | 3005 api.ProjectsRegionsOperationsResourceApi res = |
| 3006 new api.DataprocApi(mock).projects.regions.operations; |
| 2872 var arg_name = "foo"; | 3007 var arg_name = "foo"; |
| 2873 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3008 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2874 var path = (req.url).path; | 3009 var path = (req.url).path; |
| 2875 var pathOffset = 0; | 3010 var pathOffset = 0; |
| 2876 var index; | 3011 var index; |
| 2877 var subPart; | 3012 var subPart; |
| 2878 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3013 unittest.expect( |
| 3014 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2879 pathOffset += 1; | 3015 pathOffset += 1; |
| 2880 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3016 unittest.expect( |
| 3017 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| 2881 pathOffset += 3; | 3018 pathOffset += 3; |
| 2882 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3019 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2883 | 3020 |
| 2884 var query = (req.url).query; | 3021 var query = (req.url).query; |
| 2885 var queryOffset = 0; | 3022 var queryOffset = 0; |
| 2886 var queryMap = {}; | 3023 var queryMap = {}; |
| 2887 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3024 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2888 parseBool(n) { | 3025 parseBool(n) { |
| 2889 if (n == "true") return true; | 3026 if (n == "true") return true; |
| 2890 if (n == "false") return false; | 3027 if (n == "false") return false; |
| 2891 if (n == null) return null; | 3028 if (n == null) return null; |
| 2892 throw new core.ArgumentError("Invalid boolean: $n"); | 3029 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2893 } | 3030 } |
| 3031 |
| 2894 if (query.length > 0) { | 3032 if (query.length > 0) { |
| 2895 for (var part in query.split("&")) { | 3033 for (var part in query.split("&")) { |
| 2896 var keyvalue = part.split("="); | 3034 var keyvalue = part.split("="); |
| 2897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3036 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2898 } | 3037 } |
| 2899 } | 3038 } |
| 2900 | 3039 |
| 2901 | |
| 2902 var h = { | 3040 var h = { |
| 2903 "content-type" : "application/json; charset=utf-8", | 3041 "content-type": "application/json; charset=utf-8", |
| 2904 }; | 3042 }; |
| 2905 var resp = convert.JSON.encode(buildOperation()); | 3043 var resp = convert.JSON.encode(buildOperation()); |
| 2906 return new async.Future.value(stringResponse(200, h, resp)); | 3044 return new async.Future.value(stringResponse(200, h, resp)); |
| 2907 }), true); | 3045 }), true); |
| 2908 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { | 3046 res.get(arg_name).then(unittest.expectAsync1(((api.Operation response) { |
| 2909 checkOperation(response); | 3047 checkOperation(response); |
| 2910 }))); | 3048 }))); |
| 2911 }); | 3049 }); |
| 2912 | 3050 |
| 2913 unittest.test("method--list", () { | 3051 unittest.test("method--list", () { |
| 2914 | |
| 2915 var mock = new HttpServerMock(); | 3052 var mock = new HttpServerMock(); |
| 2916 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p
rojects.regions.operations; | 3053 api.ProjectsRegionsOperationsResourceApi res = |
| 3054 new api.DataprocApi(mock).projects.regions.operations; |
| 2917 var arg_name = "foo"; | 3055 var arg_name = "foo"; |
| 2918 var arg_filter = "foo"; | |
| 2919 var arg_pageToken = "foo"; | 3056 var arg_pageToken = "foo"; |
| 2920 var arg_pageSize = 42; | 3057 var arg_pageSize = 42; |
| 3058 var arg_filter = "foo"; |
| 2921 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3059 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2922 var path = (req.url).path; | 3060 var path = (req.url).path; |
| 2923 var pathOffset = 0; | 3061 var pathOffset = 0; |
| 2924 var index; | 3062 var index; |
| 2925 var subPart; | 3063 var subPart; |
| 2926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3064 unittest.expect( |
| 3065 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2927 pathOffset += 1; | 3066 pathOffset += 1; |
| 2928 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3067 unittest.expect( |
| 3068 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
| 2929 pathOffset += 3; | 3069 pathOffset += 3; |
| 2930 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3070 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2931 | 3071 |
| 2932 var query = (req.url).query; | 3072 var query = (req.url).query; |
| 2933 var queryOffset = 0; | 3073 var queryOffset = 0; |
| 2934 var queryMap = {}; | 3074 var queryMap = {}; |
| 2935 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3075 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2936 parseBool(n) { | 3076 parseBool(n) { |
| 2937 if (n == "true") return true; | 3077 if (n == "true") return true; |
| 2938 if (n == "false") return false; | 3078 if (n == "false") return false; |
| 2939 if (n == null) return null; | 3079 if (n == null) return null; |
| 2940 throw new core.ArgumentError("Invalid boolean: $n"); | 3080 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2941 } | 3081 } |
| 3082 |
| 2942 if (query.length > 0) { | 3083 if (query.length > 0) { |
| 2943 for (var part in query.split("&")) { | 3084 for (var part in query.split("&")) { |
| 2944 var keyvalue = part.split("="); | 3085 var keyvalue = part.split("="); |
| 2945 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3086 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3087 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2946 } | 3088 } |
| 2947 } | 3089 } |
| 3090 unittest.expect( |
| 3091 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3092 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3093 unittest.equals(arg_pageSize)); |
| 2948 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 3094 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 2949 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 2950 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2951 | |
| 2952 | 3095 |
| 2953 var h = { | 3096 var h = { |
| 2954 "content-type" : "application/json; charset=utf-8", | 3097 "content-type": "application/json; charset=utf-8", |
| 2955 }; | 3098 }; |
| 2956 var resp = convert.JSON.encode(buildListOperationsResponse()); | 3099 var resp = convert.JSON.encode(buildListOperationsResponse()); |
| 2957 return new async.Future.value(stringResponse(200, h, resp)); | 3100 return new async.Future.value(stringResponse(200, h, resp)); |
| 2958 }), true); | 3101 }), true); |
| 2959 res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize:
arg_pageSize).then(unittest.expectAsync1(((api.ListOperationsResponse response)
{ | 3102 res |
| 3103 .list(arg_name, |
| 3104 pageToken: arg_pageToken, |
| 3105 pageSize: arg_pageSize, |
| 3106 filter: arg_filter) |
| 3107 .then(unittest.expectAsync1(((api.ListOperationsResponse response) { |
| 2960 checkListOperationsResponse(response); | 3108 checkListOperationsResponse(response); |
| 2961 }))); | 3109 }))); |
| 2962 }); | 3110 }); |
| 2963 | |
| 2964 }); | 3111 }); |
| 2965 | |
| 2966 | |
| 2967 } | 3112 } |
| 2968 | |
| OLD | NEW |