| OLD | NEW |
| 1 library googleapis_beta.cloudmonitoring.v2beta1.test; | 1 library googleapis_beta.cloudmonitoring.v2beta1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 checkListMetricDescriptorsRequest(api.ListMetricDescriptorsRequest o) { | 30 checkListMetricDescriptorsRequest(api.ListMetricDescriptorsRequest o) { |
| 31 buildCounterListMetricDescriptorsRequest++; | 31 buildCounterListMetricDescriptorsRequest++; |
| 32 if (buildCounterListMetricDescriptorsRequest < 3) { | 32 if (buildCounterListMetricDescriptorsRequest < 3) { |
| 33 unittest.expect(o.kind, unittest.equals('foo')); | 33 unittest.expect(o.kind, unittest.equals('foo')); |
| 34 } | 34 } |
| 35 buildCounterListMetricDescriptorsRequest--; | 35 buildCounterListMetricDescriptorsRequest--; |
| 36 } | 36 } |
| 37 | 37 |
| 38 buildUnnamed1270() { | 38 buildUnnamed1170() { |
| 39 var o = new core.List<api.MetricDescriptor>(); | 39 var o = new core.List<api.MetricDescriptor>(); |
| 40 o.add(buildMetricDescriptor()); | 40 o.add(buildMetricDescriptor()); |
| 41 o.add(buildMetricDescriptor()); | 41 o.add(buildMetricDescriptor()); |
| 42 return o; | 42 return o; |
| 43 } | 43 } |
| 44 | 44 |
| 45 checkUnnamed1270(core.List<api.MetricDescriptor> o) { | 45 checkUnnamed1170(core.List<api.MetricDescriptor> o) { |
| 46 unittest.expect(o, unittest.hasLength(2)); | 46 unittest.expect(o, unittest.hasLength(2)); |
| 47 checkMetricDescriptor(o[0]); | 47 checkMetricDescriptor(o[0]); |
| 48 checkMetricDescriptor(o[1]); | 48 checkMetricDescriptor(o[1]); |
| 49 } | 49 } |
| 50 | 50 |
| 51 core.int buildCounterListMetricDescriptorsResponse = 0; | 51 core.int buildCounterListMetricDescriptorsResponse = 0; |
| 52 buildListMetricDescriptorsResponse() { | 52 buildListMetricDescriptorsResponse() { |
| 53 var o = new api.ListMetricDescriptorsResponse(); | 53 var o = new api.ListMetricDescriptorsResponse(); |
| 54 buildCounterListMetricDescriptorsResponse++; | 54 buildCounterListMetricDescriptorsResponse++; |
| 55 if (buildCounterListMetricDescriptorsResponse < 3) { | 55 if (buildCounterListMetricDescriptorsResponse < 3) { |
| 56 o.kind = "foo"; | 56 o.kind = "foo"; |
| 57 o.metrics = buildUnnamed1270(); | 57 o.metrics = buildUnnamed1170(); |
| 58 o.nextPageToken = "foo"; | 58 o.nextPageToken = "foo"; |
| 59 } | 59 } |
| 60 buildCounterListMetricDescriptorsResponse--; | 60 buildCounterListMetricDescriptorsResponse--; |
| 61 return o; | 61 return o; |
| 62 } | 62 } |
| 63 | 63 |
| 64 checkListMetricDescriptorsResponse(api.ListMetricDescriptorsResponse o) { | 64 checkListMetricDescriptorsResponse(api.ListMetricDescriptorsResponse o) { |
| 65 buildCounterListMetricDescriptorsResponse++; | 65 buildCounterListMetricDescriptorsResponse++; |
| 66 if (buildCounterListMetricDescriptorsResponse < 3) { | 66 if (buildCounterListMetricDescriptorsResponse < 3) { |
| 67 unittest.expect(o.kind, unittest.equals('foo')); | 67 unittest.expect(o.kind, unittest.equals('foo')); |
| 68 checkUnnamed1270(o.metrics); | 68 checkUnnamed1170(o.metrics); |
| 69 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 69 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 70 } | 70 } |
| 71 buildCounterListMetricDescriptorsResponse--; | 71 buildCounterListMetricDescriptorsResponse--; |
| 72 } | 72 } |
| 73 | 73 |
| 74 core.int buildCounterListTimeseriesDescriptorsRequest = 0; | 74 core.int buildCounterListTimeseriesDescriptorsRequest = 0; |
| 75 buildListTimeseriesDescriptorsRequest() { | 75 buildListTimeseriesDescriptorsRequest() { |
| 76 var o = new api.ListTimeseriesDescriptorsRequest(); | 76 var o = new api.ListTimeseriesDescriptorsRequest(); |
| 77 buildCounterListTimeseriesDescriptorsRequest++; | 77 buildCounterListTimeseriesDescriptorsRequest++; |
| 78 if (buildCounterListTimeseriesDescriptorsRequest < 3) { | 78 if (buildCounterListTimeseriesDescriptorsRequest < 3) { |
| 79 o.kind = "foo"; | 79 o.kind = "foo"; |
| 80 } | 80 } |
| 81 buildCounterListTimeseriesDescriptorsRequest--; | 81 buildCounterListTimeseriesDescriptorsRequest--; |
| 82 return o; | 82 return o; |
| 83 } | 83 } |
| 84 | 84 |
| 85 checkListTimeseriesDescriptorsRequest(api.ListTimeseriesDescriptorsRequest o) { | 85 checkListTimeseriesDescriptorsRequest(api.ListTimeseriesDescriptorsRequest o) { |
| 86 buildCounterListTimeseriesDescriptorsRequest++; | 86 buildCounterListTimeseriesDescriptorsRequest++; |
| 87 if (buildCounterListTimeseriesDescriptorsRequest < 3) { | 87 if (buildCounterListTimeseriesDescriptorsRequest < 3) { |
| 88 unittest.expect(o.kind, unittest.equals('foo')); | 88 unittest.expect(o.kind, unittest.equals('foo')); |
| 89 } | 89 } |
| 90 buildCounterListTimeseriesDescriptorsRequest--; | 90 buildCounterListTimeseriesDescriptorsRequest--; |
| 91 } | 91 } |
| 92 | 92 |
| 93 buildUnnamed1271() { | 93 buildUnnamed1171() { |
| 94 var o = new core.List<api.TimeseriesDescriptor>(); | 94 var o = new core.List<api.TimeseriesDescriptor>(); |
| 95 o.add(buildTimeseriesDescriptor()); | 95 o.add(buildTimeseriesDescriptor()); |
| 96 o.add(buildTimeseriesDescriptor()); | 96 o.add(buildTimeseriesDescriptor()); |
| 97 return o; | 97 return o; |
| 98 } | 98 } |
| 99 | 99 |
| 100 checkUnnamed1271(core.List<api.TimeseriesDescriptor> o) { | 100 checkUnnamed1171(core.List<api.TimeseriesDescriptor> o) { |
| 101 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
| 102 checkTimeseriesDescriptor(o[0]); | 102 checkTimeseriesDescriptor(o[0]); |
| 103 checkTimeseriesDescriptor(o[1]); | 103 checkTimeseriesDescriptor(o[1]); |
| 104 } | 104 } |
| 105 | 105 |
| 106 core.int buildCounterListTimeseriesDescriptorsResponse = 0; | 106 core.int buildCounterListTimeseriesDescriptorsResponse = 0; |
| 107 buildListTimeseriesDescriptorsResponse() { | 107 buildListTimeseriesDescriptorsResponse() { |
| 108 var o = new api.ListTimeseriesDescriptorsResponse(); | 108 var o = new api.ListTimeseriesDescriptorsResponse(); |
| 109 buildCounterListTimeseriesDescriptorsResponse++; | 109 buildCounterListTimeseriesDescriptorsResponse++; |
| 110 if (buildCounterListTimeseriesDescriptorsResponse < 3) { | 110 if (buildCounterListTimeseriesDescriptorsResponse < 3) { |
| 111 o.kind = "foo"; | 111 o.kind = "foo"; |
| 112 o.nextPageToken = "foo"; | 112 o.nextPageToken = "foo"; |
| 113 o.oldest = core.DateTime.parse("2002-02-27T14:01:02"); | 113 o.oldest = core.DateTime.parse("2002-02-27T14:01:02"); |
| 114 o.timeseries = buildUnnamed1271(); | 114 o.timeseries = buildUnnamed1171(); |
| 115 o.youngest = core.DateTime.parse("2002-02-27T14:01:02"); | 115 o.youngest = core.DateTime.parse("2002-02-27T14:01:02"); |
| 116 } | 116 } |
| 117 buildCounterListTimeseriesDescriptorsResponse--; | 117 buildCounterListTimeseriesDescriptorsResponse--; |
| 118 return o; | 118 return o; |
| 119 } | 119 } |
| 120 | 120 |
| 121 checkListTimeseriesDescriptorsResponse(api.ListTimeseriesDescriptorsResponse o)
{ | 121 checkListTimeseriesDescriptorsResponse(api.ListTimeseriesDescriptorsResponse o)
{ |
| 122 buildCounterListTimeseriesDescriptorsResponse++; | 122 buildCounterListTimeseriesDescriptorsResponse++; |
| 123 if (buildCounterListTimeseriesDescriptorsResponse < 3) { | 123 if (buildCounterListTimeseriesDescriptorsResponse < 3) { |
| 124 unittest.expect(o.kind, unittest.equals('foo')); | 124 unittest.expect(o.kind, unittest.equals('foo')); |
| 125 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 125 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 126 unittest.expect(o.oldest, unittest.equals(core.DateTime.parse("2002-02-27T14
:01:02"))); | 126 unittest.expect(o.oldest, unittest.equals(core.DateTime.parse("2002-02-27T14
:01:02"))); |
| 127 checkUnnamed1271(o.timeseries); | 127 checkUnnamed1171(o.timeseries); |
| 128 unittest.expect(o.youngest, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); | 128 unittest.expect(o.youngest, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); |
| 129 } | 129 } |
| 130 buildCounterListTimeseriesDescriptorsResponse--; | 130 buildCounterListTimeseriesDescriptorsResponse--; |
| 131 } | 131 } |
| 132 | 132 |
| 133 core.int buildCounterListTimeseriesRequest = 0; | 133 core.int buildCounterListTimeseriesRequest = 0; |
| 134 buildListTimeseriesRequest() { | 134 buildListTimeseriesRequest() { |
| 135 var o = new api.ListTimeseriesRequest(); | 135 var o = new api.ListTimeseriesRequest(); |
| 136 buildCounterListTimeseriesRequest++; | 136 buildCounterListTimeseriesRequest++; |
| 137 if (buildCounterListTimeseriesRequest < 3) { | 137 if (buildCounterListTimeseriesRequest < 3) { |
| 138 o.kind = "foo"; | 138 o.kind = "foo"; |
| 139 } | 139 } |
| 140 buildCounterListTimeseriesRequest--; | 140 buildCounterListTimeseriesRequest--; |
| 141 return o; | 141 return o; |
| 142 } | 142 } |
| 143 | 143 |
| 144 checkListTimeseriesRequest(api.ListTimeseriesRequest o) { | 144 checkListTimeseriesRequest(api.ListTimeseriesRequest o) { |
| 145 buildCounterListTimeseriesRequest++; | 145 buildCounterListTimeseriesRequest++; |
| 146 if (buildCounterListTimeseriesRequest < 3) { | 146 if (buildCounterListTimeseriesRequest < 3) { |
| 147 unittest.expect(o.kind, unittest.equals('foo')); | 147 unittest.expect(o.kind, unittest.equals('foo')); |
| 148 } | 148 } |
| 149 buildCounterListTimeseriesRequest--; | 149 buildCounterListTimeseriesRequest--; |
| 150 } | 150 } |
| 151 | 151 |
| 152 buildUnnamed1272() { | 152 buildUnnamed1172() { |
| 153 var o = new core.List<api.Timeseries>(); | 153 var o = new core.List<api.Timeseries>(); |
| 154 o.add(buildTimeseries()); | 154 o.add(buildTimeseries()); |
| 155 o.add(buildTimeseries()); | 155 o.add(buildTimeseries()); |
| 156 return o; | 156 return o; |
| 157 } | 157 } |
| 158 | 158 |
| 159 checkUnnamed1272(core.List<api.Timeseries> o) { | 159 checkUnnamed1172(core.List<api.Timeseries> o) { |
| 160 unittest.expect(o, unittest.hasLength(2)); | 160 unittest.expect(o, unittest.hasLength(2)); |
| 161 checkTimeseries(o[0]); | 161 checkTimeseries(o[0]); |
| 162 checkTimeseries(o[1]); | 162 checkTimeseries(o[1]); |
| 163 } | 163 } |
| 164 | 164 |
| 165 core.int buildCounterListTimeseriesResponse = 0; | 165 core.int buildCounterListTimeseriesResponse = 0; |
| 166 buildListTimeseriesResponse() { | 166 buildListTimeseriesResponse() { |
| 167 var o = new api.ListTimeseriesResponse(); | 167 var o = new api.ListTimeseriesResponse(); |
| 168 buildCounterListTimeseriesResponse++; | 168 buildCounterListTimeseriesResponse++; |
| 169 if (buildCounterListTimeseriesResponse < 3) { | 169 if (buildCounterListTimeseriesResponse < 3) { |
| 170 o.kind = "foo"; | 170 o.kind = "foo"; |
| 171 o.nextPageToken = "foo"; | 171 o.nextPageToken = "foo"; |
| 172 o.oldest = core.DateTime.parse("2002-02-27T14:01:02"); | 172 o.oldest = core.DateTime.parse("2002-02-27T14:01:02"); |
| 173 o.timeseries = buildUnnamed1272(); | 173 o.timeseries = buildUnnamed1172(); |
| 174 o.youngest = core.DateTime.parse("2002-02-27T14:01:02"); | 174 o.youngest = core.DateTime.parse("2002-02-27T14:01:02"); |
| 175 } | 175 } |
| 176 buildCounterListTimeseriesResponse--; | 176 buildCounterListTimeseriesResponse--; |
| 177 return o; | 177 return o; |
| 178 } | 178 } |
| 179 | 179 |
| 180 checkListTimeseriesResponse(api.ListTimeseriesResponse o) { | 180 checkListTimeseriesResponse(api.ListTimeseriesResponse o) { |
| 181 buildCounterListTimeseriesResponse++; | 181 buildCounterListTimeseriesResponse++; |
| 182 if (buildCounterListTimeseriesResponse < 3) { | 182 if (buildCounterListTimeseriesResponse < 3) { |
| 183 unittest.expect(o.kind, unittest.equals('foo')); | 183 unittest.expect(o.kind, unittest.equals('foo')); |
| 184 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 184 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 185 unittest.expect(o.oldest, unittest.equals(core.DateTime.parse("2002-02-27T14
:01:02"))); | 185 unittest.expect(o.oldest, unittest.equals(core.DateTime.parse("2002-02-27T14
:01:02"))); |
| 186 checkUnnamed1272(o.timeseries); | 186 checkUnnamed1172(o.timeseries); |
| 187 unittest.expect(o.youngest, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); | 187 unittest.expect(o.youngest, unittest.equals(core.DateTime.parse("2002-02-27T
14:01:02"))); |
| 188 } | 188 } |
| 189 buildCounterListTimeseriesResponse--; | 189 buildCounterListTimeseriesResponse--; |
| 190 } | 190 } |
| 191 | 191 |
| 192 buildUnnamed1273() { | 192 buildUnnamed1173() { |
| 193 var o = new core.List<api.MetricDescriptorLabelDescriptor>(); | 193 var o = new core.List<api.MetricDescriptorLabelDescriptor>(); |
| 194 o.add(buildMetricDescriptorLabelDescriptor()); | 194 o.add(buildMetricDescriptorLabelDescriptor()); |
| 195 o.add(buildMetricDescriptorLabelDescriptor()); | 195 o.add(buildMetricDescriptorLabelDescriptor()); |
| 196 return o; | 196 return o; |
| 197 } | 197 } |
| 198 | 198 |
| 199 checkUnnamed1273(core.List<api.MetricDescriptorLabelDescriptor> o) { | 199 checkUnnamed1173(core.List<api.MetricDescriptorLabelDescriptor> o) { |
| 200 unittest.expect(o, unittest.hasLength(2)); | 200 unittest.expect(o, unittest.hasLength(2)); |
| 201 checkMetricDescriptorLabelDescriptor(o[0]); | 201 checkMetricDescriptorLabelDescriptor(o[0]); |
| 202 checkMetricDescriptorLabelDescriptor(o[1]); | 202 checkMetricDescriptorLabelDescriptor(o[1]); |
| 203 } | 203 } |
| 204 | 204 |
| 205 core.int buildCounterMetricDescriptor = 0; | 205 core.int buildCounterMetricDescriptor = 0; |
| 206 buildMetricDescriptor() { | 206 buildMetricDescriptor() { |
| 207 var o = new api.MetricDescriptor(); | 207 var o = new api.MetricDescriptor(); |
| 208 buildCounterMetricDescriptor++; | 208 buildCounterMetricDescriptor++; |
| 209 if (buildCounterMetricDescriptor < 3) { | 209 if (buildCounterMetricDescriptor < 3) { |
| 210 o.description = "foo"; | 210 o.description = "foo"; |
| 211 o.labels = buildUnnamed1273(); | 211 o.labels = buildUnnamed1173(); |
| 212 o.name = "foo"; | 212 o.name = "foo"; |
| 213 o.project = "foo"; | 213 o.project = "foo"; |
| 214 o.typeDescriptor = buildMetricDescriptorTypeDescriptor(); | 214 o.typeDescriptor = buildMetricDescriptorTypeDescriptor(); |
| 215 } | 215 } |
| 216 buildCounterMetricDescriptor--; | 216 buildCounterMetricDescriptor--; |
| 217 return o; | 217 return o; |
| 218 } | 218 } |
| 219 | 219 |
| 220 checkMetricDescriptor(api.MetricDescriptor o) { | 220 checkMetricDescriptor(api.MetricDescriptor o) { |
| 221 buildCounterMetricDescriptor++; | 221 buildCounterMetricDescriptor++; |
| 222 if (buildCounterMetricDescriptor < 3) { | 222 if (buildCounterMetricDescriptor < 3) { |
| 223 unittest.expect(o.description, unittest.equals('foo')); | 223 unittest.expect(o.description, unittest.equals('foo')); |
| 224 checkUnnamed1273(o.labels); | 224 checkUnnamed1173(o.labels); |
| 225 unittest.expect(o.name, unittest.equals('foo')); | 225 unittest.expect(o.name, unittest.equals('foo')); |
| 226 unittest.expect(o.project, unittest.equals('foo')); | 226 unittest.expect(o.project, unittest.equals('foo')); |
| 227 checkMetricDescriptorTypeDescriptor(o.typeDescriptor); | 227 checkMetricDescriptorTypeDescriptor(o.typeDescriptor); |
| 228 } | 228 } |
| 229 buildCounterMetricDescriptor--; | 229 buildCounterMetricDescriptor--; |
| 230 } | 230 } |
| 231 | 231 |
| 232 core.int buildCounterMetricDescriptorLabelDescriptor = 0; | 232 core.int buildCounterMetricDescriptorLabelDescriptor = 0; |
| 233 buildMetricDescriptorLabelDescriptor() { | 233 buildMetricDescriptorLabelDescriptor() { |
| 234 var o = new api.MetricDescriptorLabelDescriptor(); | 234 var o = new api.MetricDescriptorLabelDescriptor(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 checkPointDistribution(o.distributionValue); | 295 checkPointDistribution(o.distributionValue); |
| 296 unittest.expect(o.doubleValue, unittest.equals(42.0)); | 296 unittest.expect(o.doubleValue, unittest.equals(42.0)); |
| 297 unittest.expect(o.end, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); | 297 unittest.expect(o.end, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); |
| 298 unittest.expect(o.int64Value, unittest.equals('foo')); | 298 unittest.expect(o.int64Value, unittest.equals('foo')); |
| 299 unittest.expect(o.start, unittest.equals(core.DateTime.parse("2002-02-27T14:
01:02"))); | 299 unittest.expect(o.start, unittest.equals(core.DateTime.parse("2002-02-27T14:
01:02"))); |
| 300 unittest.expect(o.stringValue, unittest.equals('foo')); | 300 unittest.expect(o.stringValue, unittest.equals('foo')); |
| 301 } | 301 } |
| 302 buildCounterPoint--; | 302 buildCounterPoint--; |
| 303 } | 303 } |
| 304 | 304 |
| 305 buildUnnamed1274() { | 305 buildUnnamed1174() { |
| 306 var o = new core.List<api.PointDistributionBucket>(); | 306 var o = new core.List<api.PointDistributionBucket>(); |
| 307 o.add(buildPointDistributionBucket()); | 307 o.add(buildPointDistributionBucket()); |
| 308 o.add(buildPointDistributionBucket()); | 308 o.add(buildPointDistributionBucket()); |
| 309 return o; | 309 return o; |
| 310 } | 310 } |
| 311 | 311 |
| 312 checkUnnamed1274(core.List<api.PointDistributionBucket> o) { | 312 checkUnnamed1174(core.List<api.PointDistributionBucket> o) { |
| 313 unittest.expect(o, unittest.hasLength(2)); | 313 unittest.expect(o, unittest.hasLength(2)); |
| 314 checkPointDistributionBucket(o[0]); | 314 checkPointDistributionBucket(o[0]); |
| 315 checkPointDistributionBucket(o[1]); | 315 checkPointDistributionBucket(o[1]); |
| 316 } | 316 } |
| 317 | 317 |
| 318 core.int buildCounterPointDistribution = 0; | 318 core.int buildCounterPointDistribution = 0; |
| 319 buildPointDistribution() { | 319 buildPointDistribution() { |
| 320 var o = new api.PointDistribution(); | 320 var o = new api.PointDistribution(); |
| 321 buildCounterPointDistribution++; | 321 buildCounterPointDistribution++; |
| 322 if (buildCounterPointDistribution < 3) { | 322 if (buildCounterPointDistribution < 3) { |
| 323 o.buckets = buildUnnamed1274(); | 323 o.buckets = buildUnnamed1174(); |
| 324 o.overflowBucket = buildPointDistributionOverflowBucket(); | 324 o.overflowBucket = buildPointDistributionOverflowBucket(); |
| 325 o.underflowBucket = buildPointDistributionUnderflowBucket(); | 325 o.underflowBucket = buildPointDistributionUnderflowBucket(); |
| 326 } | 326 } |
| 327 buildCounterPointDistribution--; | 327 buildCounterPointDistribution--; |
| 328 return o; | 328 return o; |
| 329 } | 329 } |
| 330 | 330 |
| 331 checkPointDistribution(api.PointDistribution o) { | 331 checkPointDistribution(api.PointDistribution o) { |
| 332 buildCounterPointDistribution++; | 332 buildCounterPointDistribution++; |
| 333 if (buildCounterPointDistribution < 3) { | 333 if (buildCounterPointDistribution < 3) { |
| 334 checkUnnamed1274(o.buckets); | 334 checkUnnamed1174(o.buckets); |
| 335 checkPointDistributionOverflowBucket(o.overflowBucket); | 335 checkPointDistributionOverflowBucket(o.overflowBucket); |
| 336 checkPointDistributionUnderflowBucket(o.underflowBucket); | 336 checkPointDistributionUnderflowBucket(o.underflowBucket); |
| 337 } | 337 } |
| 338 buildCounterPointDistribution--; | 338 buildCounterPointDistribution--; |
| 339 } | 339 } |
| 340 | 340 |
| 341 core.int buildCounterPointDistributionBucket = 0; | 341 core.int buildCounterPointDistributionBucket = 0; |
| 342 buildPointDistributionBucket() { | 342 buildPointDistributionBucket() { |
| 343 var o = new api.PointDistributionBucket(); | 343 var o = new api.PointDistributionBucket(); |
| 344 buildCounterPointDistributionBucket++; | 344 buildCounterPointDistributionBucket++; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 checkPointDistributionUnderflowBucket(api.PointDistributionUnderflowBucket o) { | 397 checkPointDistributionUnderflowBucket(api.PointDistributionUnderflowBucket o) { |
| 398 buildCounterPointDistributionUnderflowBucket++; | 398 buildCounterPointDistributionUnderflowBucket++; |
| 399 if (buildCounterPointDistributionUnderflowBucket < 3) { | 399 if (buildCounterPointDistributionUnderflowBucket < 3) { |
| 400 unittest.expect(o.count, unittest.equals('foo')); | 400 unittest.expect(o.count, unittest.equals('foo')); |
| 401 unittest.expect(o.upperBound, unittest.equals(42.0)); | 401 unittest.expect(o.upperBound, unittest.equals(42.0)); |
| 402 } | 402 } |
| 403 buildCounterPointDistributionUnderflowBucket--; | 403 buildCounterPointDistributionUnderflowBucket--; |
| 404 } | 404 } |
| 405 | 405 |
| 406 buildUnnamed1275() { | 406 buildUnnamed1175() { |
| 407 var o = new core.List<api.Point>(); | 407 var o = new core.List<api.Point>(); |
| 408 o.add(buildPoint()); | 408 o.add(buildPoint()); |
| 409 o.add(buildPoint()); | 409 o.add(buildPoint()); |
| 410 return o; | 410 return o; |
| 411 } | 411 } |
| 412 | 412 |
| 413 checkUnnamed1275(core.List<api.Point> o) { | 413 checkUnnamed1175(core.List<api.Point> o) { |
| 414 unittest.expect(o, unittest.hasLength(2)); | 414 unittest.expect(o, unittest.hasLength(2)); |
| 415 checkPoint(o[0]); | 415 checkPoint(o[0]); |
| 416 checkPoint(o[1]); | 416 checkPoint(o[1]); |
| 417 } | 417 } |
| 418 | 418 |
| 419 core.int buildCounterTimeseries = 0; | 419 core.int buildCounterTimeseries = 0; |
| 420 buildTimeseries() { | 420 buildTimeseries() { |
| 421 var o = new api.Timeseries(); | 421 var o = new api.Timeseries(); |
| 422 buildCounterTimeseries++; | 422 buildCounterTimeseries++; |
| 423 if (buildCounterTimeseries < 3) { | 423 if (buildCounterTimeseries < 3) { |
| 424 o.points = buildUnnamed1275(); | 424 o.points = buildUnnamed1175(); |
| 425 o.timeseriesDesc = buildTimeseriesDescriptor(); | 425 o.timeseriesDesc = buildTimeseriesDescriptor(); |
| 426 } | 426 } |
| 427 buildCounterTimeseries--; | 427 buildCounterTimeseries--; |
| 428 return o; | 428 return o; |
| 429 } | 429 } |
| 430 | 430 |
| 431 checkTimeseries(api.Timeseries o) { | 431 checkTimeseries(api.Timeseries o) { |
| 432 buildCounterTimeseries++; | 432 buildCounterTimeseries++; |
| 433 if (buildCounterTimeseries < 3) { | 433 if (buildCounterTimeseries < 3) { |
| 434 checkUnnamed1275(o.points); | 434 checkUnnamed1175(o.points); |
| 435 checkTimeseriesDescriptor(o.timeseriesDesc); | 435 checkTimeseriesDescriptor(o.timeseriesDesc); |
| 436 } | 436 } |
| 437 buildCounterTimeseries--; | 437 buildCounterTimeseries--; |
| 438 } | 438 } |
| 439 | 439 |
| 440 buildUnnamed1276() { | 440 buildUnnamed1176() { |
| 441 var o = new core.Map<core.String, core.String>(); | 441 var o = new core.Map<core.String, core.String>(); |
| 442 o["x"] = "foo"; | 442 o["x"] = "foo"; |
| 443 o["y"] = "foo"; | 443 o["y"] = "foo"; |
| 444 return o; | 444 return o; |
| 445 } | 445 } |
| 446 | 446 |
| 447 checkUnnamed1276(core.Map<core.String, core.String> o) { | 447 checkUnnamed1176(core.Map<core.String, core.String> o) { |
| 448 unittest.expect(o, unittest.hasLength(2)); | 448 unittest.expect(o, unittest.hasLength(2)); |
| 449 unittest.expect(o["x"], unittest.equals('foo')); | 449 unittest.expect(o["x"], unittest.equals('foo')); |
| 450 unittest.expect(o["y"], unittest.equals('foo')); | 450 unittest.expect(o["y"], unittest.equals('foo')); |
| 451 } | 451 } |
| 452 | 452 |
| 453 core.int buildCounterTimeseriesDescriptor = 0; | 453 core.int buildCounterTimeseriesDescriptor = 0; |
| 454 buildTimeseriesDescriptor() { | 454 buildTimeseriesDescriptor() { |
| 455 var o = new api.TimeseriesDescriptor(); | 455 var o = new api.TimeseriesDescriptor(); |
| 456 buildCounterTimeseriesDescriptor++; | 456 buildCounterTimeseriesDescriptor++; |
| 457 if (buildCounterTimeseriesDescriptor < 3) { | 457 if (buildCounterTimeseriesDescriptor < 3) { |
| 458 o.labels = buildUnnamed1276(); | 458 o.labels = buildUnnamed1176(); |
| 459 o.metric = "foo"; | 459 o.metric = "foo"; |
| 460 o.project = "foo"; | 460 o.project = "foo"; |
| 461 } | 461 } |
| 462 buildCounterTimeseriesDescriptor--; | 462 buildCounterTimeseriesDescriptor--; |
| 463 return o; | 463 return o; |
| 464 } | 464 } |
| 465 | 465 |
| 466 checkTimeseriesDescriptor(api.TimeseriesDescriptor o) { | 466 checkTimeseriesDescriptor(api.TimeseriesDescriptor o) { |
| 467 buildCounterTimeseriesDescriptor++; | 467 buildCounterTimeseriesDescriptor++; |
| 468 if (buildCounterTimeseriesDescriptor < 3) { | 468 if (buildCounterTimeseriesDescriptor < 3) { |
| 469 checkUnnamed1276(o.labels); | 469 checkUnnamed1176(o.labels); |
| 470 unittest.expect(o.metric, unittest.equals('foo')); | 470 unittest.expect(o.metric, unittest.equals('foo')); |
| 471 unittest.expect(o.project, unittest.equals('foo')); | 471 unittest.expect(o.project, unittest.equals('foo')); |
| 472 } | 472 } |
| 473 buildCounterTimeseriesDescriptor--; | 473 buildCounterTimeseriesDescriptor--; |
| 474 } | 474 } |
| 475 | 475 |
| 476 core.int buildCounterTimeseriesDescriptorLabel = 0; | 476 core.int buildCounterTimeseriesDescriptorLabel = 0; |
| 477 buildTimeseriesDescriptorLabel() { | 477 buildTimeseriesDescriptorLabel() { |
| 478 var o = new api.TimeseriesDescriptorLabel(); | 478 var o = new api.TimeseriesDescriptorLabel(); |
| 479 buildCounterTimeseriesDescriptorLabel++; | 479 buildCounterTimeseriesDescriptorLabel++; |
| 480 if (buildCounterTimeseriesDescriptorLabel < 3) { | 480 if (buildCounterTimeseriesDescriptorLabel < 3) { |
| 481 o.key = "foo"; | 481 o.key = "foo"; |
| 482 o.value = "foo"; | 482 o.value = "foo"; |
| 483 } | 483 } |
| 484 buildCounterTimeseriesDescriptorLabel--; | 484 buildCounterTimeseriesDescriptorLabel--; |
| 485 return o; | 485 return o; |
| 486 } | 486 } |
| 487 | 487 |
| 488 checkTimeseriesDescriptorLabel(api.TimeseriesDescriptorLabel o) { | 488 checkTimeseriesDescriptorLabel(api.TimeseriesDescriptorLabel o) { |
| 489 buildCounterTimeseriesDescriptorLabel++; | 489 buildCounterTimeseriesDescriptorLabel++; |
| 490 if (buildCounterTimeseriesDescriptorLabel < 3) { | 490 if (buildCounterTimeseriesDescriptorLabel < 3) { |
| 491 unittest.expect(o.key, unittest.equals('foo')); | 491 unittest.expect(o.key, unittest.equals('foo')); |
| 492 unittest.expect(o.value, unittest.equals('foo')); | 492 unittest.expect(o.value, unittest.equals('foo')); |
| 493 } | 493 } |
| 494 buildCounterTimeseriesDescriptorLabel--; | 494 buildCounterTimeseriesDescriptorLabel--; |
| 495 } | 495 } |
| 496 | 496 |
| 497 buildUnnamed1277() { | 497 buildUnnamed1177() { |
| 498 var o = new core.List<core.String>(); | 498 var o = new core.List<core.String>(); |
| 499 o.add("foo"); | 499 o.add("foo"); |
| 500 o.add("foo"); | 500 o.add("foo"); |
| 501 return o; | 501 return o; |
| 502 } | 502 } |
| 503 | 503 |
| 504 checkUnnamed1277(core.List<core.String> o) { | 504 checkUnnamed1177(core.List<core.String> o) { |
| 505 unittest.expect(o, unittest.hasLength(2)); | 505 unittest.expect(o, unittest.hasLength(2)); |
| 506 unittest.expect(o[0], unittest.equals('foo')); | 506 unittest.expect(o[0], unittest.equals('foo')); |
| 507 unittest.expect(o[1], unittest.equals('foo')); | 507 unittest.expect(o[1], unittest.equals('foo')); |
| 508 } | 508 } |
| 509 | 509 |
| 510 buildUnnamed1278() { | 510 buildUnnamed1178() { |
| 511 var o = new core.List<core.String>(); | 511 var o = new core.List<core.String>(); |
| 512 o.add("foo"); | 512 o.add("foo"); |
| 513 o.add("foo"); | 513 o.add("foo"); |
| 514 return o; | 514 return o; |
| 515 } | 515 } |
| 516 | 516 |
| 517 checkUnnamed1278(core.List<core.String> o) { | 517 checkUnnamed1178(core.List<core.String> o) { |
| 518 unittest.expect(o, unittest.hasLength(2)); | 518 unittest.expect(o, unittest.hasLength(2)); |
| 519 unittest.expect(o[0], unittest.equals('foo')); | 519 unittest.expect(o[0], unittest.equals('foo')); |
| 520 unittest.expect(o[1], unittest.equals('foo')); | 520 unittest.expect(o[1], unittest.equals('foo')); |
| 521 } | 521 } |
| 522 | 522 |
| 523 | 523 |
| 524 main() { | 524 main() { |
| 525 unittest.group("obj-schema-ListMetricDescriptorsRequest", () { | 525 unittest.group("obj-schema-ListMetricDescriptorsRequest", () { |
| 526 unittest.test("to-json--from-json", () { | 526 unittest.test("to-json--from-json", () { |
| 527 var o = buildListMetricDescriptorsRequest(); | 527 var o = buildListMetricDescriptorsRequest(); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 unittest.group("resource-TimeseriesResourceApi", () { | 734 unittest.group("resource-TimeseriesResourceApi", () { |
| 735 unittest.test("method--list", () { | 735 unittest.test("method--list", () { |
| 736 | 736 |
| 737 var mock = new common_test.HttpServerMock(); | 737 var mock = new common_test.HttpServerMock(); |
| 738 api.TimeseriesResourceApi res = new api.CloudmonitoringApi(mock).timeserie
s; | 738 api.TimeseriesResourceApi res = new api.CloudmonitoringApi(mock).timeserie
s; |
| 739 var arg_request = buildListTimeseriesRequest(); | 739 var arg_request = buildListTimeseriesRequest(); |
| 740 var arg_project = "foo"; | 740 var arg_project = "foo"; |
| 741 var arg_metric = "foo"; | 741 var arg_metric = "foo"; |
| 742 var arg_youngest = "foo"; | 742 var arg_youngest = "foo"; |
| 743 var arg_count = 42; | 743 var arg_count = 42; |
| 744 var arg_labels = buildUnnamed1277(); | 744 var arg_labels = buildUnnamed1177(); |
| 745 var arg_oldest = "foo"; | 745 var arg_oldest = "foo"; |
| 746 var arg_pageToken = "foo"; | 746 var arg_pageToken = "foo"; |
| 747 var arg_timespan = "foo"; | 747 var arg_timespan = "foo"; |
| 748 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 748 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 749 var obj = new api.ListTimeseriesRequest.fromJson(json); | 749 var obj = new api.ListTimeseriesRequest.fromJson(json); |
| 750 checkListTimeseriesRequest(obj); | 750 checkListTimeseriesRequest(obj); |
| 751 | 751 |
| 752 var path = (req.url).path; | 752 var path = (req.url).path; |
| 753 var pathOffset = 0; | 753 var pathOffset = 0; |
| 754 var index; | 754 var index; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 unittest.group("resource-TimeseriesDescriptorsResourceApi", () { | 797 unittest.group("resource-TimeseriesDescriptorsResourceApi", () { |
| 798 unittest.test("method--list", () { | 798 unittest.test("method--list", () { |
| 799 | 799 |
| 800 var mock = new common_test.HttpServerMock(); | 800 var mock = new common_test.HttpServerMock(); |
| 801 api.TimeseriesDescriptorsResourceApi res = new api.CloudmonitoringApi(mock
).timeseriesDescriptors; | 801 api.TimeseriesDescriptorsResourceApi res = new api.CloudmonitoringApi(mock
).timeseriesDescriptors; |
| 802 var arg_request = buildListTimeseriesDescriptorsRequest(); | 802 var arg_request = buildListTimeseriesDescriptorsRequest(); |
| 803 var arg_project = "foo"; | 803 var arg_project = "foo"; |
| 804 var arg_metric = "foo"; | 804 var arg_metric = "foo"; |
| 805 var arg_youngest = "foo"; | 805 var arg_youngest = "foo"; |
| 806 var arg_count = 42; | 806 var arg_count = 42; |
| 807 var arg_labels = buildUnnamed1278(); | 807 var arg_labels = buildUnnamed1178(); |
| 808 var arg_oldest = "foo"; | 808 var arg_oldest = "foo"; |
| 809 var arg_pageToken = "foo"; | 809 var arg_pageToken = "foo"; |
| 810 var arg_timespan = "foo"; | 810 var arg_timespan = "foo"; |
| 811 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 811 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 812 var obj = new api.ListTimeseriesDescriptorsRequest.fromJson(json); | 812 var obj = new api.ListTimeseriesDescriptorsRequest.fromJson(json); |
| 813 checkListTimeseriesDescriptorsRequest(obj); | 813 checkListTimeseriesDescriptorsRequest(obj); |
| 814 | 814 |
| 815 var path = (req.url).path; | 815 var path = (req.url).path; |
| 816 var pathOffset = 0; | 816 var pathOffset = 0; |
| 817 var index; | 817 var index; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 res.list(arg_request, arg_project, arg_metric, arg_youngest, count: arg_co
unt, labels: arg_labels, oldest: arg_oldest, pageToken: arg_pageToken, timespan:
arg_timespan).then(unittest.expectAsync(((api.ListTimeseriesDescriptorsResponse
response) { | 852 res.list(arg_request, arg_project, arg_metric, arg_youngest, count: arg_co
unt, labels: arg_labels, oldest: arg_oldest, pageToken: arg_pageToken, timespan:
arg_timespan).then(unittest.expectAsync(((api.ListTimeseriesDescriptorsResponse
response) { |
| 853 checkListTimeseriesDescriptorsResponse(response); | 853 checkListTimeseriesDescriptorsResponse(response); |
| 854 }))); | 854 }))); |
| 855 }); | 855 }); |
| 856 | 856 |
| 857 }); | 857 }); |
| 858 | 858 |
| 859 | 859 |
| 860 } | 860 } |
| 861 | 861 |
| OLD | NEW |