generated new packages
diff --git a/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart b/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart new file mode 100644 index 0000000..b7c4a9c --- /dev/null +++ b/generated/googleapis_beta/test/accesscontextmanager/v1beta_test.dart
@@ -0,0 +1,1678 @@ +library googleapis_beta.accesscontextmanager.v1beta.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/accesscontextmanager/v1beta.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccessLevel = 0; +buildAccessLevel() { + var o = new api.AccessLevel(); + buildCounterAccessLevel++; + if (buildCounterAccessLevel < 3) { + o.basic = buildBasicLevel(); + o.createTime = "foo"; + o.description = "foo"; + o.name = "foo"; + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterAccessLevel--; + return o; +} + +checkAccessLevel(api.AccessLevel o) { + buildCounterAccessLevel++; + if (buildCounterAccessLevel < 3) { + checkBasicLevel(o.basic); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterAccessLevel--; +} + +core.int buildCounterAccessPolicy = 0; +buildAccessPolicy() { + var o = new api.AccessPolicy(); + buildCounterAccessPolicy++; + if (buildCounterAccessPolicy < 3) { + o.createTime = "foo"; + o.name = "foo"; + o.parent = "foo"; + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterAccessPolicy--; + return o; +} + +checkAccessPolicy(api.AccessPolicy o) { + buildCounterAccessPolicy++; + if (buildCounterAccessPolicy < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.parent, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterAccessPolicy--; +} + +buildUnnamed4630() { + var o = new core.List<api.Condition>(); + o.add(buildCondition()); + o.add(buildCondition()); + return o; +} + +checkUnnamed4630(core.List<api.Condition> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCondition(o[0]); + checkCondition(o[1]); +} + +core.int buildCounterBasicLevel = 0; +buildBasicLevel() { + var o = new api.BasicLevel(); + buildCounterBasicLevel++; + if (buildCounterBasicLevel < 3) { + o.combiningFunction = "foo"; + o.conditions = buildUnnamed4630(); + } + buildCounterBasicLevel--; + return o; +} + +checkBasicLevel(api.BasicLevel o) { + buildCounterBasicLevel++; + if (buildCounterBasicLevel < 3) { + unittest.expect(o.combiningFunction, unittest.equals('foo')); + checkUnnamed4630(o.conditions); + } + buildCounterBasicLevel--; +} + +buildUnnamed4631() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4631(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4632() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4632(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4633() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4633(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCondition = 0; +buildCondition() { + var o = new api.Condition(); + buildCounterCondition++; + if (buildCounterCondition < 3) { + o.devicePolicy = buildDevicePolicy(); + o.ipSubnetworks = buildUnnamed4631(); + o.members = buildUnnamed4632(); + o.negate = true; + o.requiredAccessLevels = buildUnnamed4633(); + } + buildCounterCondition--; + return o; +} + +checkCondition(api.Condition o) { + buildCounterCondition++; + if (buildCounterCondition < 3) { + checkDevicePolicy(o.devicePolicy); + checkUnnamed4631(o.ipSubnetworks); + checkUnnamed4632(o.members); + unittest.expect(o.negate, unittest.isTrue); + checkUnnamed4633(o.requiredAccessLevels); + } + buildCounterCondition--; +} + +buildUnnamed4634() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4634(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4635() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4635(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4636() { + var o = new core.List<api.OsConstraint>(); + o.add(buildOsConstraint()); + o.add(buildOsConstraint()); + return o; +} + +checkUnnamed4636(core.List<api.OsConstraint> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOsConstraint(o[0]); + checkOsConstraint(o[1]); +} + +core.int buildCounterDevicePolicy = 0; +buildDevicePolicy() { + var o = new api.DevicePolicy(); + buildCounterDevicePolicy++; + if (buildCounterDevicePolicy < 3) { + o.allowedDeviceManagementLevels = buildUnnamed4634(); + o.allowedEncryptionStatuses = buildUnnamed4635(); + o.osConstraints = buildUnnamed4636(); + o.requireScreenlock = true; + } + buildCounterDevicePolicy--; + return o; +} + +checkDevicePolicy(api.DevicePolicy o) { + buildCounterDevicePolicy++; + if (buildCounterDevicePolicy < 3) { + checkUnnamed4634(o.allowedDeviceManagementLevels); + checkUnnamed4635(o.allowedEncryptionStatuses); + checkUnnamed4636(o.osConstraints); + unittest.expect(o.requireScreenlock, unittest.isTrue); + } + buildCounterDevicePolicy--; +} + +buildUnnamed4637() { + var o = new core.List<api.AccessLevel>(); + o.add(buildAccessLevel()); + o.add(buildAccessLevel()); + return o; +} + +checkUnnamed4637(core.List<api.AccessLevel> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessLevel(o[0]); + checkAccessLevel(o[1]); +} + +core.int buildCounterListAccessLevelsResponse = 0; +buildListAccessLevelsResponse() { + var o = new api.ListAccessLevelsResponse(); + buildCounterListAccessLevelsResponse++; + if (buildCounterListAccessLevelsResponse < 3) { + o.accessLevels = buildUnnamed4637(); + o.nextPageToken = "foo"; + } + buildCounterListAccessLevelsResponse--; + return o; +} + +checkListAccessLevelsResponse(api.ListAccessLevelsResponse o) { + buildCounterListAccessLevelsResponse++; + if (buildCounterListAccessLevelsResponse < 3) { + checkUnnamed4637(o.accessLevels); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAccessLevelsResponse--; +} + +buildUnnamed4638() { + var o = new core.List<api.AccessPolicy>(); + o.add(buildAccessPolicy()); + o.add(buildAccessPolicy()); + return o; +} + +checkUnnamed4638(core.List<api.AccessPolicy> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessPolicy(o[0]); + checkAccessPolicy(o[1]); +} + +core.int buildCounterListAccessPoliciesResponse = 0; +buildListAccessPoliciesResponse() { + var o = new api.ListAccessPoliciesResponse(); + buildCounterListAccessPoliciesResponse++; + if (buildCounterListAccessPoliciesResponse < 3) { + o.accessPolicies = buildUnnamed4638(); + o.nextPageToken = "foo"; + } + buildCounterListAccessPoliciesResponse--; + return o; +} + +checkListAccessPoliciesResponse(api.ListAccessPoliciesResponse o) { + buildCounterListAccessPoliciesResponse++; + if (buildCounterListAccessPoliciesResponse < 3) { + checkUnnamed4638(o.accessPolicies); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAccessPoliciesResponse--; +} + +buildUnnamed4639() { + var o = new core.List<api.ServicePerimeter>(); + o.add(buildServicePerimeter()); + o.add(buildServicePerimeter()); + return o; +} + +checkUnnamed4639(core.List<api.ServicePerimeter> o) { + unittest.expect(o, unittest.hasLength(2)); + checkServicePerimeter(o[0]); + checkServicePerimeter(o[1]); +} + +core.int buildCounterListServicePerimetersResponse = 0; +buildListServicePerimetersResponse() { + var o = new api.ListServicePerimetersResponse(); + buildCounterListServicePerimetersResponse++; + if (buildCounterListServicePerimetersResponse < 3) { + o.nextPageToken = "foo"; + o.servicePerimeters = buildUnnamed4639(); + } + buildCounterListServicePerimetersResponse--; + return o; +} + +checkListServicePerimetersResponse(api.ListServicePerimetersResponse o) { + buildCounterListServicePerimetersResponse++; + if (buildCounterListServicePerimetersResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4639(o.servicePerimeters); + } + buildCounterListServicePerimetersResponse--; +} + +buildUnnamed4640() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4640(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4641() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4641(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4640(); + o.name = "foo"; + o.response = buildUnnamed4641(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4640(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4641(o.response); + } + buildCounterOperation--; +} + +core.int buildCounterOsConstraint = 0; +buildOsConstraint() { + var o = new api.OsConstraint(); + buildCounterOsConstraint++; + if (buildCounterOsConstraint < 3) { + o.minimumVersion = "foo"; + o.osType = "foo"; + } + buildCounterOsConstraint--; + return o; +} + +checkOsConstraint(api.OsConstraint o) { + buildCounterOsConstraint++; + if (buildCounterOsConstraint < 3) { + unittest.expect(o.minimumVersion, unittest.equals('foo')); + unittest.expect(o.osType, unittest.equals('foo')); + } + buildCounterOsConstraint--; +} + +core.int buildCounterServicePerimeter = 0; +buildServicePerimeter() { + var o = new api.ServicePerimeter(); + buildCounterServicePerimeter++; + if (buildCounterServicePerimeter < 3) { + o.createTime = "foo"; + o.description = "foo"; + o.name = "foo"; + o.perimeterType = "foo"; + o.status = buildServicePerimeterConfig(); + o.title = "foo"; + o.updateTime = "foo"; + } + buildCounterServicePerimeter--; + return o; +} + +checkServicePerimeter(api.ServicePerimeter o) { + buildCounterServicePerimeter++; + if (buildCounterServicePerimeter < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.perimeterType, unittest.equals('foo')); + checkServicePerimeterConfig(o.status); + unittest.expect(o.title, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterServicePerimeter--; +} + +buildUnnamed4642() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4642(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4643() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4643(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4644() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4644(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4645() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4645(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterServicePerimeterConfig = 0; +buildServicePerimeterConfig() { + var o = new api.ServicePerimeterConfig(); + buildCounterServicePerimeterConfig++; + if (buildCounterServicePerimeterConfig < 3) { + o.accessLevels = buildUnnamed4642(); + o.resources = buildUnnamed4643(); + o.restrictedServices = buildUnnamed4644(); + o.unrestrictedServices = buildUnnamed4645(); + } + buildCounterServicePerimeterConfig--; + return o; +} + +checkServicePerimeterConfig(api.ServicePerimeterConfig o) { + buildCounterServicePerimeterConfig++; + if (buildCounterServicePerimeterConfig < 3) { + checkUnnamed4642(o.accessLevels); + checkUnnamed4643(o.resources); + checkUnnamed4644(o.restrictedServices); + checkUnnamed4645(o.unrestrictedServices); + } + buildCounterServicePerimeterConfig--; +} + +buildUnnamed4646() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4646(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +buildUnnamed4647() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4646()); + o.add(buildUnnamed4646()); + return o; +} + +checkUnnamed4647(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4646(o[0]); + checkUnnamed4646(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4647(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4647(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +main() { + unittest.group("obj-schema-AccessLevel", () { + unittest.test("to-json--from-json", () { + var o = buildAccessLevel(); + var od = new api.AccessLevel.fromJson(o.toJson()); + checkAccessLevel(od); + }); + }); + + unittest.group("obj-schema-AccessPolicy", () { + unittest.test("to-json--from-json", () { + var o = buildAccessPolicy(); + var od = new api.AccessPolicy.fromJson(o.toJson()); + checkAccessPolicy(od); + }); + }); + + unittest.group("obj-schema-BasicLevel", () { + unittest.test("to-json--from-json", () { + var o = buildBasicLevel(); + var od = new api.BasicLevel.fromJson(o.toJson()); + checkBasicLevel(od); + }); + }); + + unittest.group("obj-schema-Condition", () { + unittest.test("to-json--from-json", () { + var o = buildCondition(); + var od = new api.Condition.fromJson(o.toJson()); + checkCondition(od); + }); + }); + + unittest.group("obj-schema-DevicePolicy", () { + unittest.test("to-json--from-json", () { + var o = buildDevicePolicy(); + var od = new api.DevicePolicy.fromJson(o.toJson()); + checkDevicePolicy(od); + }); + }); + + unittest.group("obj-schema-ListAccessLevelsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAccessLevelsResponse(); + var od = new api.ListAccessLevelsResponse.fromJson(o.toJson()); + checkListAccessLevelsResponse(od); + }); + }); + + unittest.group("obj-schema-ListAccessPoliciesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAccessPoliciesResponse(); + var od = new api.ListAccessPoliciesResponse.fromJson(o.toJson()); + checkListAccessPoliciesResponse(od); + }); + }); + + unittest.group("obj-schema-ListServicePerimetersResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListServicePerimetersResponse(); + var od = new api.ListServicePerimetersResponse.fromJson(o.toJson()); + checkListServicePerimetersResponse(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-OsConstraint", () { + unittest.test("to-json--from-json", () { + var o = buildOsConstraint(); + var od = new api.OsConstraint.fromJson(o.toJson()); + checkOsConstraint(od); + }); + }); + + unittest.group("obj-schema-ServicePerimeter", () { + unittest.test("to-json--from-json", () { + var o = buildServicePerimeter(); + var od = new api.ServicePerimeter.fromJson(o.toJson()); + checkServicePerimeter(od); + }); + }); + + unittest.group("obj-schema-ServicePerimeterConfig", () { + unittest.test("to-json--from-json", () { + var o = buildServicePerimeterConfig(); + var od = new api.ServicePerimeterConfig.fromJson(o.toJson()); + checkServicePerimeterConfig(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("resource-AccessPoliciesResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_request = buildAccessPolicy(); + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessPolicy.fromJson(json); + checkAccessPolicy(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 21), + unittest.equals("v1beta/accessPolicies")); + pathOffset += 21; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAccessPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAccessPolicy(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 21), + unittest.equals("v1beta/accessPolicies")); + pathOffset += 21; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAccessPoliciesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list( + parent: arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAccessPoliciesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies; + var arg_request = buildAccessPolicy(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessPolicy.fromJson(json); + checkAccessPolicy(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-AccessPoliciesAccessLevelsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_request = buildAccessLevel(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessLevel.fromJson(json); + checkAccessLevel(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_name = "foo"; + var arg_accessLevelFormat = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["accessLevelFormat"].first, + unittest.equals(arg_accessLevelFormat)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAccessLevel()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, + accessLevelFormat: arg_accessLevelFormat, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAccessLevel(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_accessLevelFormat = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["accessLevelFormat"].first, + unittest.equals(arg_accessLevelFormat)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAccessLevelsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + accessLevelFormat: arg_accessLevelFormat, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAccessLevelsResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesAccessLevelsResourceApi res = + new api.AccesscontextmanagerApi(mock).accessPolicies.accessLevels; + var arg_request = buildAccessLevel(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AccessLevel.fromJson(json); + checkAccessLevel(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-AccessPoliciesServicePerimetersResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_request = buildServicePerimeter(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ServicePerimeter.fromJson(json); + checkServicePerimeter(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildServicePerimeter()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkServicePerimeter(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListServicePerimetersResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListServicePerimetersResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.AccessPoliciesServicePerimetersResourceApi res = + new api.AccesscontextmanagerApi(mock) + .accessPolicies + .servicePerimeters; + var arg_request = buildServicePerimeter(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ServicePerimeter.fromJson(json); + checkServicePerimeter(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-OperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OperationsResourceApi res = + new api.AccesscontextmanagerApi(mock).operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart b/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart index cfc3d3e..c31d738 100644 --- a/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart +++ b/generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart
@@ -71,6 +71,48 @@ buildCounterAbsoluteDateRange--; } +core.int buildCounterAcceptProposalRequest = 0; +buildAcceptProposalRequest() { + var o = new api.AcceptProposalRequest(); + buildCounterAcceptProposalRequest++; + if (buildCounterAcceptProposalRequest < 3) { + o.proposalRevision = "foo"; + } + buildCounterAcceptProposalRequest--; + return o; +} + +checkAcceptProposalRequest(api.AcceptProposalRequest o) { + buildCounterAcceptProposalRequest++; + if (buildCounterAcceptProposalRequest < 3) { + unittest.expect(o.proposalRevision, unittest.equals('foo')); + } + buildCounterAcceptProposalRequest--; +} + +core.int buildCounterAdSize = 0; +buildAdSize() { + var o = new api.AdSize(); + buildCounterAdSize++; + if (buildCounterAdSize < 3) { + o.height = "foo"; + o.sizeType = "foo"; + o.width = "foo"; + } + buildCounterAdSize--; + return o; +} + +checkAdSize(api.AdSize o) { + buildCounterAdSize++; + if (buildCounterAdSize < 3) { + unittest.expect(o.height, unittest.equals('foo')); + unittest.expect(o.sizeType, unittest.equals('foo')); + unittest.expect(o.width, unittest.equals('foo')); + } + buildCounterAdSize--; +} + core.int buildCounterAddDealAssociationRequest = 0; buildAddDealAssociationRequest() { var o = new api.AddDealAssociationRequest(); @@ -90,14 +132,33 @@ buildCounterAddDealAssociationRequest--; } -buildUnnamed5286() { +core.int buildCounterAddNoteRequest = 0; +buildAddNoteRequest() { + var o = new api.AddNoteRequest(); + buildCounterAddNoteRequest++; + if (buildCounterAddNoteRequest < 3) { + o.note = buildNote(); + } + buildCounterAddNoteRequest--; + return o; +} + +checkAddNoteRequest(api.AddNoteRequest o) { + buildCounterAddNoteRequest++; + if (buildCounterAddNoteRequest < 3) { + checkNote(o.note); + } + buildCounterAddNoteRequest--; +} + +buildUnnamed4793() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5286(core.List<core.String> o) { +checkUnnamed4793(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -108,7 +169,7 @@ var o = new api.AppContext(); buildCounterAppContext++; if (buildCounterAppContext < 3) { - o.appTypes = buildUnnamed5286(); + o.appTypes = buildUnnamed4793(); } buildCounterAppContext--; return o; @@ -117,19 +178,19 @@ checkAppContext(api.AppContext o) { buildCounterAppContext++; if (buildCounterAppContext < 3) { - checkUnnamed5286(o.appTypes); + checkUnnamed4793(o.appTypes); } buildCounterAppContext--; } -buildUnnamed5287() { +buildUnnamed4794() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5287(core.List<core.String> o) { +checkUnnamed4794(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -140,7 +201,7 @@ var o = new api.AuctionContext(); buildCounterAuctionContext++; if (buildCounterAuctionContext < 3) { - o.auctionTypes = buildUnnamed5287(); + o.auctionTypes = buildUnnamed4794(); } buildCounterAuctionContext--; return o; @@ -149,7 +210,7 @@ checkAuctionContext(api.AuctionContext o) { buildCounterAuctionContext++; if (buildCounterAuctionContext < 3) { - checkUnnamed5287(o.auctionTypes); + checkUnnamed4794(o.auctionTypes); } buildCounterAuctionContext--; } @@ -208,6 +269,25 @@ buildCounterBidResponseWithoutBidsStatusRow--; } +core.int buildCounterBuyer = 0; +buildBuyer() { + var o = new api.Buyer(); + buildCounterBuyer++; + if (buildCounterBuyer < 3) { + o.accountId = "foo"; + } + buildCounterBuyer--; + return o; +} + +checkBuyer(api.Buyer o) { + buildCounterBuyer++; + if (buildCounterBuyer < 3) { + unittest.expect(o.accountId, unittest.equals('foo')); + } + buildCounterBuyer--; +} + core.int buildCounterCalloutStatusRow = 0; buildCalloutStatusRow() { var o = new api.CalloutStatusRow(); @@ -231,6 +311,21 @@ buildCounterCalloutStatusRow--; } +core.int buildCounterCancelNegotiationRequest = 0; +buildCancelNegotiationRequest() { + var o = new api.CancelNegotiationRequest(); + buildCounterCancelNegotiationRequest++; + if (buildCounterCancelNegotiationRequest < 3) {} + buildCounterCancelNegotiationRequest--; + return o; +} + +checkCancelNegotiationRequest(api.CancelNegotiationRequest o) { + buildCounterCancelNegotiationRequest++; + if (buildCounterCancelNegotiationRequest < 3) {} + buildCounterCancelNegotiationRequest--; +} + core.int buildCounterClient = 0; buildClient() { var o = new api.Client(); @@ -314,27 +409,63 @@ buildCounterClientUserInvitation--; } -buildUnnamed5288() { +core.int buildCounterCompleteSetupRequest = 0; +buildCompleteSetupRequest() { + var o = new api.CompleteSetupRequest(); + buildCounterCompleteSetupRequest++; + if (buildCounterCompleteSetupRequest < 3) {} + buildCounterCompleteSetupRequest--; + return o; +} + +checkCompleteSetupRequest(api.CompleteSetupRequest o) { + buildCounterCompleteSetupRequest++; + if (buildCounterCompleteSetupRequest < 3) {} + buildCounterCompleteSetupRequest--; +} + +core.int buildCounterContactInformation = 0; +buildContactInformation() { + var o = new api.ContactInformation(); + buildCounterContactInformation++; + if (buildCounterContactInformation < 3) { + o.email = "foo"; + o.name = "foo"; + } + buildCounterContactInformation--; + return o; +} + +checkContactInformation(api.ContactInformation o) { + buildCounterContactInformation++; + if (buildCounterContactInformation < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterContactInformation--; +} + +buildUnnamed4795() { var o = new core.List<api.ServingContext>(); o.add(buildServingContext()); o.add(buildServingContext()); return o; } -checkUnnamed5288(core.List<api.ServingContext> o) { +checkUnnamed4795(core.List<api.ServingContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServingContext(o[0]); checkServingContext(o[1]); } -buildUnnamed5289() { +buildUnnamed4796() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5289(core.List<core.String> o) { +checkUnnamed4796(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -345,8 +476,8 @@ var o = new api.Correction(); buildCounterCorrection++; if (buildCounterCorrection < 3) { - o.contexts = buildUnnamed5288(); - o.details = buildUnnamed5289(); + o.contexts = buildUnnamed4795(); + o.details = buildUnnamed4796(); o.type = "foo"; } buildCounterCorrection--; @@ -356,177 +487,177 @@ checkCorrection(api.Correction o) { buildCounterCorrection++; if (buildCounterCorrection < 3) { - checkUnnamed5288(o.contexts); - checkUnnamed5289(o.details); + checkUnnamed4795(o.contexts); + checkUnnamed4796(o.details); unittest.expect(o.type, unittest.equals('foo')); } buildCounterCorrection--; } -buildUnnamed5290() { +buildUnnamed4797() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5290(core.List<core.String> o) { +checkUnnamed4797(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5291() { +buildUnnamed4798() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5291(core.List<core.String> o) { +checkUnnamed4798(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5292() { +buildUnnamed4799() { var o = new core.List<api.Correction>(); o.add(buildCorrection()); o.add(buildCorrection()); return o; } -checkUnnamed5292(core.List<api.Correction> o) { +checkUnnamed4799(core.List<api.Correction> o) { unittest.expect(o, unittest.hasLength(2)); checkCorrection(o[0]); checkCorrection(o[1]); } -buildUnnamed5293() { +buildUnnamed4800() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5293(core.List<core.String> o) { +checkUnnamed4800(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5294() { +buildUnnamed4801() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5294(core.List<core.String> o) { +checkUnnamed4801(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5295() { +buildUnnamed4802() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5295(core.List<core.String> o) { +checkUnnamed4802(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5296() { +buildUnnamed4803() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5296(core.List<core.String> o) { +checkUnnamed4803(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5297() { +buildUnnamed4804() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5297(core.List<core.int> o) { +checkUnnamed4804(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); } -buildUnnamed5298() { +buildUnnamed4805() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5298(core.List<core.int> o) { +checkUnnamed4805(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); } -buildUnnamed5299() { +buildUnnamed4806() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5299(core.List<core.String> o) { +checkUnnamed4806(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5300() { +buildUnnamed4807() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5300(core.List<core.String> o) { +checkUnnamed4807(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5301() { +buildUnnamed4808() { var o = new core.List<api.ServingRestriction>(); o.add(buildServingRestriction()); o.add(buildServingRestriction()); return o; } -checkUnnamed5301(core.List<api.ServingRestriction> o) { +checkUnnamed4808(core.List<api.ServingRestriction> o) { unittest.expect(o, unittest.hasLength(2)); checkServingRestriction(o[0]); checkServingRestriction(o[1]); } -buildUnnamed5302() { +buildUnnamed4809() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5302(core.List<core.int> o) { +checkUnnamed4809(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -542,25 +673,25 @@ o.advertiserName = "foo"; o.agencyId = "foo"; o.apiUpdateTime = "foo"; - o.attributes = buildUnnamed5290(); - o.clickThroughUrls = buildUnnamed5291(); - o.corrections = buildUnnamed5292(); + o.attributes = buildUnnamed4797(); + o.clickThroughUrls = buildUnnamed4798(); + o.corrections = buildUnnamed4799(); o.creativeId = "foo"; o.dealsStatus = "foo"; - o.declaredClickThroughUrls = buildUnnamed5293(); - o.detectedAdvertiserIds = buildUnnamed5294(); - o.detectedDomains = buildUnnamed5295(); - o.detectedLanguages = buildUnnamed5296(); - o.detectedProductCategories = buildUnnamed5297(); - o.detectedSensitiveCategories = buildUnnamed5298(); + o.declaredClickThroughUrls = buildUnnamed4800(); + o.detectedAdvertiserIds = buildUnnamed4801(); + o.detectedDomains = buildUnnamed4802(); + o.detectedLanguages = buildUnnamed4803(); + o.detectedProductCategories = buildUnnamed4804(); + o.detectedSensitiveCategories = buildUnnamed4805(); o.filteringStats = buildFilteringStats(); o.html = buildHtmlContent(); - o.impressionTrackingUrls = buildUnnamed5299(); + o.impressionTrackingUrls = buildUnnamed4806(); o.native = buildNativeContent(); o.openAuctionStatus = "foo"; - o.restrictedCategories = buildUnnamed5300(); - o.servingRestrictions = buildUnnamed5301(); - o.vendorIds = buildUnnamed5302(); + o.restrictedCategories = buildUnnamed4807(); + o.servingRestrictions = buildUnnamed4808(); + o.vendorIds = buildUnnamed4809(); o.version = 42; o.video = buildVideoContent(); } @@ -576,25 +707,25 @@ unittest.expect(o.advertiserName, unittest.equals('foo')); unittest.expect(o.agencyId, unittest.equals('foo')); unittest.expect(o.apiUpdateTime, unittest.equals('foo')); - checkUnnamed5290(o.attributes); - checkUnnamed5291(o.clickThroughUrls); - checkUnnamed5292(o.corrections); + checkUnnamed4797(o.attributes); + checkUnnamed4798(o.clickThroughUrls); + checkUnnamed4799(o.corrections); unittest.expect(o.creativeId, unittest.equals('foo')); unittest.expect(o.dealsStatus, unittest.equals('foo')); - checkUnnamed5293(o.declaredClickThroughUrls); - checkUnnamed5294(o.detectedAdvertiserIds); - checkUnnamed5295(o.detectedDomains); - checkUnnamed5296(o.detectedLanguages); - checkUnnamed5297(o.detectedProductCategories); - checkUnnamed5298(o.detectedSensitiveCategories); + checkUnnamed4800(o.declaredClickThroughUrls); + checkUnnamed4801(o.detectedAdvertiserIds); + checkUnnamed4802(o.detectedDomains); + checkUnnamed4803(o.detectedLanguages); + checkUnnamed4804(o.detectedProductCategories); + checkUnnamed4805(o.detectedSensitiveCategories); checkFilteringStats(o.filteringStats); checkHtmlContent(o.html); - checkUnnamed5299(o.impressionTrackingUrls); + checkUnnamed4806(o.impressionTrackingUrls); checkNativeContent(o.native); unittest.expect(o.openAuctionStatus, unittest.equals('foo')); - checkUnnamed5300(o.restrictedCategories); - checkUnnamed5301(o.servingRestrictions); - checkUnnamed5302(o.vendorIds); + checkUnnamed4807(o.restrictedCategories); + checkUnnamed4808(o.servingRestrictions); + checkUnnamed4809(o.vendorIds); unittest.expect(o.version, unittest.equals(42)); checkVideoContent(o.video); } @@ -624,6 +755,131 @@ buildCounterCreativeDealAssociation--; } +buildUnnamed4810() { + var o = new core.List<api.CreativeSpecification>(); + o.add(buildCreativeSpecification()); + o.add(buildCreativeSpecification()); + return o; +} + +checkUnnamed4810(core.List<api.CreativeSpecification> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCreativeSpecification(o[0]); + checkCreativeSpecification(o[1]); +} + +core.int buildCounterCreativeRestrictions = 0; +buildCreativeRestrictions() { + var o = new api.CreativeRestrictions(); + buildCounterCreativeRestrictions++; + if (buildCounterCreativeRestrictions < 3) { + o.creativeFormat = "foo"; + o.creativeSpecifications = buildUnnamed4810(); + o.skippableAdType = "foo"; + } + buildCounterCreativeRestrictions--; + return o; +} + +checkCreativeRestrictions(api.CreativeRestrictions o) { + buildCounterCreativeRestrictions++; + if (buildCounterCreativeRestrictions < 3) { + unittest.expect(o.creativeFormat, unittest.equals('foo')); + checkUnnamed4810(o.creativeSpecifications); + unittest.expect(o.skippableAdType, unittest.equals('foo')); + } + buildCounterCreativeRestrictions--; +} + +buildUnnamed4811() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4811(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4812() { + var o = new core.List<api.Size>(); + o.add(buildSize()); + o.add(buildSize()); + return o; +} + +checkUnnamed4812(core.List<api.Size> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSize(o[0]); + checkSize(o[1]); +} + +core.int buildCounterCreativeSize = 0; +buildCreativeSize() { + var o = new api.CreativeSize(); + buildCounterCreativeSize++; + if (buildCounterCreativeSize < 3) { + o.allowedFormats = buildUnnamed4811(); + o.companionSizes = buildUnnamed4812(); + o.creativeSizeType = "foo"; + o.nativeTemplate = "foo"; + o.size = buildSize(); + o.skippableAdType = "foo"; + } + buildCounterCreativeSize--; + return o; +} + +checkCreativeSize(api.CreativeSize o) { + buildCounterCreativeSize++; + if (buildCounterCreativeSize < 3) { + checkUnnamed4811(o.allowedFormats); + checkUnnamed4812(o.companionSizes); + unittest.expect(o.creativeSizeType, unittest.equals('foo')); + unittest.expect(o.nativeTemplate, unittest.equals('foo')); + checkSize(o.size); + unittest.expect(o.skippableAdType, unittest.equals('foo')); + } + buildCounterCreativeSize--; +} + +buildUnnamed4813() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4813(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +core.int buildCounterCreativeSpecification = 0; +buildCreativeSpecification() { + var o = new api.CreativeSpecification(); + buildCounterCreativeSpecification++; + if (buildCounterCreativeSpecification < 3) { + o.creativeCompanionSizes = buildUnnamed4813(); + o.creativeSize = buildAdSize(); + } + buildCounterCreativeSpecification--; + return o; +} + +checkCreativeSpecification(api.CreativeSpecification o) { + buildCounterCreativeSpecification++; + if (buildCounterCreativeSpecification < 3) { + checkUnnamed4813(o.creativeCompanionSizes); + checkAdSize(o.creativeSize); + } + buildCounterCreativeSpecification--; +} + core.int buildCounterCreativeStatusRow = 0; buildCreativeStatusRow() { var o = new api.CreativeStatusRow(); @@ -647,6 +903,53 @@ buildCounterCreativeStatusRow--; } +buildUnnamed4814() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4814(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4815() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4815(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCriteriaTargeting = 0; +buildCriteriaTargeting() { + var o = new api.CriteriaTargeting(); + buildCounterCriteriaTargeting++; + if (buildCounterCriteriaTargeting < 3) { + o.excludedCriteriaIds = buildUnnamed4814(); + o.targetedCriteriaIds = buildUnnamed4815(); + } + buildCounterCriteriaTargeting--; + return o; +} + +checkCriteriaTargeting(api.CriteriaTargeting o) { + buildCounterCriteriaTargeting++; + if (buildCounterCriteriaTargeting < 3) { + checkUnnamed4814(o.excludedCriteriaIds); + checkUnnamed4815(o.targetedCriteriaIds); + } + buildCounterCriteriaTargeting--; +} + core.int buildCounterDate = 0; buildDate() { var o = new api.Date(); @@ -670,14 +973,279 @@ buildCounterDate--; } -buildUnnamed5303() { +core.int buildCounterDayPart = 0; +buildDayPart() { + var o = new api.DayPart(); + buildCounterDayPart++; + if (buildCounterDayPart < 3) { + o.dayOfWeek = "foo"; + o.endTime = buildTimeOfDay(); + o.startTime = buildTimeOfDay(); + } + buildCounterDayPart--; + return o; +} + +checkDayPart(api.DayPart o) { + buildCounterDayPart++; + if (buildCounterDayPart < 3) { + unittest.expect(o.dayOfWeek, unittest.equals('foo')); + checkTimeOfDay(o.endTime); + checkTimeOfDay(o.startTime); + } + buildCounterDayPart--; +} + +buildUnnamed4816() { + var o = new core.List<api.DayPart>(); + o.add(buildDayPart()); + o.add(buildDayPart()); + return o; +} + +checkUnnamed4816(core.List<api.DayPart> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDayPart(o[0]); + checkDayPart(o[1]); +} + +core.int buildCounterDayPartTargeting = 0; +buildDayPartTargeting() { + var o = new api.DayPartTargeting(); + buildCounterDayPartTargeting++; + if (buildCounterDayPartTargeting < 3) { + o.dayParts = buildUnnamed4816(); + o.timeZoneType = "foo"; + } + buildCounterDayPartTargeting--; + return o; +} + +checkDayPartTargeting(api.DayPartTargeting o) { + buildCounterDayPartTargeting++; + if (buildCounterDayPartTargeting < 3) { + checkUnnamed4816(o.dayParts); + unittest.expect(o.timeZoneType, unittest.equals('foo')); + } + buildCounterDayPartTargeting--; +} + +buildUnnamed4817() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4817(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4818() { + var o = new core.List<api.TargetingCriteria>(); + o.add(buildTargetingCriteria()); + o.add(buildTargetingCriteria()); + return o; +} + +checkUnnamed4818(core.List<api.TargetingCriteria> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingCriteria(o[0]); + checkTargetingCriteria(o[1]); +} + +core.int buildCounterDeal = 0; +buildDeal() { + var o = new api.Deal(); + buildCounterDeal++; + if (buildCounterDeal < 3) { + o.availableEndTime = "foo"; + o.availableStartTime = "foo"; + o.buyerPrivateData = buildPrivateData(); + o.createProductId = "foo"; + o.createProductRevision = "foo"; + o.createTime = "foo"; + o.creativePreApprovalPolicy = "foo"; + o.creativeRestrictions = buildCreativeRestrictions(); + o.creativeSafeFrameCompatibility = "foo"; + o.dealId = "foo"; + o.dealServingMetadata = buildDealServingMetadata(); + o.dealTerms = buildDealTerms(); + o.deliveryControl = buildDeliveryControl(); + o.description = "foo"; + o.displayName = "foo"; + o.externalDealId = "foo"; + o.isSetupComplete = true; + o.programmaticCreativeSource = "foo"; + o.proposalId = "foo"; + o.sellerContacts = buildUnnamed4817(); + o.syndicationProduct = "foo"; + o.targeting = buildMarketplaceTargeting(); + o.targetingCriterion = buildUnnamed4818(); + o.updateTime = "foo"; + o.webPropertyCode = "foo"; + } + buildCounterDeal--; + return o; +} + +checkDeal(api.Deal o) { + buildCounterDeal++; + if (buildCounterDeal < 3) { + unittest.expect(o.availableEndTime, unittest.equals('foo')); + unittest.expect(o.availableStartTime, unittest.equals('foo')); + checkPrivateData(o.buyerPrivateData); + unittest.expect(o.createProductId, unittest.equals('foo')); + unittest.expect(o.createProductRevision, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creativePreApprovalPolicy, unittest.equals('foo')); + checkCreativeRestrictions(o.creativeRestrictions); + unittest.expect(o.creativeSafeFrameCompatibility, unittest.equals('foo')); + unittest.expect(o.dealId, unittest.equals('foo')); + checkDealServingMetadata(o.dealServingMetadata); + checkDealTerms(o.dealTerms); + checkDeliveryControl(o.deliveryControl); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.externalDealId, unittest.equals('foo')); + unittest.expect(o.isSetupComplete, unittest.isTrue); + unittest.expect(o.programmaticCreativeSource, unittest.equals('foo')); + unittest.expect(o.proposalId, unittest.equals('foo')); + checkUnnamed4817(o.sellerContacts); + unittest.expect(o.syndicationProduct, unittest.equals('foo')); + checkMarketplaceTargeting(o.targeting); + checkUnnamed4818(o.targetingCriterion); + unittest.expect(o.updateTime, unittest.equals('foo')); + unittest.expect(o.webPropertyCode, unittest.equals('foo')); + } + buildCounterDeal--; +} + +core.int buildCounterDealPauseStatus = 0; +buildDealPauseStatus() { + var o = new api.DealPauseStatus(); + buildCounterDealPauseStatus++; + if (buildCounterDealPauseStatus < 3) { + o.buyerPauseReason = "foo"; + o.firstPausedBy = "foo"; + o.hasBuyerPaused = true; + o.hasSellerPaused = true; + o.sellerPauseReason = "foo"; + } + buildCounterDealPauseStatus--; + return o; +} + +checkDealPauseStatus(api.DealPauseStatus o) { + buildCounterDealPauseStatus++; + if (buildCounterDealPauseStatus < 3) { + unittest.expect(o.buyerPauseReason, unittest.equals('foo')); + unittest.expect(o.firstPausedBy, unittest.equals('foo')); + unittest.expect(o.hasBuyerPaused, unittest.isTrue); + unittest.expect(o.hasSellerPaused, unittest.isTrue); + unittest.expect(o.sellerPauseReason, unittest.equals('foo')); + } + buildCounterDealPauseStatus--; +} + +core.int buildCounterDealServingMetadata = 0; +buildDealServingMetadata() { + var o = new api.DealServingMetadata(); + buildCounterDealServingMetadata++; + if (buildCounterDealServingMetadata < 3) { + o.dealPauseStatus = buildDealPauseStatus(); + } + buildCounterDealServingMetadata--; + return o; +} + +checkDealServingMetadata(api.DealServingMetadata o) { + buildCounterDealServingMetadata++; + if (buildCounterDealServingMetadata < 3) { + checkDealPauseStatus(o.dealPauseStatus); + } + buildCounterDealServingMetadata--; +} + +core.int buildCounterDealTerms = 0; +buildDealTerms() { + var o = new api.DealTerms(); + buildCounterDealTerms++; + if (buildCounterDealTerms < 3) { + o.brandingType = "foo"; + o.description = "foo"; + o.estimatedGrossSpend = buildPrice(); + o.estimatedImpressionsPerDay = "foo"; + o.guaranteedFixedPriceTerms = buildGuaranteedFixedPriceTerms(); + o.nonGuaranteedAuctionTerms = buildNonGuaranteedAuctionTerms(); + o.nonGuaranteedFixedPriceTerms = buildNonGuaranteedFixedPriceTerms(); + o.sellerTimeZone = "foo"; + } + buildCounterDealTerms--; + return o; +} + +checkDealTerms(api.DealTerms o) { + buildCounterDealTerms++; + if (buildCounterDealTerms < 3) { + unittest.expect(o.brandingType, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkPrice(o.estimatedGrossSpend); + unittest.expect(o.estimatedImpressionsPerDay, unittest.equals('foo')); + checkGuaranteedFixedPriceTerms(o.guaranteedFixedPriceTerms); + checkNonGuaranteedAuctionTerms(o.nonGuaranteedAuctionTerms); + checkNonGuaranteedFixedPriceTerms(o.nonGuaranteedFixedPriceTerms); + unittest.expect(o.sellerTimeZone, unittest.equals('foo')); + } + buildCounterDealTerms--; +} + +buildUnnamed4819() { + var o = new core.List<api.FrequencyCap>(); + o.add(buildFrequencyCap()); + o.add(buildFrequencyCap()); + return o; +} + +checkUnnamed4819(core.List<api.FrequencyCap> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFrequencyCap(o[0]); + checkFrequencyCap(o[1]); +} + +core.int buildCounterDeliveryControl = 0; +buildDeliveryControl() { + var o = new api.DeliveryControl(); + buildCounterDeliveryControl++; + if (buildCounterDeliveryControl < 3) { + o.creativeBlockingLevel = "foo"; + o.deliveryRateType = "foo"; + o.frequencyCaps = buildUnnamed4819(); + } + buildCounterDeliveryControl--; + return o; +} + +checkDeliveryControl(api.DeliveryControl o) { + buildCounterDeliveryControl++; + if (buildCounterDeliveryControl < 3) { + unittest.expect(o.creativeBlockingLevel, unittest.equals('foo')); + unittest.expect(o.deliveryRateType, unittest.equals('foo')); + checkUnnamed4819(o.frequencyCaps); + } + buildCounterDeliveryControl--; +} + +buildUnnamed4820() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5303(core.List<core.String> o) { +checkUnnamed4820(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -688,7 +1256,7 @@ var o = new api.Disapproval(); buildCounterDisapproval++; if (buildCounterDisapproval < 3) { - o.details = buildUnnamed5303(); + o.details = buildUnnamed4820(); o.reason = "foo"; } buildCounterDisapproval--; @@ -698,7 +1266,7 @@ checkDisapproval(api.Disapproval o) { buildCounterDisapproval++; if (buildCounterDisapproval < 3) { - checkUnnamed5303(o.details); + checkUnnamed4820(o.details); unittest.expect(o.reason, unittest.equals('foo')); } buildCounterDisapproval--; @@ -719,53 +1287,66 @@ buildCounterEmpty--; } -buildUnnamed5304() { +buildUnnamed4821() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5304(core.List<core.String> o) { +checkUnnamed4821(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5305() { +buildUnnamed4822() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5305(core.List<core.String> o) { +checkUnnamed4822(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5306() { +buildUnnamed4823() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5306(core.List<core.String> o) { +checkUnnamed4823(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5307() { +buildUnnamed4824() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4824(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4825() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5307(core.List<core.int> o) { +checkUnnamed4825(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -777,16 +1358,17 @@ buildCounterFilterSet++; if (buildCounterFilterSet < 3) { o.absoluteDateRange = buildAbsoluteDateRange(); + o.breakdownDimensions = buildUnnamed4821(); o.creativeId = "foo"; o.dealId = "foo"; o.environment = "foo"; - o.formats = buildUnnamed5304(); + o.formats = buildUnnamed4822(); o.name = "foo"; - o.platforms = buildUnnamed5305(); - o.publisherIdentifiers = buildUnnamed5306(); + o.platforms = buildUnnamed4823(); + o.publisherIdentifiers = buildUnnamed4824(); o.realtimeTimeRange = buildRealtimeTimeRange(); o.relativeDateRange = buildRelativeDateRange(); - o.sellerNetworkIds = buildUnnamed5307(); + o.sellerNetworkIds = buildUnnamed4825(); o.timeSeriesGranularity = "foo"; } buildCounterFilterSet--; @@ -797,16 +1379,17 @@ buildCounterFilterSet++; if (buildCounterFilterSet < 3) { checkAbsoluteDateRange(o.absoluteDateRange); + checkUnnamed4821(o.breakdownDimensions); unittest.expect(o.creativeId, unittest.equals('foo')); unittest.expect(o.dealId, unittest.equals('foo')); unittest.expect(o.environment, unittest.equals('foo')); - checkUnnamed5304(o.formats); + checkUnnamed4822(o.formats); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5305(o.platforms); - checkUnnamed5306(o.publisherIdentifiers); + checkUnnamed4823(o.platforms); + checkUnnamed4824(o.publisherIdentifiers); checkRealtimeTimeRange(o.realtimeTimeRange); checkRelativeDateRange(o.relativeDateRange); - checkUnnamed5307(o.sellerNetworkIds); + checkUnnamed4825(o.sellerNetworkIds); unittest.expect(o.timeSeriesGranularity, unittest.equals('foo')); } buildCounterFilterSet--; @@ -858,14 +1441,14 @@ buildCounterFilteredBidDetailRow--; } -buildUnnamed5308() { +buildUnnamed4826() { var o = new core.List<api.Reason>(); o.add(buildReason()); o.add(buildReason()); return o; } -checkUnnamed5308(core.List<api.Reason> o) { +checkUnnamed4826(core.List<api.Reason> o) { unittest.expect(o, unittest.hasLength(2)); checkReason(o[0]); checkReason(o[1]); @@ -877,7 +1460,7 @@ buildCounterFilteringStats++; if (buildCounterFilteringStats < 3) { o.date = buildDate(); - o.reasons = buildUnnamed5308(); + o.reasons = buildUnnamed4826(); } buildCounterFilteringStats--; return o; @@ -887,11 +1470,120 @@ buildCounterFilteringStats++; if (buildCounterFilteringStats < 3) { checkDate(o.date); - checkUnnamed5308(o.reasons); + checkUnnamed4826(o.reasons); } buildCounterFilteringStats--; } +buildUnnamed4827() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4827(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4828() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4828(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterFirstPartyMobileApplicationTargeting = 0; +buildFirstPartyMobileApplicationTargeting() { + var o = new api.FirstPartyMobileApplicationTargeting(); + buildCounterFirstPartyMobileApplicationTargeting++; + if (buildCounterFirstPartyMobileApplicationTargeting < 3) { + o.excludedAppIds = buildUnnamed4827(); + o.targetedAppIds = buildUnnamed4828(); + } + buildCounterFirstPartyMobileApplicationTargeting--; + return o; +} + +checkFirstPartyMobileApplicationTargeting( + api.FirstPartyMobileApplicationTargeting o) { + buildCounterFirstPartyMobileApplicationTargeting++; + if (buildCounterFirstPartyMobileApplicationTargeting < 3) { + checkUnnamed4827(o.excludedAppIds); + checkUnnamed4828(o.targetedAppIds); + } + buildCounterFirstPartyMobileApplicationTargeting--; +} + +core.int buildCounterFrequencyCap = 0; +buildFrequencyCap() { + var o = new api.FrequencyCap(); + buildCounterFrequencyCap++; + if (buildCounterFrequencyCap < 3) { + o.maxImpressions = 42; + o.numTimeUnits = 42; + o.timeUnitType = "foo"; + } + buildCounterFrequencyCap--; + return o; +} + +checkFrequencyCap(api.FrequencyCap o) { + buildCounterFrequencyCap++; + if (buildCounterFrequencyCap < 3) { + unittest.expect(o.maxImpressions, unittest.equals(42)); + unittest.expect(o.numTimeUnits, unittest.equals(42)); + unittest.expect(o.timeUnitType, unittest.equals('foo')); + } + buildCounterFrequencyCap--; +} + +buildUnnamed4829() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4829(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterGuaranteedFixedPriceTerms = 0; +buildGuaranteedFixedPriceTerms() { + var o = new api.GuaranteedFixedPriceTerms(); + buildCounterGuaranteedFixedPriceTerms++; + if (buildCounterGuaranteedFixedPriceTerms < 3) { + o.fixedPrices = buildUnnamed4829(); + o.guaranteedImpressions = "foo"; + o.guaranteedLooks = "foo"; + o.minimumDailyLooks = "foo"; + } + buildCounterGuaranteedFixedPriceTerms--; + return o; +} + +checkGuaranteedFixedPriceTerms(api.GuaranteedFixedPriceTerms o) { + buildCounterGuaranteedFixedPriceTerms++; + if (buildCounterGuaranteedFixedPriceTerms < 3) { + checkUnnamed4829(o.fixedPrices); + unittest.expect(o.guaranteedImpressions, unittest.equals('foo')); + unittest.expect(o.guaranteedLooks, unittest.equals('foo')); + unittest.expect(o.minimumDailyLooks, unittest.equals('foo')); + } + buildCounterGuaranteedFixedPriceTerms--; +} + core.int buildCounterHtmlContent = 0; buildHtmlContent() { var o = new api.HtmlContent(); @@ -967,14 +1659,61 @@ buildCounterImpressionMetricsRow--; } -buildUnnamed5309() { +buildUnnamed4830() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4830(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +buildUnnamed4831() { + var o = new core.List<api.AdSize>(); + o.add(buildAdSize()); + o.add(buildAdSize()); + return o; +} + +checkUnnamed4831(core.List<api.AdSize> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAdSize(o[0]); + checkAdSize(o[1]); +} + +core.int buildCounterInventorySizeTargeting = 0; +buildInventorySizeTargeting() { + var o = new api.InventorySizeTargeting(); + buildCounterInventorySizeTargeting++; + if (buildCounterInventorySizeTargeting < 3) { + o.excludedInventorySizes = buildUnnamed4830(); + o.targetedInventorySizes = buildUnnamed4831(); + } + buildCounterInventorySizeTargeting--; + return o; +} + +checkInventorySizeTargeting(api.InventorySizeTargeting o) { + buildCounterInventorySizeTargeting++; + if (buildCounterInventorySizeTargeting < 3) { + checkUnnamed4830(o.excludedInventorySizes); + checkUnnamed4831(o.targetedInventorySizes); + } + buildCounterInventorySizeTargeting--; +} + +buildUnnamed4832() { var o = new core.List<api.BidMetricsRow>(); o.add(buildBidMetricsRow()); o.add(buildBidMetricsRow()); return o; } -checkUnnamed5309(core.List<api.BidMetricsRow> o) { +checkUnnamed4832(core.List<api.BidMetricsRow> o) { unittest.expect(o, unittest.hasLength(2)); checkBidMetricsRow(o[0]); checkBidMetricsRow(o[1]); @@ -985,7 +1724,7 @@ var o = new api.ListBidMetricsResponse(); buildCounterListBidMetricsResponse++; if (buildCounterListBidMetricsResponse < 3) { - o.bidMetricsRows = buildUnnamed5309(); + o.bidMetricsRows = buildUnnamed4832(); o.nextPageToken = "foo"; } buildCounterListBidMetricsResponse--; @@ -995,20 +1734,20 @@ checkListBidMetricsResponse(api.ListBidMetricsResponse o) { buildCounterListBidMetricsResponse++; if (buildCounterListBidMetricsResponse < 3) { - checkUnnamed5309(o.bidMetricsRows); + checkUnnamed4832(o.bidMetricsRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidMetricsResponse--; } -buildUnnamed5310() { +buildUnnamed4833() { var o = new core.List<api.CalloutStatusRow>(); o.add(buildCalloutStatusRow()); o.add(buildCalloutStatusRow()); return o; } -checkUnnamed5310(core.List<api.CalloutStatusRow> o) { +checkUnnamed4833(core.List<api.CalloutStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCalloutStatusRow(o[0]); checkCalloutStatusRow(o[1]); @@ -1019,7 +1758,7 @@ var o = new api.ListBidResponseErrorsResponse(); buildCounterListBidResponseErrorsResponse++; if (buildCounterListBidResponseErrorsResponse < 3) { - o.calloutStatusRows = buildUnnamed5310(); + o.calloutStatusRows = buildUnnamed4833(); o.nextPageToken = "foo"; } buildCounterListBidResponseErrorsResponse--; @@ -1029,20 +1768,20 @@ checkListBidResponseErrorsResponse(api.ListBidResponseErrorsResponse o) { buildCounterListBidResponseErrorsResponse++; if (buildCounterListBidResponseErrorsResponse < 3) { - checkUnnamed5310(o.calloutStatusRows); + checkUnnamed4833(o.calloutStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidResponseErrorsResponse--; } -buildUnnamed5311() { +buildUnnamed4834() { var o = new core.List<api.BidResponseWithoutBidsStatusRow>(); o.add(buildBidResponseWithoutBidsStatusRow()); o.add(buildBidResponseWithoutBidsStatusRow()); return o; } -checkUnnamed5311(core.List<api.BidResponseWithoutBidsStatusRow> o) { +checkUnnamed4834(core.List<api.BidResponseWithoutBidsStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkBidResponseWithoutBidsStatusRow(o[0]); checkBidResponseWithoutBidsStatusRow(o[1]); @@ -1053,7 +1792,7 @@ var o = new api.ListBidResponsesWithoutBidsResponse(); buildCounterListBidResponsesWithoutBidsResponse++; if (buildCounterListBidResponsesWithoutBidsResponse < 3) { - o.bidResponseWithoutBidsStatusRows = buildUnnamed5311(); + o.bidResponseWithoutBidsStatusRows = buildUnnamed4834(); o.nextPageToken = "foo"; } buildCounterListBidResponsesWithoutBidsResponse--; @@ -1064,20 +1803,20 @@ api.ListBidResponsesWithoutBidsResponse o) { buildCounterListBidResponsesWithoutBidsResponse++; if (buildCounterListBidResponsesWithoutBidsResponse < 3) { - checkUnnamed5311(o.bidResponseWithoutBidsStatusRows); + checkUnnamed4834(o.bidResponseWithoutBidsStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListBidResponsesWithoutBidsResponse--; } -buildUnnamed5312() { +buildUnnamed4835() { var o = new core.List<api.ClientUserInvitation>(); o.add(buildClientUserInvitation()); o.add(buildClientUserInvitation()); return o; } -checkUnnamed5312(core.List<api.ClientUserInvitation> o) { +checkUnnamed4835(core.List<api.ClientUserInvitation> o) { unittest.expect(o, unittest.hasLength(2)); checkClientUserInvitation(o[0]); checkClientUserInvitation(o[1]); @@ -1088,7 +1827,7 @@ var o = new api.ListClientUserInvitationsResponse(); buildCounterListClientUserInvitationsResponse++; if (buildCounterListClientUserInvitationsResponse < 3) { - o.invitations = buildUnnamed5312(); + o.invitations = buildUnnamed4835(); o.nextPageToken = "foo"; } buildCounterListClientUserInvitationsResponse--; @@ -1099,20 +1838,20 @@ api.ListClientUserInvitationsResponse o) { buildCounterListClientUserInvitationsResponse++; if (buildCounterListClientUserInvitationsResponse < 3) { - checkUnnamed5312(o.invitations); + checkUnnamed4835(o.invitations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListClientUserInvitationsResponse--; } -buildUnnamed5313() { +buildUnnamed4836() { var o = new core.List<api.ClientUser>(); o.add(buildClientUser()); o.add(buildClientUser()); return o; } -checkUnnamed5313(core.List<api.ClientUser> o) { +checkUnnamed4836(core.List<api.ClientUser> o) { unittest.expect(o, unittest.hasLength(2)); checkClientUser(o[0]); checkClientUser(o[1]); @@ -1124,7 +1863,7 @@ buildCounterListClientUsersResponse++; if (buildCounterListClientUsersResponse < 3) { o.nextPageToken = "foo"; - o.users = buildUnnamed5313(); + o.users = buildUnnamed4836(); } buildCounterListClientUsersResponse--; return o; @@ -1134,19 +1873,19 @@ buildCounterListClientUsersResponse++; if (buildCounterListClientUsersResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5313(o.users); + checkUnnamed4836(o.users); } buildCounterListClientUsersResponse--; } -buildUnnamed5314() { +buildUnnamed4837() { var o = new core.List<api.Client>(); o.add(buildClient()); o.add(buildClient()); return o; } -checkUnnamed5314(core.List<api.Client> o) { +checkUnnamed4837(core.List<api.Client> o) { unittest.expect(o, unittest.hasLength(2)); checkClient(o[0]); checkClient(o[1]); @@ -1157,7 +1896,7 @@ var o = new api.ListClientsResponse(); buildCounterListClientsResponse++; if (buildCounterListClientsResponse < 3) { - o.clients = buildUnnamed5314(); + o.clients = buildUnnamed4837(); o.nextPageToken = "foo"; } buildCounterListClientsResponse--; @@ -1167,20 +1906,20 @@ checkListClientsResponse(api.ListClientsResponse o) { buildCounterListClientsResponse++; if (buildCounterListClientsResponse < 3) { - checkUnnamed5314(o.clients); + checkUnnamed4837(o.clients); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListClientsResponse--; } -buildUnnamed5315() { +buildUnnamed4838() { var o = new core.List<api.FilteredBidCreativeRow>(); o.add(buildFilteredBidCreativeRow()); o.add(buildFilteredBidCreativeRow()); return o; } -checkUnnamed5315(core.List<api.FilteredBidCreativeRow> o) { +checkUnnamed4838(core.List<api.FilteredBidCreativeRow> o) { unittest.expect(o, unittest.hasLength(2)); checkFilteredBidCreativeRow(o[0]); checkFilteredBidCreativeRow(o[1]); @@ -1191,7 +1930,7 @@ var o = new api.ListCreativeStatusBreakdownByCreativeResponse(); buildCounterListCreativeStatusBreakdownByCreativeResponse++; if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { - o.filteredBidCreativeRows = buildUnnamed5315(); + o.filteredBidCreativeRows = buildUnnamed4838(); o.nextPageToken = "foo"; } buildCounterListCreativeStatusBreakdownByCreativeResponse--; @@ -1202,20 +1941,20 @@ api.ListCreativeStatusBreakdownByCreativeResponse o) { buildCounterListCreativeStatusBreakdownByCreativeResponse++; if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { - checkUnnamed5315(o.filteredBidCreativeRows); + checkUnnamed4838(o.filteredBidCreativeRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativeStatusBreakdownByCreativeResponse--; } -buildUnnamed5316() { +buildUnnamed4839() { var o = new core.List<api.FilteredBidDetailRow>(); o.add(buildFilteredBidDetailRow()); o.add(buildFilteredBidDetailRow()); return o; } -checkUnnamed5316(core.List<api.FilteredBidDetailRow> o) { +checkUnnamed4839(core.List<api.FilteredBidDetailRow> o) { unittest.expect(o, unittest.hasLength(2)); checkFilteredBidDetailRow(o[0]); checkFilteredBidDetailRow(o[1]); @@ -1227,7 +1966,7 @@ buildCounterListCreativeStatusBreakdownByDetailResponse++; if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { o.detailType = "foo"; - o.filteredBidDetailRows = buildUnnamed5316(); + o.filteredBidDetailRows = buildUnnamed4839(); o.nextPageToken = "foo"; } buildCounterListCreativeStatusBreakdownByDetailResponse--; @@ -1239,20 +1978,20 @@ buildCounterListCreativeStatusBreakdownByDetailResponse++; if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { unittest.expect(o.detailType, unittest.equals('foo')); - checkUnnamed5316(o.filteredBidDetailRows); + checkUnnamed4839(o.filteredBidDetailRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativeStatusBreakdownByDetailResponse--; } -buildUnnamed5317() { +buildUnnamed4840() { var o = new core.List<api.Creative>(); o.add(buildCreative()); o.add(buildCreative()); return o; } -checkUnnamed5317(core.List<api.Creative> o) { +checkUnnamed4840(core.List<api.Creative> o) { unittest.expect(o, unittest.hasLength(2)); checkCreative(o[0]); checkCreative(o[1]); @@ -1263,7 +2002,7 @@ var o = new api.ListCreativesResponse(); buildCounterListCreativesResponse++; if (buildCounterListCreativesResponse < 3) { - o.creatives = buildUnnamed5317(); + o.creatives = buildUnnamed4840(); o.nextPageToken = "foo"; } buildCounterListCreativesResponse--; @@ -1273,20 +2012,20 @@ checkListCreativesResponse(api.ListCreativesResponse o) { buildCounterListCreativesResponse++; if (buildCounterListCreativesResponse < 3) { - checkUnnamed5317(o.creatives); + checkUnnamed4840(o.creatives); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCreativesResponse--; } -buildUnnamed5318() { +buildUnnamed4841() { var o = new core.List<api.CreativeDealAssociation>(); o.add(buildCreativeDealAssociation()); o.add(buildCreativeDealAssociation()); return o; } -checkUnnamed5318(core.List<api.CreativeDealAssociation> o) { +checkUnnamed4841(core.List<api.CreativeDealAssociation> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeDealAssociation(o[0]); checkCreativeDealAssociation(o[1]); @@ -1297,7 +2036,7 @@ var o = new api.ListDealAssociationsResponse(); buildCounterListDealAssociationsResponse++; if (buildCounterListDealAssociationsResponse < 3) { - o.associations = buildUnnamed5318(); + o.associations = buildUnnamed4841(); o.nextPageToken = "foo"; } buildCounterListDealAssociationsResponse--; @@ -1307,20 +2046,20 @@ checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) { buildCounterListDealAssociationsResponse++; if (buildCounterListDealAssociationsResponse < 3) { - checkUnnamed5318(o.associations); + checkUnnamed4841(o.associations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDealAssociationsResponse--; } -buildUnnamed5319() { +buildUnnamed4842() { var o = new core.List<api.FilterSet>(); o.add(buildFilterSet()); o.add(buildFilterSet()); return o; } -checkUnnamed5319(core.List<api.FilterSet> o) { +checkUnnamed4842(core.List<api.FilterSet> o) { unittest.expect(o, unittest.hasLength(2)); checkFilterSet(o[0]); checkFilterSet(o[1]); @@ -1331,7 +2070,7 @@ var o = new api.ListFilterSetsResponse(); buildCounterListFilterSetsResponse++; if (buildCounterListFilterSetsResponse < 3) { - o.filterSets = buildUnnamed5319(); + o.filterSets = buildUnnamed4842(); o.nextPageToken = "foo"; } buildCounterListFilterSetsResponse--; @@ -1341,20 +2080,20 @@ checkListFilterSetsResponse(api.ListFilterSetsResponse o) { buildCounterListFilterSetsResponse++; if (buildCounterListFilterSetsResponse < 3) { - checkUnnamed5319(o.filterSets); + checkUnnamed4842(o.filterSets); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilterSetsResponse--; } -buildUnnamed5320() { +buildUnnamed4843() { var o = new core.List<api.CalloutStatusRow>(); o.add(buildCalloutStatusRow()); o.add(buildCalloutStatusRow()); return o; } -checkUnnamed5320(core.List<api.CalloutStatusRow> o) { +checkUnnamed4843(core.List<api.CalloutStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCalloutStatusRow(o[0]); checkCalloutStatusRow(o[1]); @@ -1365,7 +2104,7 @@ var o = new api.ListFilteredBidRequestsResponse(); buildCounterListFilteredBidRequestsResponse++; if (buildCounterListFilteredBidRequestsResponse < 3) { - o.calloutStatusRows = buildUnnamed5320(); + o.calloutStatusRows = buildUnnamed4843(); o.nextPageToken = "foo"; } buildCounterListFilteredBidRequestsResponse--; @@ -1375,20 +2114,20 @@ checkListFilteredBidRequestsResponse(api.ListFilteredBidRequestsResponse o) { buildCounterListFilteredBidRequestsResponse++; if (buildCounterListFilteredBidRequestsResponse < 3) { - checkUnnamed5320(o.calloutStatusRows); + checkUnnamed4843(o.calloutStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilteredBidRequestsResponse--; } -buildUnnamed5321() { +buildUnnamed4844() { var o = new core.List<api.CreativeStatusRow>(); o.add(buildCreativeStatusRow()); o.add(buildCreativeStatusRow()); return o; } -checkUnnamed5321(core.List<api.CreativeStatusRow> o) { +checkUnnamed4844(core.List<api.CreativeStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeStatusRow(o[0]); checkCreativeStatusRow(o[1]); @@ -1399,7 +2138,7 @@ var o = new api.ListFilteredBidsResponse(); buildCounterListFilteredBidsResponse++; if (buildCounterListFilteredBidsResponse < 3) { - o.creativeStatusRows = buildUnnamed5321(); + o.creativeStatusRows = buildUnnamed4844(); o.nextPageToken = "foo"; } buildCounterListFilteredBidsResponse--; @@ -1409,20 +2148,20 @@ checkListFilteredBidsResponse(api.ListFilteredBidsResponse o) { buildCounterListFilteredBidsResponse++; if (buildCounterListFilteredBidsResponse < 3) { - checkUnnamed5321(o.creativeStatusRows); + checkUnnamed4844(o.creativeStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFilteredBidsResponse--; } -buildUnnamed5322() { +buildUnnamed4845() { var o = new core.List<api.ImpressionMetricsRow>(); o.add(buildImpressionMetricsRow()); o.add(buildImpressionMetricsRow()); return o; } -checkUnnamed5322(core.List<api.ImpressionMetricsRow> o) { +checkUnnamed4845(core.List<api.ImpressionMetricsRow> o) { unittest.expect(o, unittest.hasLength(2)); checkImpressionMetricsRow(o[0]); checkImpressionMetricsRow(o[1]); @@ -1433,7 +2172,7 @@ var o = new api.ListImpressionMetricsResponse(); buildCounterListImpressionMetricsResponse++; if (buildCounterListImpressionMetricsResponse < 3) { - o.impressionMetricsRows = buildUnnamed5322(); + o.impressionMetricsRows = buildUnnamed4845(); o.nextPageToken = "foo"; } buildCounterListImpressionMetricsResponse--; @@ -1443,20 +2182,20 @@ checkListImpressionMetricsResponse(api.ListImpressionMetricsResponse o) { buildCounterListImpressionMetricsResponse++; if (buildCounterListImpressionMetricsResponse < 3) { - checkUnnamed5322(o.impressionMetricsRows); + checkUnnamed4845(o.impressionMetricsRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListImpressionMetricsResponse--; } -buildUnnamed5323() { +buildUnnamed4846() { var o = new core.List<api.CreativeStatusRow>(); o.add(buildCreativeStatusRow()); o.add(buildCreativeStatusRow()); return o; } -checkUnnamed5323(core.List<api.CreativeStatusRow> o) { +checkUnnamed4846(core.List<api.CreativeStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkCreativeStatusRow(o[0]); checkCreativeStatusRow(o[1]); @@ -1467,7 +2206,7 @@ var o = new api.ListLosingBidsResponse(); buildCounterListLosingBidsResponse++; if (buildCounterListLosingBidsResponse < 3) { - o.creativeStatusRows = buildUnnamed5323(); + o.creativeStatusRows = buildUnnamed4846(); o.nextPageToken = "foo"; } buildCounterListLosingBidsResponse--; @@ -1477,20 +2216,20 @@ checkListLosingBidsResponse(api.ListLosingBidsResponse o) { buildCounterListLosingBidsResponse++; if (buildCounterListLosingBidsResponse < 3) { - checkUnnamed5323(o.creativeStatusRows); + checkUnnamed4846(o.creativeStatusRows); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLosingBidsResponse--; } -buildUnnamed5324() { +buildUnnamed4847() { var o = new core.List<api.NonBillableWinningBidStatusRow>(); o.add(buildNonBillableWinningBidStatusRow()); o.add(buildNonBillableWinningBidStatusRow()); return o; } -checkUnnamed5324(core.List<api.NonBillableWinningBidStatusRow> o) { +checkUnnamed4847(core.List<api.NonBillableWinningBidStatusRow> o) { unittest.expect(o, unittest.hasLength(2)); checkNonBillableWinningBidStatusRow(o[0]); checkNonBillableWinningBidStatusRow(o[1]); @@ -1502,7 +2241,7 @@ buildCounterListNonBillableWinningBidsResponse++; if (buildCounterListNonBillableWinningBidsResponse < 3) { o.nextPageToken = "foo"; - o.nonBillableWinningBidStatusRows = buildUnnamed5324(); + o.nonBillableWinningBidStatusRows = buildUnnamed4847(); } buildCounterListNonBillableWinningBidsResponse--; return o; @@ -1513,19 +2252,121 @@ buildCounterListNonBillableWinningBidsResponse++; if (buildCounterListNonBillableWinningBidsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5324(o.nonBillableWinningBidStatusRows); + checkUnnamed4847(o.nonBillableWinningBidStatusRows); } buildCounterListNonBillableWinningBidsResponse--; } -buildUnnamed5325() { +buildUnnamed4848() { + var o = new core.List<api.Product>(); + o.add(buildProduct()); + o.add(buildProduct()); + return o; +} + +checkUnnamed4848(core.List<api.Product> o) { + unittest.expect(o, unittest.hasLength(2)); + checkProduct(o[0]); + checkProduct(o[1]); +} + +core.int buildCounterListProductsResponse = 0; +buildListProductsResponse() { + var o = new api.ListProductsResponse(); + buildCounterListProductsResponse++; + if (buildCounterListProductsResponse < 3) { + o.nextPageToken = "foo"; + o.products = buildUnnamed4848(); + } + buildCounterListProductsResponse--; + return o; +} + +checkListProductsResponse(api.ListProductsResponse o) { + buildCounterListProductsResponse++; + if (buildCounterListProductsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4848(o.products); + } + buildCounterListProductsResponse--; +} + +buildUnnamed4849() { + var o = new core.List<api.Proposal>(); + o.add(buildProposal()); + o.add(buildProposal()); + return o; +} + +checkUnnamed4849(core.List<api.Proposal> o) { + unittest.expect(o, unittest.hasLength(2)); + checkProposal(o[0]); + checkProposal(o[1]); +} + +core.int buildCounterListProposalsResponse = 0; +buildListProposalsResponse() { + var o = new api.ListProposalsResponse(); + buildCounterListProposalsResponse++; + if (buildCounterListProposalsResponse < 3) { + o.nextPageToken = "foo"; + o.proposals = buildUnnamed4849(); + } + buildCounterListProposalsResponse--; + return o; +} + +checkListProposalsResponse(api.ListProposalsResponse o) { + buildCounterListProposalsResponse++; + if (buildCounterListProposalsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4849(o.proposals); + } + buildCounterListProposalsResponse--; +} + +buildUnnamed4850() { + var o = new core.List<api.PublisherProfile>(); + o.add(buildPublisherProfile()); + o.add(buildPublisherProfile()); + return o; +} + +checkUnnamed4850(core.List<api.PublisherProfile> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPublisherProfile(o[0]); + checkPublisherProfile(o[1]); +} + +core.int buildCounterListPublisherProfilesResponse = 0; +buildListPublisherProfilesResponse() { + var o = new api.ListPublisherProfilesResponse(); + buildCounterListPublisherProfilesResponse++; + if (buildCounterListPublisherProfilesResponse < 3) { + o.nextPageToken = "foo"; + o.publisherProfiles = buildUnnamed4850(); + } + buildCounterListPublisherProfilesResponse--; + return o; +} + +checkListPublisherProfilesResponse(api.ListPublisherProfilesResponse o) { + buildCounterListPublisherProfilesResponse++; + if (buildCounterListPublisherProfilesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4850(o.publisherProfiles); + } + buildCounterListPublisherProfilesResponse--; +} + +buildUnnamed4851() { var o = new core.List<core.int>(); o.add(42); o.add(42); return o; } -checkUnnamed5325(core.List<core.int> o) { +checkUnnamed4851(core.List<core.int> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42)); unittest.expect(o[1], unittest.equals(42)); @@ -1536,7 +2377,7 @@ var o = new api.LocationContext(); buildCounterLocationContext++; if (buildCounterLocationContext < 3) { - o.geoCriteriaIds = buildUnnamed5325(); + o.geoCriteriaIds = buildUnnamed4851(); } buildCounterLocationContext--; return o; @@ -1545,11 +2386,38 @@ checkLocationContext(api.LocationContext o) { buildCounterLocationContext++; if (buildCounterLocationContext < 3) { - checkUnnamed5325(o.geoCriteriaIds); + checkUnnamed4851(o.geoCriteriaIds); } buildCounterLocationContext--; } +core.int buildCounterMarketplaceTargeting = 0; +buildMarketplaceTargeting() { + var o = new api.MarketplaceTargeting(); + buildCounterMarketplaceTargeting++; + if (buildCounterMarketplaceTargeting < 3) { + o.geoTargeting = buildCriteriaTargeting(); + o.inventorySizeTargeting = buildInventorySizeTargeting(); + o.placementTargeting = buildPlacementTargeting(); + o.technologyTargeting = buildTechnologyTargeting(); + o.videoTargeting = buildVideoTargeting(); + } + buildCounterMarketplaceTargeting--; + return o; +} + +checkMarketplaceTargeting(api.MarketplaceTargeting o) { + buildCounterMarketplaceTargeting++; + if (buildCounterMarketplaceTargeting < 3) { + checkCriteriaTargeting(o.geoTargeting); + checkInventorySizeTargeting(o.inventorySizeTargeting); + checkPlacementTargeting(o.placementTargeting); + checkTechnologyTargeting(o.technologyTargeting); + checkVideoTargeting(o.videoTargeting); + } + buildCounterMarketplaceTargeting--; +} + core.int buildCounterMetricValue = 0; buildMetricValue() { var o = new api.MetricValue(); @@ -1571,6 +2439,48 @@ buildCounterMetricValue--; } +core.int buildCounterMobileApplicationTargeting = 0; +buildMobileApplicationTargeting() { + var o = new api.MobileApplicationTargeting(); + buildCounterMobileApplicationTargeting++; + if (buildCounterMobileApplicationTargeting < 3) { + o.firstPartyTargeting = buildFirstPartyMobileApplicationTargeting(); + } + buildCounterMobileApplicationTargeting--; + return o; +} + +checkMobileApplicationTargeting(api.MobileApplicationTargeting o) { + buildCounterMobileApplicationTargeting++; + if (buildCounterMobileApplicationTargeting < 3) { + checkFirstPartyMobileApplicationTargeting(o.firstPartyTargeting); + } + buildCounterMobileApplicationTargeting--; +} + +core.int buildCounterMoney = 0; +buildMoney() { + var o = new api.Money(); + buildCounterMoney++; + if (buildCounterMoney < 3) { + o.currencyCode = "foo"; + o.nanos = 42; + o.units = "foo"; + } + buildCounterMoney--; + return o; +} + +checkMoney(api.Money o) { + buildCounterMoney++; + if (buildCounterMoney < 3) { + unittest.expect(o.currencyCode, unittest.equals('foo')); + unittest.expect(o.nanos, unittest.equals(42)); + unittest.expect(o.units, unittest.equals('foo')); + } + buildCounterMoney--; +} + core.int buildCounterNativeContent = 0; buildNativeContent() { var o = new api.NativeContent(); @@ -1637,14 +2547,168 @@ buildCounterNonBillableWinningBidStatusRow--; } -buildUnnamed5326() { +buildUnnamed4852() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4852(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterNonGuaranteedAuctionTerms = 0; +buildNonGuaranteedAuctionTerms() { + var o = new api.NonGuaranteedAuctionTerms(); + buildCounterNonGuaranteedAuctionTerms++; + if (buildCounterNonGuaranteedAuctionTerms < 3) { + o.autoOptimizePrivateAuction = true; + o.reservePricesPerBuyer = buildUnnamed4852(); + } + buildCounterNonGuaranteedAuctionTerms--; + return o; +} + +checkNonGuaranteedAuctionTerms(api.NonGuaranteedAuctionTerms o) { + buildCounterNonGuaranteedAuctionTerms++; + if (buildCounterNonGuaranteedAuctionTerms < 3) { + unittest.expect(o.autoOptimizePrivateAuction, unittest.isTrue); + checkUnnamed4852(o.reservePricesPerBuyer); + } + buildCounterNonGuaranteedAuctionTerms--; +} + +buildUnnamed4853() { + var o = new core.List<api.PricePerBuyer>(); + o.add(buildPricePerBuyer()); + o.add(buildPricePerBuyer()); + return o; +} + +checkUnnamed4853(core.List<api.PricePerBuyer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPricePerBuyer(o[0]); + checkPricePerBuyer(o[1]); +} + +core.int buildCounterNonGuaranteedFixedPriceTerms = 0; +buildNonGuaranteedFixedPriceTerms() { + var o = new api.NonGuaranteedFixedPriceTerms(); + buildCounterNonGuaranteedFixedPriceTerms++; + if (buildCounterNonGuaranteedFixedPriceTerms < 3) { + o.fixedPrices = buildUnnamed4853(); + } + buildCounterNonGuaranteedFixedPriceTerms--; + return o; +} + +checkNonGuaranteedFixedPriceTerms(api.NonGuaranteedFixedPriceTerms o) { + buildCounterNonGuaranteedFixedPriceTerms++; + if (buildCounterNonGuaranteedFixedPriceTerms < 3) { + checkUnnamed4853(o.fixedPrices); + } + buildCounterNonGuaranteedFixedPriceTerms--; +} + +core.int buildCounterNote = 0; +buildNote() { + var o = new api.Note(); + buildCounterNote++; + if (buildCounterNote < 3) { + o.createTime = "foo"; + o.creatorRole = "foo"; + o.note = "foo"; + o.noteId = "foo"; + o.proposalRevision = "foo"; + } + buildCounterNote--; + return o; +} + +checkNote(api.Note o) { + buildCounterNote++; + if (buildCounterNote < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creatorRole, unittest.equals('foo')); + unittest.expect(o.note, unittest.equals('foo')); + unittest.expect(o.noteId, unittest.equals('foo')); + unittest.expect(o.proposalRevision, unittest.equals('foo')); + } + buildCounterNote--; +} + +core.int buildCounterOperatingSystemTargeting = 0; +buildOperatingSystemTargeting() { + var o = new api.OperatingSystemTargeting(); + buildCounterOperatingSystemTargeting++; + if (buildCounterOperatingSystemTargeting < 3) { + o.operatingSystemCriteria = buildCriteriaTargeting(); + o.operatingSystemVersionCriteria = buildCriteriaTargeting(); + } + buildCounterOperatingSystemTargeting--; + return o; +} + +checkOperatingSystemTargeting(api.OperatingSystemTargeting o) { + buildCounterOperatingSystemTargeting++; + if (buildCounterOperatingSystemTargeting < 3) { + checkCriteriaTargeting(o.operatingSystemCriteria); + checkCriteriaTargeting(o.operatingSystemVersionCriteria); + } + buildCounterOperatingSystemTargeting--; +} + +core.int buildCounterPauseProposalRequest = 0; +buildPauseProposalRequest() { + var o = new api.PauseProposalRequest(); + buildCounterPauseProposalRequest++; + if (buildCounterPauseProposalRequest < 3) { + o.reason = "foo"; + } + buildCounterPauseProposalRequest--; + return o; +} + +checkPauseProposalRequest(api.PauseProposalRequest o) { + buildCounterPauseProposalRequest++; + if (buildCounterPauseProposalRequest < 3) { + unittest.expect(o.reason, unittest.equals('foo')); + } + buildCounterPauseProposalRequest--; +} + +core.int buildCounterPlacementTargeting = 0; +buildPlacementTargeting() { + var o = new api.PlacementTargeting(); + buildCounterPlacementTargeting++; + if (buildCounterPlacementTargeting < 3) { + o.mobileApplicationTargeting = buildMobileApplicationTargeting(); + o.urlTargeting = buildUrlTargeting(); + } + buildCounterPlacementTargeting--; + return o; +} + +checkPlacementTargeting(api.PlacementTargeting o) { + buildCounterPlacementTargeting++; + if (buildCounterPlacementTargeting < 3) { + checkMobileApplicationTargeting(o.mobileApplicationTargeting); + checkUrlTargeting(o.urlTargeting); + } + buildCounterPlacementTargeting--; +} + +buildUnnamed4854() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5326(core.List<core.String> o) { +checkUnnamed4854(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1655,7 +2719,7 @@ var o = new api.PlatformContext(); buildCounterPlatformContext++; if (buildCounterPlatformContext < 3) { - o.platforms = buildUnnamed5326(); + o.platforms = buildUnnamed4854(); } buildCounterPlatformContext--; return o; @@ -1664,11 +2728,338 @@ checkPlatformContext(api.PlatformContext o) { buildCounterPlatformContext++; if (buildCounterPlatformContext < 3) { - checkUnnamed5326(o.platforms); + checkUnnamed4854(o.platforms); } buildCounterPlatformContext--; } +core.int buildCounterPrice = 0; +buildPrice() { + var o = new api.Price(); + buildCounterPrice++; + if (buildCounterPrice < 3) { + o.amount = buildMoney(); + o.pricingType = "foo"; + } + buildCounterPrice--; + return o; +} + +checkPrice(api.Price o) { + buildCounterPrice++; + if (buildCounterPrice < 3) { + checkMoney(o.amount); + unittest.expect(o.pricingType, unittest.equals('foo')); + } + buildCounterPrice--; +} + +buildUnnamed4855() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4855(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPricePerBuyer = 0; +buildPricePerBuyer() { + var o = new api.PricePerBuyer(); + buildCounterPricePerBuyer++; + if (buildCounterPricePerBuyer < 3) { + o.advertiserIds = buildUnnamed4855(); + o.buyer = buildBuyer(); + o.price = buildPrice(); + } + buildCounterPricePerBuyer--; + return o; +} + +checkPricePerBuyer(api.PricePerBuyer o) { + buildCounterPricePerBuyer++; + if (buildCounterPricePerBuyer < 3) { + checkUnnamed4855(o.advertiserIds); + checkBuyer(o.buyer); + checkPrice(o.price); + } + buildCounterPricePerBuyer--; +} + +core.int buildCounterPrivateData = 0; +buildPrivateData() { + var o = new api.PrivateData(); + buildCounterPrivateData++; + if (buildCounterPrivateData < 3) { + o.referenceId = "foo"; + } + buildCounterPrivateData--; + return o; +} + +checkPrivateData(api.PrivateData o) { + buildCounterPrivateData++; + if (buildCounterPrivateData < 3) { + unittest.expect(o.referenceId, unittest.equals('foo')); + } + buildCounterPrivateData--; +} + +buildUnnamed4856() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4856(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4857() { + var o = new core.List<api.TargetingCriteria>(); + o.add(buildTargetingCriteria()); + o.add(buildTargetingCriteria()); + return o; +} + +checkUnnamed4857(core.List<api.TargetingCriteria> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingCriteria(o[0]); + checkTargetingCriteria(o[1]); +} + +core.int buildCounterProduct = 0; +buildProduct() { + var o = new api.Product(); + buildCounterProduct++; + if (buildCounterProduct < 3) { + o.availableEndTime = "foo"; + o.availableStartTime = "foo"; + o.createTime = "foo"; + o.creatorContacts = buildUnnamed4856(); + o.displayName = "foo"; + o.hasCreatorSignedOff = true; + o.productId = "foo"; + o.productRevision = "foo"; + o.publisherProfileId = "foo"; + o.seller = buildSeller(); + o.syndicationProduct = "foo"; + o.targetingCriterion = buildUnnamed4857(); + o.terms = buildDealTerms(); + o.updateTime = "foo"; + o.webPropertyCode = "foo"; + } + buildCounterProduct--; + return o; +} + +checkProduct(api.Product o) { + buildCounterProduct++; + if (buildCounterProduct < 3) { + unittest.expect(o.availableEndTime, unittest.equals('foo')); + unittest.expect(o.availableStartTime, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + checkUnnamed4856(o.creatorContacts); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.hasCreatorSignedOff, unittest.isTrue); + unittest.expect(o.productId, unittest.equals('foo')); + unittest.expect(o.productRevision, unittest.equals('foo')); + unittest.expect(o.publisherProfileId, unittest.equals('foo')); + checkSeller(o.seller); + unittest.expect(o.syndicationProduct, unittest.equals('foo')); + checkUnnamed4857(o.targetingCriterion); + checkDealTerms(o.terms); + unittest.expect(o.updateTime, unittest.equals('foo')); + unittest.expect(o.webPropertyCode, unittest.equals('foo')); + } + buildCounterProduct--; +} + +buildUnnamed4858() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4858(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +buildUnnamed4859() { + var o = new core.List<api.Deal>(); + o.add(buildDeal()); + o.add(buildDeal()); + return o; +} + +checkUnnamed4859(core.List<api.Deal> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDeal(o[0]); + checkDeal(o[1]); +} + +buildUnnamed4860() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4860(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +buildUnnamed4861() { + var o = new core.List<api.ContactInformation>(); + o.add(buildContactInformation()); + o.add(buildContactInformation()); + return o; +} + +checkUnnamed4861(core.List<api.ContactInformation> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContactInformation(o[0]); + checkContactInformation(o[1]); +} + +core.int buildCounterProposal = 0; +buildProposal() { + var o = new api.Proposal(); + buildCounterProposal++; + if (buildCounterProposal < 3) { + o.billedBuyer = buildBuyer(); + o.buyer = buildBuyer(); + o.buyerContacts = buildUnnamed4858(); + o.buyerPrivateData = buildPrivateData(); + o.deals = buildUnnamed4859(); + o.displayName = "foo"; + o.isRenegotiating = true; + o.isSetupComplete = true; + o.lastUpdaterOrCommentorRole = "foo"; + o.notes = buildUnnamed4860(); + o.originatorRole = "foo"; + o.privateAuctionId = "foo"; + o.proposalId = "foo"; + o.proposalRevision = "foo"; + o.proposalState = "foo"; + o.seller = buildSeller(); + o.sellerContacts = buildUnnamed4861(); + o.updateTime = "foo"; + } + buildCounterProposal--; + return o; +} + +checkProposal(api.Proposal o) { + buildCounterProposal++; + if (buildCounterProposal < 3) { + checkBuyer(o.billedBuyer); + checkBuyer(o.buyer); + checkUnnamed4858(o.buyerContacts); + checkPrivateData(o.buyerPrivateData); + checkUnnamed4859(o.deals); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.isRenegotiating, unittest.isTrue); + unittest.expect(o.isSetupComplete, unittest.isTrue); + unittest.expect(o.lastUpdaterOrCommentorRole, unittest.equals('foo')); + checkUnnamed4860(o.notes); + unittest.expect(o.originatorRole, unittest.equals('foo')); + unittest.expect(o.privateAuctionId, unittest.equals('foo')); + unittest.expect(o.proposalId, unittest.equals('foo')); + unittest.expect(o.proposalRevision, unittest.equals('foo')); + unittest.expect(o.proposalState, unittest.equals('foo')); + checkSeller(o.seller); + checkUnnamed4861(o.sellerContacts); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterProposal--; +} + +buildUnnamed4862() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4862(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4863() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4863(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPublisherProfile = 0; +buildPublisherProfile() { + var o = new api.PublisherProfile(); + buildCounterPublisherProfile++; + if (buildCounterPublisherProfile < 3) { + o.audienceDescription = "foo"; + o.buyerPitchStatement = "foo"; + o.directDealsContact = "foo"; + o.displayName = "foo"; + o.domains = buildUnnamed4862(); + o.googlePlusUrl = "foo"; + o.logoUrl = "foo"; + o.mediaKitUrl = "foo"; + o.overview = "foo"; + o.programmaticDealsContact = "foo"; + o.publisherProfileId = "foo"; + o.rateCardInfoUrl = "foo"; + o.samplePageUrl = "foo"; + o.seller = buildSeller(); + o.topHeadlines = buildUnnamed4863(); + } + buildCounterPublisherProfile--; + return o; +} + +checkPublisherProfile(api.PublisherProfile o) { + buildCounterPublisherProfile++; + if (buildCounterPublisherProfile < 3) { + unittest.expect(o.audienceDescription, unittest.equals('foo')); + unittest.expect(o.buyerPitchStatement, unittest.equals('foo')); + unittest.expect(o.directDealsContact, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4862(o.domains); + unittest.expect(o.googlePlusUrl, unittest.equals('foo')); + unittest.expect(o.logoUrl, unittest.equals('foo')); + unittest.expect(o.mediaKitUrl, unittest.equals('foo')); + unittest.expect(o.overview, unittest.equals('foo')); + unittest.expect(o.programmaticDealsContact, unittest.equals('foo')); + unittest.expect(o.publisherProfileId, unittest.equals('foo')); + unittest.expect(o.rateCardInfoUrl, unittest.equals('foo')); + unittest.expect(o.samplePageUrl, unittest.equals('foo')); + checkSeller(o.seller); + checkUnnamed4863(o.topHeadlines); + } + buildCounterPublisherProfile--; +} + core.int buildCounterRealtimeTimeRange = 0; buildRealtimeTimeRange() { var o = new api.RealtimeTimeRange(); @@ -1749,11 +3140,27 @@ buildCounterRemoveDealAssociationRequest--; } +core.int buildCounterResumeProposalRequest = 0; +buildResumeProposalRequest() { + var o = new api.ResumeProposalRequest(); + buildCounterResumeProposalRequest++; + if (buildCounterResumeProposalRequest < 3) {} + buildCounterResumeProposalRequest--; + return o; +} + +checkResumeProposalRequest(api.ResumeProposalRequest o) { + buildCounterResumeProposalRequest++; + if (buildCounterResumeProposalRequest < 3) {} + buildCounterResumeProposalRequest--; +} + core.int buildCounterRowDimensions = 0; buildRowDimensions() { var o = new api.RowDimensions(); buildCounterRowDimensions++; if (buildCounterRowDimensions < 3) { + o.publisherIdentifier = "foo"; o.timeInterval = buildTimeInterval(); } buildCounterRowDimensions--; @@ -1763,19 +3170,20 @@ checkRowDimensions(api.RowDimensions o) { buildCounterRowDimensions++; if (buildCounterRowDimensions < 3) { + unittest.expect(o.publisherIdentifier, unittest.equals('foo')); checkTimeInterval(o.timeInterval); } buildCounterRowDimensions--; } -buildUnnamed5327() { +buildUnnamed4864() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5327(core.List<core.String> o) { +checkUnnamed4864(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1786,7 +3194,7 @@ var o = new api.SecurityContext(); buildCounterSecurityContext++; if (buildCounterSecurityContext < 3) { - o.securities = buildUnnamed5327(); + o.securities = buildUnnamed4864(); } buildCounterSecurityContext--; return o; @@ -1795,11 +3203,32 @@ checkSecurityContext(api.SecurityContext o) { buildCounterSecurityContext++; if (buildCounterSecurityContext < 3) { - checkUnnamed5327(o.securities); + checkUnnamed4864(o.securities); } buildCounterSecurityContext--; } +core.int buildCounterSeller = 0; +buildSeller() { + var o = new api.Seller(); + buildCounterSeller++; + if (buildCounterSeller < 3) { + o.accountId = "foo"; + o.subAccountId = "foo"; + } + buildCounterSeller--; + return o; +} + +checkSeller(api.Seller o) { + buildCounterSeller++; + if (buildCounterSeller < 3) { + unittest.expect(o.accountId, unittest.equals('foo')); + unittest.expect(o.subAccountId, unittest.equals('foo')); + } + buildCounterSeller--; +} + core.int buildCounterServingContext = 0; buildServingContext() { var o = new api.ServingContext(); @@ -1829,27 +3258,27 @@ buildCounterServingContext--; } -buildUnnamed5328() { +buildUnnamed4865() { var o = new core.List<api.ServingContext>(); o.add(buildServingContext()); o.add(buildServingContext()); return o; } -checkUnnamed5328(core.List<api.ServingContext> o) { +checkUnnamed4865(core.List<api.ServingContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServingContext(o[0]); checkServingContext(o[1]); } -buildUnnamed5329() { +buildUnnamed4866() { var o = new core.List<api.Disapproval>(); o.add(buildDisapproval()); o.add(buildDisapproval()); return o; } -checkUnnamed5329(core.List<api.Disapproval> o) { +checkUnnamed4866(core.List<api.Disapproval> o) { unittest.expect(o, unittest.hasLength(2)); checkDisapproval(o[0]); checkDisapproval(o[1]); @@ -1860,9 +3289,9 @@ var o = new api.ServingRestriction(); buildCounterServingRestriction++; if (buildCounterServingRestriction < 3) { - o.contexts = buildUnnamed5328(); + o.contexts = buildUnnamed4865(); o.disapproval = buildDisapproval(); - o.disapprovalReasons = buildUnnamed5329(); + o.disapprovalReasons = buildUnnamed4866(); o.status = "foo"; } buildCounterServingRestriction--; @@ -1872,14 +3301,35 @@ checkServingRestriction(api.ServingRestriction o) { buildCounterServingRestriction++; if (buildCounterServingRestriction < 3) { - checkUnnamed5328(o.contexts); + checkUnnamed4865(o.contexts); checkDisapproval(o.disapproval); - checkUnnamed5329(o.disapprovalReasons); + checkUnnamed4866(o.disapprovalReasons); unittest.expect(o.status, unittest.equals('foo')); } buildCounterServingRestriction--; } +core.int buildCounterSize = 0; +buildSize() { + var o = new api.Size(); + buildCounterSize++; + if (buildCounterSize < 3) { + o.height = 42; + o.width = 42; + } + buildCounterSize--; + return o; +} + +checkSize(api.Size o) { + buildCounterSize++; + if (buildCounterSize < 3) { + unittest.expect(o.height, unittest.equals(42)); + unittest.expect(o.width, unittest.equals(42)); + } + buildCounterSize--; +} + core.int buildCounterStopWatchingCreativeRequest = 0; buildStopWatchingCreativeRequest() { var o = new api.StopWatchingCreativeRequest(); @@ -1895,6 +3345,103 @@ buildCounterStopWatchingCreativeRequest--; } +buildUnnamed4867() { + var o = new core.List<api.TargetingValue>(); + o.add(buildTargetingValue()); + o.add(buildTargetingValue()); + return o; +} + +checkUnnamed4867(core.List<api.TargetingValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingValue(o[0]); + checkTargetingValue(o[1]); +} + +buildUnnamed4868() { + var o = new core.List<api.TargetingValue>(); + o.add(buildTargetingValue()); + o.add(buildTargetingValue()); + return o; +} + +checkUnnamed4868(core.List<api.TargetingValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTargetingValue(o[0]); + checkTargetingValue(o[1]); +} + +core.int buildCounterTargetingCriteria = 0; +buildTargetingCriteria() { + var o = new api.TargetingCriteria(); + buildCounterTargetingCriteria++; + if (buildCounterTargetingCriteria < 3) { + o.exclusions = buildUnnamed4867(); + o.inclusions = buildUnnamed4868(); + o.key = "foo"; + } + buildCounterTargetingCriteria--; + return o; +} + +checkTargetingCriteria(api.TargetingCriteria o) { + buildCounterTargetingCriteria++; + if (buildCounterTargetingCriteria < 3) { + checkUnnamed4867(o.exclusions); + checkUnnamed4868(o.inclusions); + unittest.expect(o.key, unittest.equals('foo')); + } + buildCounterTargetingCriteria--; +} + +core.int buildCounterTargetingValue = 0; +buildTargetingValue() { + var o = new api.TargetingValue(); + buildCounterTargetingValue++; + if (buildCounterTargetingValue < 3) { + o.creativeSizeValue = buildCreativeSize(); + o.dayPartTargetingValue = buildDayPartTargeting(); + o.longValue = "foo"; + o.stringValue = "foo"; + } + buildCounterTargetingValue--; + return o; +} + +checkTargetingValue(api.TargetingValue o) { + buildCounterTargetingValue++; + if (buildCounterTargetingValue < 3) { + checkCreativeSize(o.creativeSizeValue); + checkDayPartTargeting(o.dayPartTargetingValue); + unittest.expect(o.longValue, unittest.equals('foo')); + unittest.expect(o.stringValue, unittest.equals('foo')); + } + buildCounterTargetingValue--; +} + +core.int buildCounterTechnologyTargeting = 0; +buildTechnologyTargeting() { + var o = new api.TechnologyTargeting(); + buildCounterTechnologyTargeting++; + if (buildCounterTechnologyTargeting < 3) { + o.deviceCapabilityTargeting = buildCriteriaTargeting(); + o.deviceCategoryTargeting = buildCriteriaTargeting(); + o.operatingSystemTargeting = buildOperatingSystemTargeting(); + } + buildCounterTechnologyTargeting--; + return o; +} + +checkTechnologyTargeting(api.TechnologyTargeting o) { + buildCounterTechnologyTargeting++; + if (buildCounterTechnologyTargeting < 3) { + checkCriteriaTargeting(o.deviceCapabilityTargeting); + checkCriteriaTargeting(o.deviceCategoryTargeting); + checkOperatingSystemTargeting(o.operatingSystemTargeting); + } + buildCounterTechnologyTargeting--; +} + core.int buildCounterTimeInterval = 0; buildTimeInterval() { var o = new api.TimeInterval(); @@ -1916,6 +3463,78 @@ buildCounterTimeInterval--; } +core.int buildCounterTimeOfDay = 0; +buildTimeOfDay() { + var o = new api.TimeOfDay(); + buildCounterTimeOfDay++; + if (buildCounterTimeOfDay < 3) { + o.hours = 42; + o.minutes = 42; + o.nanos = 42; + o.seconds = 42; + } + buildCounterTimeOfDay--; + return o; +} + +checkTimeOfDay(api.TimeOfDay o) { + buildCounterTimeOfDay++; + if (buildCounterTimeOfDay < 3) { + unittest.expect(o.hours, unittest.equals(42)); + unittest.expect(o.minutes, unittest.equals(42)); + unittest.expect(o.nanos, unittest.equals(42)); + unittest.expect(o.seconds, unittest.equals(42)); + } + buildCounterTimeOfDay--; +} + +buildUnnamed4869() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4869(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4870() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4870(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterUrlTargeting = 0; +buildUrlTargeting() { + var o = new api.UrlTargeting(); + buildCounterUrlTargeting++; + if (buildCounterUrlTargeting < 3) { + o.excludedUrls = buildUnnamed4869(); + o.targetedUrls = buildUnnamed4870(); + } + buildCounterUrlTargeting--; + return o; +} + +checkUrlTargeting(api.UrlTargeting o) { + buildCounterUrlTargeting++; + if (buildCounterUrlTargeting < 3) { + checkUnnamed4869(o.excludedUrls); + checkUnnamed4870(o.targetedUrls); + } + buildCounterUrlTargeting--; +} + core.int buildCounterVideoContent = 0; buildVideoContent() { var o = new api.VideoContent(); @@ -1937,6 +3556,53 @@ buildCounterVideoContent--; } +buildUnnamed4871() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4871(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4872() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4872(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterVideoTargeting = 0; +buildVideoTargeting() { + var o = new api.VideoTargeting(); + buildCounterVideoTargeting++; + if (buildCounterVideoTargeting < 3) { + o.excludedPositionTypes = buildUnnamed4871(); + o.targetedPositionTypes = buildUnnamed4872(); + } + buildCounterVideoTargeting--; + return o; +} + +checkVideoTargeting(api.VideoTargeting o) { + buildCounterVideoTargeting++; + if (buildCounterVideoTargeting < 3) { + checkUnnamed4871(o.excludedPositionTypes); + checkUnnamed4872(o.targetedPositionTypes); + } + buildCounterVideoTargeting--; +} + core.int buildCounterWatchCreativeRequest = 0; buildWatchCreativeRequest() { var o = new api.WatchCreativeRequest(); @@ -1965,6 +3631,22 @@ }); }); + unittest.group("obj-schema-AcceptProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAcceptProposalRequest(); + var od = new api.AcceptProposalRequest.fromJson(o.toJson()); + checkAcceptProposalRequest(od); + }); + }); + + unittest.group("obj-schema-AdSize", () { + unittest.test("to-json--from-json", () { + var o = buildAdSize(); + var od = new api.AdSize.fromJson(o.toJson()); + checkAdSize(od); + }); + }); + unittest.group("obj-schema-AddDealAssociationRequest", () { unittest.test("to-json--from-json", () { var o = buildAddDealAssociationRequest(); @@ -1973,6 +3655,14 @@ }); }); + unittest.group("obj-schema-AddNoteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAddNoteRequest(); + var od = new api.AddNoteRequest.fromJson(o.toJson()); + checkAddNoteRequest(od); + }); + }); + unittest.group("obj-schema-AppContext", () { unittest.test("to-json--from-json", () { var o = buildAppContext(); @@ -2005,6 +3695,14 @@ }); }); + unittest.group("obj-schema-Buyer", () { + unittest.test("to-json--from-json", () { + var o = buildBuyer(); + var od = new api.Buyer.fromJson(o.toJson()); + checkBuyer(od); + }); + }); + unittest.group("obj-schema-CalloutStatusRow", () { unittest.test("to-json--from-json", () { var o = buildCalloutStatusRow(); @@ -2013,6 +3711,14 @@ }); }); + unittest.group("obj-schema-CancelNegotiationRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCancelNegotiationRequest(); + var od = new api.CancelNegotiationRequest.fromJson(o.toJson()); + checkCancelNegotiationRequest(od); + }); + }); + unittest.group("obj-schema-Client", () { unittest.test("to-json--from-json", () { var o = buildClient(); @@ -2037,6 +3743,22 @@ }); }); + unittest.group("obj-schema-CompleteSetupRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCompleteSetupRequest(); + var od = new api.CompleteSetupRequest.fromJson(o.toJson()); + checkCompleteSetupRequest(od); + }); + }); + + unittest.group("obj-schema-ContactInformation", () { + unittest.test("to-json--from-json", () { + var o = buildContactInformation(); + var od = new api.ContactInformation.fromJson(o.toJson()); + checkContactInformation(od); + }); + }); + unittest.group("obj-schema-Correction", () { unittest.test("to-json--from-json", () { var o = buildCorrection(); @@ -2061,6 +3783,30 @@ }); }); + unittest.group("obj-schema-CreativeRestrictions", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeRestrictions(); + var od = new api.CreativeRestrictions.fromJson(o.toJson()); + checkCreativeRestrictions(od); + }); + }); + + unittest.group("obj-schema-CreativeSize", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeSize(); + var od = new api.CreativeSize.fromJson(o.toJson()); + checkCreativeSize(od); + }); + }); + + unittest.group("obj-schema-CreativeSpecification", () { + unittest.test("to-json--from-json", () { + var o = buildCreativeSpecification(); + var od = new api.CreativeSpecification.fromJson(o.toJson()); + checkCreativeSpecification(od); + }); + }); + unittest.group("obj-schema-CreativeStatusRow", () { unittest.test("to-json--from-json", () { var o = buildCreativeStatusRow(); @@ -2069,6 +3815,14 @@ }); }); + unittest.group("obj-schema-CriteriaTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildCriteriaTargeting(); + var od = new api.CriteriaTargeting.fromJson(o.toJson()); + checkCriteriaTargeting(od); + }); + }); + unittest.group("obj-schema-Date", () { unittest.test("to-json--from-json", () { var o = buildDate(); @@ -2077,6 +3831,62 @@ }); }); + unittest.group("obj-schema-DayPart", () { + unittest.test("to-json--from-json", () { + var o = buildDayPart(); + var od = new api.DayPart.fromJson(o.toJson()); + checkDayPart(od); + }); + }); + + unittest.group("obj-schema-DayPartTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildDayPartTargeting(); + var od = new api.DayPartTargeting.fromJson(o.toJson()); + checkDayPartTargeting(od); + }); + }); + + unittest.group("obj-schema-Deal", () { + unittest.test("to-json--from-json", () { + var o = buildDeal(); + var od = new api.Deal.fromJson(o.toJson()); + checkDeal(od); + }); + }); + + unittest.group("obj-schema-DealPauseStatus", () { + unittest.test("to-json--from-json", () { + var o = buildDealPauseStatus(); + var od = new api.DealPauseStatus.fromJson(o.toJson()); + checkDealPauseStatus(od); + }); + }); + + unittest.group("obj-schema-DealServingMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildDealServingMetadata(); + var od = new api.DealServingMetadata.fromJson(o.toJson()); + checkDealServingMetadata(od); + }); + }); + + unittest.group("obj-schema-DealTerms", () { + unittest.test("to-json--from-json", () { + var o = buildDealTerms(); + var od = new api.DealTerms.fromJson(o.toJson()); + checkDealTerms(od); + }); + }); + + unittest.group("obj-schema-DeliveryControl", () { + unittest.test("to-json--from-json", () { + var o = buildDeliveryControl(); + var od = new api.DeliveryControl.fromJson(o.toJson()); + checkDeliveryControl(od); + }); + }); + unittest.group("obj-schema-Disapproval", () { unittest.test("to-json--from-json", () { var o = buildDisapproval(); @@ -2125,6 +3935,31 @@ }); }); + unittest.group("obj-schema-FirstPartyMobileApplicationTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildFirstPartyMobileApplicationTargeting(); + var od = + new api.FirstPartyMobileApplicationTargeting.fromJson(o.toJson()); + checkFirstPartyMobileApplicationTargeting(od); + }); + }); + + unittest.group("obj-schema-FrequencyCap", () { + unittest.test("to-json--from-json", () { + var o = buildFrequencyCap(); + var od = new api.FrequencyCap.fromJson(o.toJson()); + checkFrequencyCap(od); + }); + }); + + unittest.group("obj-schema-GuaranteedFixedPriceTerms", () { + unittest.test("to-json--from-json", () { + var o = buildGuaranteedFixedPriceTerms(); + var od = new api.GuaranteedFixedPriceTerms.fromJson(o.toJson()); + checkGuaranteedFixedPriceTerms(od); + }); + }); + unittest.group("obj-schema-HtmlContent", () { unittest.test("to-json--from-json", () { var o = buildHtmlContent(); @@ -2149,6 +3984,14 @@ }); }); + unittest.group("obj-schema-InventorySizeTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildInventorySizeTargeting(); + var od = new api.InventorySizeTargeting.fromJson(o.toJson()); + checkInventorySizeTargeting(od); + }); + }); + unittest.group("obj-schema-ListBidMetricsResponse", () { unittest.test("to-json--from-json", () { var o = buildListBidMetricsResponse(); @@ -2280,6 +4123,30 @@ }); }); + unittest.group("obj-schema-ListProductsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListProductsResponse(); + var od = new api.ListProductsResponse.fromJson(o.toJson()); + checkListProductsResponse(od); + }); + }); + + unittest.group("obj-schema-ListProposalsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListProposalsResponse(); + var od = new api.ListProposalsResponse.fromJson(o.toJson()); + checkListProposalsResponse(od); + }); + }); + + unittest.group("obj-schema-ListPublisherProfilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListPublisherProfilesResponse(); + var od = new api.ListPublisherProfilesResponse.fromJson(o.toJson()); + checkListPublisherProfilesResponse(od); + }); + }); + unittest.group("obj-schema-LocationContext", () { unittest.test("to-json--from-json", () { var o = buildLocationContext(); @@ -2288,6 +4155,14 @@ }); }); + unittest.group("obj-schema-MarketplaceTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildMarketplaceTargeting(); + var od = new api.MarketplaceTargeting.fromJson(o.toJson()); + checkMarketplaceTargeting(od); + }); + }); + unittest.group("obj-schema-MetricValue", () { unittest.test("to-json--from-json", () { var o = buildMetricValue(); @@ -2296,6 +4171,22 @@ }); }); + unittest.group("obj-schema-MobileApplicationTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildMobileApplicationTargeting(); + var od = new api.MobileApplicationTargeting.fromJson(o.toJson()); + checkMobileApplicationTargeting(od); + }); + }); + + unittest.group("obj-schema-Money", () { + unittest.test("to-json--from-json", () { + var o = buildMoney(); + var od = new api.Money.fromJson(o.toJson()); + checkMoney(od); + }); + }); + unittest.group("obj-schema-NativeContent", () { unittest.test("to-json--from-json", () { var o = buildNativeContent(); @@ -2312,6 +4203,54 @@ }); }); + unittest.group("obj-schema-NonGuaranteedAuctionTerms", () { + unittest.test("to-json--from-json", () { + var o = buildNonGuaranteedAuctionTerms(); + var od = new api.NonGuaranteedAuctionTerms.fromJson(o.toJson()); + checkNonGuaranteedAuctionTerms(od); + }); + }); + + unittest.group("obj-schema-NonGuaranteedFixedPriceTerms", () { + unittest.test("to-json--from-json", () { + var o = buildNonGuaranteedFixedPriceTerms(); + var od = new api.NonGuaranteedFixedPriceTerms.fromJson(o.toJson()); + checkNonGuaranteedFixedPriceTerms(od); + }); + }); + + unittest.group("obj-schema-Note", () { + unittest.test("to-json--from-json", () { + var o = buildNote(); + var od = new api.Note.fromJson(o.toJson()); + checkNote(od); + }); + }); + + unittest.group("obj-schema-OperatingSystemTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildOperatingSystemTargeting(); + var od = new api.OperatingSystemTargeting.fromJson(o.toJson()); + checkOperatingSystemTargeting(od); + }); + }); + + unittest.group("obj-schema-PauseProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPauseProposalRequest(); + var od = new api.PauseProposalRequest.fromJson(o.toJson()); + checkPauseProposalRequest(od); + }); + }); + + unittest.group("obj-schema-PlacementTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildPlacementTargeting(); + var od = new api.PlacementTargeting.fromJson(o.toJson()); + checkPlacementTargeting(od); + }); + }); + unittest.group("obj-schema-PlatformContext", () { unittest.test("to-json--from-json", () { var o = buildPlatformContext(); @@ -2320,6 +4259,54 @@ }); }); + unittest.group("obj-schema-Price", () { + unittest.test("to-json--from-json", () { + var o = buildPrice(); + var od = new api.Price.fromJson(o.toJson()); + checkPrice(od); + }); + }); + + unittest.group("obj-schema-PricePerBuyer", () { + unittest.test("to-json--from-json", () { + var o = buildPricePerBuyer(); + var od = new api.PricePerBuyer.fromJson(o.toJson()); + checkPricePerBuyer(od); + }); + }); + + unittest.group("obj-schema-PrivateData", () { + unittest.test("to-json--from-json", () { + var o = buildPrivateData(); + var od = new api.PrivateData.fromJson(o.toJson()); + checkPrivateData(od); + }); + }); + + unittest.group("obj-schema-Product", () { + unittest.test("to-json--from-json", () { + var o = buildProduct(); + var od = new api.Product.fromJson(o.toJson()); + checkProduct(od); + }); + }); + + unittest.group("obj-schema-Proposal", () { + unittest.test("to-json--from-json", () { + var o = buildProposal(); + var od = new api.Proposal.fromJson(o.toJson()); + checkProposal(od); + }); + }); + + unittest.group("obj-schema-PublisherProfile", () { + unittest.test("to-json--from-json", () { + var o = buildPublisherProfile(); + var od = new api.PublisherProfile.fromJson(o.toJson()); + checkPublisherProfile(od); + }); + }); + unittest.group("obj-schema-RealtimeTimeRange", () { unittest.test("to-json--from-json", () { var o = buildRealtimeTimeRange(); @@ -2352,6 +4339,14 @@ }); }); + unittest.group("obj-schema-ResumeProposalRequest", () { + unittest.test("to-json--from-json", () { + var o = buildResumeProposalRequest(); + var od = new api.ResumeProposalRequest.fromJson(o.toJson()); + checkResumeProposalRequest(od); + }); + }); + unittest.group("obj-schema-RowDimensions", () { unittest.test("to-json--from-json", () { var o = buildRowDimensions(); @@ -2368,6 +4363,14 @@ }); }); + unittest.group("obj-schema-Seller", () { + unittest.test("to-json--from-json", () { + var o = buildSeller(); + var od = new api.Seller.fromJson(o.toJson()); + checkSeller(od); + }); + }); + unittest.group("obj-schema-ServingContext", () { unittest.test("to-json--from-json", () { var o = buildServingContext(); @@ -2384,6 +4387,14 @@ }); }); + unittest.group("obj-schema-Size", () { + unittest.test("to-json--from-json", () { + var o = buildSize(); + var od = new api.Size.fromJson(o.toJson()); + checkSize(od); + }); + }); + unittest.group("obj-schema-StopWatchingCreativeRequest", () { unittest.test("to-json--from-json", () { var o = buildStopWatchingCreativeRequest(); @@ -2392,6 +4403,30 @@ }); }); + unittest.group("obj-schema-TargetingCriteria", () { + unittest.test("to-json--from-json", () { + var o = buildTargetingCriteria(); + var od = new api.TargetingCriteria.fromJson(o.toJson()); + checkTargetingCriteria(od); + }); + }); + + unittest.group("obj-schema-TargetingValue", () { + unittest.test("to-json--from-json", () { + var o = buildTargetingValue(); + var od = new api.TargetingValue.fromJson(o.toJson()); + checkTargetingValue(od); + }); + }); + + unittest.group("obj-schema-TechnologyTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildTechnologyTargeting(); + var od = new api.TechnologyTargeting.fromJson(o.toJson()); + checkTechnologyTargeting(od); + }); + }); + unittest.group("obj-schema-TimeInterval", () { unittest.test("to-json--from-json", () { var o = buildTimeInterval(); @@ -2400,6 +4435,22 @@ }); }); + unittest.group("obj-schema-TimeOfDay", () { + unittest.test("to-json--from-json", () { + var o = buildTimeOfDay(); + var od = new api.TimeOfDay.fromJson(o.toJson()); + checkTimeOfDay(od); + }); + }); + + unittest.group("obj-schema-UrlTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildUrlTargeting(); + var od = new api.UrlTargeting.fromJson(o.toJson()); + checkUrlTargeting(od); + }); + }); + unittest.group("obj-schema-VideoContent", () { unittest.test("to-json--from-json", () { var o = buildVideoContent(); @@ -2408,6 +4459,14 @@ }); }); + unittest.group("obj-schema-VideoTargeting", () { + unittest.test("to-json--from-json", () { + var o = buildVideoTargeting(); + var od = new api.VideoTargeting.fromJson(o.toJson()); + checkVideoTargeting(od); + }); + }); + unittest.group("obj-schema-WatchCreativeRequest", () { unittest.test("to-json--from-json", () { var o = buildWatchCreativeRequest(); @@ -3813,6 +5872,1137 @@ }); }); + unittest.group("resource-AccountsFinalizedProposalsResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsFinalizedProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.finalizedProposals; + var arg_accountId = "foo"; + var arg_filterSyntax = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/finalizedProposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 19), + unittest.equals("/finalizedProposals")); + pathOffset += 19; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["filterSyntax"].first, unittest.equals(arg_filterSyntax)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProposalsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + filterSyntax: arg_filterSyntax, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProposalsResponse(response); + }))); + }); + }); + + unittest.group("resource-AccountsProductsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsProductsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.products; + var arg_accountId = "foo"; + var arg_productId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/products/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/products/")); + pathOffset += 10; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_productId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProduct()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_productId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProduct(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsProductsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.products; + var arg_accountId = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/products", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/products")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProductsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProductsResponse(response); + }))); + }); + }); + + unittest.group("resource-AccountsProposalsResourceApi", () { + unittest.test("method--accept", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildAcceptProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AcceptProposalRequest.fromJson(json); + checkAcceptProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":accept", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals(":accept")); + pathOffset += 7; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .accept(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--addNote", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildAddNoteRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AddNoteRequest.fromJson(json); + checkAddNoteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":addNote", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals(":addNote")); + pathOffset += 8; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .addNote(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--cancelNegotiation", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildCancelNegotiationRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CancelNegotiationRequest.fromJson(json); + checkCancelNegotiationRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":cancelNegotiation", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 18), + unittest.equals(":cancelNegotiation")); + pathOffset += 18; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .cancelNegotiation(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--completeSetup", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildCompleteSetupRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CompleteSetupRequest.fromJson(json); + checkCompleteSetupRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":completeSetup", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals(":completeSetup")); + pathOffset += 14; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .completeSetup(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildProposal(); + var arg_accountId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Proposal.fromJson(json); + checkProposal(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/proposals")); + pathOffset += 10; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_accountId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_proposalId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_accountId = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_filterSyntax = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 10), + unittest.equals("/proposals")); + pathOffset += 10; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["filterSyntax"].first, unittest.equals(arg_filterSyntax)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListProposalsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + filterSyntax: arg_filterSyntax, + filter: arg_filter, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListProposalsResponse(response); + }))); + }); + + unittest.test("method--pause", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildPauseProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PauseProposalRequest.fromJson(json); + checkPauseProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":pause", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals(":pause")); + pathOffset += 6; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .pause(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--resume", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildResumeProposalRequest(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ResumeProposalRequest.fromJson(json); + checkResumeProposalRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + index = path.indexOf(":resume", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals(":resume")); + pathOffset += 7; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .resume(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.AccountsProposalsResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.proposals; + var arg_request = buildProposal(); + var arg_accountId = "foo"; + var arg_proposalId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Proposal.fromJson(json); + checkProposal(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/proposals/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/proposals/")); + pathOffset += 11; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_proposalId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildProposal()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_accountId, arg_proposalId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkProposal(response); + }))); + }); + }); + + unittest.group("resource-AccountsPublisherProfilesResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AccountsPublisherProfilesResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.publisherProfiles; + var arg_accountId = "foo"; + var arg_publisherProfileId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/publisherProfiles/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 19), + unittest.equals("/publisherProfiles/")); + pathOffset += 19; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_publisherProfileId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPublisherProfile()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_accountId, arg_publisherProfileId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPublisherProfile(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AccountsPublisherProfilesResourceApi res = + new api.Adexchangebuyer2Api(mock).accounts.publisherProfiles; + var arg_accountId = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 17), + unittest.equals("v2beta1/accounts/")); + pathOffset += 17; + index = path.indexOf("/publisherProfiles", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_accountId")); + unittest.expect(path.substring(pathOffset, pathOffset + 18), + unittest.equals("/publisherProfiles")); + pathOffset += 18; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListPublisherProfilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_accountId, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListPublisherProfilesResponse(response); + }))); + }); + }); + + unittest.group("resource-BiddersAccountsCreativesResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.BiddersAccountsCreativesResourceApi res = + new api.Adexchangebuyer2Api(mock).bidders.accounts.creatives; + var arg_ownerName = "foo"; + var arg_creativeId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_ownerName, arg_creativeId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + }); + unittest.group("resource-BiddersAccountsFilterSetsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); @@ -5225,8 +8415,8 @@ api.BiddersFilterSetsFilteredBidsResourceApi res = new api.Adexchangebuyer2Api(mock).bidders.filterSets.filteredBids; var arg_filterSetName = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -5259,10 +8449,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5273,8 +8463,8 @@ }), true); res .list(arg_filterSetName, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListFilteredBidsResponse(response);
diff --git a/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart b/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart new file mode 100644 index 0000000..c9c90ef --- /dev/null +++ b/generated/googleapis_beta/test/alertcenter/v1beta1_test.dart
@@ -0,0 +1,1581 @@ +library googleapis_beta.alertcenter.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/alertcenter/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccountWarning = 0; +buildAccountWarning() { + var o = new api.AccountWarning(); + buildCounterAccountWarning++; + if (buildCounterAccountWarning < 3) { + o.email = "foo"; + o.loginDetails = buildLoginDetails(); + } + buildCounterAccountWarning--; + return o; +} + +checkAccountWarning(api.AccountWarning o) { + buildCounterAccountWarning++; + if (buildCounterAccountWarning < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkLoginDetails(o.loginDetails); + } + buildCounterAccountWarning--; +} + +buildUnnamed4761() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4761(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +core.int buildCounterAlert = 0; +buildAlert() { + var o = new api.Alert(); + buildCounterAlert++; + if (buildCounterAlert < 3) { + o.alertId = "foo"; + o.createTime = "foo"; + o.customerId = "foo"; + o.data = buildUnnamed4761(); + o.deleted = true; + o.endTime = "foo"; + o.securityInvestigationToolLink = "foo"; + o.source = "foo"; + o.startTime = "foo"; + o.type = "foo"; + } + buildCounterAlert--; + return o; +} + +checkAlert(api.Alert o) { + buildCounterAlert++; + if (buildCounterAlert < 3) { + unittest.expect(o.alertId, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.customerId, unittest.equals('foo')); + checkUnnamed4761(o.data); + unittest.expect(o.deleted, unittest.isTrue); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.securityInvestigationToolLink, unittest.equals('foo')); + unittest.expect(o.source, unittest.equals('foo')); + unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAlert--; +} + +core.int buildCounterAlertFeedback = 0; +buildAlertFeedback() { + var o = new api.AlertFeedback(); + buildCounterAlertFeedback++; + if (buildCounterAlertFeedback < 3) { + o.alertId = "foo"; + o.createTime = "foo"; + o.customerId = "foo"; + o.email = "foo"; + o.feedbackId = "foo"; + o.type = "foo"; + } + buildCounterAlertFeedback--; + return o; +} + +checkAlertFeedback(api.AlertFeedback o) { + buildCounterAlertFeedback++; + if (buildCounterAlertFeedback < 3) { + unittest.expect(o.alertId, unittest.equals('foo')); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.customerId, unittest.equals('foo')); + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.feedbackId, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAlertFeedback--; +} + +core.int buildCounterAttachment = 0; +buildAttachment() { + var o = new api.Attachment(); + buildCounterAttachment++; + if (buildCounterAttachment < 3) { + o.csv = buildCsv(); + } + buildCounterAttachment--; + return o; +} + +checkAttachment(api.Attachment o) { + buildCounterAttachment++; + if (buildCounterAttachment < 3) { + checkCsv(o.csv); + } + buildCounterAttachment--; +} + +buildUnnamed4762() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4762(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterBadWhitelist = 0; +buildBadWhitelist() { + var o = new api.BadWhitelist(); + buildCounterBadWhitelist++; + if (buildCounterBadWhitelist < 3) { + o.domainId = buildDomainId(); + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4762(); + o.sourceIp = "foo"; + } + buildCounterBadWhitelist--; + return o; +} + +checkBadWhitelist(api.BadWhitelist o) { + buildCounterBadWhitelist++; + if (buildCounterBadWhitelist < 3) { + checkDomainId(o.domainId); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4762(o.messages); + unittest.expect(o.sourceIp, unittest.equals('foo')); + } + buildCounterBadWhitelist--; +} + +core.int buildCounterCloudPubsubTopic = 0; +buildCloudPubsubTopic() { + var o = new api.CloudPubsubTopic(); + buildCounterCloudPubsubTopic++; + if (buildCounterCloudPubsubTopic < 3) { + o.payloadFormat = "foo"; + o.topicName = "foo"; + } + buildCounterCloudPubsubTopic--; + return o; +} + +checkCloudPubsubTopic(api.CloudPubsubTopic o) { + buildCounterCloudPubsubTopic++; + if (buildCounterCloudPubsubTopic < 3) { + unittest.expect(o.payloadFormat, unittest.equals('foo')); + unittest.expect(o.topicName, unittest.equals('foo')); + } + buildCounterCloudPubsubTopic--; +} + +buildUnnamed4763() { + var o = new core.List<api.CsvRow>(); + o.add(buildCsvRow()); + o.add(buildCsvRow()); + return o; +} + +checkUnnamed4763(core.List<api.CsvRow> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCsvRow(o[0]); + checkCsvRow(o[1]); +} + +buildUnnamed4764() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4764(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCsv = 0; +buildCsv() { + var o = new api.Csv(); + buildCounterCsv++; + if (buildCounterCsv < 3) { + o.dataRows = buildUnnamed4763(); + o.headers = buildUnnamed4764(); + } + buildCounterCsv--; + return o; +} + +checkCsv(api.Csv o) { + buildCounterCsv++; + if (buildCounterCsv < 3) { + checkUnnamed4763(o.dataRows); + checkUnnamed4764(o.headers); + } + buildCounterCsv--; +} + +buildUnnamed4765() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4765(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCsvRow = 0; +buildCsvRow() { + var o = new api.CsvRow(); + buildCounterCsvRow++; + if (buildCounterCsvRow < 3) { + o.entries = buildUnnamed4765(); + } + buildCounterCsvRow--; + return o; +} + +checkCsvRow(api.CsvRow o) { + buildCounterCsvRow++; + if (buildCounterCsvRow < 3) { + checkUnnamed4765(o.entries); + } + buildCounterCsvRow--; +} + +buildUnnamed4766() { + var o = new core.List<api.DeviceCompromisedSecurityDetail>(); + o.add(buildDeviceCompromisedSecurityDetail()); + o.add(buildDeviceCompromisedSecurityDetail()); + return o; +} + +checkUnnamed4766(core.List<api.DeviceCompromisedSecurityDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDeviceCompromisedSecurityDetail(o[0]); + checkDeviceCompromisedSecurityDetail(o[1]); +} + +core.int buildCounterDeviceCompromised = 0; +buildDeviceCompromised() { + var o = new api.DeviceCompromised(); + buildCounterDeviceCompromised++; + if (buildCounterDeviceCompromised < 3) { + o.email = "foo"; + o.events = buildUnnamed4766(); + } + buildCounterDeviceCompromised--; + return o; +} + +checkDeviceCompromised(api.DeviceCompromised o) { + buildCounterDeviceCompromised++; + if (buildCounterDeviceCompromised < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4766(o.events); + } + buildCounterDeviceCompromised--; +} + +core.int buildCounterDeviceCompromisedSecurityDetail = 0; +buildDeviceCompromisedSecurityDetail() { + var o = new api.DeviceCompromisedSecurityDetail(); + buildCounterDeviceCompromisedSecurityDetail++; + if (buildCounterDeviceCompromisedSecurityDetail < 3) { + o.deviceCompromisedState = "foo"; + o.deviceId = "foo"; + o.deviceModel = "foo"; + o.deviceType = "foo"; + o.iosVendorId = "foo"; + o.resourceId = "foo"; + o.serialNumber = "foo"; + } + buildCounterDeviceCompromisedSecurityDetail--; + return o; +} + +checkDeviceCompromisedSecurityDetail(api.DeviceCompromisedSecurityDetail o) { + buildCounterDeviceCompromisedSecurityDetail++; + if (buildCounterDeviceCompromisedSecurityDetail < 3) { + unittest.expect(o.deviceCompromisedState, unittest.equals('foo')); + unittest.expect(o.deviceId, unittest.equals('foo')); + unittest.expect(o.deviceModel, unittest.equals('foo')); + unittest.expect(o.deviceType, unittest.equals('foo')); + unittest.expect(o.iosVendorId, unittest.equals('foo')); + unittest.expect(o.resourceId, unittest.equals('foo')); + unittest.expect(o.serialNumber, unittest.equals('foo')); + } + buildCounterDeviceCompromisedSecurityDetail--; +} + +core.int buildCounterDomainId = 0; +buildDomainId() { + var o = new api.DomainId(); + buildCounterDomainId++; + if (buildCounterDomainId < 3) { + o.customerPrimaryDomain = "foo"; + } + buildCounterDomainId--; + return o; +} + +checkDomainId(api.DomainId o) { + buildCounterDomainId++; + if (buildCounterDomainId < 3) { + unittest.expect(o.customerPrimaryDomain, unittest.equals('foo')); + } + buildCounterDomainId--; +} + +core.int buildCounterDomainWideTakeoutInitiated = 0; +buildDomainWideTakeoutInitiated() { + var o = new api.DomainWideTakeoutInitiated(); + buildCounterDomainWideTakeoutInitiated++; + if (buildCounterDomainWideTakeoutInitiated < 3) { + o.email = "foo"; + o.takeoutRequestId = "foo"; + } + buildCounterDomainWideTakeoutInitiated--; + return o; +} + +checkDomainWideTakeoutInitiated(api.DomainWideTakeoutInitiated o) { + buildCounterDomainWideTakeoutInitiated++; + if (buildCounterDomainWideTakeoutInitiated < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.takeoutRequestId, unittest.equals('foo')); + } + buildCounterDomainWideTakeoutInitiated--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +buildUnnamed4767() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4767(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterGmailMessageInfo = 0; +buildGmailMessageInfo() { + var o = new api.GmailMessageInfo(); + buildCounterGmailMessageInfo++; + if (buildCounterGmailMessageInfo < 3) { + o.attachmentsSha256Hash = buildUnnamed4767(); + o.date = "foo"; + o.md5HashMessageBody = "foo"; + o.md5HashSubject = "foo"; + o.messageBodySnippet = "foo"; + o.messageId = "foo"; + o.recipient = "foo"; + o.subjectText = "foo"; + } + buildCounterGmailMessageInfo--; + return o; +} + +checkGmailMessageInfo(api.GmailMessageInfo o) { + buildCounterGmailMessageInfo++; + if (buildCounterGmailMessageInfo < 3) { + checkUnnamed4767(o.attachmentsSha256Hash); + unittest.expect(o.date, unittest.equals('foo')); + unittest.expect(o.md5HashMessageBody, unittest.equals('foo')); + unittest.expect(o.md5HashSubject, unittest.equals('foo')); + unittest.expect(o.messageBodySnippet, unittest.equals('foo')); + unittest.expect(o.messageId, unittest.equals('foo')); + unittest.expect(o.recipient, unittest.equals('foo')); + unittest.expect(o.subjectText, unittest.equals('foo')); + } + buildCounterGmailMessageInfo--; +} + +buildUnnamed4768() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4768(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterGoogleOperations = 0; +buildGoogleOperations() { + var o = new api.GoogleOperations(); + buildCounterGoogleOperations++; + if (buildCounterGoogleOperations < 3) { + o.affectedUserEmails = buildUnnamed4768(); + o.attachmentData = buildAttachment(); + o.description = "foo"; + o.title = "foo"; + } + buildCounterGoogleOperations--; + return o; +} + +checkGoogleOperations(api.GoogleOperations o) { + buildCounterGoogleOperations++; + if (buildCounterGoogleOperations < 3) { + checkUnnamed4768(o.affectedUserEmails); + checkAttachment(o.attachmentData); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterGoogleOperations--; +} + +buildUnnamed4769() { + var o = new core.List<api.AlertFeedback>(); + o.add(buildAlertFeedback()); + o.add(buildAlertFeedback()); + return o; +} + +checkUnnamed4769(core.List<api.AlertFeedback> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAlertFeedback(o[0]); + checkAlertFeedback(o[1]); +} + +core.int buildCounterListAlertFeedbackResponse = 0; +buildListAlertFeedbackResponse() { + var o = new api.ListAlertFeedbackResponse(); + buildCounterListAlertFeedbackResponse++; + if (buildCounterListAlertFeedbackResponse < 3) { + o.feedback = buildUnnamed4769(); + } + buildCounterListAlertFeedbackResponse--; + return o; +} + +checkListAlertFeedbackResponse(api.ListAlertFeedbackResponse o) { + buildCounterListAlertFeedbackResponse++; + if (buildCounterListAlertFeedbackResponse < 3) { + checkUnnamed4769(o.feedback); + } + buildCounterListAlertFeedbackResponse--; +} + +buildUnnamed4770() { + var o = new core.List<api.Alert>(); + o.add(buildAlert()); + o.add(buildAlert()); + return o; +} + +checkUnnamed4770(core.List<api.Alert> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAlert(o[0]); + checkAlert(o[1]); +} + +core.int buildCounterListAlertsResponse = 0; +buildListAlertsResponse() { + var o = new api.ListAlertsResponse(); + buildCounterListAlertsResponse++; + if (buildCounterListAlertsResponse < 3) { + o.alerts = buildUnnamed4770(); + o.nextPageToken = "foo"; + } + buildCounterListAlertsResponse--; + return o; +} + +checkListAlertsResponse(api.ListAlertsResponse o) { + buildCounterListAlertsResponse++; + if (buildCounterListAlertsResponse < 3) { + checkUnnamed4770(o.alerts); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListAlertsResponse--; +} + +core.int buildCounterLoginDetails = 0; +buildLoginDetails() { + var o = new api.LoginDetails(); + buildCounterLoginDetails++; + if (buildCounterLoginDetails < 3) { + o.ipAddress = "foo"; + o.loginTime = "foo"; + } + buildCounterLoginDetails--; + return o; +} + +checkLoginDetails(api.LoginDetails o) { + buildCounterLoginDetails++; + if (buildCounterLoginDetails < 3) { + unittest.expect(o.ipAddress, unittest.equals('foo')); + unittest.expect(o.loginTime, unittest.equals('foo')); + } + buildCounterLoginDetails--; +} + +buildUnnamed4771() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4771(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterMailPhishing = 0; +buildMailPhishing() { + var o = new api.MailPhishing(); + buildCounterMailPhishing++; + if (buildCounterMailPhishing < 3) { + o.domainId = buildDomainId(); + o.isInternal = true; + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4771(); + } + buildCounterMailPhishing--; + return o; +} + +checkMailPhishing(api.MailPhishing o) { + buildCounterMailPhishing++; + if (buildCounterMailPhishing < 3) { + checkDomainId(o.domainId); + unittest.expect(o.isInternal, unittest.isTrue); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4771(o.messages); + } + buildCounterMailPhishing--; +} + +core.int buildCounterMaliciousEntity = 0; +buildMaliciousEntity() { + var o = new api.MaliciousEntity(); + buildCounterMaliciousEntity++; + if (buildCounterMaliciousEntity < 3) { + o.fromHeader = "foo"; + } + buildCounterMaliciousEntity--; + return o; +} + +checkMaliciousEntity(api.MaliciousEntity o) { + buildCounterMaliciousEntity++; + if (buildCounterMaliciousEntity < 3) { + unittest.expect(o.fromHeader, unittest.equals('foo')); + } + buildCounterMaliciousEntity--; +} + +core.int buildCounterNotification = 0; +buildNotification() { + var o = new api.Notification(); + buildCounterNotification++; + if (buildCounterNotification < 3) { + o.cloudPubsubTopic = buildCloudPubsubTopic(); + } + buildCounterNotification--; + return o; +} + +checkNotification(api.Notification o) { + buildCounterNotification++; + if (buildCounterNotification < 3) { + checkCloudPubsubTopic(o.cloudPubsubTopic); + } + buildCounterNotification--; +} + +buildUnnamed4772() { + var o = new core.List<api.GmailMessageInfo>(); + o.add(buildGmailMessageInfo()); + o.add(buildGmailMessageInfo()); + return o; +} + +checkUnnamed4772(core.List<api.GmailMessageInfo> o) { + unittest.expect(o, unittest.hasLength(2)); + checkGmailMessageInfo(o[0]); + checkGmailMessageInfo(o[1]); +} + +core.int buildCounterPhishingSpike = 0; +buildPhishingSpike() { + var o = new api.PhishingSpike(); + buildCounterPhishingSpike++; + if (buildCounterPhishingSpike < 3) { + o.domainId = buildDomainId(); + o.isInternal = true; + o.maliciousEntity = buildMaliciousEntity(); + o.messages = buildUnnamed4772(); + } + buildCounterPhishingSpike--; + return o; +} + +checkPhishingSpike(api.PhishingSpike o) { + buildCounterPhishingSpike++; + if (buildCounterPhishingSpike < 3) { + checkDomainId(o.domainId); + unittest.expect(o.isInternal, unittest.isTrue); + checkMaliciousEntity(o.maliciousEntity); + checkUnnamed4772(o.messages); + } + buildCounterPhishingSpike--; +} + +buildUnnamed4773() { + var o = new core.List<api.Notification>(); + o.add(buildNotification()); + o.add(buildNotification()); + return o; +} + +checkUnnamed4773(core.List<api.Notification> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNotification(o[0]); + checkNotification(o[1]); +} + +core.int buildCounterSettings = 0; +buildSettings() { + var o = new api.Settings(); + buildCounterSettings++; + if (buildCounterSettings < 3) { + o.notifications = buildUnnamed4773(); + } + buildCounterSettings--; + return o; +} + +checkSettings(api.Settings o) { + buildCounterSettings++; + if (buildCounterSettings < 3) { + checkUnnamed4773(o.notifications); + } + buildCounterSettings--; +} + +core.int buildCounterStateSponsoredAttack = 0; +buildStateSponsoredAttack() { + var o = new api.StateSponsoredAttack(); + buildCounterStateSponsoredAttack++; + if (buildCounterStateSponsoredAttack < 3) { + o.email = "foo"; + } + buildCounterStateSponsoredAttack--; + return o; +} + +checkStateSponsoredAttack(api.StateSponsoredAttack o) { + buildCounterStateSponsoredAttack++; + if (buildCounterStateSponsoredAttack < 3) { + unittest.expect(o.email, unittest.equals('foo')); + } + buildCounterStateSponsoredAttack--; +} + +buildUnnamed4774() { + var o = new core.List<api.SuspiciousActivitySecurityDetail>(); + o.add(buildSuspiciousActivitySecurityDetail()); + o.add(buildSuspiciousActivitySecurityDetail()); + return o; +} + +checkUnnamed4774(core.List<api.SuspiciousActivitySecurityDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSuspiciousActivitySecurityDetail(o[0]); + checkSuspiciousActivitySecurityDetail(o[1]); +} + +core.int buildCounterSuspiciousActivity = 0; +buildSuspiciousActivity() { + var o = new api.SuspiciousActivity(); + buildCounterSuspiciousActivity++; + if (buildCounterSuspiciousActivity < 3) { + o.email = "foo"; + o.events = buildUnnamed4774(); + } + buildCounterSuspiciousActivity--; + return o; +} + +checkSuspiciousActivity(api.SuspiciousActivity o) { + buildCounterSuspiciousActivity++; + if (buildCounterSuspiciousActivity < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4774(o.events); + } + buildCounterSuspiciousActivity--; +} + +core.int buildCounterSuspiciousActivitySecurityDetail = 0; +buildSuspiciousActivitySecurityDetail() { + var o = new api.SuspiciousActivitySecurityDetail(); + buildCounterSuspiciousActivitySecurityDetail++; + if (buildCounterSuspiciousActivitySecurityDetail < 3) { + o.deviceId = "foo"; + o.deviceModel = "foo"; + o.deviceProperty = "foo"; + o.deviceType = "foo"; + o.iosVendorId = "foo"; + o.newValue = "foo"; + o.oldValue = "foo"; + o.resourceId = "foo"; + o.serialNumber = "foo"; + } + buildCounterSuspiciousActivitySecurityDetail--; + return o; +} + +checkSuspiciousActivitySecurityDetail(api.SuspiciousActivitySecurityDetail o) { + buildCounterSuspiciousActivitySecurityDetail++; + if (buildCounterSuspiciousActivitySecurityDetail < 3) { + unittest.expect(o.deviceId, unittest.equals('foo')); + unittest.expect(o.deviceModel, unittest.equals('foo')); + unittest.expect(o.deviceProperty, unittest.equals('foo')); + unittest.expect(o.deviceType, unittest.equals('foo')); + unittest.expect(o.iosVendorId, unittest.equals('foo')); + unittest.expect(o.newValue, unittest.equals('foo')); + unittest.expect(o.oldValue, unittest.equals('foo')); + unittest.expect(o.resourceId, unittest.equals('foo')); + unittest.expect(o.serialNumber, unittest.equals('foo')); + } + buildCounterSuspiciousActivitySecurityDetail--; +} + +core.int buildCounterUndeleteAlertRequest = 0; +buildUndeleteAlertRequest() { + var o = new api.UndeleteAlertRequest(); + buildCounterUndeleteAlertRequest++; + if (buildCounterUndeleteAlertRequest < 3) { + o.customerId = "foo"; + } + buildCounterUndeleteAlertRequest--; + return o; +} + +checkUndeleteAlertRequest(api.UndeleteAlertRequest o) { + buildCounterUndeleteAlertRequest++; + if (buildCounterUndeleteAlertRequest < 3) { + unittest.expect(o.customerId, unittest.equals('foo')); + } + buildCounterUndeleteAlertRequest--; +} + +main() { + unittest.group("obj-schema-AccountWarning", () { + unittest.test("to-json--from-json", () { + var o = buildAccountWarning(); + var od = new api.AccountWarning.fromJson(o.toJson()); + checkAccountWarning(od); + }); + }); + + unittest.group("obj-schema-Alert", () { + unittest.test("to-json--from-json", () { + var o = buildAlert(); + var od = new api.Alert.fromJson(o.toJson()); + checkAlert(od); + }); + }); + + unittest.group("obj-schema-AlertFeedback", () { + unittest.test("to-json--from-json", () { + var o = buildAlertFeedback(); + var od = new api.AlertFeedback.fromJson(o.toJson()); + checkAlertFeedback(od); + }); + }); + + unittest.group("obj-schema-Attachment", () { + unittest.test("to-json--from-json", () { + var o = buildAttachment(); + var od = new api.Attachment.fromJson(o.toJson()); + checkAttachment(od); + }); + }); + + unittest.group("obj-schema-BadWhitelist", () { + unittest.test("to-json--from-json", () { + var o = buildBadWhitelist(); + var od = new api.BadWhitelist.fromJson(o.toJson()); + checkBadWhitelist(od); + }); + }); + + unittest.group("obj-schema-CloudPubsubTopic", () { + unittest.test("to-json--from-json", () { + var o = buildCloudPubsubTopic(); + var od = new api.CloudPubsubTopic.fromJson(o.toJson()); + checkCloudPubsubTopic(od); + }); + }); + + unittest.group("obj-schema-Csv", () { + unittest.test("to-json--from-json", () { + var o = buildCsv(); + var od = new api.Csv.fromJson(o.toJson()); + checkCsv(od); + }); + }); + + unittest.group("obj-schema-CsvRow", () { + unittest.test("to-json--from-json", () { + var o = buildCsvRow(); + var od = new api.CsvRow.fromJson(o.toJson()); + checkCsvRow(od); + }); + }); + + unittest.group("obj-schema-DeviceCompromised", () { + unittest.test("to-json--from-json", () { + var o = buildDeviceCompromised(); + var od = new api.DeviceCompromised.fromJson(o.toJson()); + checkDeviceCompromised(od); + }); + }); + + unittest.group("obj-schema-DeviceCompromisedSecurityDetail", () { + unittest.test("to-json--from-json", () { + var o = buildDeviceCompromisedSecurityDetail(); + var od = new api.DeviceCompromisedSecurityDetail.fromJson(o.toJson()); + checkDeviceCompromisedSecurityDetail(od); + }); + }); + + unittest.group("obj-schema-DomainId", () { + unittest.test("to-json--from-json", () { + var o = buildDomainId(); + var od = new api.DomainId.fromJson(o.toJson()); + checkDomainId(od); + }); + }); + + unittest.group("obj-schema-DomainWideTakeoutInitiated", () { + unittest.test("to-json--from-json", () { + var o = buildDomainWideTakeoutInitiated(); + var od = new api.DomainWideTakeoutInitiated.fromJson(o.toJson()); + checkDomainWideTakeoutInitiated(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-GmailMessageInfo", () { + unittest.test("to-json--from-json", () { + var o = buildGmailMessageInfo(); + var od = new api.GmailMessageInfo.fromJson(o.toJson()); + checkGmailMessageInfo(od); + }); + }); + + unittest.group("obj-schema-GoogleOperations", () { + unittest.test("to-json--from-json", () { + var o = buildGoogleOperations(); + var od = new api.GoogleOperations.fromJson(o.toJson()); + checkGoogleOperations(od); + }); + }); + + unittest.group("obj-schema-ListAlertFeedbackResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAlertFeedbackResponse(); + var od = new api.ListAlertFeedbackResponse.fromJson(o.toJson()); + checkListAlertFeedbackResponse(od); + }); + }); + + unittest.group("obj-schema-ListAlertsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListAlertsResponse(); + var od = new api.ListAlertsResponse.fromJson(o.toJson()); + checkListAlertsResponse(od); + }); + }); + + unittest.group("obj-schema-LoginDetails", () { + unittest.test("to-json--from-json", () { + var o = buildLoginDetails(); + var od = new api.LoginDetails.fromJson(o.toJson()); + checkLoginDetails(od); + }); + }); + + unittest.group("obj-schema-MailPhishing", () { + unittest.test("to-json--from-json", () { + var o = buildMailPhishing(); + var od = new api.MailPhishing.fromJson(o.toJson()); + checkMailPhishing(od); + }); + }); + + unittest.group("obj-schema-MaliciousEntity", () { + unittest.test("to-json--from-json", () { + var o = buildMaliciousEntity(); + var od = new api.MaliciousEntity.fromJson(o.toJson()); + checkMaliciousEntity(od); + }); + }); + + unittest.group("obj-schema-Notification", () { + unittest.test("to-json--from-json", () { + var o = buildNotification(); + var od = new api.Notification.fromJson(o.toJson()); + checkNotification(od); + }); + }); + + unittest.group("obj-schema-PhishingSpike", () { + unittest.test("to-json--from-json", () { + var o = buildPhishingSpike(); + var od = new api.PhishingSpike.fromJson(o.toJson()); + checkPhishingSpike(od); + }); + }); + + unittest.group("obj-schema-Settings", () { + unittest.test("to-json--from-json", () { + var o = buildSettings(); + var od = new api.Settings.fromJson(o.toJson()); + checkSettings(od); + }); + }); + + unittest.group("obj-schema-StateSponsoredAttack", () { + unittest.test("to-json--from-json", () { + var o = buildStateSponsoredAttack(); + var od = new api.StateSponsoredAttack.fromJson(o.toJson()); + checkStateSponsoredAttack(od); + }); + }); + + unittest.group("obj-schema-SuspiciousActivity", () { + unittest.test("to-json--from-json", () { + var o = buildSuspiciousActivity(); + var od = new api.SuspiciousActivity.fromJson(o.toJson()); + checkSuspiciousActivity(od); + }); + }); + + unittest.group("obj-schema-SuspiciousActivitySecurityDetail", () { + unittest.test("to-json--from-json", () { + var o = buildSuspiciousActivitySecurityDetail(); + var od = new api.SuspiciousActivitySecurityDetail.fromJson(o.toJson()); + checkSuspiciousActivitySecurityDetail(od); + }); + }); + + unittest.group("obj-schema-UndeleteAlertRequest", () { + unittest.test("to-json--from-json", () { + var o = buildUndeleteAlertRequest(); + var od = new api.UndeleteAlertRequest.fromJson(o.toJson()); + checkUndeleteAlertRequest(od); + }); + }); + + unittest.group("resource-AlertsResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_alertId, customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); + pathOffset = path.length; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlert()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_alertId, customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlert(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_orderBy = "foo"; + var arg_customerId = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1beta1/alerts")); + pathOffset += 14; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect( + queryMap["orderBy"].first, unittest.equals(arg_orderBy)); + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAlertsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list( + filter: arg_filter, + pageToken: arg_pageToken, + orderBy: arg_orderBy, + customerId: arg_customerId, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAlertsResponse(response); + }))); + }); + + unittest.test("method--undelete", () { + var mock = new HttpServerMock(); + api.AlertsResourceApi res = new api.AlertcenterApi(mock).alerts; + var arg_request = buildUndeleteAlertRequest(); + var arg_alertId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.UndeleteAlertRequest.fromJson(json); + checkUndeleteAlertRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf(":undelete", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":undelete")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlert()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .undelete(arg_request, arg_alertId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlert(response); + }))); + }); + }); + + unittest.group("resource-AlertsFeedbackResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.AlertsFeedbackResourceApi res = + new api.AlertcenterApi(mock).alerts.feedback; + var arg_request = buildAlertFeedback(); + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AlertFeedback.fromJson(json); + checkAlertFeedback(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf("/feedback", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/feedback")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildAlertFeedback()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_alertId, + customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkAlertFeedback(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.AlertsFeedbackResourceApi res = + new api.AlertcenterApi(mock).alerts.feedback; + var arg_alertId = "foo"; + var arg_customerId = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 15), + unittest.equals("v1beta1/alerts/")); + pathOffset += 15; + index = path.indexOf("/feedback", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_alertId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals("/feedback")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListAlertFeedbackResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_alertId, + customerId: arg_customerId, + filter: arg_filter, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListAlertFeedbackResponse(response); + }))); + }); + }); + + unittest.group("resource-V1beta1ResourceApi", () { + unittest.test("method--getSettings", () { + var mock = new HttpServerMock(); + api.V1beta1ResourceApi res = new api.AlertcenterApi(mock).v1beta1; + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 16), + unittest.equals("v1beta1/settings")); + pathOffset += 16; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSettings()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getSettings(customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSettings(response); + }))); + }); + + unittest.test("method--updateSettings", () { + var mock = new HttpServerMock(); + api.V1beta1ResourceApi res = new api.AlertcenterApi(mock).v1beta1; + var arg_request = buildSettings(); + var arg_customerId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Settings.fromJson(json); + checkSettings(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 16), + unittest.equals("v1beta1/settings")); + pathOffset += 16; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["customerId"].first, unittest.equals(arg_customerId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSettings()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updateSettings(arg_request, + customerId: arg_customerId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSettings(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/appengine/v1beta4_test.dart b/generated/googleapis_beta/test/appengine/v1beta4_test.dart index d0220b0..8d857c6 100644 --- a/generated/googleapis_beta/test/appengine/v1beta4_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta4_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5436() { +buildUnnamed4987() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5436(core.List<api.UrlDispatchRule> o) { +checkUnnamed4987(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5436(); + o.dispatchRules = buildUnnamed4987(); o.iap = buildIdentityAwareProxy(); o.id = "foo"; o.location = "foo"; @@ -137,7 +137,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5436(o.dispatchRules); + checkUnnamed4987(o.dispatchRules); checkIdentityAwareProxy(o.iap); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); @@ -324,27 +324,27 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5437() { +buildUnnamed4988() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5437(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4988(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); } -buildUnnamed5438() { +buildUnnamed4989() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5438(core.List<api.SourceReference> o) { +checkUnnamed4989(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -356,8 +356,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { o.container = buildContainerInfo(); - o.files = buildUnnamed5437(); - o.sourceReferences = buildUnnamed5438(); + o.files = buildUnnamed4988(); + o.sourceReferences = buildUnnamed4989(); } buildCounterDeployment--; return o; @@ -367,8 +367,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { checkContainerInfo(o.container); - checkUnnamed5437(o.files); - checkUnnamed5438(o.sourceReferences); + checkUnnamed4988(o.files); + checkUnnamed4989(o.sourceReferences); } buildCounterDeployment--; } @@ -595,14 +595,14 @@ buildCounterLibrary--; } -buildUnnamed5439() { +buildUnnamed4990() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5439(core.List<api.Instance> o) { +checkUnnamed4990(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -613,7 +613,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5439(); + o.instances = buildUnnamed4990(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -623,20 +623,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5439(o.instances); + checkUnnamed4990(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5440() { +buildUnnamed4991() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5440(core.List<api.Location> o) { +checkUnnamed4991(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -647,7 +647,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5440(); + o.locations = buildUnnamed4991(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -657,20 +657,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5440(o.locations); + checkUnnamed4991(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5441() { +buildUnnamed4992() { var o = new core.List<api.Module>(); o.add(buildModule()); o.add(buildModule()); return o; } -checkUnnamed5441(core.List<api.Module> o) { +checkUnnamed4992(core.List<api.Module> o) { unittest.expect(o, unittest.hasLength(2)); checkModule(o[0]); checkModule(o[1]); @@ -681,7 +681,7 @@ var o = new api.ListModulesResponse(); buildCounterListModulesResponse++; if (buildCounterListModulesResponse < 3) { - o.modules = buildUnnamed5441(); + o.modules = buildUnnamed4992(); o.nextPageToken = "foo"; } buildCounterListModulesResponse--; @@ -691,20 +691,20 @@ checkListModulesResponse(api.ListModulesResponse o) { buildCounterListModulesResponse++; if (buildCounterListModulesResponse < 3) { - checkUnnamed5441(o.modules); + checkUnnamed4992(o.modules); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListModulesResponse--; } -buildUnnamed5442() { +buildUnnamed4993() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5442(core.List<api.Operation> o) { +checkUnnamed4993(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -716,7 +716,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5442(); + o.operations = buildUnnamed4993(); } buildCounterListOperationsResponse--; return o; @@ -726,19 +726,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5442(o.operations); + checkUnnamed4993(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5443() { +buildUnnamed4994() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5443(core.List<api.Version> o) { +checkUnnamed4994(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -750,7 +750,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5443(); + o.versions = buildUnnamed4994(); } buildCounterListVersionsResponse--; return o; @@ -760,25 +760,25 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5443(o.versions); + checkUnnamed4994(o.versions); } buildCounterListVersionsResponse--; } -buildUnnamed5444() { +buildUnnamed4995() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5444(core.Map<core.String, core.String> o) { +checkUnnamed4995(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5445() { +buildUnnamed4996() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -793,7 +793,7 @@ return o; } -checkUnnamed5445(core.Map<core.String, core.Object> o) { +checkUnnamed4996(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -813,9 +813,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5444(); + o.labels = buildUnnamed4995(); o.locationId = "foo"; - o.metadata = buildUnnamed5445(); + o.metadata = buildUnnamed4996(); o.name = "foo"; } buildCounterLocation--; @@ -826,9 +826,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5444(o.labels); + checkUnnamed4995(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5445(o.metadata); + checkUnnamed4996(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -897,14 +897,14 @@ buildCounterModule--; } -buildUnnamed5446() { +buildUnnamed4997() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5446(core.List<core.String> o) { +checkUnnamed4997(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -915,7 +915,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5446(); + o.forwardedPorts = buildUnnamed4997(); o.instanceTag = "foo"; o.name = "foo"; } @@ -926,7 +926,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5446(o.forwardedPorts); + checkUnnamed4997(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } @@ -958,7 +958,7 @@ buildCounterNetworkUtilization--; } -buildUnnamed5447() { +buildUnnamed4998() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -973,7 +973,7 @@ return o; } -checkUnnamed5447(core.Map<core.String, core.Object> o) { +checkUnnamed4998(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -987,7 +987,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5448() { +buildUnnamed4999() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1002,7 +1002,7 @@ return o; } -checkUnnamed5448(core.Map<core.String, core.Object> o) { +checkUnnamed4999(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1023,9 +1023,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5447(); + o.metadata = buildUnnamed4998(); o.name = "foo"; - o.response = buildUnnamed5448(); + o.response = buildUnnamed4999(); } buildCounterOperation--; return o; @@ -1036,9 +1036,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5447(o.metadata); + checkUnnamed4998(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5448(o.response); + checkUnnamed4999(o.response); } buildCounterOperation--; } @@ -1072,14 +1072,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5449() { +buildUnnamed5000() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5449(core.List<core.String> o) { +checkUnnamed5000(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1097,7 +1097,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5449(); + o.warning = buildUnnamed5000(); } buildCounterOperationMetadataV1--; return o; @@ -1113,19 +1113,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5449(o.warning); + checkUnnamed5000(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5450() { +buildUnnamed5001() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5450(core.List<core.String> o) { +checkUnnamed5001(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1143,7 +1143,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5450(); + o.warning = buildUnnamed5001(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1159,19 +1159,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5450(o.warning); + checkUnnamed5001(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5451() { +buildUnnamed5002() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5451(core.List<core.String> o) { +checkUnnamed5002(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1189,7 +1189,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5451(); + o.warning = buildUnnamed5002(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1205,7 +1205,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5451(o.warning); + checkUnnamed5002(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1258,14 +1258,14 @@ buildCounterRequestUtilization--; } -buildUnnamed5452() { +buildUnnamed5003() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5452(core.List<api.Volume> o) { +checkUnnamed5003(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1279,7 +1279,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5452(); + o.volumes = buildUnnamed5003(); } buildCounterResources--; return o; @@ -1291,7 +1291,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5452(o.volumes); + checkUnnamed5003(o.volumes); } buildCounterResources--; } @@ -1336,14 +1336,14 @@ buildCounterSourceReference--; } -buildUnnamed5453() { +buildUnnamed5004() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5453(core.Map<core.String, core.String> o) { +checkUnnamed5004(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1357,7 +1357,7 @@ o.applicationReadable = true; o.directory = "foo"; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5453(); + o.httpHeaders = buildUnnamed5004(); o.mimeType = "foo"; o.requireMatchingFile = true; } @@ -1371,21 +1371,21 @@ unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.directory, unittest.equals('foo')); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5453(o.httpHeaders); + checkUnnamed5004(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); } buildCounterStaticDirectoryHandler--; } -buildUnnamed5454() { +buildUnnamed5005() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5454(core.Map<core.String, core.String> o) { +checkUnnamed5005(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1398,7 +1398,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5454(); + o.httpHeaders = buildUnnamed5005(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -1413,7 +1413,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5454(o.httpHeaders); + checkUnnamed5005(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -1422,7 +1422,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5455() { +buildUnnamed5006() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1437,7 +1437,7 @@ return o; } -checkUnnamed5455(core.Map<core.String, core.Object> o) { +checkUnnamed5006(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1451,17 +1451,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5456() { +buildUnnamed5007() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5455()); - o.add(buildUnnamed5455()); + o.add(buildUnnamed5006()); + o.add(buildUnnamed5006()); return o; } -checkUnnamed5456(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5007(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5455(o[0]); - checkUnnamed5455(o[1]); + checkUnnamed5006(o[0]); + checkUnnamed5006(o[1]); } core.int buildCounterStatus = 0; @@ -1470,7 +1470,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5456(); + o.details = buildUnnamed5007(); o.message = "foo"; } buildCounterStatus--; @@ -1481,20 +1481,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5456(o.details); + checkUnnamed5007(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5457() { +buildUnnamed5008() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5457(core.Map<core.String, core.double> o) { +checkUnnamed5008(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -1505,7 +1505,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5457(); + o.allocations = buildUnnamed5008(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -1515,7 +1515,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5457(o.allocations); + checkUnnamed5008(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -1579,79 +1579,79 @@ buildCounterUrlMap--; } -buildUnnamed5458() { +buildUnnamed5009() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5458(core.Map<core.String, core.String> o) { +checkUnnamed5009(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5459() { +buildUnnamed5010() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5459(core.Map<core.String, core.String> o) { +checkUnnamed5010(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5460() { +buildUnnamed5011() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5460(core.List<api.ErrorHandler> o) { +checkUnnamed5011(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5461() { +buildUnnamed5012() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5461(core.List<api.UrlMap> o) { +checkUnnamed5012(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5462() { +buildUnnamed5013() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5462(core.List<core.String> o) { +checkUnnamed5013(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5463() { +buildUnnamed5014() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5463(core.List<api.Library> o) { +checkUnnamed5014(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); @@ -1665,21 +1665,21 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5458(); + o.betaSettings = buildUnnamed5009(); o.creationTime = "foo"; o.defaultExpiration = "foo"; o.deployer = "foo"; o.deployment = buildDeployment(); o.endpointsApiService = buildEndpointsApiService(); o.env = "foo"; - o.envVariables = buildUnnamed5459(); - o.errorHandlers = buildUnnamed5460(); - o.handlers = buildUnnamed5461(); + o.envVariables = buildUnnamed5010(); + o.errorHandlers = buildUnnamed5011(); + o.handlers = buildUnnamed5012(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5462(); + o.inboundServices = buildUnnamed5013(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5463(); + o.libraries = buildUnnamed5014(); o.manualScaling = buildManualScaling(); o.name = "foo"; o.network = buildNetwork(); @@ -1687,6 +1687,7 @@ o.resources = buildResources(); o.runtime = "foo"; o.runtimeApiVersion = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.vm = true; @@ -1701,21 +1702,21 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5458(o.betaSettings); + checkUnnamed5009(o.betaSettings); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); unittest.expect(o.deployer, unittest.equals('foo')); checkDeployment(o.deployment); checkEndpointsApiService(o.endpointsApiService); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5459(o.envVariables); - checkUnnamed5460(o.errorHandlers); - checkUnnamed5461(o.handlers); + checkUnnamed5010(o.envVariables); + checkUnnamed5011(o.errorHandlers); + checkUnnamed5012(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5462(o.inboundServices); + checkUnnamed5013(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5463(o.libraries); + checkUnnamed5014(o.libraries); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); checkNetwork(o.network); @@ -1723,6 +1724,7 @@ checkResources(o.resources); unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.vm, unittest.isTrue); @@ -2960,9 +2962,9 @@ new api.AppengineApi(mock).apps.modules.versions; var arg_appsId = "foo"; var arg_modulesId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3012,11 +3014,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3027,9 +3029,9 @@ }), true); res .list(arg_appsId, arg_modulesId, - pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response); @@ -3392,8 +3394,8 @@ var arg_appsId = "foo"; var arg_modulesId = "foo"; var arg_versionsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3452,10 +3454,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3466,8 +3468,8 @@ }), true); res .list(arg_appsId, arg_modulesId, arg_versionsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListInstancesResponse(response); @@ -3545,9 +3547,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3588,11 +3590,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3603,9 +3605,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response);
diff --git a/generated/googleapis_beta/test/appengine/v1beta5_test.dart b/generated/googleapis_beta/test/appengine/v1beta5_test.dart index 96d703d..f08df06 100644 --- a/generated/googleapis_beta/test/appengine/v1beta5_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta5_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5330() { +buildUnnamed4696() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5330(core.List<api.UrlDispatchRule> o) { +checkUnnamed4696(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5330(); + o.dispatchRules = buildUnnamed4696(); o.iap = buildIdentityAwareProxy(); o.id = "foo"; o.location = "foo"; @@ -137,7 +137,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5330(o.dispatchRules); + checkUnnamed4696(o.dispatchRules); checkIdentityAwareProxy(o.iap); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); @@ -324,27 +324,27 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5331() { +buildUnnamed4697() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5331(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4697(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); } -buildUnnamed5332() { +buildUnnamed4698() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5332(core.List<api.SourceReference> o) { +checkUnnamed4698(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -356,8 +356,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { o.container = buildContainerInfo(); - o.files = buildUnnamed5331(); - o.sourceReferences = buildUnnamed5332(); + o.files = buildUnnamed4697(); + o.sourceReferences = buildUnnamed4698(); } buildCounterDeployment--; return o; @@ -367,8 +367,8 @@ buildCounterDeployment++; if (buildCounterDeployment < 3) { checkContainerInfo(o.container); - checkUnnamed5331(o.files); - checkUnnamed5332(o.sourceReferences); + checkUnnamed4697(o.files); + checkUnnamed4698(o.sourceReferences); } buildCounterDeployment--; } @@ -595,14 +595,14 @@ buildCounterLibrary--; } -buildUnnamed5333() { +buildUnnamed4699() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5333(core.List<api.Instance> o) { +checkUnnamed4699(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -613,7 +613,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5333(); + o.instances = buildUnnamed4699(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -623,20 +623,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5333(o.instances); + checkUnnamed4699(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5334() { +buildUnnamed4700() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5334(core.List<api.Location> o) { +checkUnnamed4700(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -647,7 +647,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5334(); + o.locations = buildUnnamed4700(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -657,20 +657,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5334(o.locations); + checkUnnamed4700(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5335() { +buildUnnamed4701() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5335(core.List<api.Operation> o) { +checkUnnamed4701(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -682,7 +682,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5335(); + o.operations = buildUnnamed4701(); } buildCounterListOperationsResponse--; return o; @@ -692,19 +692,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5335(o.operations); + checkUnnamed4701(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5336() { +buildUnnamed4702() { var o = new core.List<api.Service>(); o.add(buildService()); o.add(buildService()); return o; } -checkUnnamed5336(core.List<api.Service> o) { +checkUnnamed4702(core.List<api.Service> o) { unittest.expect(o, unittest.hasLength(2)); checkService(o[0]); checkService(o[1]); @@ -716,7 +716,7 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { o.nextPageToken = "foo"; - o.services = buildUnnamed5336(); + o.services = buildUnnamed4702(); } buildCounterListServicesResponse--; return o; @@ -726,19 +726,19 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5336(o.services); + checkUnnamed4702(o.services); } buildCounterListServicesResponse--; } -buildUnnamed5337() { +buildUnnamed4703() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5337(core.List<api.Version> o) { +checkUnnamed4703(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -750,7 +750,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5337(); + o.versions = buildUnnamed4703(); } buildCounterListVersionsResponse--; return o; @@ -760,25 +760,25 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5337(o.versions); + checkUnnamed4703(o.versions); } buildCounterListVersionsResponse--; } -buildUnnamed5338() { +buildUnnamed4704() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5338(core.Map<core.String, core.String> o) { +checkUnnamed4704(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5339() { +buildUnnamed4705() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -793,7 +793,7 @@ return o; } -checkUnnamed5339(core.Map<core.String, core.Object> o) { +checkUnnamed4705(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -813,9 +813,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5338(); + o.labels = buildUnnamed4704(); o.locationId = "foo"; - o.metadata = buildUnnamed5339(); + o.metadata = buildUnnamed4705(); o.name = "foo"; } buildCounterLocation--; @@ -826,9 +826,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5338(o.labels); + checkUnnamed4704(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5339(o.metadata); + checkUnnamed4705(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -874,14 +874,14 @@ buildCounterManualScaling--; } -buildUnnamed5340() { +buildUnnamed4706() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5340(core.List<core.String> o) { +checkUnnamed4706(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -892,7 +892,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5340(); + o.forwardedPorts = buildUnnamed4706(); o.instanceTag = "foo"; o.name = "foo"; o.subnetworkName = "foo"; @@ -904,7 +904,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5340(o.forwardedPorts); + checkUnnamed4706(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.subnetworkName, unittest.equals('foo')); @@ -937,7 +937,7 @@ buildCounterNetworkUtilization--; } -buildUnnamed5341() { +buildUnnamed4707() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -952,7 +952,7 @@ return o; } -checkUnnamed5341(core.Map<core.String, core.Object> o) { +checkUnnamed4707(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -966,7 +966,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5342() { +buildUnnamed4708() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -981,7 +981,7 @@ return o; } -checkUnnamed5342(core.Map<core.String, core.Object> o) { +checkUnnamed4708(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1002,9 +1002,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5341(); + o.metadata = buildUnnamed4707(); o.name = "foo"; - o.response = buildUnnamed5342(); + o.response = buildUnnamed4708(); } buildCounterOperation--; return o; @@ -1015,9 +1015,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5341(o.metadata); + checkUnnamed4707(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5342(o.response); + checkUnnamed4708(o.response); } buildCounterOperation--; } @@ -1051,14 +1051,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5343() { +buildUnnamed4709() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5343(core.List<core.String> o) { +checkUnnamed4709(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1076,7 +1076,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5343(); + o.warning = buildUnnamed4709(); } buildCounterOperationMetadataV1--; return o; @@ -1092,19 +1092,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5343(o.warning); + checkUnnamed4709(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5344() { +buildUnnamed4710() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5344(core.List<core.String> o) { +checkUnnamed4710(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1122,7 +1122,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5344(); + o.warning = buildUnnamed4710(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1138,19 +1138,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5344(o.warning); + checkUnnamed4710(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5345() { +buildUnnamed4711() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5345(core.List<core.String> o) { +checkUnnamed4711(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1168,7 +1168,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5345(); + o.warning = buildUnnamed4711(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1184,7 +1184,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5345(o.warning); + checkUnnamed4711(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1237,14 +1237,14 @@ buildCounterRequestUtilization--; } -buildUnnamed5346() { +buildUnnamed4712() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5346(core.List<api.Volume> o) { +checkUnnamed4712(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1258,7 +1258,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5346(); + o.volumes = buildUnnamed4712(); } buildCounterResources--; return o; @@ -1270,7 +1270,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5346(o.volumes); + checkUnnamed4712(o.volumes); } buildCounterResources--; } @@ -1338,14 +1338,14 @@ buildCounterSourceReference--; } -buildUnnamed5347() { +buildUnnamed4713() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5347(core.Map<core.String, core.String> o) { +checkUnnamed4713(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1358,7 +1358,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5347(); + o.httpHeaders = buildUnnamed4713(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -1373,7 +1373,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5347(o.httpHeaders); + checkUnnamed4713(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -1382,7 +1382,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5348() { +buildUnnamed4714() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1397,7 +1397,7 @@ return o; } -checkUnnamed5348(core.Map<core.String, core.Object> o) { +checkUnnamed4714(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1411,17 +1411,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5349() { +buildUnnamed4715() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5348()); - o.add(buildUnnamed5348()); + o.add(buildUnnamed4714()); + o.add(buildUnnamed4714()); return o; } -checkUnnamed5349(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4715(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5348(o[0]); - checkUnnamed5348(o[1]); + checkUnnamed4714(o[0]); + checkUnnamed4714(o[1]); } core.int buildCounterStatus = 0; @@ -1430,7 +1430,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5349(); + o.details = buildUnnamed4715(); o.message = "foo"; } buildCounterStatus--; @@ -1441,20 +1441,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5349(o.details); + checkUnnamed4715(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5350() { +buildUnnamed4716() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5350(core.Map<core.String, core.double> o) { +checkUnnamed4716(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -1465,7 +1465,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5350(); + o.allocations = buildUnnamed4716(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -1475,7 +1475,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5350(o.allocations); + checkUnnamed4716(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -1537,79 +1537,79 @@ buildCounterUrlMap--; } -buildUnnamed5351() { +buildUnnamed4717() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5351(core.Map<core.String, core.String> o) { +checkUnnamed4717(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5352() { +buildUnnamed4718() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5352(core.Map<core.String, core.String> o) { +checkUnnamed4718(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5353() { +buildUnnamed4719() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5353(core.List<api.ErrorHandler> o) { +checkUnnamed4719(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5354() { +buildUnnamed4720() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5354(core.List<api.UrlMap> o) { +checkUnnamed4720(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5355() { +buildUnnamed4721() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5355(core.List<core.String> o) { +checkUnnamed4721(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5356() { +buildUnnamed4722() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5356(core.List<api.Library> o) { +checkUnnamed4722(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); @@ -1623,7 +1623,7 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5351(); + o.betaSettings = buildUnnamed4717(); o.creationTime = "foo"; o.defaultExpiration = "foo"; o.deployer = "foo"; @@ -1631,14 +1631,14 @@ o.diskUsageBytes = "foo"; o.endpointsApiService = buildEndpointsApiService(); o.env = "foo"; - o.envVariables = buildUnnamed5352(); - o.errorHandlers = buildUnnamed5353(); - o.handlers = buildUnnamed5354(); + o.envVariables = buildUnnamed4718(); + o.errorHandlers = buildUnnamed4719(); + o.handlers = buildUnnamed4720(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5355(); + o.inboundServices = buildUnnamed4721(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5356(); + o.libraries = buildUnnamed4722(); o.manualScaling = buildManualScaling(); o.name = "foo"; o.network = buildNetwork(); @@ -1646,6 +1646,7 @@ o.resources = buildResources(); o.runtime = "foo"; o.runtimeApiVersion = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.vm = true; @@ -1660,7 +1661,7 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5351(o.betaSettings); + checkUnnamed4717(o.betaSettings); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); unittest.expect(o.deployer, unittest.equals('foo')); @@ -1668,14 +1669,14 @@ unittest.expect(o.diskUsageBytes, unittest.equals('foo')); checkEndpointsApiService(o.endpointsApiService); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5352(o.envVariables); - checkUnnamed5353(o.errorHandlers); - checkUnnamed5354(o.handlers); + checkUnnamed4718(o.envVariables); + checkUnnamed4719(o.errorHandlers); + checkUnnamed4720(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5355(o.inboundServices); + checkUnnamed4721(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5356(o.libraries); + checkUnnamed4722(o.libraries); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); checkNetwork(o.network); @@ -1683,6 +1684,7 @@ checkResources(o.resources); unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.vm, unittest.isTrue); @@ -2340,9 +2342,9 @@ api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locations; var arg_appsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2383,11 +2385,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2398,9 +2400,9 @@ }), true); res .list(arg_appsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -2478,9 +2480,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2521,11 +2523,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2536,9 +2538,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -3054,9 +3056,9 @@ new api.AppengineApi(mock).apps.services.versions; var arg_appsId = "foo"; var arg_servicesId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3106,11 +3108,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3121,9 +3123,9 @@ }), true); res .list(arg_appsId, arg_servicesId, + pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/appengine/v1beta_test.dart b/generated/googleapis_beta/test/appengine/v1beta_test.dart index 3e5a2af..1cd461a 100644 --- a/generated/googleapis_beta/test/appengine/v1beta_test.dart +++ b/generated/googleapis_beta/test/appengine/v1beta_test.dart
@@ -96,14 +96,14 @@ buildCounterApiEndpointHandler--; } -buildUnnamed5025() { +buildUnnamed4510() { var o = new core.List<api.UrlDispatchRule>(); o.add(buildUrlDispatchRule()); o.add(buildUrlDispatchRule()); return o; } -checkUnnamed5025(core.List<api.UrlDispatchRule> o) { +checkUnnamed4510(core.List<api.UrlDispatchRule> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlDispatchRule(o[0]); checkUrlDispatchRule(o[1]); @@ -119,7 +119,7 @@ o.defaultBucket = "foo"; o.defaultCookieExpiration = "foo"; o.defaultHostname = "foo"; - o.dispatchRules = buildUnnamed5025(); + o.dispatchRules = buildUnnamed4510(); o.featureSettings = buildFeatureSettings(); o.gcrDomain = "foo"; o.iap = buildIdentityAwareProxy(); @@ -140,7 +140,7 @@ unittest.expect(o.defaultBucket, unittest.equals('foo')); unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); unittest.expect(o.defaultHostname, unittest.equals('foo')); - checkUnnamed5025(o.dispatchRules); + checkUnnamed4510(o.dispatchRules); checkFeatureSettings(o.featureSettings); unittest.expect(o.gcrDomain, unittest.equals('foo')); checkIdentityAwareProxy(o.iap); @@ -152,27 +152,27 @@ buildCounterApplication--; } -buildUnnamed5026() { +buildUnnamed4511() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5026(core.List<core.String> o) { +checkUnnamed4511(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5027() { +buildUnnamed4512() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5027(core.List<core.String> o) { +checkUnnamed4512(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -186,12 +186,12 @@ o.certificateRawData = buildCertificateRawData(); o.displayName = "foo"; o.domainMappingsCount = 42; - o.domainNames = buildUnnamed5026(); + o.domainNames = buildUnnamed4511(); o.expireTime = "foo"; o.id = "foo"; o.managedCertificate = buildManagedCertificate(); o.name = "foo"; - o.visibleDomainMappings = buildUnnamed5027(); + o.visibleDomainMappings = buildUnnamed4512(); } buildCounterAuthorizedCertificate--; return o; @@ -203,12 +203,12 @@ checkCertificateRawData(o.certificateRawData); unittest.expect(o.displayName, unittest.equals('foo')); unittest.expect(o.domainMappingsCount, unittest.equals(42)); - checkUnnamed5026(o.domainNames); + checkUnnamed4511(o.domainNames); unittest.expect(o.expireTime, unittest.equals('foo')); unittest.expect(o.id, unittest.equals('foo')); checkManagedCertificate(o.managedCertificate); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5027(o.visibleDomainMappings); + checkUnnamed4512(o.visibleDomainMappings); } buildCounterAuthorizedCertificate--; } @@ -234,14 +234,14 @@ buildCounterAuthorizedDomain--; } -buildUnnamed5028() { +buildUnnamed4513() { var o = new core.List<api.CustomMetric>(); o.add(buildCustomMetric()); o.add(buildCustomMetric()); return o; } -checkUnnamed5028(core.List<api.CustomMetric> o) { +checkUnnamed4513(core.List<api.CustomMetric> o) { unittest.expect(o, unittest.hasLength(2)); checkCustomMetric(o[0]); checkCustomMetric(o[1]); @@ -254,7 +254,7 @@ if (buildCounterAutomaticScaling < 3) { o.coolDownPeriod = "foo"; o.cpuUtilization = buildCpuUtilization(); - o.customMetrics = buildUnnamed5028(); + o.customMetrics = buildUnnamed4513(); o.diskUtilization = buildDiskUtilization(); o.maxConcurrentRequests = 42; o.maxIdleInstances = 42; @@ -276,7 +276,7 @@ if (buildCounterAutomaticScaling < 3) { unittest.expect(o.coolDownPeriod, unittest.equals('foo')); checkCpuUtilization(o.cpuUtilization); - checkUnnamed5028(o.customMetrics); + checkUnnamed4513(o.customMetrics); checkDiskUtilization(o.diskUtilization); unittest.expect(o.maxConcurrentRequests, unittest.equals(42)); unittest.expect(o.maxIdleInstances, unittest.equals(42)); @@ -313,14 +313,14 @@ buildCounterBasicScaling--; } -buildUnnamed5029() { +buildUnnamed4514() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5029(core.List<api.FirewallRule> o) { +checkUnnamed4514(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -331,7 +331,7 @@ var o = new api.BatchUpdateIngressRulesRequest(); buildCounterBatchUpdateIngressRulesRequest++; if (buildCounterBatchUpdateIngressRulesRequest < 3) { - o.ingressRules = buildUnnamed5029(); + o.ingressRules = buildUnnamed4514(); } buildCounterBatchUpdateIngressRulesRequest--; return o; @@ -340,19 +340,19 @@ checkBatchUpdateIngressRulesRequest(api.BatchUpdateIngressRulesRequest o) { buildCounterBatchUpdateIngressRulesRequest++; if (buildCounterBatchUpdateIngressRulesRequest < 3) { - checkUnnamed5029(o.ingressRules); + checkUnnamed4514(o.ingressRules); } buildCounterBatchUpdateIngressRulesRequest--; } -buildUnnamed5030() { +buildUnnamed4515() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5030(core.List<api.FirewallRule> o) { +checkUnnamed4515(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -363,7 +363,7 @@ var o = new api.BatchUpdateIngressRulesResponse(); buildCounterBatchUpdateIngressRulesResponse++; if (buildCounterBatchUpdateIngressRulesResponse < 3) { - o.ingressRules = buildUnnamed5030(); + o.ingressRules = buildUnnamed4515(); } buildCounterBatchUpdateIngressRulesResponse--; return o; @@ -372,7 +372,7 @@ checkBatchUpdateIngressRulesResponse(api.BatchUpdateIngressRulesResponse o) { buildCounterBatchUpdateIngressRulesResponse++; if (buildCounterBatchUpdateIngressRulesResponse < 3) { - checkUnnamed5030(o.ingressRules); + checkUnnamed4515(o.ingressRules); } buildCounterBatchUpdateIngressRulesResponse--; } @@ -581,14 +581,14 @@ buildCounterDebugInstanceRequest--; } -buildUnnamed5031() { +buildUnnamed4516() { var o = new core.Map<core.String, api.FileInfo>(); o["x"] = buildFileInfo(); o["y"] = buildFileInfo(); return o; } -checkUnnamed5031(core.Map<core.String, api.FileInfo> o) { +checkUnnamed4516(core.Map<core.String, api.FileInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkFileInfo(o["x"]); checkFileInfo(o["y"]); @@ -602,7 +602,7 @@ o.build = buildBuildInfo(); o.cloudBuildOptions = buildCloudBuildOptions(); o.container = buildContainerInfo(); - o.files = buildUnnamed5031(); + o.files = buildUnnamed4516(); o.zip = buildZipInfo(); } buildCounterDeployment--; @@ -615,7 +615,7 @@ checkBuildInfo(o.build); checkCloudBuildOptions(o.cloudBuildOptions); checkContainerInfo(o.container); - checkUnnamed5031(o.files); + checkUnnamed4516(o.files); checkZipInfo(o.zip); } buildCounterDeployment--; @@ -646,14 +646,14 @@ buildCounterDiskUtilization--; } -buildUnnamed5032() { +buildUnnamed4517() { var o = new core.List<api.ResourceRecord>(); o.add(buildResourceRecord()); o.add(buildResourceRecord()); return o; } -checkUnnamed5032(core.List<api.ResourceRecord> o) { +checkUnnamed4517(core.List<api.ResourceRecord> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecord(o[0]); checkResourceRecord(o[1]); @@ -666,7 +666,7 @@ if (buildCounterDomainMapping < 3) { o.id = "foo"; o.name = "foo"; - o.resourceRecords = buildUnnamed5032(); + o.resourceRecords = buildUnnamed4517(); o.sslSettings = buildSslSettings(); } buildCounterDomainMapping--; @@ -678,7 +678,7 @@ if (buildCounterDomainMapping < 3) { unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5032(o.resourceRecords); + checkUnnamed4517(o.resourceRecords); checkSslSettings(o.sslSettings); } buildCounterDomainMapping--; @@ -963,14 +963,14 @@ buildCounterLibrary--; } -buildUnnamed5033() { +buildUnnamed4518() { var o = new core.List<api.AuthorizedCertificate>(); o.add(buildAuthorizedCertificate()); o.add(buildAuthorizedCertificate()); return o; } -checkUnnamed5033(core.List<api.AuthorizedCertificate> o) { +checkUnnamed4518(core.List<api.AuthorizedCertificate> o) { unittest.expect(o, unittest.hasLength(2)); checkAuthorizedCertificate(o[0]); checkAuthorizedCertificate(o[1]); @@ -981,7 +981,7 @@ var o = new api.ListAuthorizedCertificatesResponse(); buildCounterListAuthorizedCertificatesResponse++; if (buildCounterListAuthorizedCertificatesResponse < 3) { - o.certificates = buildUnnamed5033(); + o.certificates = buildUnnamed4518(); o.nextPageToken = "foo"; } buildCounterListAuthorizedCertificatesResponse--; @@ -992,20 +992,20 @@ api.ListAuthorizedCertificatesResponse o) { buildCounterListAuthorizedCertificatesResponse++; if (buildCounterListAuthorizedCertificatesResponse < 3) { - checkUnnamed5033(o.certificates); + checkUnnamed4518(o.certificates); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAuthorizedCertificatesResponse--; } -buildUnnamed5034() { +buildUnnamed4519() { var o = new core.List<api.AuthorizedDomain>(); o.add(buildAuthorizedDomain()); o.add(buildAuthorizedDomain()); return o; } -checkUnnamed5034(core.List<api.AuthorizedDomain> o) { +checkUnnamed4519(core.List<api.AuthorizedDomain> o) { unittest.expect(o, unittest.hasLength(2)); checkAuthorizedDomain(o[0]); checkAuthorizedDomain(o[1]); @@ -1016,7 +1016,7 @@ var o = new api.ListAuthorizedDomainsResponse(); buildCounterListAuthorizedDomainsResponse++; if (buildCounterListAuthorizedDomainsResponse < 3) { - o.domains = buildUnnamed5034(); + o.domains = buildUnnamed4519(); o.nextPageToken = "foo"; } buildCounterListAuthorizedDomainsResponse--; @@ -1026,20 +1026,20 @@ checkListAuthorizedDomainsResponse(api.ListAuthorizedDomainsResponse o) { buildCounterListAuthorizedDomainsResponse++; if (buildCounterListAuthorizedDomainsResponse < 3) { - checkUnnamed5034(o.domains); + checkUnnamed4519(o.domains); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAuthorizedDomainsResponse--; } -buildUnnamed5035() { +buildUnnamed4520() { var o = new core.List<api.DomainMapping>(); o.add(buildDomainMapping()); o.add(buildDomainMapping()); return o; } -checkUnnamed5035(core.List<api.DomainMapping> o) { +checkUnnamed4520(core.List<api.DomainMapping> o) { unittest.expect(o, unittest.hasLength(2)); checkDomainMapping(o[0]); checkDomainMapping(o[1]); @@ -1050,7 +1050,7 @@ var o = new api.ListDomainMappingsResponse(); buildCounterListDomainMappingsResponse++; if (buildCounterListDomainMappingsResponse < 3) { - o.domainMappings = buildUnnamed5035(); + o.domainMappings = buildUnnamed4520(); o.nextPageToken = "foo"; } buildCounterListDomainMappingsResponse--; @@ -1060,20 +1060,20 @@ checkListDomainMappingsResponse(api.ListDomainMappingsResponse o) { buildCounterListDomainMappingsResponse++; if (buildCounterListDomainMappingsResponse < 3) { - checkUnnamed5035(o.domainMappings); + checkUnnamed4520(o.domainMappings); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDomainMappingsResponse--; } -buildUnnamed5036() { +buildUnnamed4521() { var o = new core.List<api.FirewallRule>(); o.add(buildFirewallRule()); o.add(buildFirewallRule()); return o; } -checkUnnamed5036(core.List<api.FirewallRule> o) { +checkUnnamed4521(core.List<api.FirewallRule> o) { unittest.expect(o, unittest.hasLength(2)); checkFirewallRule(o[0]); checkFirewallRule(o[1]); @@ -1084,7 +1084,7 @@ var o = new api.ListIngressRulesResponse(); buildCounterListIngressRulesResponse++; if (buildCounterListIngressRulesResponse < 3) { - o.ingressRules = buildUnnamed5036(); + o.ingressRules = buildUnnamed4521(); o.nextPageToken = "foo"; } buildCounterListIngressRulesResponse--; @@ -1094,20 +1094,20 @@ checkListIngressRulesResponse(api.ListIngressRulesResponse o) { buildCounterListIngressRulesResponse++; if (buildCounterListIngressRulesResponse < 3) { - checkUnnamed5036(o.ingressRules); + checkUnnamed4521(o.ingressRules); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListIngressRulesResponse--; } -buildUnnamed5037() { +buildUnnamed4522() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5037(core.List<api.Instance> o) { +checkUnnamed4522(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); @@ -1118,7 +1118,7 @@ var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5037(); + o.instances = buildUnnamed4522(); o.nextPageToken = "foo"; } buildCounterListInstancesResponse--; @@ -1128,20 +1128,20 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5037(o.instances); + checkUnnamed4522(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListInstancesResponse--; } -buildUnnamed5038() { +buildUnnamed4523() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5038(core.List<api.Location> o) { +checkUnnamed4523(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -1152,7 +1152,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5038(); + o.locations = buildUnnamed4523(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -1162,20 +1162,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5038(o.locations); + checkUnnamed4523(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5039() { +buildUnnamed4524() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5039(core.List<api.Operation> o) { +checkUnnamed4524(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -1187,7 +1187,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5039(); + o.operations = buildUnnamed4524(); } buildCounterListOperationsResponse--; return o; @@ -1197,19 +1197,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5039(o.operations); + checkUnnamed4524(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5040() { +buildUnnamed4525() { var o = new core.List<api.Service>(); o.add(buildService()); o.add(buildService()); return o; } -checkUnnamed5040(core.List<api.Service> o) { +checkUnnamed4525(core.List<api.Service> o) { unittest.expect(o, unittest.hasLength(2)); checkService(o[0]); checkService(o[1]); @@ -1221,7 +1221,7 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { o.nextPageToken = "foo"; - o.services = buildUnnamed5040(); + o.services = buildUnnamed4525(); } buildCounterListServicesResponse--; return o; @@ -1231,19 +1231,19 @@ buildCounterListServicesResponse++; if (buildCounterListServicesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5040(o.services); + checkUnnamed4525(o.services); } buildCounterListServicesResponse--; } -buildUnnamed5041() { +buildUnnamed4526() { var o = new core.List<api.Version>(); o.add(buildVersion()); o.add(buildVersion()); return o; } -checkUnnamed5041(core.List<api.Version> o) { +checkUnnamed4526(core.List<api.Version> o) { unittest.expect(o, unittest.hasLength(2)); checkVersion(o[0]); checkVersion(o[1]); @@ -1255,7 +1255,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { o.nextPageToken = "foo"; - o.versions = buildUnnamed5041(); + o.versions = buildUnnamed4526(); } buildCounterListVersionsResponse--; return o; @@ -1265,7 +1265,7 @@ buildCounterListVersionsResponse++; if (buildCounterListVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5041(o.versions); + checkUnnamed4526(o.versions); } buildCounterListVersionsResponse--; } @@ -1301,20 +1301,20 @@ buildCounterLivenessCheck--; } -buildUnnamed5042() { +buildUnnamed4527() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5042(core.Map<core.String, core.String> o) { +checkUnnamed4527(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5043() { +buildUnnamed4528() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1329,7 +1329,7 @@ return o; } -checkUnnamed5043(core.Map<core.String, core.Object> o) { +checkUnnamed4528(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -1349,9 +1349,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5042(); + o.labels = buildUnnamed4527(); o.locationId = "foo"; - o.metadata = buildUnnamed5043(); + o.metadata = buildUnnamed4528(); o.name = "foo"; } buildCounterLocation--; @@ -1362,9 +1362,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5042(o.labels); + checkUnnamed4527(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5043(o.metadata); + checkUnnamed4528(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -1431,14 +1431,14 @@ buildCounterManualScaling--; } -buildUnnamed5044() { +buildUnnamed4529() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5044(core.List<core.String> o) { +checkUnnamed4529(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1449,7 +1449,7 @@ var o = new api.Network(); buildCounterNetwork++; if (buildCounterNetwork < 3) { - o.forwardedPorts = buildUnnamed5044(); + o.forwardedPorts = buildUnnamed4529(); o.instanceTag = "foo"; o.name = "foo"; o.sessionAffinity = true; @@ -1462,7 +1462,7 @@ checkNetwork(api.Network o) { buildCounterNetwork++; if (buildCounterNetwork < 3) { - checkUnnamed5044(o.forwardedPorts); + checkUnnamed4529(o.forwardedPorts); unittest.expect(o.instanceTag, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.sessionAffinity, unittest.isTrue); @@ -1519,7 +1519,7 @@ buildCounterOAuth2ClientInfo--; } -buildUnnamed5045() { +buildUnnamed4530() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1534,7 +1534,7 @@ return o; } -checkUnnamed5045(core.Map<core.String, core.Object> o) { +checkUnnamed4530(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -1548,7 +1548,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5046() { +buildUnnamed4531() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1563,7 +1563,7 @@ return o; } -checkUnnamed5046(core.Map<core.String, core.Object> o) { +checkUnnamed4531(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -1584,9 +1584,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5045(); + o.metadata = buildUnnamed4530(); o.name = "foo"; - o.response = buildUnnamed5046(); + o.response = buildUnnamed4531(); } buildCounterOperation--; return o; @@ -1597,9 +1597,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5045(o.metadata); + checkUnnamed4530(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5046(o.response); + checkUnnamed4531(o.response); } buildCounterOperation--; } @@ -1633,14 +1633,14 @@ buildCounterOperationMetadata--; } -buildUnnamed5047() { +buildUnnamed4532() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5047(core.List<core.String> o) { +checkUnnamed4532(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1658,7 +1658,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5047(); + o.warning = buildUnnamed4532(); } buildCounterOperationMetadataV1--; return o; @@ -1674,19 +1674,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5047(o.warning); + checkUnnamed4532(o.warning); } buildCounterOperationMetadataV1--; } -buildUnnamed5048() { +buildUnnamed4533() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5048(core.List<core.String> o) { +checkUnnamed4533(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1704,7 +1704,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5048(); + o.warning = buildUnnamed4533(); } buildCounterOperationMetadataV1Alpha--; return o; @@ -1720,19 +1720,19 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5048(o.warning); + checkUnnamed4533(o.warning); } buildCounterOperationMetadataV1Alpha--; } -buildUnnamed5049() { +buildUnnamed4534() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5049(core.List<core.String> o) { +checkUnnamed4534(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1750,7 +1750,7 @@ o.method = "foo"; o.target = "foo"; o.user = "foo"; - o.warning = buildUnnamed5049(); + o.warning = buildUnnamed4534(); } buildCounterOperationMetadataV1Beta--; return o; @@ -1766,7 +1766,7 @@ unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.target, unittest.equals('foo')); unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5049(o.warning); + checkUnnamed4534(o.warning); } buildCounterOperationMetadataV1Beta--; } @@ -1888,14 +1888,14 @@ buildCounterResourceRecord--; } -buildUnnamed5050() { +buildUnnamed4535() { var o = new core.List<api.Volume>(); o.add(buildVolume()); o.add(buildVolume()); return o; } -checkUnnamed5050(core.List<api.Volume> o) { +checkUnnamed4535(core.List<api.Volume> o) { unittest.expect(o, unittest.hasLength(2)); checkVolume(o[0]); checkVolume(o[1]); @@ -1909,7 +1909,7 @@ o.cpu = 42.0; o.diskGb = 42.0; o.memoryGb = 42.0; - o.volumes = buildUnnamed5050(); + o.volumes = buildUnnamed4535(); } buildCounterResources--; return o; @@ -1921,7 +1921,7 @@ unittest.expect(o.cpu, unittest.equals(42.0)); unittest.expect(o.diskGb, unittest.equals(42.0)); unittest.expect(o.memoryGb, unittest.equals(42.0)); - checkUnnamed5050(o.volumes); + checkUnnamed4535(o.volumes); } buildCounterResources--; } @@ -2016,14 +2016,14 @@ buildCounterStandardSchedulerSettings--; } -buildUnnamed5051() { +buildUnnamed4536() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5051(core.Map<core.String, core.String> o) { +checkUnnamed4536(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -2036,7 +2036,7 @@ if (buildCounterStaticFilesHandler < 3) { o.applicationReadable = true; o.expiration = "foo"; - o.httpHeaders = buildUnnamed5051(); + o.httpHeaders = buildUnnamed4536(); o.mimeType = "foo"; o.path = "foo"; o.requireMatchingFile = true; @@ -2051,7 +2051,7 @@ if (buildCounterStaticFilesHandler < 3) { unittest.expect(o.applicationReadable, unittest.isTrue); unittest.expect(o.expiration, unittest.equals('foo')); - checkUnnamed5051(o.httpHeaders); + checkUnnamed4536(o.httpHeaders); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.path, unittest.equals('foo')); unittest.expect(o.requireMatchingFile, unittest.isTrue); @@ -2060,7 +2060,7 @@ buildCounterStaticFilesHandler--; } -buildUnnamed5052() { +buildUnnamed4537() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2075,7 +2075,7 @@ return o; } -checkUnnamed5052(core.Map<core.String, core.Object> o) { +checkUnnamed4537(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -2089,17 +2089,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5053() { +buildUnnamed4538() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5052()); - o.add(buildUnnamed5052()); + o.add(buildUnnamed4537()); + o.add(buildUnnamed4537()); return o; } -checkUnnamed5053(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4538(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5052(o[0]); - checkUnnamed5052(o[1]); + checkUnnamed4537(o[0]); + checkUnnamed4537(o[1]); } core.int buildCounterStatus = 0; @@ -2108,7 +2108,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5053(); + o.details = buildUnnamed4538(); o.message = "foo"; } buildCounterStatus--; @@ -2119,20 +2119,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5053(o.details); + checkUnnamed4538(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5054() { +buildUnnamed4539() { var o = new core.Map<core.String, core.double>(); o["x"] = 42.0; o["y"] = 42.0; return o; } -checkUnnamed5054(core.Map<core.String, core.double> o) { +checkUnnamed4539(core.Map<core.String, core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals(42.0)); unittest.expect(o["y"], unittest.equals(42.0)); @@ -2143,7 +2143,7 @@ var o = new api.TrafficSplit(); buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - o.allocations = buildUnnamed5054(); + o.allocations = buildUnnamed4539(); o.shardBy = "foo"; } buildCounterTrafficSplit--; @@ -2153,7 +2153,7 @@ checkTrafficSplit(api.TrafficSplit o) { buildCounterTrafficSplit++; if (buildCounterTrafficSplit < 3) { - checkUnnamed5054(o.allocations); + checkUnnamed4539(o.allocations); unittest.expect(o.shardBy, unittest.equals('foo')); } buildCounterTrafficSplit--; @@ -2215,92 +2215,92 @@ buildCounterUrlMap--; } -buildUnnamed5055() { +buildUnnamed4540() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5055(core.Map<core.String, core.String> o) { +checkUnnamed4540(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5056() { +buildUnnamed4541() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5056(core.Map<core.String, core.String> o) { +checkUnnamed4541(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5057() { +buildUnnamed4542() { var o = new core.List<api.ErrorHandler>(); o.add(buildErrorHandler()); o.add(buildErrorHandler()); return o; } -checkUnnamed5057(core.List<api.ErrorHandler> o) { +checkUnnamed4542(core.List<api.ErrorHandler> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorHandler(o[0]); checkErrorHandler(o[1]); } -buildUnnamed5058() { +buildUnnamed4543() { var o = new core.List<api.UrlMap>(); o.add(buildUrlMap()); o.add(buildUrlMap()); return o; } -checkUnnamed5058(core.List<api.UrlMap> o) { +checkUnnamed4543(core.List<api.UrlMap> o) { unittest.expect(o, unittest.hasLength(2)); checkUrlMap(o[0]); checkUrlMap(o[1]); } -buildUnnamed5059() { +buildUnnamed4544() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5059(core.List<core.String> o) { +checkUnnamed4544(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5060() { +buildUnnamed4545() { var o = new core.List<api.Library>(); o.add(buildLibrary()); o.add(buildLibrary()); return o; } -checkUnnamed5060(core.List<api.Library> o) { +checkUnnamed4545(core.List<api.Library> o) { unittest.expect(o, unittest.hasLength(2)); checkLibrary(o[0]); checkLibrary(o[1]); } -buildUnnamed5061() { +buildUnnamed4546() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5061(core.List<core.String> o) { +checkUnnamed4546(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2314,7 +2314,7 @@ o.apiConfig = buildApiConfigHandler(); o.automaticScaling = buildAutomaticScaling(); o.basicScaling = buildBasicScaling(); - o.betaSettings = buildUnnamed5055(); + o.betaSettings = buildUnnamed4540(); o.createTime = "foo"; o.createdBy = "foo"; o.defaultExpiration = "foo"; @@ -2323,14 +2323,14 @@ o.endpointsApiService = buildEndpointsApiService(); o.entrypoint = buildEntrypoint(); o.env = "foo"; - o.envVariables = buildUnnamed5056(); - o.errorHandlers = buildUnnamed5057(); - o.handlers = buildUnnamed5058(); + o.envVariables = buildUnnamed4541(); + o.errorHandlers = buildUnnamed4542(); + o.handlers = buildUnnamed4543(); o.healthCheck = buildHealthCheck(); o.id = "foo"; - o.inboundServices = buildUnnamed5059(); + o.inboundServices = buildUnnamed4544(); o.instanceClass = "foo"; - o.libraries = buildUnnamed5060(); + o.libraries = buildUnnamed4545(); o.livenessCheck = buildLivenessCheck(); o.manualScaling = buildManualScaling(); o.name = "foo"; @@ -2341,11 +2341,13 @@ o.runtime = "foo"; o.runtimeApiVersion = "foo"; o.runtimeChannel = "foo"; + o.runtimeMainExecutablePath = "foo"; o.servingStatus = "foo"; o.threadsafe = true; o.versionUrl = "foo"; o.vm = true; - o.zones = buildUnnamed5061(); + o.vpcAccessConnector = buildVpcAccessConnector(); + o.zones = buildUnnamed4546(); } buildCounterVersion--; return o; @@ -2357,7 +2359,7 @@ checkApiConfigHandler(o.apiConfig); checkAutomaticScaling(o.automaticScaling); checkBasicScaling(o.basicScaling); - checkUnnamed5055(o.betaSettings); + checkUnnamed4540(o.betaSettings); unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.createdBy, unittest.equals('foo')); unittest.expect(o.defaultExpiration, unittest.equals('foo')); @@ -2366,14 +2368,14 @@ checkEndpointsApiService(o.endpointsApiService); checkEntrypoint(o.entrypoint); unittest.expect(o.env, unittest.equals('foo')); - checkUnnamed5056(o.envVariables); - checkUnnamed5057(o.errorHandlers); - checkUnnamed5058(o.handlers); + checkUnnamed4541(o.envVariables); + checkUnnamed4542(o.errorHandlers); + checkUnnamed4543(o.handlers); checkHealthCheck(o.healthCheck); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5059(o.inboundServices); + checkUnnamed4544(o.inboundServices); unittest.expect(o.instanceClass, unittest.equals('foo')); - checkUnnamed5060(o.libraries); + checkUnnamed4545(o.libraries); checkLivenessCheck(o.livenessCheck); checkManualScaling(o.manualScaling); unittest.expect(o.name, unittest.equals('foo')); @@ -2384,11 +2386,13 @@ unittest.expect(o.runtime, unittest.equals('foo')); unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); unittest.expect(o.runtimeChannel, unittest.equals('foo')); + unittest.expect(o.runtimeMainExecutablePath, unittest.equals('foo')); unittest.expect(o.servingStatus, unittest.equals('foo')); unittest.expect(o.threadsafe, unittest.isTrue); unittest.expect(o.versionUrl, unittest.equals('foo')); unittest.expect(o.vm, unittest.isTrue); - checkUnnamed5061(o.zones); + checkVpcAccessConnector(o.vpcAccessConnector); + checkUnnamed4546(o.zones); } buildCounterVersion--; } @@ -2416,6 +2420,25 @@ buildCounterVolume--; } +core.int buildCounterVpcAccessConnector = 0; +buildVpcAccessConnector() { + var o = new api.VpcAccessConnector(); + buildCounterVpcAccessConnector++; + if (buildCounterVpcAccessConnector < 3) { + o.name = "foo"; + } + buildCounterVpcAccessConnector--; + return o; +} + +checkVpcAccessConnector(api.VpcAccessConnector o) { + buildCounterVpcAccessConnector++; + if (buildCounterVpcAccessConnector < 3) { + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterVpcAccessConnector--; +} + core.int buildCounterZipInfo = 0; buildZipInfo() { var o = new api.ZipInfo(); @@ -3014,6 +3037,14 @@ }); }); + unittest.group("obj-schema-VpcAccessConnector", () { + unittest.test("to-json--from-json", () { + var o = buildVpcAccessConnector(); + var od = new api.VpcAccessConnector.fromJson(o.toJson()); + checkVpcAccessConnector(od); + }); + }); + unittest.group("obj-schema-ZipInfo", () { unittest.test("to-json--from-json", () { var o = buildZipInfo(); @@ -3606,8 +3637,8 @@ api.AppsAuthorizedDomainsResourceApi res = new api.AppengineApi(mock).apps.authorizedDomains; var arg_appsId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -3648,10 +3679,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -3662,8 +3693,8 @@ }), true); res .list(arg_appsId, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAuthorizedDomainsResponse(response); @@ -4272,9 +4303,9 @@ api.AppsFirewallIngressRulesResourceApi res = new api.AppengineApi(mock).apps.firewall.ingressRules; var arg_appsId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_matchingAddress = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4315,12 +4346,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["matchingAddress"].first, unittest.equals(arg_matchingAddress)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4331,9 +4362,9 @@ }), true); res .list(arg_appsId, + pageToken: arg_pageToken, pageSize: arg_pageSize, matchingAddress: arg_matchingAddress, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListIngressRulesResponse(response); @@ -4483,9 +4514,9 @@ api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locations; var arg_appsId = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4526,11 +4557,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4541,9 +4572,9 @@ }), true); res .list(arg_appsId, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -4621,9 +4652,9 @@ api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operations; var arg_appsId = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -4664,11 +4695,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -4679,9 +4710,9 @@ }), true); res .list(arg_appsId, + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -5198,9 +5229,9 @@ new api.AppengineApi(mock).apps.services.versions; var arg_appsId = "foo"; var arg_servicesId = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_view = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -5250,11 +5281,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5265,9 +5296,9 @@ }), true); res .list(arg_appsId, arg_servicesId, - pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart b/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart index 9a80923..0db6e1c 100644 --- a/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart +++ b/generated/googleapis_beta/test/binaryauthorization/v1beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5092() { +buildUnnamed4648() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5092(core.List<core.String> o) { +checkUnnamed4648(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -70,7 +70,7 @@ if (buildCounterAdmissionRule < 3) { o.enforcementMode = "foo"; o.evaluationMode = "foo"; - o.requireAttestationsBy = buildUnnamed5092(); + o.requireAttestationsBy = buildUnnamed4648(); } buildCounterAdmissionRule--; return o; @@ -81,7 +81,7 @@ if (buildCounterAdmissionRule < 3) { unittest.expect(o.enforcementMode, unittest.equals('foo')); unittest.expect(o.evaluationMode, unittest.equals('foo')); - checkUnnamed5092(o.requireAttestationsBy); + checkUnnamed4648(o.requireAttestationsBy); } buildCounterAdmissionRule--; } @@ -153,14 +153,14 @@ buildCounterAttestorPublicKey--; } -buildUnnamed5093() { +buildUnnamed4649() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5093(core.List<core.String> o) { +checkUnnamed4649(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -172,7 +172,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5093(); + o.members = buildUnnamed4649(); o.role = "foo"; } buildCounterBinding--; @@ -183,7 +183,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5093(o.members); + checkUnnamed4649(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -229,14 +229,14 @@ buildCounterExpr--; } -buildUnnamed5094() { +buildUnnamed4650() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5094(core.List<api.Binding> o) { +checkUnnamed4650(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -247,7 +247,7 @@ var o = new api.IamPolicy(); buildCounterIamPolicy++; if (buildCounterIamPolicy < 3) { - o.bindings = buildUnnamed5094(); + o.bindings = buildUnnamed4650(); o.etag = "foo"; o.version = 42; } @@ -258,21 +258,21 @@ checkIamPolicy(api.IamPolicy o) { buildCounterIamPolicy++; if (buildCounterIamPolicy < 3) { - checkUnnamed5094(o.bindings); + checkUnnamed4650(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterIamPolicy--; } -buildUnnamed5095() { +buildUnnamed4651() { var o = new core.List<api.Attestor>(); o.add(buildAttestor()); o.add(buildAttestor()); return o; } -checkUnnamed5095(core.List<api.Attestor> o) { +checkUnnamed4651(core.List<api.Attestor> o) { unittest.expect(o, unittest.hasLength(2)); checkAttestor(o[0]); checkAttestor(o[1]); @@ -283,7 +283,7 @@ var o = new api.ListAttestorsResponse(); buildCounterListAttestorsResponse++; if (buildCounterListAttestorsResponse < 3) { - o.attestors = buildUnnamed5095(); + o.attestors = buildUnnamed4651(); o.nextPageToken = "foo"; } buildCounterListAttestorsResponse--; @@ -293,33 +293,33 @@ checkListAttestorsResponse(api.ListAttestorsResponse o) { buildCounterListAttestorsResponse++; if (buildCounterListAttestorsResponse < 3) { - checkUnnamed5095(o.attestors); + checkUnnamed4651(o.attestors); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAttestorsResponse--; } -buildUnnamed5096() { +buildUnnamed4652() { var o = new core.List<api.AdmissionWhitelistPattern>(); o.add(buildAdmissionWhitelistPattern()); o.add(buildAdmissionWhitelistPattern()); return o; } -checkUnnamed5096(core.List<api.AdmissionWhitelistPattern> o) { +checkUnnamed4652(core.List<api.AdmissionWhitelistPattern> o) { unittest.expect(o, unittest.hasLength(2)); checkAdmissionWhitelistPattern(o[0]); checkAdmissionWhitelistPattern(o[1]); } -buildUnnamed5097() { +buildUnnamed4653() { var o = new core.Map<core.String, api.AdmissionRule>(); o["x"] = buildAdmissionRule(); o["y"] = buildAdmissionRule(); return o; } -checkUnnamed5097(core.Map<core.String, api.AdmissionRule> o) { +checkUnnamed4653(core.Map<core.String, api.AdmissionRule> o) { unittest.expect(o, unittest.hasLength(2)); checkAdmissionRule(o["x"]); checkAdmissionRule(o["y"]); @@ -330,8 +330,8 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.admissionWhitelistPatterns = buildUnnamed5096(); - o.clusterAdmissionRules = buildUnnamed5097(); + o.admissionWhitelistPatterns = buildUnnamed4652(); + o.clusterAdmissionRules = buildUnnamed4653(); o.defaultAdmissionRule = buildAdmissionRule(); o.description = "foo"; o.name = "foo"; @@ -344,8 +344,8 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5096(o.admissionWhitelistPatterns); - checkUnnamed5097(o.clusterAdmissionRules); + checkUnnamed4652(o.admissionWhitelistPatterns); + checkUnnamed4653(o.clusterAdmissionRules); checkAdmissionRule(o.defaultAdmissionRule); unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); @@ -373,14 +373,14 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5098() { +buildUnnamed4654() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5098(core.List<core.String> o) { +checkUnnamed4654(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -391,7 +391,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5098(); + o.permissions = buildUnnamed4654(); } buildCounterTestIamPermissionsRequest--; return o; @@ -400,19 +400,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5098(o.permissions); + checkUnnamed4654(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5099() { +buildUnnamed4655() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5099(core.List<core.String> o) { +checkUnnamed4655(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -423,7 +423,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5099(); + o.permissions = buildUnnamed4655(); } buildCounterTestIamPermissionsResponse--; return o; @@ -432,19 +432,19 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5099(o.permissions); + checkUnnamed4655(o.permissions); } buildCounterTestIamPermissionsResponse--; } -buildUnnamed5100() { +buildUnnamed4656() { var o = new core.List<api.AttestorPublicKey>(); o.add(buildAttestorPublicKey()); o.add(buildAttestorPublicKey()); return o; } -checkUnnamed5100(core.List<api.AttestorPublicKey> o) { +checkUnnamed4656(core.List<api.AttestorPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkAttestorPublicKey(o[0]); checkAttestorPublicKey(o[1]); @@ -457,7 +457,7 @@ if (buildCounterUserOwnedDrydockNote < 3) { o.delegationServiceAccountEmail = "foo"; o.noteReference = "foo"; - o.publicKeys = buildUnnamed5100(); + o.publicKeys = buildUnnamed4656(); } buildCounterUserOwnedDrydockNote--; return o; @@ -468,7 +468,7 @@ if (buildCounterUserOwnedDrydockNote < 3) { unittest.expect(o.delegationServiceAccountEmail, unittest.equals('foo')); unittest.expect(o.noteReference, unittest.equals('foo')); - checkUnnamed5100(o.publicKeys); + checkUnnamed4656(o.publicKeys); } buildCounterUserOwnedDrydockNote--; } @@ -918,8 +918,8 @@ api.ProjectsAttestorsResourceApi res = new api.BinaryauthorizationApi(mock).projects.attestors; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -952,10 +952,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -966,8 +966,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAttestorsResponse(response);
diff --git a/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart b/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart new file mode 100644 index 0000000..099108f --- /dev/null +++ b/generated/googleapis_beta/test/cloudasset/v1beta1_test.dart
@@ -0,0 +1,1124 @@ +library googleapis_beta.cloudasset.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/cloudasset/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAsset = 0; +buildAsset() { + var o = new api.Asset(); + buildCounterAsset++; + if (buildCounterAsset < 3) { + o.assetType = "foo"; + o.iamPolicy = buildPolicy(); + o.name = "foo"; + o.resource = buildResource(); + } + buildCounterAsset--; + return o; +} + +checkAsset(api.Asset o) { + buildCounterAsset++; + if (buildCounterAsset < 3) { + unittest.expect(o.assetType, unittest.equals('foo')); + checkPolicy(o.iamPolicy); + unittest.expect(o.name, unittest.equals('foo')); + checkResource(o.resource); + } + buildCounterAsset--; +} + +buildUnnamed4670() { + var o = new core.List<api.AuditLogConfig>(); + o.add(buildAuditLogConfig()); + o.add(buildAuditLogConfig()); + return o; +} + +checkUnnamed4670(core.List<api.AuditLogConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditLogConfig(o[0]); + checkAuditLogConfig(o[1]); +} + +core.int buildCounterAuditConfig = 0; +buildAuditConfig() { + var o = new api.AuditConfig(); + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + o.auditLogConfigs = buildUnnamed4670(); + o.service = "foo"; + } + buildCounterAuditConfig--; + return o; +} + +checkAuditConfig(api.AuditConfig o) { + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + checkUnnamed4670(o.auditLogConfigs); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterAuditConfig--; +} + +buildUnnamed4671() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4671(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAuditLogConfig = 0; +buildAuditLogConfig() { + var o = new api.AuditLogConfig(); + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + o.exemptedMembers = buildUnnamed4671(); + o.logType = "foo"; + } + buildCounterAuditLogConfig--; + return o; +} + +checkAuditLogConfig(api.AuditLogConfig o) { + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + checkUnnamed4671(o.exemptedMembers); + unittest.expect(o.logType, unittest.equals('foo')); + } + buildCounterAuditLogConfig--; +} + +buildUnnamed4672() { + var o = new core.List<api.TemporalAsset>(); + o.add(buildTemporalAsset()); + o.add(buildTemporalAsset()); + return o; +} + +checkUnnamed4672(core.List<api.TemporalAsset> o) { + unittest.expect(o, unittest.hasLength(2)); + checkTemporalAsset(o[0]); + checkTemporalAsset(o[1]); +} + +core.int buildCounterBatchGetAssetsHistoryResponse = 0; +buildBatchGetAssetsHistoryResponse() { + var o = new api.BatchGetAssetsHistoryResponse(); + buildCounterBatchGetAssetsHistoryResponse++; + if (buildCounterBatchGetAssetsHistoryResponse < 3) { + o.assets = buildUnnamed4672(); + } + buildCounterBatchGetAssetsHistoryResponse--; + return o; +} + +checkBatchGetAssetsHistoryResponse(api.BatchGetAssetsHistoryResponse o) { + buildCounterBatchGetAssetsHistoryResponse++; + if (buildCounterBatchGetAssetsHistoryResponse < 3) { + checkUnnamed4672(o.assets); + } + buildCounterBatchGetAssetsHistoryResponse--; +} + +buildUnnamed4673() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4673(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBinding = 0; +buildBinding() { + var o = new api.Binding(); + buildCounterBinding++; + if (buildCounterBinding < 3) { + o.condition = buildExpr(); + o.members = buildUnnamed4673(); + o.role = "foo"; + } + buildCounterBinding--; + return o; +} + +checkBinding(api.Binding o) { + buildCounterBinding++; + if (buildCounterBinding < 3) { + checkExpr(o.condition); + checkUnnamed4673(o.members); + unittest.expect(o.role, unittest.equals('foo')); + } + buildCounterBinding--; +} + +buildUnnamed4674() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4674(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterExportAssetsRequest = 0; +buildExportAssetsRequest() { + var o = new api.ExportAssetsRequest(); + buildCounterExportAssetsRequest++; + if (buildCounterExportAssetsRequest < 3) { + o.assetTypes = buildUnnamed4674(); + o.contentType = "foo"; + o.outputConfig = buildOutputConfig(); + o.readTime = "foo"; + } + buildCounterExportAssetsRequest--; + return o; +} + +checkExportAssetsRequest(api.ExportAssetsRequest o) { + buildCounterExportAssetsRequest++; + if (buildCounterExportAssetsRequest < 3) { + checkUnnamed4674(o.assetTypes); + unittest.expect(o.contentType, unittest.equals('foo')); + checkOutputConfig(o.outputConfig); + unittest.expect(o.readTime, unittest.equals('foo')); + } + buildCounterExportAssetsRequest--; +} + +core.int buildCounterExpr = 0; +buildExpr() { + var o = new api.Expr(); + buildCounterExpr++; + if (buildCounterExpr < 3) { + o.description = "foo"; + o.expression = "foo"; + o.location = "foo"; + o.title = "foo"; + } + buildCounterExpr--; + return o; +} + +checkExpr(api.Expr o) { + buildCounterExpr++; + if (buildCounterExpr < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.expression, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterExpr--; +} + +core.int buildCounterGcsDestination = 0; +buildGcsDestination() { + var o = new api.GcsDestination(); + buildCounterGcsDestination++; + if (buildCounterGcsDestination < 3) { + o.uri = "foo"; + } + buildCounterGcsDestination--; + return o; +} + +checkGcsDestination(api.GcsDestination o) { + buildCounterGcsDestination++; + if (buildCounterGcsDestination < 3) { + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterGcsDestination--; +} + +buildUnnamed4675() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4675(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4676() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4676(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4675(); + o.name = "foo"; + o.response = buildUnnamed4676(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4675(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4676(o.response); + } + buildCounterOperation--; +} + +core.int buildCounterOutputConfig = 0; +buildOutputConfig() { + var o = new api.OutputConfig(); + buildCounterOutputConfig++; + if (buildCounterOutputConfig < 3) { + o.gcsDestination = buildGcsDestination(); + } + buildCounterOutputConfig--; + return o; +} + +checkOutputConfig(api.OutputConfig o) { + buildCounterOutputConfig++; + if (buildCounterOutputConfig < 3) { + checkGcsDestination(o.gcsDestination); + } + buildCounterOutputConfig--; +} + +buildUnnamed4677() { + var o = new core.List<api.AuditConfig>(); + o.add(buildAuditConfig()); + o.add(buildAuditConfig()); + return o; +} + +checkUnnamed4677(core.List<api.AuditConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditConfig(o[0]); + checkAuditConfig(o[1]); +} + +buildUnnamed4678() { + var o = new core.List<api.Binding>(); + o.add(buildBinding()); + o.add(buildBinding()); + return o; +} + +checkUnnamed4678(core.List<api.Binding> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBinding(o[0]); + checkBinding(o[1]); +} + +core.int buildCounterPolicy = 0; +buildPolicy() { + var o = new api.Policy(); + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + o.auditConfigs = buildUnnamed4677(); + o.bindings = buildUnnamed4678(); + o.etag = "foo"; + o.version = 42; + } + buildCounterPolicy--; + return o; +} + +checkPolicy(api.Policy o) { + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + checkUnnamed4677(o.auditConfigs); + checkUnnamed4678(o.bindings); + unittest.expect(o.etag, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals(42)); + } + buildCounterPolicy--; +} + +buildUnnamed4679() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4679(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +core.int buildCounterResource = 0; +buildResource() { + var o = new api.Resource(); + buildCounterResource++; + if (buildCounterResource < 3) { + o.data = buildUnnamed4679(); + o.discoveryDocumentUri = "foo"; + o.discoveryName = "foo"; + o.parent = "foo"; + o.resourceUrl = "foo"; + o.version = "foo"; + } + buildCounterResource--; + return o; +} + +checkResource(api.Resource o) { + buildCounterResource++; + if (buildCounterResource < 3) { + checkUnnamed4679(o.data); + unittest.expect(o.discoveryDocumentUri, unittest.equals('foo')); + unittest.expect(o.discoveryName, unittest.equals('foo')); + unittest.expect(o.parent, unittest.equals('foo')); + unittest.expect(o.resourceUrl, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterResource--; +} + +buildUnnamed4680() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4680(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted7 = (o["x"]) as core.Map; + unittest.expect(casted7, unittest.hasLength(3)); + unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted7["bool"], unittest.equals(true)); + unittest.expect(casted7["string"], unittest.equals('foo')); + var casted8 = (o["y"]) as core.Map; + unittest.expect(casted8, unittest.hasLength(3)); + unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted8["bool"], unittest.equals(true)); + unittest.expect(casted8["string"], unittest.equals('foo')); +} + +buildUnnamed4681() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4680()); + o.add(buildUnnamed4680()); + return o; +} + +checkUnnamed4681(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4680(o[0]); + checkUnnamed4680(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4681(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4681(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +core.int buildCounterTemporalAsset = 0; +buildTemporalAsset() { + var o = new api.TemporalAsset(); + buildCounterTemporalAsset++; + if (buildCounterTemporalAsset < 3) { + o.asset = buildAsset(); + o.deleted = true; + o.window = buildTimeWindow(); + } + buildCounterTemporalAsset--; + return o; +} + +checkTemporalAsset(api.TemporalAsset o) { + buildCounterTemporalAsset++; + if (buildCounterTemporalAsset < 3) { + checkAsset(o.asset); + unittest.expect(o.deleted, unittest.isTrue); + checkTimeWindow(o.window); + } + buildCounterTemporalAsset--; +} + +core.int buildCounterTimeWindow = 0; +buildTimeWindow() { + var o = new api.TimeWindow(); + buildCounterTimeWindow++; + if (buildCounterTimeWindow < 3) { + o.endTime = "foo"; + o.startTime = "foo"; + } + buildCounterTimeWindow--; + return o; +} + +checkTimeWindow(api.TimeWindow o) { + buildCounterTimeWindow++; + if (buildCounterTimeWindow < 3) { + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.startTime, unittest.equals('foo')); + } + buildCounterTimeWindow--; +} + +buildUnnamed4682() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4682(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4683() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4683(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +main() { + unittest.group("obj-schema-Asset", () { + unittest.test("to-json--from-json", () { + var o = buildAsset(); + var od = new api.Asset.fromJson(o.toJson()); + checkAsset(od); + }); + }); + + unittest.group("obj-schema-AuditConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditConfig(); + var od = new api.AuditConfig.fromJson(o.toJson()); + checkAuditConfig(od); + }); + }); + + unittest.group("obj-schema-AuditLogConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditLogConfig(); + var od = new api.AuditLogConfig.fromJson(o.toJson()); + checkAuditLogConfig(od); + }); + }); + + unittest.group("obj-schema-BatchGetAssetsHistoryResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchGetAssetsHistoryResponse(); + var od = new api.BatchGetAssetsHistoryResponse.fromJson(o.toJson()); + checkBatchGetAssetsHistoryResponse(od); + }); + }); + + unittest.group("obj-schema-Binding", () { + unittest.test("to-json--from-json", () { + var o = buildBinding(); + var od = new api.Binding.fromJson(o.toJson()); + checkBinding(od); + }); + }); + + unittest.group("obj-schema-ExportAssetsRequest", () { + unittest.test("to-json--from-json", () { + var o = buildExportAssetsRequest(); + var od = new api.ExportAssetsRequest.fromJson(o.toJson()); + checkExportAssetsRequest(od); + }); + }); + + unittest.group("obj-schema-Expr", () { + unittest.test("to-json--from-json", () { + var o = buildExpr(); + var od = new api.Expr.fromJson(o.toJson()); + checkExpr(od); + }); + }); + + unittest.group("obj-schema-GcsDestination", () { + unittest.test("to-json--from-json", () { + var o = buildGcsDestination(); + var od = new api.GcsDestination.fromJson(o.toJson()); + checkGcsDestination(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-OutputConfig", () { + unittest.test("to-json--from-json", () { + var o = buildOutputConfig(); + var od = new api.OutputConfig.fromJson(o.toJson()); + checkOutputConfig(od); + }); + }); + + unittest.group("obj-schema-Policy", () { + unittest.test("to-json--from-json", () { + var o = buildPolicy(); + var od = new api.Policy.fromJson(o.toJson()); + checkPolicy(od); + }); + }); + + unittest.group("obj-schema-Resource", () { + unittest.test("to-json--from-json", () { + var o = buildResource(); + var od = new api.Resource.fromJson(o.toJson()); + checkResource(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-TemporalAsset", () { + unittest.test("to-json--from-json", () { + var o = buildTemporalAsset(); + var od = new api.TemporalAsset.fromJson(o.toJson()); + checkTemporalAsset(od); + }); + }); + + unittest.group("obj-schema-TimeWindow", () { + unittest.test("to-json--from-json", () { + var o = buildTimeWindow(); + var od = new api.TimeWindow.fromJson(o.toJson()); + checkTimeWindow(od); + }); + }); + + unittest.group("resource-OrganizationsResourceApi", () { + unittest.test("method--batchGetAssetsHistory", () { + var mock = new HttpServerMock(); + api.OrganizationsResourceApi res = + new api.CloudassetApi(mock).organizations; + var arg_parent = "foo"; + var arg_readTimeWindow_endTime = "foo"; + var arg_readTimeWindow_startTime = "foo"; + var arg_assetNames = buildUnnamed4682(); + var arg_contentType = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["readTimeWindow.endTime"].first, + unittest.equals(arg_readTimeWindow_endTime)); + unittest.expect(queryMap["readTimeWindow.startTime"].first, + unittest.equals(arg_readTimeWindow_startTime)); + unittest.expect( + queryMap["assetNames"], unittest.equals(arg_assetNames)); + unittest.expect( + queryMap["contentType"].first, unittest.equals(arg_contentType)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchGetAssetsHistoryResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchGetAssetsHistory(arg_parent, + readTimeWindow_endTime: arg_readTimeWindow_endTime, + readTimeWindow_startTime: arg_readTimeWindow_startTime, + assetNames: arg_assetNames, + contentType: arg_contentType, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchGetAssetsHistoryResponse(response); + }))); + }); + + unittest.test("method--exportAssets", () { + var mock = new HttpServerMock(); + api.OrganizationsResourceApi res = + new api.CloudassetApi(mock).organizations; + var arg_request = buildExportAssetsRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ExportAssetsRequest.fromJson(json); + checkExportAssetsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .exportAssets(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-OrganizationsOperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OrganizationsOperationsResourceApi res = + new api.CloudassetApi(mock).organizations.operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ProjectsResourceApi", () { + unittest.test("method--batchGetAssetsHistory", () { + var mock = new HttpServerMock(); + api.ProjectsResourceApi res = new api.CloudassetApi(mock).projects; + var arg_parent = "foo"; + var arg_readTimeWindow_endTime = "foo"; + var arg_readTimeWindow_startTime = "foo"; + var arg_assetNames = buildUnnamed4683(); + var arg_contentType = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["readTimeWindow.endTime"].first, + unittest.equals(arg_readTimeWindow_endTime)); + unittest.expect(queryMap["readTimeWindow.startTime"].first, + unittest.equals(arg_readTimeWindow_startTime)); + unittest.expect( + queryMap["assetNames"], unittest.equals(arg_assetNames)); + unittest.expect( + queryMap["contentType"].first, unittest.equals(arg_contentType)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchGetAssetsHistoryResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchGetAssetsHistory(arg_parent, + readTimeWindow_endTime: arg_readTimeWindow_endTime, + readTimeWindow_startTime: arg_readTimeWindow_startTime, + assetNames: arg_assetNames, + contentType: arg_contentType, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchGetAssetsHistoryResponse(response); + }))); + }); + + unittest.test("method--exportAssets", () { + var mock = new HttpServerMock(); + api.ProjectsResourceApi res = new api.CloudassetApi(mock).projects; + var arg_request = buildExportAssetsRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ExportAssetsRequest.fromJson(json); + checkExportAssetsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .exportAssets(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ProjectsOperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsOperationsResourceApi res = + new api.CloudassetApi(mock).projects.operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart b/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart index 61644fe..663752c 100644 --- a/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart +++ b/generated/googleapis_beta/test/clouderrorreporting/v1beta1_test.dart
@@ -65,14 +65,14 @@ buildCounterDeleteEventsResponse--; } -buildUnnamed5062() { +buildUnnamed4547() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5062(core.List<api.SourceReference> o) { +checkUnnamed4547(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -85,7 +85,7 @@ if (buildCounterErrorContext < 3) { o.httpRequest = buildHttpRequestContext(); o.reportLocation = buildSourceLocation(); - o.sourceReferences = buildUnnamed5062(); + o.sourceReferences = buildUnnamed4547(); o.user = "foo"; } buildCounterErrorContext--; @@ -97,7 +97,7 @@ if (buildCounterErrorContext < 3) { checkHttpRequestContext(o.httpRequest); checkSourceLocation(o.reportLocation); - checkUnnamed5062(o.sourceReferences); + checkUnnamed4547(o.sourceReferences); unittest.expect(o.user, unittest.equals('foo')); } buildCounterErrorContext--; @@ -128,14 +128,14 @@ buildCounterErrorEvent--; } -buildUnnamed5063() { +buildUnnamed4548() { var o = new core.List<api.TrackingIssue>(); o.add(buildTrackingIssue()); o.add(buildTrackingIssue()); return o; } -checkUnnamed5063(core.List<api.TrackingIssue> o) { +checkUnnamed4548(core.List<api.TrackingIssue> o) { unittest.expect(o, unittest.hasLength(2)); checkTrackingIssue(o[0]); checkTrackingIssue(o[1]); @@ -148,7 +148,7 @@ if (buildCounterErrorGroup < 3) { o.groupId = "foo"; o.name = "foo"; - o.trackingIssues = buildUnnamed5063(); + o.trackingIssues = buildUnnamed4548(); } buildCounterErrorGroup--; return o; @@ -159,32 +159,32 @@ if (buildCounterErrorGroup < 3) { unittest.expect(o.groupId, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5063(o.trackingIssues); + checkUnnamed4548(o.trackingIssues); } buildCounterErrorGroup--; } -buildUnnamed5064() { +buildUnnamed4549() { var o = new core.List<api.ServiceContext>(); o.add(buildServiceContext()); o.add(buildServiceContext()); return o; } -checkUnnamed5064(core.List<api.ServiceContext> o) { +checkUnnamed4549(core.List<api.ServiceContext> o) { unittest.expect(o, unittest.hasLength(2)); checkServiceContext(o[0]); checkServiceContext(o[1]); } -buildUnnamed5065() { +buildUnnamed4550() { var o = new core.List<api.TimedCount>(); o.add(buildTimedCount()); o.add(buildTimedCount()); return o; } -checkUnnamed5065(core.List<api.TimedCount> o) { +checkUnnamed4550(core.List<api.TimedCount> o) { unittest.expect(o, unittest.hasLength(2)); checkTimedCount(o[0]); checkTimedCount(o[1]); @@ -195,7 +195,7 @@ var o = new api.ErrorGroupStats(); buildCounterErrorGroupStats++; if (buildCounterErrorGroupStats < 3) { - o.affectedServices = buildUnnamed5064(); + o.affectedServices = buildUnnamed4549(); o.affectedUsersCount = "foo"; o.count = "foo"; o.firstSeenTime = "foo"; @@ -203,7 +203,7 @@ o.lastSeenTime = "foo"; o.numAffectedServices = 42; o.representative = buildErrorEvent(); - o.timedCounts = buildUnnamed5065(); + o.timedCounts = buildUnnamed4550(); } buildCounterErrorGroupStats--; return o; @@ -212,7 +212,7 @@ checkErrorGroupStats(api.ErrorGroupStats o) { buildCounterErrorGroupStats++; if (buildCounterErrorGroupStats < 3) { - checkUnnamed5064(o.affectedServices); + checkUnnamed4549(o.affectedServices); unittest.expect(o.affectedUsersCount, unittest.equals('foo')); unittest.expect(o.count, unittest.equals('foo')); unittest.expect(o.firstSeenTime, unittest.equals('foo')); @@ -220,7 +220,7 @@ unittest.expect(o.lastSeenTime, unittest.equals('foo')); unittest.expect(o.numAffectedServices, unittest.equals(42)); checkErrorEvent(o.representative); - checkUnnamed5065(o.timedCounts); + checkUnnamed4550(o.timedCounts); } buildCounterErrorGroupStats--; } @@ -254,14 +254,14 @@ buildCounterHttpRequestContext--; } -buildUnnamed5066() { +buildUnnamed4551() { var o = new core.List<api.ErrorEvent>(); o.add(buildErrorEvent()); o.add(buildErrorEvent()); return o; } -checkUnnamed5066(core.List<api.ErrorEvent> o) { +checkUnnamed4551(core.List<api.ErrorEvent> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorEvent(o[0]); checkErrorEvent(o[1]); @@ -272,7 +272,7 @@ var o = new api.ListEventsResponse(); buildCounterListEventsResponse++; if (buildCounterListEventsResponse < 3) { - o.errorEvents = buildUnnamed5066(); + o.errorEvents = buildUnnamed4551(); o.nextPageToken = "foo"; o.timeRangeBegin = "foo"; } @@ -283,21 +283,21 @@ checkListEventsResponse(api.ListEventsResponse o) { buildCounterListEventsResponse++; if (buildCounterListEventsResponse < 3) { - checkUnnamed5066(o.errorEvents); + checkUnnamed4551(o.errorEvents); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.timeRangeBegin, unittest.equals('foo')); } buildCounterListEventsResponse--; } -buildUnnamed5067() { +buildUnnamed4552() { var o = new core.List<api.ErrorGroupStats>(); o.add(buildErrorGroupStats()); o.add(buildErrorGroupStats()); return o; } -checkUnnamed5067(core.List<api.ErrorGroupStats> o) { +checkUnnamed4552(core.List<api.ErrorGroupStats> o) { unittest.expect(o, unittest.hasLength(2)); checkErrorGroupStats(o[0]); checkErrorGroupStats(o[1]); @@ -308,7 +308,7 @@ var o = new api.ListGroupStatsResponse(); buildCounterListGroupStatsResponse++; if (buildCounterListGroupStatsResponse < 3) { - o.errorGroupStats = buildUnnamed5067(); + o.errorGroupStats = buildUnnamed4552(); o.nextPageToken = "foo"; o.timeRangeBegin = "foo"; } @@ -319,7 +319,7 @@ checkListGroupStatsResponse(api.ListGroupStatsResponse o) { buildCounterListGroupStatsResponse++; if (buildCounterListGroupStatsResponse < 3) { - checkUnnamed5067(o.errorGroupStats); + checkUnnamed4552(o.errorGroupStats); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.timeRangeBegin, unittest.equals('foo')); } @@ -475,14 +475,14 @@ buildCounterTrackingIssue--; } -buildUnnamed5068() { +buildUnnamed4553() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5068(core.List<core.String> o) { +checkUnnamed4553(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -670,8 +670,8 @@ new api.ClouderrorreportingApi(mock).projects.events; var arg_projectName = "foo"; var arg_groupId = "foo"; - var arg_pageToken = "foo"; var arg_serviceFilter_service = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_serviceFilter_version = "foo"; var arg_serviceFilter_resourceType = "foo"; @@ -710,10 +710,10 @@ } unittest.expect( queryMap["groupId"].first, unittest.equals(arg_groupId)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["serviceFilter.service"].first, unittest.equals(arg_serviceFilter_service)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["serviceFilter.version"].first, @@ -733,8 +733,8 @@ res .list(arg_projectName, groupId: arg_groupId, - pageToken: arg_pageToken, serviceFilter_service: arg_serviceFilter_service, + pageToken: arg_pageToken, pageSize: arg_pageSize, serviceFilter_version: arg_serviceFilter_version, serviceFilter_resourceType: arg_serviceFilter_resourceType, @@ -808,17 +808,17 @@ api.ProjectsGroupStatsResourceApi res = new api.ClouderrorreportingApi(mock).projects.groupStats; var arg_projectName = "foo"; + var arg_timedCountDuration = "foo"; + var arg_pageToken = "foo"; var arg_timeRange_period = "foo"; var arg_alignment = "foo"; - var arg_groupId = buildUnnamed5068(); + var arg_groupId = buildUnnamed4553(); var arg_serviceFilter_service = "foo"; var arg_pageSize = 42; var arg_serviceFilter_version = "foo"; var arg_order = "foo"; var arg_serviceFilter_resourceType = "foo"; var arg_alignmentTime = "foo"; - var arg_timedCountDuration = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -851,6 +851,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["timedCountDuration"].first, + unittest.equals(arg_timedCountDuration)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["timeRange.period"].first, unittest.equals(arg_timeRange_period)); unittest.expect( @@ -867,10 +871,6 @@ unittest.equals(arg_serviceFilter_resourceType)); unittest.expect(queryMap["alignmentTime"].first, unittest.equals(arg_alignmentTime)); - unittest.expect(queryMap["timedCountDuration"].first, - unittest.equals(arg_timedCountDuration)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -881,6 +881,8 @@ }), true); res .list(arg_projectName, + timedCountDuration: arg_timedCountDuration, + pageToken: arg_pageToken, timeRange_period: arg_timeRange_period, alignment: arg_alignment, groupId: arg_groupId, @@ -890,8 +892,6 @@ order: arg_order, serviceFilter_resourceType: arg_serviceFilter_resourceType, alignmentTime: arg_alignmentTime, - timedCountDuration: arg_timedCountDuration, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListGroupStatsResponse(response);
diff --git a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart index 1ddd086..fde1fd2 100644 --- a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart +++ b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
@@ -69,14 +69,14 @@ buildCounterAncestor--; } -buildUnnamed5411() { +buildUnnamed4282() { var o = new core.List<api.AuditLogConfig>(); o.add(buildAuditLogConfig()); o.add(buildAuditLogConfig()); return o; } -checkUnnamed5411(core.List<api.AuditLogConfig> o) { +checkUnnamed4282(core.List<api.AuditLogConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkAuditLogConfig(o[0]); checkAuditLogConfig(o[1]); @@ -87,7 +87,7 @@ var o = new api.AuditConfig(); buildCounterAuditConfig++; if (buildCounterAuditConfig < 3) { - o.auditLogConfigs = buildUnnamed5411(); + o.auditLogConfigs = buildUnnamed4282(); o.service = "foo"; } buildCounterAuditConfig--; @@ -97,20 +97,20 @@ checkAuditConfig(api.AuditConfig o) { buildCounterAuditConfig++; if (buildCounterAuditConfig < 3) { - checkUnnamed5411(o.auditLogConfigs); + checkUnnamed4282(o.auditLogConfigs); unittest.expect(o.service, unittest.equals('foo')); } buildCounterAuditConfig--; } -buildUnnamed5412() { +buildUnnamed4283() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5412(core.List<core.String> o) { +checkUnnamed4283(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -121,7 +121,7 @@ var o = new api.AuditLogConfig(); buildCounterAuditLogConfig++; if (buildCounterAuditLogConfig < 3) { - o.exemptedMembers = buildUnnamed5412(); + o.exemptedMembers = buildUnnamed4283(); o.logType = "foo"; } buildCounterAuditLogConfig--; @@ -131,20 +131,20 @@ checkAuditLogConfig(api.AuditLogConfig o) { buildCounterAuditLogConfig++; if (buildCounterAuditLogConfig < 3) { - checkUnnamed5412(o.exemptedMembers); + checkUnnamed4283(o.exemptedMembers); unittest.expect(o.logType, unittest.equals('foo')); } buildCounterAuditLogConfig--; } -buildUnnamed5413() { +buildUnnamed4284() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5413(core.List<core.String> o) { +checkUnnamed4284(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -156,7 +156,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5413(); + o.members = buildUnnamed4284(); o.role = "foo"; } buildCounterBinding--; @@ -167,7 +167,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5413(o.members); + checkUnnamed4284(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -272,14 +272,14 @@ buildCounterGetAncestryRequest--; } -buildUnnamed5414() { +buildUnnamed4285() { var o = new core.List<api.Ancestor>(); o.add(buildAncestor()); o.add(buildAncestor()); return o; } -checkUnnamed5414(core.List<api.Ancestor> o) { +checkUnnamed4285(core.List<api.Ancestor> o) { unittest.expect(o, unittest.hasLength(2)); checkAncestor(o[0]); checkAncestor(o[1]); @@ -290,7 +290,7 @@ var o = new api.GetAncestryResponse(); buildCounterGetAncestryResponse++; if (buildCounterGetAncestryResponse < 3) { - o.ancestor = buildUnnamed5414(); + o.ancestor = buildUnnamed4285(); } buildCounterGetAncestryResponse--; return o; @@ -299,7 +299,7 @@ checkGetAncestryResponse(api.GetAncestryResponse o) { buildCounterGetAncestryResponse++; if (buildCounterGetAncestryResponse < 3) { - checkUnnamed5414(o.ancestor); + checkUnnamed4285(o.ancestor); } buildCounterGetAncestryResponse--; } @@ -319,14 +319,14 @@ buildCounterGetIamPolicyRequest--; } -buildUnnamed5415() { +buildUnnamed4286() { var o = new core.List<api.Organization>(); o.add(buildOrganization()); o.add(buildOrganization()); return o; } -checkUnnamed5415(core.List<api.Organization> o) { +checkUnnamed4286(core.List<api.Organization> o) { unittest.expect(o, unittest.hasLength(2)); checkOrganization(o[0]); checkOrganization(o[1]); @@ -338,7 +338,7 @@ buildCounterListOrganizationsResponse++; if (buildCounterListOrganizationsResponse < 3) { o.nextPageToken = "foo"; - o.organizations = buildUnnamed5415(); + o.organizations = buildUnnamed4286(); } buildCounterListOrganizationsResponse--; return o; @@ -348,19 +348,19 @@ buildCounterListOrganizationsResponse++; if (buildCounterListOrganizationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5415(o.organizations); + checkUnnamed4286(o.organizations); } buildCounterListOrganizationsResponse--; } -buildUnnamed5416() { +buildUnnamed4287() { var o = new core.List<api.Project>(); o.add(buildProject()); o.add(buildProject()); return o; } -checkUnnamed5416(core.List<api.Project> o) { +checkUnnamed4287(core.List<api.Project> o) { unittest.expect(o, unittest.hasLength(2)); checkProject(o[0]); checkProject(o[1]); @@ -372,7 +372,7 @@ buildCounterListProjectsResponse++; if (buildCounterListProjectsResponse < 3) { o.nextPageToken = "foo"; - o.projects = buildUnnamed5416(); + o.projects = buildUnnamed4287(); } buildCounterListProjectsResponse--; return o; @@ -382,7 +382,7 @@ buildCounterListProjectsResponse++; if (buildCounterListProjectsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5416(o.projects); + checkUnnamed4287(o.projects); } buildCounterListProjectsResponse--; } @@ -435,27 +435,27 @@ buildCounterOrganizationOwner--; } -buildUnnamed5417() { +buildUnnamed4288() { var o = new core.List<api.AuditConfig>(); o.add(buildAuditConfig()); o.add(buildAuditConfig()); return o; } -checkUnnamed5417(core.List<api.AuditConfig> o) { +checkUnnamed4288(core.List<api.AuditConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkAuditConfig(o[0]); checkAuditConfig(o[1]); } -buildUnnamed5418() { +buildUnnamed4289() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5418(core.List<api.Binding> o) { +checkUnnamed4289(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -466,8 +466,8 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.auditConfigs = buildUnnamed5417(); - o.bindings = buildUnnamed5418(); + o.auditConfigs = buildUnnamed4288(); + o.bindings = buildUnnamed4289(); o.etag = "foo"; o.version = 42; } @@ -478,22 +478,22 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5417(o.auditConfigs); - checkUnnamed5418(o.bindings); + checkUnnamed4288(o.auditConfigs); + checkUnnamed4289(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -buildUnnamed5419() { +buildUnnamed4290() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5419(core.Map<core.String, core.String> o) { +checkUnnamed4290(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -505,7 +505,7 @@ buildCounterProject++; if (buildCounterProject < 3) { o.createTime = "foo"; - o.labels = buildUnnamed5419(); + o.labels = buildUnnamed4290(); o.lifecycleState = "foo"; o.name = "foo"; o.parent = buildResourceId(); @@ -520,7 +520,7 @@ buildCounterProject++; if (buildCounterProject < 3) { unittest.expect(o.createTime, unittest.equals('foo')); - checkUnnamed5419(o.labels); + checkUnnamed4290(o.labels); unittest.expect(o.lifecycleState, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); checkResourceId(o.parent); @@ -595,14 +595,14 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5420() { +buildUnnamed4291() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5420(core.List<core.String> o) { +checkUnnamed4291(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -613,7 +613,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5420(); + o.permissions = buildUnnamed4291(); } buildCounterTestIamPermissionsRequest--; return o; @@ -622,19 +622,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5420(o.permissions); + checkUnnamed4291(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5421() { +buildUnnamed4292() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5421(core.List<core.String> o) { +checkUnnamed4292(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -645,7 +645,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5421(); + o.permissions = buildUnnamed4292(); } buildCounterTestIamPermissionsResponse--; return o; @@ -654,7 +654,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5421(o.permissions); + checkUnnamed4292(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1502,9 +1502,9 @@ var mock = new HttpServerMock(); api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects; + var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; - var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1536,11 +1536,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1551,9 +1551,9 @@ }), true); res .list( + filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize, - filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListProjectsResponse(response);
diff --git a/generated/googleapis_beta/test/redis/v1beta1_test.dart b/generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart similarity index 62% copy from generated/googleapis_beta/test/redis/v1beta1_test.dart copy to generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart index 67cf4bd..513dc18 100644 --- a/generated/googleapis_beta/test/redis/v1beta1_test.dart +++ b/generated/googleapis_beta/test/cloudscheduler/v1beta1_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.redis.v1beta1.test; +library googleapis_beta.cloudscheduler.v1beta1.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/redis/v1beta1.dart' as api; +import 'package:googleapis_beta/cloudscheduler/v1beta1.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,6 +50,71 @@ return new http.StreamedResponse(stream, status, headers: headers); } +buildUnnamed4873() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4873(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterAppEngineHttpTarget = 0; +buildAppEngineHttpTarget() { + var o = new api.AppEngineHttpTarget(); + buildCounterAppEngineHttpTarget++; + if (buildCounterAppEngineHttpTarget < 3) { + o.appEngineRouting = buildAppEngineRouting(); + o.body = "foo"; + o.headers = buildUnnamed4873(); + o.httpMethod = "foo"; + o.relativeUri = "foo"; + } + buildCounterAppEngineHttpTarget--; + return o; +} + +checkAppEngineHttpTarget(api.AppEngineHttpTarget o) { + buildCounterAppEngineHttpTarget++; + if (buildCounterAppEngineHttpTarget < 3) { + checkAppEngineRouting(o.appEngineRouting); + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4873(o.headers); + unittest.expect(o.httpMethod, unittest.equals('foo')); + unittest.expect(o.relativeUri, unittest.equals('foo')); + } + buildCounterAppEngineHttpTarget--; +} + +core.int buildCounterAppEngineRouting = 0; +buildAppEngineRouting() { + var o = new api.AppEngineRouting(); + buildCounterAppEngineRouting++; + if (buildCounterAppEngineRouting < 3) { + o.host = "foo"; + o.instance = "foo"; + o.service = "foo"; + o.version = "foo"; + } + buildCounterAppEngineRouting--; + return o; +} + +checkAppEngineRouting(api.AppEngineRouting o) { + buildCounterAppEngineRouting++; + if (buildCounterAppEngineRouting < 3) { + unittest.expect(o.host, unittest.equals('foo')); + unittest.expect(o.instance, unittest.equals('foo')); + unittest.expect(o.service, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterAppEngineRouting--; +} + core.int buildCounterEmpty = 0; buildEmpty() { var o = new api.Empty(); @@ -65,207 +130,129 @@ buildCounterEmpty--; } -core.int buildCounterGoogleCloudCommonOperationMetadata = 0; -buildGoogleCloudCommonOperationMetadata() { - var o = new api.GoogleCloudCommonOperationMetadata(); - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - o.apiVersion = "foo"; - o.cancelRequested = true; - o.createTime = "foo"; - o.endTime = "foo"; - o.statusDetail = "foo"; - o.target = "foo"; - o.verb = "foo"; - } - buildCounterGoogleCloudCommonOperationMetadata--; - return o; -} - -checkGoogleCloudCommonOperationMetadata( - api.GoogleCloudCommonOperationMetadata o) { - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - unittest.expect(o.apiVersion, unittest.equals('foo')); - unittest.expect(o.cancelRequested, unittest.isTrue); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - unittest.expect(o.statusDetail, unittest.equals('foo')); - unittest.expect(o.target, unittest.equals('foo')); - unittest.expect(o.verb, unittest.equals('foo')); - } - buildCounterGoogleCloudCommonOperationMetadata--; -} - -buildUnnamed5359() { - var o = new core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata>(); - o["x"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - o["y"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - return o; -} - -checkUnnamed5359( - core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata> o) { - unittest.expect(o, unittest.hasLength(2)); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["x"]); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["y"]); -} - -core.int buildCounterGoogleCloudRedisV1beta1LocationMetadata = 0; -buildGoogleCloudRedisV1beta1LocationMetadata() { - var o = new api.GoogleCloudRedisV1beta1LocationMetadata(); - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - o.availableZones = buildUnnamed5359(); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1LocationMetadata( - api.GoogleCloudRedisV1beta1LocationMetadata o) { - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - checkUnnamed5359(o.availableZones); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; -} - -core.int buildCounterGoogleCloudRedisV1beta1ZoneMetadata = 0; -buildGoogleCloudRedisV1beta1ZoneMetadata() { - var o = new api.GoogleCloudRedisV1beta1ZoneMetadata(); - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1ZoneMetadata( - api.GoogleCloudRedisV1beta1ZoneMetadata o) { - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; -} - -buildUnnamed5360() { +buildUnnamed4874() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5360(core.Map<core.String, core.String> o) { +checkUnnamed4874(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5361() { - var o = new core.Map<core.String, core.String>(); - o["x"] = "foo"; - o["y"] = "foo"; +core.int buildCounterHttpTarget = 0; +buildHttpTarget() { + var o = new api.HttpTarget(); + buildCounterHttpTarget++; + if (buildCounterHttpTarget < 3) { + o.body = "foo"; + o.headers = buildUnnamed4874(); + o.httpMethod = "foo"; + o.uri = "foo"; + } + buildCounterHttpTarget--; return o; } -checkUnnamed5361(core.Map<core.String, core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o["x"], unittest.equals('foo')); - unittest.expect(o["y"], unittest.equals('foo')); +checkHttpTarget(api.HttpTarget o) { + buildCounterHttpTarget++; + if (buildCounterHttpTarget < 3) { + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4874(o.headers); + unittest.expect(o.httpMethod, unittest.equals('foo')); + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterHttpTarget--; } -core.int buildCounterInstance = 0; -buildInstance() { - var o = new api.Instance(); - buildCounterInstance++; - if (buildCounterInstance < 3) { - o.alternativeLocationId = "foo"; - o.authorizedNetwork = "foo"; - o.createTime = "foo"; - o.currentLocationId = "foo"; - o.displayName = "foo"; - o.host = "foo"; - o.labels = buildUnnamed5360(); - o.locationId = "foo"; - o.memorySizeGb = 42; +core.int buildCounterJob = 0; +buildJob() { + var o = new api.Job(); + buildCounterJob++; + if (buildCounterJob < 3) { + o.appEngineHttpTarget = buildAppEngineHttpTarget(); + o.description = "foo"; + o.httpTarget = buildHttpTarget(); + o.lastAttemptTime = "foo"; o.name = "foo"; - o.port = 42; - o.redisConfigs = buildUnnamed5361(); - o.redisVersion = "foo"; - o.reservedIpRange = "foo"; + o.pubsubTarget = buildPubsubTarget(); + o.retryConfig = buildRetryConfig(); + o.schedule = "foo"; + o.scheduleTime = "foo"; o.state = "foo"; - o.statusMessage = "foo"; - o.tier = "foo"; + o.status = buildStatus(); + o.timeZone = "foo"; + o.userUpdateTime = "foo"; } - buildCounterInstance--; + buildCounterJob--; return o; } -checkInstance(api.Instance o) { - buildCounterInstance++; - if (buildCounterInstance < 3) { - unittest.expect(o.alternativeLocationId, unittest.equals('foo')); - unittest.expect(o.authorizedNetwork, unittest.equals('foo')); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.currentLocationId, unittest.equals('foo')); - unittest.expect(o.displayName, unittest.equals('foo')); - unittest.expect(o.host, unittest.equals('foo')); - checkUnnamed5360(o.labels); - unittest.expect(o.locationId, unittest.equals('foo')); - unittest.expect(o.memorySizeGb, unittest.equals(42)); +checkJob(api.Job o) { + buildCounterJob++; + if (buildCounterJob < 3) { + checkAppEngineHttpTarget(o.appEngineHttpTarget); + unittest.expect(o.description, unittest.equals('foo')); + checkHttpTarget(o.httpTarget); + unittest.expect(o.lastAttemptTime, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.port, unittest.equals(42)); - checkUnnamed5361(o.redisConfigs); - unittest.expect(o.redisVersion, unittest.equals('foo')); - unittest.expect(o.reservedIpRange, unittest.equals('foo')); + checkPubsubTarget(o.pubsubTarget); + checkRetryConfig(o.retryConfig); + unittest.expect(o.schedule, unittest.equals('foo')); + unittest.expect(o.scheduleTime, unittest.equals('foo')); unittest.expect(o.state, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.tier, unittest.equals('foo')); + checkStatus(o.status); + unittest.expect(o.timeZone, unittest.equals('foo')); + unittest.expect(o.userUpdateTime, unittest.equals('foo')); } - buildCounterInstance--; + buildCounterJob--; } -buildUnnamed5362() { - var o = new core.List<api.Instance>(); - o.add(buildInstance()); - o.add(buildInstance()); +buildUnnamed4875() { + var o = new core.List<api.Job>(); + o.add(buildJob()); + o.add(buildJob()); return o; } -checkUnnamed5362(core.List<api.Instance> o) { +checkUnnamed4875(core.List<api.Job> o) { unittest.expect(o, unittest.hasLength(2)); - checkInstance(o[0]); - checkInstance(o[1]); + checkJob(o[0]); + checkJob(o[1]); } -core.int buildCounterListInstancesResponse = 0; -buildListInstancesResponse() { - var o = new api.ListInstancesResponse(); - buildCounterListInstancesResponse++; - if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5362(); +core.int buildCounterListJobsResponse = 0; +buildListJobsResponse() { + var o = new api.ListJobsResponse(); + buildCounterListJobsResponse++; + if (buildCounterListJobsResponse < 3) { + o.jobs = buildUnnamed4875(); o.nextPageToken = "foo"; } - buildCounterListInstancesResponse--; + buildCounterListJobsResponse--; return o; } -checkListInstancesResponse(api.ListInstancesResponse o) { - buildCounterListInstancesResponse++; - if (buildCounterListInstancesResponse < 3) { - checkUnnamed5362(o.instances); +checkListJobsResponse(api.ListJobsResponse o) { + buildCounterListJobsResponse++; + if (buildCounterListJobsResponse < 3) { + checkUnnamed4875(o.jobs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } - buildCounterListInstancesResponse--; + buildCounterListJobsResponse--; } -buildUnnamed5363() { +buildUnnamed4876() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5363(core.List<api.Location> o) { +checkUnnamed4876(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -276,7 +263,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5363(); + o.locations = buildUnnamed4876(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -286,60 +273,26 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5363(o.locations); + checkUnnamed4876(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5364() { - var o = new core.List<api.Operation>(); - o.add(buildOperation()); - o.add(buildOperation()); - return o; -} - -checkUnnamed5364(core.List<api.Operation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperation(o[0]); - checkOperation(o[1]); -} - -core.int buildCounterListOperationsResponse = 0; -buildListOperationsResponse() { - var o = new api.ListOperationsResponse(); - buildCounterListOperationsResponse++; - if (buildCounterListOperationsResponse < 3) { - o.nextPageToken = "foo"; - o.operations = buildUnnamed5364(); - } - buildCounterListOperationsResponse--; - return o; -} - -checkListOperationsResponse(api.ListOperationsResponse o) { - buildCounterListOperationsResponse++; - if (buildCounterListOperationsResponse < 3) { - unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5364(o.operations); - } - buildCounterListOperationsResponse--; -} - -buildUnnamed5365() { +buildUnnamed4877() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5365(core.Map<core.String, core.String> o) { +checkUnnamed4877(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5366() { +buildUnnamed4878() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -354,7 +307,7 @@ return o; } -checkUnnamed5366(core.Map<core.String, core.Object> o) { +checkUnnamed4878(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -374,9 +327,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5365(); + o.labels = buildUnnamed4877(); o.locationId = "foo"; - o.metadata = buildUnnamed5366(); + o.metadata = buildUnnamed4878(); o.name = "foo"; } buildCounterLocation--; @@ -387,15 +340,161 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5365(o.labels); + checkUnnamed4877(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5366(o.metadata); + checkUnnamed4878(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; } -buildUnnamed5367() { +core.int buildCounterPauseJobRequest = 0; +buildPauseJobRequest() { + var o = new api.PauseJobRequest(); + buildCounterPauseJobRequest++; + if (buildCounterPauseJobRequest < 3) {} + buildCounterPauseJobRequest--; + return o; +} + +checkPauseJobRequest(api.PauseJobRequest o) { + buildCounterPauseJobRequest++; + if (buildCounterPauseJobRequest < 3) {} + buildCounterPauseJobRequest--; +} + +buildUnnamed4879() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4879(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPubsubMessage = 0; +buildPubsubMessage() { + var o = new api.PubsubMessage(); + buildCounterPubsubMessage++; + if (buildCounterPubsubMessage < 3) { + o.attributes = buildUnnamed4879(); + o.data = "foo"; + o.messageId = "foo"; + o.publishTime = "foo"; + } + buildCounterPubsubMessage--; + return o; +} + +checkPubsubMessage(api.PubsubMessage o) { + buildCounterPubsubMessage++; + if (buildCounterPubsubMessage < 3) { + checkUnnamed4879(o.attributes); + unittest.expect(o.data, unittest.equals('foo')); + unittest.expect(o.messageId, unittest.equals('foo')); + unittest.expect(o.publishTime, unittest.equals('foo')); + } + buildCounterPubsubMessage--; +} + +buildUnnamed4880() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4880(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPubsubTarget = 0; +buildPubsubTarget() { + var o = new api.PubsubTarget(); + buildCounterPubsubTarget++; + if (buildCounterPubsubTarget < 3) { + o.attributes = buildUnnamed4880(); + o.data = "foo"; + o.topicName = "foo"; + } + buildCounterPubsubTarget--; + return o; +} + +checkPubsubTarget(api.PubsubTarget o) { + buildCounterPubsubTarget++; + if (buildCounterPubsubTarget < 3) { + checkUnnamed4880(o.attributes); + unittest.expect(o.data, unittest.equals('foo')); + unittest.expect(o.topicName, unittest.equals('foo')); + } + buildCounterPubsubTarget--; +} + +core.int buildCounterResumeJobRequest = 0; +buildResumeJobRequest() { + var o = new api.ResumeJobRequest(); + buildCounterResumeJobRequest++; + if (buildCounterResumeJobRequest < 3) {} + buildCounterResumeJobRequest--; + return o; +} + +checkResumeJobRequest(api.ResumeJobRequest o) { + buildCounterResumeJobRequest++; + if (buildCounterResumeJobRequest < 3) {} + buildCounterResumeJobRequest--; +} + +core.int buildCounterRetryConfig = 0; +buildRetryConfig() { + var o = new api.RetryConfig(); + buildCounterRetryConfig++; + if (buildCounterRetryConfig < 3) { + o.maxBackoffDuration = "foo"; + o.maxDoublings = 42; + o.maxRetryDuration = "foo"; + o.minBackoffDuration = "foo"; + o.retryCount = 42; + } + buildCounterRetryConfig--; + return o; +} + +checkRetryConfig(api.RetryConfig o) { + buildCounterRetryConfig++; + if (buildCounterRetryConfig < 3) { + unittest.expect(o.maxBackoffDuration, unittest.equals('foo')); + unittest.expect(o.maxDoublings, unittest.equals(42)); + unittest.expect(o.maxRetryDuration, unittest.equals('foo')); + unittest.expect(o.minBackoffDuration, unittest.equals('foo')); + unittest.expect(o.retryCount, unittest.equals(42)); + } + buildCounterRetryConfig--; +} + +core.int buildCounterRunJobRequest = 0; +buildRunJobRequest() { + var o = new api.RunJobRequest(); + buildCounterRunJobRequest++; + if (buildCounterRunJobRequest < 3) {} + buildCounterRunJobRequest--; + return o; +} + +checkRunJobRequest(api.RunJobRequest o) { + buildCounterRunJobRequest++; + if (buildCounterRunJobRequest < 3) {} + buildCounterRunJobRequest--; +} + +buildUnnamed4881() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -410,7 +509,7 @@ return o; } -checkUnnamed5367(core.Map<core.String, core.Object> o) { +checkUnnamed4881(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -424,102 +523,17 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5368() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5368(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted5 = (o["x"]) as core.Map; - unittest.expect(casted5, unittest.hasLength(3)); - unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted5["bool"], unittest.equals(true)); - unittest.expect(casted5["string"], unittest.equals('foo')); - var casted6 = (o["y"]) as core.Map; - unittest.expect(casted6, unittest.hasLength(3)); - unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted6["bool"], unittest.equals(true)); - unittest.expect(casted6["string"], unittest.equals('foo')); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.done = true; - o.error = buildStatus(); - o.metadata = buildUnnamed5367(); - o.name = "foo"; - o.response = buildUnnamed5368(); - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.done, unittest.isTrue); - checkStatus(o.error); - checkUnnamed5367(o.metadata); - unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5368(o.response); - } - buildCounterOperation--; -} - -buildUnnamed5369() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5369(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted7 = (o["x"]) as core.Map; - unittest.expect(casted7, unittest.hasLength(3)); - unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted7["bool"], unittest.equals(true)); - unittest.expect(casted7["string"], unittest.equals('foo')); - var casted8 = (o["y"]) as core.Map; - unittest.expect(casted8, unittest.hasLength(3)); - unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted8["bool"], unittest.equals(true)); - unittest.expect(casted8["string"], unittest.equals('foo')); -} - -buildUnnamed5370() { +buildUnnamed4882() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5369()); - o.add(buildUnnamed5369()); + o.add(buildUnnamed4881()); + o.add(buildUnnamed4881()); return o; } -checkUnnamed5370(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4882(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5369(o[0]); - checkUnnamed5369(o[1]); + checkUnnamed4881(o[0]); + checkUnnamed4881(o[1]); } core.int buildCounterStatus = 0; @@ -528,7 +542,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5370(); + o.details = buildUnnamed4882(); o.message = "foo"; } buildCounterStatus--; @@ -539,13 +553,29 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5370(o.details); + checkUnnamed4882(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } main() { + unittest.group("obj-schema-AppEngineHttpTarget", () { + unittest.test("to-json--from-json", () { + var o = buildAppEngineHttpTarget(); + var od = new api.AppEngineHttpTarget.fromJson(o.toJson()); + checkAppEngineHttpTarget(od); + }); + }); + + unittest.group("obj-schema-AppEngineRouting", () { + unittest.test("to-json--from-json", () { + var o = buildAppEngineRouting(); + var od = new api.AppEngineRouting.fromJson(o.toJson()); + checkAppEngineRouting(od); + }); + }); + unittest.group("obj-schema-Empty", () { unittest.test("to-json--from-json", () { var o = buildEmpty(); @@ -554,44 +584,27 @@ }); }); - unittest.group("obj-schema-GoogleCloudCommonOperationMetadata", () { + unittest.group("obj-schema-HttpTarget", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudCommonOperationMetadata(); - var od = new api.GoogleCloudCommonOperationMetadata.fromJson(o.toJson()); - checkGoogleCloudCommonOperationMetadata(od); + var o = buildHttpTarget(); + var od = new api.HttpTarget.fromJson(o.toJson()); + checkHttpTarget(od); }); }); - unittest.group("obj-schema-GoogleCloudRedisV1beta1LocationMetadata", () { + unittest.group("obj-schema-Job", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1LocationMetadata(); - var od = - new api.GoogleCloudRedisV1beta1LocationMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1LocationMetadata(od); + var o = buildJob(); + var od = new api.Job.fromJson(o.toJson()); + checkJob(od); }); }); - unittest.group("obj-schema-GoogleCloudRedisV1beta1ZoneMetadata", () { + unittest.group("obj-schema-ListJobsResponse", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1ZoneMetadata(); - var od = new api.GoogleCloudRedisV1beta1ZoneMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1ZoneMetadata(od); - }); - }); - - unittest.group("obj-schema-Instance", () { - unittest.test("to-json--from-json", () { - var o = buildInstance(); - var od = new api.Instance.fromJson(o.toJson()); - checkInstance(od); - }); - }); - - unittest.group("obj-schema-ListInstancesResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListInstancesResponse(); - var od = new api.ListInstancesResponse.fromJson(o.toJson()); - checkListInstancesResponse(od); + var o = buildListJobsResponse(); + var od = new api.ListJobsResponse.fromJson(o.toJson()); + checkListJobsResponse(od); }); }); @@ -603,14 +616,6 @@ }); }); - unittest.group("obj-schema-ListOperationsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListOperationsResponse(); - var od = new api.ListOperationsResponse.fromJson(o.toJson()); - checkListOperationsResponse(od); - }); - }); - unittest.group("obj-schema-Location", () { unittest.test("to-json--from-json", () { var o = buildLocation(); @@ -619,11 +624,51 @@ }); }); - unittest.group("obj-schema-Operation", () { + unittest.group("obj-schema-PauseJobRequest", () { unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); + var o = buildPauseJobRequest(); + var od = new api.PauseJobRequest.fromJson(o.toJson()); + checkPauseJobRequest(od); + }); + }); + + unittest.group("obj-schema-PubsubMessage", () { + unittest.test("to-json--from-json", () { + var o = buildPubsubMessage(); + var od = new api.PubsubMessage.fromJson(o.toJson()); + checkPubsubMessage(od); + }); + }); + + unittest.group("obj-schema-PubsubTarget", () { + unittest.test("to-json--from-json", () { + var o = buildPubsubTarget(); + var od = new api.PubsubTarget.fromJson(o.toJson()); + checkPubsubTarget(od); + }); + }); + + unittest.group("obj-schema-ResumeJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildResumeJobRequest(); + var od = new api.ResumeJobRequest.fromJson(o.toJson()); + checkResumeJobRequest(od); + }); + }); + + unittest.group("obj-schema-RetryConfig", () { + unittest.test("to-json--from-json", () { + var o = buildRetryConfig(); + var od = new api.RetryConfig.fromJson(o.toJson()); + checkRetryConfig(od); + }); + }); + + unittest.group("obj-schema-RunJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildRunJobRequest(); + var od = new api.RunJobRequest.fromJson(o.toJson()); + checkRunJobRequest(od); }); }); @@ -639,7 +684,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.CloudschedulerApi(mock).projects.locations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -691,11 +736,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.CloudschedulerApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -728,11 +773,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -743,9 +788,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -753,18 +798,17 @@ }); }); - unittest.group("resource-ProjectsLocationsInstancesResourceApi", () { + unittest.group("resource-ProjectsLocationsJobsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; - var arg_request = buildInstance(); + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildJob(); var arg_parent = "foo"; - var arg_instanceId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.Instance.fromJson(json); - checkInstance(obj); + var obj = new api.Job.fromJson(json); + checkJob(obj); var path = (req.url).path; var pathOffset = 0; @@ -796,28 +840,25 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["instanceId"].first, unittest.equals(arg_instanceId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .create(arg_request, arg_parent, - instanceId: arg_instanceId, $fields: arg_$fields) + .create(arg_request, arg_parent, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkJob(response); }))); }); unittest.test("method--delete", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -856,20 +897,20 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildEmpty()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .delete(arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkEmpty(response); }))); }); unittest.test("method--get", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -908,20 +949,20 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildInstance()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .get(arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkInstance(response); + checkJob(response); }))); }); unittest.test("method--list", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; var arg_parent = "foo"; var arg_pageToken = "foo"; var arg_pageSize = 42; @@ -966,7 +1007,7 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildListInstancesResponse()); + var resp = convert.json.encode(buildListJobsResponse()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res @@ -975,21 +1016,21 @@ pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkListInstancesResponse(response); + checkListJobsResponse(response); }))); }); unittest.test("method--patch", () { var mock = new HttpServerMock(); - api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; - var arg_request = buildInstance(); + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildJob(); var arg_name = "foo"; var arg_updateMask = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.Instance.fromJson(json); - checkInstance(obj); + var obj = new api.Job.fromJson(json); + checkJob(obj); var path = (req.url).path; var pathOffset = 0; @@ -1028,26 +1069,28 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res .patch(arg_request, arg_name, updateMask: arg_updateMask, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); + checkJob(response); }))); }); - }); - unittest.group("resource-ProjectsLocationsOperationsResourceApi", () { - unittest.test("method--cancel", () { + unittest.test("method--pause", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildPauseJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PauseJobRequest.fromJson(json); + checkPauseJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1083,23 +1126,27 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildEmpty()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .cancel(arg_name, $fields: arg_$fields) + .pause(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkEmpty(response); + checkJob(response); }))); }); - unittest.test("method--delete", () { + unittest.test("method--resume", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildResumeJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ResumeJobRequest.fromJson(json); + checkResumeJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1135,23 +1182,27 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildEmpty()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .delete(arg_name, $fields: arg_$fields) + .resume(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkEmpty(response); + checkJob(response); }))); }); - unittest.test("method--get", () { + unittest.test("method--run", () { var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + api.ProjectsLocationsJobsResourceApi res = + new api.CloudschedulerApi(mock).projects.locations.jobs; + var arg_request = buildRunJobRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.RunJobRequest.fromJson(json); + checkRunJobRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1187,77 +1238,13 @@ var h = { "content-type": "application/json; charset=utf-8", }; - var resp = convert.json.encode(buildOperation()); + var resp = convert.json.encode(buildJob()); return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .get(arg_name, $fields: arg_$fields) + .run(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; - var arg_name = "foo"; - var arg_filter = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListOperationsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_name, - filter: arg_filter, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListOperationsResponse(response); + checkJob(response); }))); }); });
diff --git a/generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart b/generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart similarity index 75% rename from generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart rename to generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart index 1b2c1fe..6c99098 100644 --- a/generated/googleapis_beta/test/cloudtasks/v2beta2_test.dart +++ b/generated/googleapis_beta/test/cloudtasks/v2beta3_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.cloudtasks.v2beta2.test; +library googleapis_beta.cloudtasks.v2beta3.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/cloudtasks/v2beta2.dart' as api; +import 'package:googleapis_beta/cloudtasks/v2beta3.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,33 +50,33 @@ return new http.StreamedResponse(stream, status, headers: headers); } -core.int buildCounterAcknowledgeTaskRequest = 0; -buildAcknowledgeTaskRequest() { - var o = new api.AcknowledgeTaskRequest(); - buildCounterAcknowledgeTaskRequest++; - if (buildCounterAcknowledgeTaskRequest < 3) { - o.scheduleTime = "foo"; +core.int buildCounterAppEngineHttpQueue = 0; +buildAppEngineHttpQueue() { + var o = new api.AppEngineHttpQueue(); + buildCounterAppEngineHttpQueue++; + if (buildCounterAppEngineHttpQueue < 3) { + o.appEngineRoutingOverride = buildAppEngineRouting(); } - buildCounterAcknowledgeTaskRequest--; + buildCounterAppEngineHttpQueue--; return o; } -checkAcknowledgeTaskRequest(api.AcknowledgeTaskRequest o) { - buildCounterAcknowledgeTaskRequest++; - if (buildCounterAcknowledgeTaskRequest < 3) { - unittest.expect(o.scheduleTime, unittest.equals('foo')); +checkAppEngineHttpQueue(api.AppEngineHttpQueue o) { + buildCounterAppEngineHttpQueue++; + if (buildCounterAppEngineHttpQueue < 3) { + checkAppEngineRouting(o.appEngineRoutingOverride); } - buildCounterAcknowledgeTaskRequest--; + buildCounterAppEngineHttpQueue--; } -buildUnnamed5384() { +buildUnnamed4684() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5384(core.Map<core.String, core.String> o) { +checkUnnamed4684(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -88,10 +88,10 @@ buildCounterAppEngineHttpRequest++; if (buildCounterAppEngineHttpRequest < 3) { o.appEngineRouting = buildAppEngineRouting(); - o.headers = buildUnnamed5384(); + o.body = "foo"; + o.headers = buildUnnamed4684(); o.httpMethod = "foo"; - o.payload = "foo"; - o.relativeUrl = "foo"; + o.relativeUri = "foo"; } buildCounterAppEngineHttpRequest--; return o; @@ -101,33 +101,14 @@ buildCounterAppEngineHttpRequest++; if (buildCounterAppEngineHttpRequest < 3) { checkAppEngineRouting(o.appEngineRouting); - checkUnnamed5384(o.headers); + unittest.expect(o.body, unittest.equals('foo')); + checkUnnamed4684(o.headers); unittest.expect(o.httpMethod, unittest.equals('foo')); - unittest.expect(o.payload, unittest.equals('foo')); - unittest.expect(o.relativeUrl, unittest.equals('foo')); + unittest.expect(o.relativeUri, unittest.equals('foo')); } buildCounterAppEngineHttpRequest--; } -core.int buildCounterAppEngineHttpTarget = 0; -buildAppEngineHttpTarget() { - var o = new api.AppEngineHttpTarget(); - buildCounterAppEngineHttpTarget++; - if (buildCounterAppEngineHttpTarget < 3) { - o.appEngineRoutingOverride = buildAppEngineRouting(); - } - buildCounterAppEngineHttpTarget--; - return o; -} - -checkAppEngineHttpTarget(api.AppEngineHttpTarget o) { - buildCounterAppEngineHttpTarget++; - if (buildCounterAppEngineHttpTarget < 3) { - checkAppEngineRouting(o.appEngineRoutingOverride); - } - buildCounterAppEngineHttpTarget--; -} - core.int buildCounterAppEngineRouting = 0; buildAppEngineRouting() { var o = new api.AppEngineRouting(); @@ -153,39 +134,39 @@ buildCounterAppEngineRouting--; } -core.int buildCounterAttemptStatus = 0; -buildAttemptStatus() { - var o = new api.AttemptStatus(); - buildCounterAttemptStatus++; - if (buildCounterAttemptStatus < 3) { +core.int buildCounterAttempt = 0; +buildAttempt() { + var o = new api.Attempt(); + buildCounterAttempt++; + if (buildCounterAttempt < 3) { o.dispatchTime = "foo"; o.responseStatus = buildStatus(); o.responseTime = "foo"; o.scheduleTime = "foo"; } - buildCounterAttemptStatus--; + buildCounterAttempt--; return o; } -checkAttemptStatus(api.AttemptStatus o) { - buildCounterAttemptStatus++; - if (buildCounterAttemptStatus < 3) { +checkAttempt(api.Attempt o) { + buildCounterAttempt++; + if (buildCounterAttempt < 3) { unittest.expect(o.dispatchTime, unittest.equals('foo')); checkStatus(o.responseStatus); unittest.expect(o.responseTime, unittest.equals('foo')); unittest.expect(o.scheduleTime, unittest.equals('foo')); } - buildCounterAttemptStatus--; + buildCounterAttempt--; } -buildUnnamed5385() { +buildUnnamed4685() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5385(core.List<core.String> o) { +checkUnnamed4685(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -197,7 +178,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5385(); + o.members = buildUnnamed4685(); o.role = "foo"; } buildCounterBinding--; @@ -208,33 +189,12 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5385(o.members); + checkUnnamed4685(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; } -core.int buildCounterCancelLeaseRequest = 0; -buildCancelLeaseRequest() { - var o = new api.CancelLeaseRequest(); - buildCounterCancelLeaseRequest++; - if (buildCounterCancelLeaseRequest < 3) { - o.responseView = "foo"; - o.scheduleTime = "foo"; - } - buildCounterCancelLeaseRequest--; - return o; -} - -checkCancelLeaseRequest(api.CancelLeaseRequest o) { - buildCounterCancelLeaseRequest++; - if (buildCounterCancelLeaseRequest < 3) { - unittest.expect(o.responseView, unittest.equals('foo')); - unittest.expect(o.scheduleTime, unittest.equals('foo')); - } - buildCounterCancelLeaseRequest--; -} - core.int buildCounterCreateTaskRequest = 0; buildCreateTaskRequest() { var o = new api.CreateTaskRequest(); @@ -311,71 +271,14 @@ buildCounterGetIamPolicyRequest--; } -core.int buildCounterLeaseTasksRequest = 0; -buildLeaseTasksRequest() { - var o = new api.LeaseTasksRequest(); - buildCounterLeaseTasksRequest++; - if (buildCounterLeaseTasksRequest < 3) { - o.filter = "foo"; - o.leaseDuration = "foo"; - o.maxTasks = 42; - o.responseView = "foo"; - } - buildCounterLeaseTasksRequest--; - return o; -} - -checkLeaseTasksRequest(api.LeaseTasksRequest o) { - buildCounterLeaseTasksRequest++; - if (buildCounterLeaseTasksRequest < 3) { - unittest.expect(o.filter, unittest.equals('foo')); - unittest.expect(o.leaseDuration, unittest.equals('foo')); - unittest.expect(o.maxTasks, unittest.equals(42)); - unittest.expect(o.responseView, unittest.equals('foo')); - } - buildCounterLeaseTasksRequest--; -} - -buildUnnamed5386() { - var o = new core.List<api.Task>(); - o.add(buildTask()); - o.add(buildTask()); - return o; -} - -checkUnnamed5386(core.List<api.Task> o) { - unittest.expect(o, unittest.hasLength(2)); - checkTask(o[0]); - checkTask(o[1]); -} - -core.int buildCounterLeaseTasksResponse = 0; -buildLeaseTasksResponse() { - var o = new api.LeaseTasksResponse(); - buildCounterLeaseTasksResponse++; - if (buildCounterLeaseTasksResponse < 3) { - o.tasks = buildUnnamed5386(); - } - buildCounterLeaseTasksResponse--; - return o; -} - -checkLeaseTasksResponse(api.LeaseTasksResponse o) { - buildCounterLeaseTasksResponse++; - if (buildCounterLeaseTasksResponse < 3) { - checkUnnamed5386(o.tasks); - } - buildCounterLeaseTasksResponse--; -} - -buildUnnamed5387() { +buildUnnamed4686() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5387(core.List<api.Location> o) { +checkUnnamed4686(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -386,7 +289,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5387(); + o.locations = buildUnnamed4686(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -396,20 +299,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5387(o.locations); + checkUnnamed4686(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5388() { +buildUnnamed4687() { var o = new core.List<api.Queue>(); o.add(buildQueue()); o.add(buildQueue()); return o; } -checkUnnamed5388(core.List<api.Queue> o) { +checkUnnamed4687(core.List<api.Queue> o) { unittest.expect(o, unittest.hasLength(2)); checkQueue(o[0]); checkQueue(o[1]); @@ -421,7 +324,7 @@ buildCounterListQueuesResponse++; if (buildCounterListQueuesResponse < 3) { o.nextPageToken = "foo"; - o.queues = buildUnnamed5388(); + o.queues = buildUnnamed4687(); } buildCounterListQueuesResponse--; return o; @@ -431,19 +334,19 @@ buildCounterListQueuesResponse++; if (buildCounterListQueuesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5388(o.queues); + checkUnnamed4687(o.queues); } buildCounterListQueuesResponse--; } -buildUnnamed5389() { +buildUnnamed4688() { var o = new core.List<api.Task>(); o.add(buildTask()); o.add(buildTask()); return o; } -checkUnnamed5389(core.List<api.Task> o) { +checkUnnamed4688(core.List<api.Task> o) { unittest.expect(o, unittest.hasLength(2)); checkTask(o[0]); checkTask(o[1]); @@ -455,7 +358,7 @@ buildCounterListTasksResponse++; if (buildCounterListTasksResponse < 3) { o.nextPageToken = "foo"; - o.tasks = buildUnnamed5389(); + o.tasks = buildUnnamed4688(); } buildCounterListTasksResponse--; return o; @@ -465,25 +368,25 @@ buildCounterListTasksResponse++; if (buildCounterListTasksResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5389(o.tasks); + checkUnnamed4688(o.tasks); } buildCounterListTasksResponse--; } -buildUnnamed5390() { +buildUnnamed4689() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5390(core.Map<core.String, core.String> o) { +checkUnnamed4689(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5391() { +buildUnnamed4690() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -498,7 +401,7 @@ return o; } -checkUnnamed5391(core.Map<core.String, core.Object> o) { +checkUnnamed4690(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -518,9 +421,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5390(); + o.labels = buildUnnamed4689(); o.locationId = "foo"; - o.metadata = buildUnnamed5391(); + o.metadata = buildUnnamed4690(); o.name = "foo"; } buildCounterLocation--; @@ -531,9 +434,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5390(o.labels); + checkUnnamed4689(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5391(o.metadata); + checkUnnamed4690(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -554,14 +457,14 @@ buildCounterPauseQueueRequest--; } -buildUnnamed5392() { +buildUnnamed4691() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5392(core.List<api.Binding> o) { +checkUnnamed4691(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -572,7 +475,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5392(); + o.bindings = buildUnnamed4691(); o.etag = "foo"; o.version = 42; } @@ -583,49 +486,13 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5392(o.bindings); + checkUnnamed4691(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -core.int buildCounterPullMessage = 0; -buildPullMessage() { - var o = new api.PullMessage(); - buildCounterPullMessage++; - if (buildCounterPullMessage < 3) { - o.payload = "foo"; - o.tag = "foo"; - } - buildCounterPullMessage--; - return o; -} - -checkPullMessage(api.PullMessage o) { - buildCounterPullMessage++; - if (buildCounterPullMessage < 3) { - unittest.expect(o.payload, unittest.equals('foo')); - unittest.expect(o.tag, unittest.equals('foo')); - } - buildCounterPullMessage--; -} - -core.int buildCounterPullTarget = 0; -buildPullTarget() { - var o = new api.PullTarget(); - buildCounterPullTarget++; - if (buildCounterPullTarget < 3) {} - buildCounterPullTarget--; - return o; -} - -checkPullTarget(api.PullTarget o) { - buildCounterPullTarget++; - if (buildCounterPullTarget < 3) {} - buildCounterPullTarget--; -} - core.int buildCounterPurgeQueueRequest = 0; buildPurgeQueueRequest() { var o = new api.PurgeQueueRequest(); @@ -646,9 +513,8 @@ var o = new api.Queue(); buildCounterQueue++; if (buildCounterQueue < 3) { - o.appEngineHttpTarget = buildAppEngineHttpTarget(); + o.appEngineHttpQueue = buildAppEngineHttpQueue(); o.name = "foo"; - o.pullTarget = buildPullTarget(); o.purgeTime = "foo"; o.rateLimits = buildRateLimits(); o.retryConfig = buildRetryConfig(); @@ -661,9 +527,8 @@ checkQueue(api.Queue o) { buildCounterQueue++; if (buildCounterQueue < 3) { - checkAppEngineHttpTarget(o.appEngineHttpTarget); + checkAppEngineHttpQueue(o.appEngineHttpQueue); unittest.expect(o.name, unittest.equals('foo')); - checkPullTarget(o.pullTarget); unittest.expect(o.purgeTime, unittest.equals('foo')); checkRateLimits(o.rateLimits); checkRetryConfig(o.retryConfig); @@ -678,8 +543,8 @@ buildCounterRateLimits++; if (buildCounterRateLimits < 3) { o.maxBurstSize = 42; - o.maxConcurrentTasks = 42; - o.maxTasksDispatchedPerSecond = 42.0; + o.maxConcurrentDispatches = 42; + o.maxDispatchesPerSecond = 42.0; } buildCounterRateLimits--; return o; @@ -689,35 +554,12 @@ buildCounterRateLimits++; if (buildCounterRateLimits < 3) { unittest.expect(o.maxBurstSize, unittest.equals(42)); - unittest.expect(o.maxConcurrentTasks, unittest.equals(42)); - unittest.expect(o.maxTasksDispatchedPerSecond, unittest.equals(42.0)); + unittest.expect(o.maxConcurrentDispatches, unittest.equals(42)); + unittest.expect(o.maxDispatchesPerSecond, unittest.equals(42.0)); } buildCounterRateLimits--; } -core.int buildCounterRenewLeaseRequest = 0; -buildRenewLeaseRequest() { - var o = new api.RenewLeaseRequest(); - buildCounterRenewLeaseRequest++; - if (buildCounterRenewLeaseRequest < 3) { - o.leaseDuration = "foo"; - o.responseView = "foo"; - o.scheduleTime = "foo"; - } - buildCounterRenewLeaseRequest--; - return o; -} - -checkRenewLeaseRequest(api.RenewLeaseRequest o) { - buildCounterRenewLeaseRequest++; - if (buildCounterRenewLeaseRequest < 3) { - unittest.expect(o.leaseDuration, unittest.equals('foo')); - unittest.expect(o.responseView, unittest.equals('foo')); - unittest.expect(o.scheduleTime, unittest.equals('foo')); - } - buildCounterRenewLeaseRequest--; -} - core.int buildCounterResumeQueueRequest = 0; buildResumeQueueRequest() { var o = new api.ResumeQueueRequest(); @@ -743,7 +585,6 @@ o.maxDoublings = 42; o.maxRetryDuration = "foo"; o.minBackoff = "foo"; - o.unlimitedAttempts = true; } buildCounterRetryConfig--; return o; @@ -757,7 +598,6 @@ unittest.expect(o.maxDoublings, unittest.equals(42)); unittest.expect(o.maxRetryDuration, unittest.equals('foo')); unittest.expect(o.minBackoff, unittest.equals('foo')); - unittest.expect(o.unlimitedAttempts, unittest.isTrue); } buildCounterRetryConfig--; } @@ -800,7 +640,7 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5393() { +buildUnnamed4692() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -815,7 +655,7 @@ return o; } -checkUnnamed5393(core.Map<core.String, core.Object> o) { +checkUnnamed4692(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -829,17 +669,17 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5394() { +buildUnnamed4693() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5393()); - o.add(buildUnnamed5393()); + o.add(buildUnnamed4692()); + o.add(buildUnnamed4692()); return o; } -checkUnnamed5394(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4693(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5393(o[0]); - checkUnnamed5393(o[1]); + checkUnnamed4692(o[0]); + checkUnnamed4692(o[1]); } core.int buildCounterStatus = 0; @@ -848,7 +688,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5394(); + o.details = buildUnnamed4693(); o.message = "foo"; } buildCounterStatus--; @@ -859,7 +699,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5394(o.details); + checkUnnamed4693(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; @@ -872,10 +712,12 @@ if (buildCounterTask < 3) { o.appEngineHttpRequest = buildAppEngineHttpRequest(); o.createTime = "foo"; + o.dispatchCount = 42; + o.firstAttempt = buildAttempt(); + o.lastAttempt = buildAttempt(); o.name = "foo"; - o.pullMessage = buildPullMessage(); + o.responseCount = 42; o.scheduleTime = "foo"; - o.status = buildTaskStatus(); o.view = "foo"; } buildCounterTask--; @@ -887,48 +729,25 @@ if (buildCounterTask < 3) { checkAppEngineHttpRequest(o.appEngineHttpRequest); unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.dispatchCount, unittest.equals(42)); + checkAttempt(o.firstAttempt); + checkAttempt(o.lastAttempt); unittest.expect(o.name, unittest.equals('foo')); - checkPullMessage(o.pullMessage); + unittest.expect(o.responseCount, unittest.equals(42)); unittest.expect(o.scheduleTime, unittest.equals('foo')); - checkTaskStatus(o.status); unittest.expect(o.view, unittest.equals('foo')); } buildCounterTask--; } -core.int buildCounterTaskStatus = 0; -buildTaskStatus() { - var o = new api.TaskStatus(); - buildCounterTaskStatus++; - if (buildCounterTaskStatus < 3) { - o.attemptDispatchCount = 42; - o.attemptResponseCount = 42; - o.firstAttemptStatus = buildAttemptStatus(); - o.lastAttemptStatus = buildAttemptStatus(); - } - buildCounterTaskStatus--; - return o; -} - -checkTaskStatus(api.TaskStatus o) { - buildCounterTaskStatus++; - if (buildCounterTaskStatus < 3) { - unittest.expect(o.attemptDispatchCount, unittest.equals(42)); - unittest.expect(o.attemptResponseCount, unittest.equals(42)); - checkAttemptStatus(o.firstAttemptStatus); - checkAttemptStatus(o.lastAttemptStatus); - } - buildCounterTaskStatus--; -} - -buildUnnamed5395() { +buildUnnamed4694() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5395(core.List<core.String> o) { +checkUnnamed4694(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -939,7 +758,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5395(); + o.permissions = buildUnnamed4694(); } buildCounterTestIamPermissionsRequest--; return o; @@ -948,19 +767,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5395(o.permissions); + checkUnnamed4694(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5396() { +buildUnnamed4695() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5396(core.List<core.String> o) { +checkUnnamed4695(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -971,7 +790,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5396(); + o.permissions = buildUnnamed4695(); } buildCounterTestIamPermissionsResponse--; return o; @@ -980,17 +799,17 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5396(o.permissions); + checkUnnamed4695(o.permissions); } buildCounterTestIamPermissionsResponse--; } main() { - unittest.group("obj-schema-AcknowledgeTaskRequest", () { + unittest.group("obj-schema-AppEngineHttpQueue", () { unittest.test("to-json--from-json", () { - var o = buildAcknowledgeTaskRequest(); - var od = new api.AcknowledgeTaskRequest.fromJson(o.toJson()); - checkAcknowledgeTaskRequest(od); + var o = buildAppEngineHttpQueue(); + var od = new api.AppEngineHttpQueue.fromJson(o.toJson()); + checkAppEngineHttpQueue(od); }); }); @@ -1002,14 +821,6 @@ }); }); - unittest.group("obj-schema-AppEngineHttpTarget", () { - unittest.test("to-json--from-json", () { - var o = buildAppEngineHttpTarget(); - var od = new api.AppEngineHttpTarget.fromJson(o.toJson()); - checkAppEngineHttpTarget(od); - }); - }); - unittest.group("obj-schema-AppEngineRouting", () { unittest.test("to-json--from-json", () { var o = buildAppEngineRouting(); @@ -1018,11 +829,11 @@ }); }); - unittest.group("obj-schema-AttemptStatus", () { + unittest.group("obj-schema-Attempt", () { unittest.test("to-json--from-json", () { - var o = buildAttemptStatus(); - var od = new api.AttemptStatus.fromJson(o.toJson()); - checkAttemptStatus(od); + var o = buildAttempt(); + var od = new api.Attempt.fromJson(o.toJson()); + checkAttempt(od); }); }); @@ -1034,14 +845,6 @@ }); }); - unittest.group("obj-schema-CancelLeaseRequest", () { - unittest.test("to-json--from-json", () { - var o = buildCancelLeaseRequest(); - var od = new api.CancelLeaseRequest.fromJson(o.toJson()); - checkCancelLeaseRequest(od); - }); - }); - unittest.group("obj-schema-CreateTaskRequest", () { unittest.test("to-json--from-json", () { var o = buildCreateTaskRequest(); @@ -1074,22 +877,6 @@ }); }); - unittest.group("obj-schema-LeaseTasksRequest", () { - unittest.test("to-json--from-json", () { - var o = buildLeaseTasksRequest(); - var od = new api.LeaseTasksRequest.fromJson(o.toJson()); - checkLeaseTasksRequest(od); - }); - }); - - unittest.group("obj-schema-LeaseTasksResponse", () { - unittest.test("to-json--from-json", () { - var o = buildLeaseTasksResponse(); - var od = new api.LeaseTasksResponse.fromJson(o.toJson()); - checkLeaseTasksResponse(od); - }); - }); - unittest.group("obj-schema-ListLocationsResponse", () { unittest.test("to-json--from-json", () { var o = buildListLocationsResponse(); @@ -1138,22 +925,6 @@ }); }); - unittest.group("obj-schema-PullMessage", () { - unittest.test("to-json--from-json", () { - var o = buildPullMessage(); - var od = new api.PullMessage.fromJson(o.toJson()); - checkPullMessage(od); - }); - }); - - unittest.group("obj-schema-PullTarget", () { - unittest.test("to-json--from-json", () { - var o = buildPullTarget(); - var od = new api.PullTarget.fromJson(o.toJson()); - checkPullTarget(od); - }); - }); - unittest.group("obj-schema-PurgeQueueRequest", () { unittest.test("to-json--from-json", () { var o = buildPurgeQueueRequest(); @@ -1178,14 +949,6 @@ }); }); - unittest.group("obj-schema-RenewLeaseRequest", () { - unittest.test("to-json--from-json", () { - var o = buildRenewLeaseRequest(); - var od = new api.RenewLeaseRequest.fromJson(o.toJson()); - checkRenewLeaseRequest(od); - }); - }); - unittest.group("obj-schema-ResumeQueueRequest", () { unittest.test("to-json--from-json", () { var o = buildResumeQueueRequest(); @@ -1234,14 +997,6 @@ }); }); - unittest.group("obj-schema-TaskStatus", () { - unittest.test("to-json--from-json", () { - var o = buildTaskStatus(); - var od = new api.TaskStatus.fromJson(o.toJson()); - checkTaskStatus(od); - }); - }); - unittest.group("obj-schema-TestIamPermissionsRequest", () { unittest.test("to-json--from-json", () { var o = buildTestIamPermissionsRequest(); @@ -1274,7 +1029,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1316,9 +1071,9 @@ api.ProjectsLocationsResourceApi res = new api.CloudtasksApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1329,7 +1084,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1351,11 +1106,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1366,9 +1121,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -1396,7 +1151,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1448,7 +1203,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1500,7 +1255,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1556,7 +1311,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1611,7 +1366,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1677,7 +1432,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1736,7 +1491,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1792,7 +1547,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1848,7 +1603,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1904,7 +1659,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1960,7 +1715,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -1999,118 +1754,6 @@ }); unittest.group("resource-ProjectsLocationsQueuesTasksResourceApi", () { - unittest.test("method--acknowledge", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildAcknowledgeTaskRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.AcknowledgeTaskRequest.fromJson(json); - checkAcknowledgeTaskRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .acknowledge(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--cancelLease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildCancelLeaseRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.CancelLeaseRequest.fromJson(json); - checkCancelLeaseRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTask()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .cancelLease(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTask(response); - }))); - }); - unittest.test("method--create", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = @@ -2130,7 +1773,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2182,7 +1825,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2235,7 +1878,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2274,70 +1917,14 @@ }))); }); - unittest.test("method--lease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildLeaseTasksRequest(); - var arg_parent = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.LeaseTasksRequest.fromJson(json); - checkLeaseTasksRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildLeaseTasksResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .lease(arg_request, arg_parent, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkLeaseTasksResponse(response); - }))); - }); - unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = new api.CloudtasksApi(mock).projects.locations.queues.tasks; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_responseView = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2348,7 +1935,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; @@ -2370,12 +1957,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["responseView"].first, unittest.equals(arg_responseView)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2386,71 +1973,15 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, responseView: arg_responseView, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTasksResponse(response); }))); }); - unittest.test("method--renewLease", () { - var mock = new HttpServerMock(); - api.ProjectsLocationsQueuesTasksResourceApi res = - new api.CloudtasksApi(mock).projects.locations.queues.tasks; - var arg_request = buildRenewLeaseRequest(); - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.RenewLeaseRequest.fromJson(json); - checkRenewLeaseRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTask()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .renewLease(arg_request, arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTask(response); - }))); - }); - unittest.test("method--run", () { var mock = new HttpServerMock(); api.ProjectsLocationsQueuesTasksResourceApi res = @@ -2470,7 +2001,7 @@ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); pathOffset += 1; unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta2/")); + unittest.equals("v2beta3/")); pathOffset += 8; // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
diff --git a/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart b/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart new file mode 100644 index 0000000..1036f6f --- /dev/null +++ b/generated/googleapis_beta/test/containeranalysis/v1beta1_test.dart
@@ -0,0 +1,4232 @@ +library googleapis_beta.containeranalysis.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/containeranalysis/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAliasContext = 0; +buildAliasContext() { + var o = new api.AliasContext(); + buildCounterAliasContext++; + if (buildCounterAliasContext < 3) { + o.kind = "foo"; + o.name = "foo"; + } + buildCounterAliasContext--; + return o; +} + +checkAliasContext(api.AliasContext o) { + buildCounterAliasContext++; + if (buildCounterAliasContext < 3) { + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterAliasContext--; +} + +buildUnnamed4454() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4454(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterArtifact = 0; +buildArtifact() { + var o = new api.Artifact(); + buildCounterArtifact++; + if (buildCounterArtifact < 3) { + o.checksum = "foo"; + o.id = "foo"; + o.names = buildUnnamed4454(); + } + buildCounterArtifact--; + return o; +} + +checkArtifact(api.Artifact o) { + buildCounterArtifact++; + if (buildCounterArtifact < 3) { + unittest.expect(o.checksum, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + checkUnnamed4454(o.names); + } + buildCounterArtifact--; +} + +core.int buildCounterAttestation = 0; +buildAttestation() { + var o = new api.Attestation(); + buildCounterAttestation++; + if (buildCounterAttestation < 3) { + o.pgpSignedAttestation = buildPgpSignedAttestation(); + } + buildCounterAttestation--; + return o; +} + +checkAttestation(api.Attestation o) { + buildCounterAttestation++; + if (buildCounterAttestation < 3) { + checkPgpSignedAttestation(o.pgpSignedAttestation); + } + buildCounterAttestation--; +} + +buildUnnamed4455() { + var o = new core.List<api.AuditLogConfig>(); + o.add(buildAuditLogConfig()); + o.add(buildAuditLogConfig()); + return o; +} + +checkUnnamed4455(core.List<api.AuditLogConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditLogConfig(o[0]); + checkAuditLogConfig(o[1]); +} + +core.int buildCounterAuditConfig = 0; +buildAuditConfig() { + var o = new api.AuditConfig(); + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + o.auditLogConfigs = buildUnnamed4455(); + o.service = "foo"; + } + buildCounterAuditConfig--; + return o; +} + +checkAuditConfig(api.AuditConfig o) { + buildCounterAuditConfig++; + if (buildCounterAuditConfig < 3) { + checkUnnamed4455(o.auditLogConfigs); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterAuditConfig--; +} + +buildUnnamed4456() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4456(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAuditLogConfig = 0; +buildAuditLogConfig() { + var o = new api.AuditLogConfig(); + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + o.exemptedMembers = buildUnnamed4456(); + o.logType = "foo"; + } + buildCounterAuditLogConfig--; + return o; +} + +checkAuditLogConfig(api.AuditLogConfig o) { + buildCounterAuditLogConfig++; + if (buildCounterAuditLogConfig < 3) { + checkUnnamed4456(o.exemptedMembers); + unittest.expect(o.logType, unittest.equals('foo')); + } + buildCounterAuditLogConfig--; +} + +core.int buildCounterAuthority = 0; +buildAuthority() { + var o = new api.Authority(); + buildCounterAuthority++; + if (buildCounterAuthority < 3) { + o.hint = buildHint(); + } + buildCounterAuthority--; + return o; +} + +checkAuthority(api.Authority o) { + buildCounterAuthority++; + if (buildCounterAuthority < 3) { + checkHint(o.hint); + } + buildCounterAuthority--; +} + +core.int buildCounterBasis = 0; +buildBasis() { + var o = new api.Basis(); + buildCounterBasis++; + if (buildCounterBasis < 3) { + o.fingerprint = buildFingerprint(); + o.resourceUrl = "foo"; + } + buildCounterBasis--; + return o; +} + +checkBasis(api.Basis o) { + buildCounterBasis++; + if (buildCounterBasis < 3) { + checkFingerprint(o.fingerprint); + unittest.expect(o.resourceUrl, unittest.equals('foo')); + } + buildCounterBasis--; +} + +buildUnnamed4457() { + var o = new core.Map<core.String, api.Note>(); + o["x"] = buildNote(); + o["y"] = buildNote(); + return o; +} + +checkUnnamed4457(core.Map<core.String, api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o["x"]); + checkNote(o["y"]); +} + +core.int buildCounterBatchCreateNotesRequest = 0; +buildBatchCreateNotesRequest() { + var o = new api.BatchCreateNotesRequest(); + buildCounterBatchCreateNotesRequest++; + if (buildCounterBatchCreateNotesRequest < 3) { + o.notes = buildUnnamed4457(); + } + buildCounterBatchCreateNotesRequest--; + return o; +} + +checkBatchCreateNotesRequest(api.BatchCreateNotesRequest o) { + buildCounterBatchCreateNotesRequest++; + if (buildCounterBatchCreateNotesRequest < 3) { + checkUnnamed4457(o.notes); + } + buildCounterBatchCreateNotesRequest--; +} + +buildUnnamed4458() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4458(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +core.int buildCounterBatchCreateNotesResponse = 0; +buildBatchCreateNotesResponse() { + var o = new api.BatchCreateNotesResponse(); + buildCounterBatchCreateNotesResponse++; + if (buildCounterBatchCreateNotesResponse < 3) { + o.notes = buildUnnamed4458(); + } + buildCounterBatchCreateNotesResponse--; + return o; +} + +checkBatchCreateNotesResponse(api.BatchCreateNotesResponse o) { + buildCounterBatchCreateNotesResponse++; + if (buildCounterBatchCreateNotesResponse < 3) { + checkUnnamed4458(o.notes); + } + buildCounterBatchCreateNotesResponse--; +} + +buildUnnamed4459() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4459(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterBatchCreateOccurrencesRequest = 0; +buildBatchCreateOccurrencesRequest() { + var o = new api.BatchCreateOccurrencesRequest(); + buildCounterBatchCreateOccurrencesRequest++; + if (buildCounterBatchCreateOccurrencesRequest < 3) { + o.occurrences = buildUnnamed4459(); + } + buildCounterBatchCreateOccurrencesRequest--; + return o; +} + +checkBatchCreateOccurrencesRequest(api.BatchCreateOccurrencesRequest o) { + buildCounterBatchCreateOccurrencesRequest++; + if (buildCounterBatchCreateOccurrencesRequest < 3) { + checkUnnamed4459(o.occurrences); + } + buildCounterBatchCreateOccurrencesRequest--; +} + +buildUnnamed4460() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4460(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterBatchCreateOccurrencesResponse = 0; +buildBatchCreateOccurrencesResponse() { + var o = new api.BatchCreateOccurrencesResponse(); + buildCounterBatchCreateOccurrencesResponse++; + if (buildCounterBatchCreateOccurrencesResponse < 3) { + o.occurrences = buildUnnamed4460(); + } + buildCounterBatchCreateOccurrencesResponse--; + return o; +} + +checkBatchCreateOccurrencesResponse(api.BatchCreateOccurrencesResponse o) { + buildCounterBatchCreateOccurrencesResponse++; + if (buildCounterBatchCreateOccurrencesResponse < 3) { + checkUnnamed4460(o.occurrences); + } + buildCounterBatchCreateOccurrencesResponse--; +} + +buildUnnamed4461() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4461(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBinding = 0; +buildBinding() { + var o = new api.Binding(); + buildCounterBinding++; + if (buildCounterBinding < 3) { + o.condition = buildExpr(); + o.members = buildUnnamed4461(); + o.role = "foo"; + } + buildCounterBinding--; + return o; +} + +checkBinding(api.Binding o) { + buildCounterBinding++; + if (buildCounterBinding < 3) { + checkExpr(o.condition); + checkUnnamed4461(o.members); + unittest.expect(o.role, unittest.equals('foo')); + } + buildCounterBinding--; +} + +core.int buildCounterBuild = 0; +buildBuild() { + var o = new api.Build(); + buildCounterBuild++; + if (buildCounterBuild < 3) { + o.builderVersion = "foo"; + o.signature = buildBuildSignature(); + } + buildCounterBuild--; + return o; +} + +checkBuild(api.Build o) { + buildCounterBuild++; + if (buildCounterBuild < 3) { + unittest.expect(o.builderVersion, unittest.equals('foo')); + checkBuildSignature(o.signature); + } + buildCounterBuild--; +} + +buildUnnamed4462() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4462(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +buildUnnamed4463() { + var o = new core.List<api.Artifact>(); + o.add(buildArtifact()); + o.add(buildArtifact()); + return o; +} + +checkUnnamed4463(core.List<api.Artifact> o) { + unittest.expect(o, unittest.hasLength(2)); + checkArtifact(o[0]); + checkArtifact(o[1]); +} + +buildUnnamed4464() { + var o = new core.List<api.Command>(); + o.add(buildCommand()); + o.add(buildCommand()); + return o; +} + +checkUnnamed4464(core.List<api.Command> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCommand(o[0]); + checkCommand(o[1]); +} + +core.int buildCounterBuildProvenance = 0; +buildBuildProvenance() { + var o = new api.BuildProvenance(); + buildCounterBuildProvenance++; + if (buildCounterBuildProvenance < 3) { + o.buildOptions = buildUnnamed4462(); + o.builderVersion = "foo"; + o.builtArtifacts = buildUnnamed4463(); + o.commands = buildUnnamed4464(); + o.createTime = "foo"; + o.creator = "foo"; + o.endTime = "foo"; + o.id = "foo"; + o.logsUri = "foo"; + o.projectId = "foo"; + o.sourceProvenance = buildSource(); + o.startTime = "foo"; + o.triggerId = "foo"; + } + buildCounterBuildProvenance--; + return o; +} + +checkBuildProvenance(api.BuildProvenance o) { + buildCounterBuildProvenance++; + if (buildCounterBuildProvenance < 3) { + checkUnnamed4462(o.buildOptions); + unittest.expect(o.builderVersion, unittest.equals('foo')); + checkUnnamed4463(o.builtArtifacts); + checkUnnamed4464(o.commands); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.creator, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.logsUri, unittest.equals('foo')); + unittest.expect(o.projectId, unittest.equals('foo')); + checkSource(o.sourceProvenance); + unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.triggerId, unittest.equals('foo')); + } + buildCounterBuildProvenance--; +} + +core.int buildCounterBuildSignature = 0; +buildBuildSignature() { + var o = new api.BuildSignature(); + buildCounterBuildSignature++; + if (buildCounterBuildSignature < 3) { + o.keyId = "foo"; + o.keyType = "foo"; + o.publicKey = "foo"; + o.signature = "foo"; + } + buildCounterBuildSignature--; + return o; +} + +checkBuildSignature(api.BuildSignature o) { + buildCounterBuildSignature++; + if (buildCounterBuildSignature < 3) { + unittest.expect(o.keyId, unittest.equals('foo')); + unittest.expect(o.keyType, unittest.equals('foo')); + unittest.expect(o.publicKey, unittest.equals('foo')); + unittest.expect(o.signature, unittest.equals('foo')); + } + buildCounterBuildSignature--; +} + +core.int buildCounterCloudRepoSourceContext = 0; +buildCloudRepoSourceContext() { + var o = new api.CloudRepoSourceContext(); + buildCounterCloudRepoSourceContext++; + if (buildCounterCloudRepoSourceContext < 3) { + o.aliasContext = buildAliasContext(); + o.repoId = buildRepoId(); + o.revisionId = "foo"; + } + buildCounterCloudRepoSourceContext--; + return o; +} + +checkCloudRepoSourceContext(api.CloudRepoSourceContext o) { + buildCounterCloudRepoSourceContext++; + if (buildCounterCloudRepoSourceContext < 3) { + checkAliasContext(o.aliasContext); + checkRepoId(o.repoId); + unittest.expect(o.revisionId, unittest.equals('foo')); + } + buildCounterCloudRepoSourceContext--; +} + +buildUnnamed4465() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4465(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4466() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4466(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4467() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4467(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCommand = 0; +buildCommand() { + var o = new api.Command(); + buildCounterCommand++; + if (buildCounterCommand < 3) { + o.args = buildUnnamed4465(); + o.dir = "foo"; + o.env = buildUnnamed4466(); + o.id = "foo"; + o.name = "foo"; + o.waitFor = buildUnnamed4467(); + } + buildCounterCommand--; + return o; +} + +checkCommand(api.Command o) { + buildCounterCommand++; + if (buildCounterCommand < 3) { + checkUnnamed4465(o.args); + unittest.expect(o.dir, unittest.equals('foo')); + checkUnnamed4466(o.env); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4467(o.waitFor); + } + buildCounterCommand--; +} + +buildUnnamed4468() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4468(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDeployable = 0; +buildDeployable() { + var o = new api.Deployable(); + buildCounterDeployable++; + if (buildCounterDeployable < 3) { + o.resourceUri = buildUnnamed4468(); + } + buildCounterDeployable--; + return o; +} + +checkDeployable(api.Deployable o) { + buildCounterDeployable++; + if (buildCounterDeployable < 3) { + checkUnnamed4468(o.resourceUri); + } + buildCounterDeployable--; +} + +buildUnnamed4469() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4469(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDeployment = 0; +buildDeployment() { + var o = new api.Deployment(); + buildCounterDeployment++; + if (buildCounterDeployment < 3) { + o.address = "foo"; + o.config = "foo"; + o.deployTime = "foo"; + o.platform = "foo"; + o.resourceUri = buildUnnamed4469(); + o.undeployTime = "foo"; + o.userEmail = "foo"; + } + buildCounterDeployment--; + return o; +} + +checkDeployment(api.Deployment o) { + buildCounterDeployment++; + if (buildCounterDeployment < 3) { + unittest.expect(o.address, unittest.equals('foo')); + unittest.expect(o.config, unittest.equals('foo')); + unittest.expect(o.deployTime, unittest.equals('foo')); + unittest.expect(o.platform, unittest.equals('foo')); + checkUnnamed4469(o.resourceUri); + unittest.expect(o.undeployTime, unittest.equals('foo')); + unittest.expect(o.userEmail, unittest.equals('foo')); + } + buildCounterDeployment--; +} + +buildUnnamed4470() { + var o = new core.List<api.Layer>(); + o.add(buildLayer()); + o.add(buildLayer()); + return o; +} + +checkUnnamed4470(core.List<api.Layer> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLayer(o[0]); + checkLayer(o[1]); +} + +core.int buildCounterDerived = 0; +buildDerived() { + var o = new api.Derived(); + buildCounterDerived++; + if (buildCounterDerived < 3) { + o.baseResourceUrl = "foo"; + o.distance = 42; + o.fingerprint = buildFingerprint(); + o.layerInfo = buildUnnamed4470(); + } + buildCounterDerived--; + return o; +} + +checkDerived(api.Derived o) { + buildCounterDerived++; + if (buildCounterDerived < 3) { + unittest.expect(o.baseResourceUrl, unittest.equals('foo')); + unittest.expect(o.distance, unittest.equals(42)); + checkFingerprint(o.fingerprint); + checkUnnamed4470(o.layerInfo); + } + buildCounterDerived--; +} + +core.int buildCounterDetail = 0; +buildDetail() { + var o = new api.Detail(); + buildCounterDetail++; + if (buildCounterDetail < 3) { + o.cpeUri = "foo"; + o.description = "foo"; + o.fixedLocation = buildVulnerabilityLocation(); + o.isObsolete = true; + o.maxAffectedVersion = buildVersion(); + o.minAffectedVersion = buildVersion(); + o.package = "foo"; + o.packageType = "foo"; + o.severityName = "foo"; + } + buildCounterDetail--; + return o; +} + +checkDetail(api.Detail o) { + buildCounterDetail++; + if (buildCounterDetail < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkVulnerabilityLocation(o.fixedLocation); + unittest.expect(o.isObsolete, unittest.isTrue); + checkVersion(o.maxAffectedVersion); + checkVersion(o.minAffectedVersion); + unittest.expect(o.package, unittest.equals('foo')); + unittest.expect(o.packageType, unittest.equals('foo')); + unittest.expect(o.severityName, unittest.equals('foo')); + } + buildCounterDetail--; +} + +core.int buildCounterDetails = 0; +buildDetails() { + var o = new api.Details(); + buildCounterDetails++; + if (buildCounterDetails < 3) { + o.attestation = buildAttestation(); + } + buildCounterDetails--; + return o; +} + +checkDetails(api.Details o) { + buildCounterDetails++; + if (buildCounterDetails < 3) { + checkAttestation(o.attestation); + } + buildCounterDetails--; +} + +core.int buildCounterDiscovered = 0; +buildDiscovered() { + var o = new api.Discovered(); + buildCounterDiscovered++; + if (buildCounterDiscovered < 3) { + o.analysisStatus = "foo"; + o.analysisStatusError = buildStatus(); + o.continuousAnalysis = "foo"; + o.lastAnalysisTime = "foo"; + } + buildCounterDiscovered--; + return o; +} + +checkDiscovered(api.Discovered o) { + buildCounterDiscovered++; + if (buildCounterDiscovered < 3) { + unittest.expect(o.analysisStatus, unittest.equals('foo')); + checkStatus(o.analysisStatusError); + unittest.expect(o.continuousAnalysis, unittest.equals('foo')); + unittest.expect(o.lastAnalysisTime, unittest.equals('foo')); + } + buildCounterDiscovered--; +} + +core.int buildCounterDiscovery = 0; +buildDiscovery() { + var o = new api.Discovery(); + buildCounterDiscovery++; + if (buildCounterDiscovery < 3) { + o.analysisKind = "foo"; + } + buildCounterDiscovery--; + return o; +} + +checkDiscovery(api.Discovery o) { + buildCounterDiscovery++; + if (buildCounterDiscovery < 3) { + unittest.expect(o.analysisKind, unittest.equals('foo')); + } + buildCounterDiscovery--; +} + +core.int buildCounterDistribution = 0; +buildDistribution() { + var o = new api.Distribution(); + buildCounterDistribution++; + if (buildCounterDistribution < 3) { + o.architecture = "foo"; + o.cpeUri = "foo"; + o.description = "foo"; + o.latestVersion = buildVersion(); + o.maintainer = "foo"; + o.url = "foo"; + } + buildCounterDistribution--; + return o; +} + +checkDistribution(api.Distribution o) { + buildCounterDistribution++; + if (buildCounterDistribution < 3) { + unittest.expect(o.architecture, unittest.equals('foo')); + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkVersion(o.latestVersion); + unittest.expect(o.maintainer, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterDistribution--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +core.int buildCounterExpr = 0; +buildExpr() { + var o = new api.Expr(); + buildCounterExpr++; + if (buildCounterExpr < 3) { + o.description = "foo"; + o.expression = "foo"; + o.location = "foo"; + o.title = "foo"; + } + buildCounterExpr--; + return o; +} + +checkExpr(api.Expr o) { + buildCounterExpr++; + if (buildCounterExpr < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.expression, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.title, unittest.equals('foo')); + } + buildCounterExpr--; +} + +buildUnnamed4471() { + var o = new core.List<api.Hash>(); + o.add(buildHash()); + o.add(buildHash()); + return o; +} + +checkUnnamed4471(core.List<api.Hash> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHash(o[0]); + checkHash(o[1]); +} + +core.int buildCounterFileHashes = 0; +buildFileHashes() { + var o = new api.FileHashes(); + buildCounterFileHashes++; + if (buildCounterFileHashes < 3) { + o.fileHash = buildUnnamed4471(); + } + buildCounterFileHashes--; + return o; +} + +checkFileHashes(api.FileHashes o) { + buildCounterFileHashes++; + if (buildCounterFileHashes < 3) { + checkUnnamed4471(o.fileHash); + } + buildCounterFileHashes--; +} + +buildUnnamed4472() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4472(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterFingerprint = 0; +buildFingerprint() { + var o = new api.Fingerprint(); + buildCounterFingerprint++; + if (buildCounterFingerprint < 3) { + o.v1Name = "foo"; + o.v2Blob = buildUnnamed4472(); + o.v2Name = "foo"; + } + buildCounterFingerprint--; + return o; +} + +checkFingerprint(api.Fingerprint o) { + buildCounterFingerprint++; + if (buildCounterFingerprint < 3) { + unittest.expect(o.v1Name, unittest.equals('foo')); + checkUnnamed4472(o.v2Blob); + unittest.expect(o.v2Name, unittest.equals('foo')); + } + buildCounterFingerprint--; +} + +core.int buildCounterFixableTotalByDigest = 0; +buildFixableTotalByDigest() { + var o = new api.FixableTotalByDigest(); + buildCounterFixableTotalByDigest++; + if (buildCounterFixableTotalByDigest < 3) { + o.fixableCount = "foo"; + o.resource = buildResource(); + o.severity = "foo"; + o.totalCount = "foo"; + } + buildCounterFixableTotalByDigest--; + return o; +} + +checkFixableTotalByDigest(api.FixableTotalByDigest o) { + buildCounterFixableTotalByDigest++; + if (buildCounterFixableTotalByDigest < 3) { + unittest.expect(o.fixableCount, unittest.equals('foo')); + checkResource(o.resource); + unittest.expect(o.severity, unittest.equals('foo')); + unittest.expect(o.totalCount, unittest.equals('foo')); + } + buildCounterFixableTotalByDigest--; +} + +core.int buildCounterGerritSourceContext = 0; +buildGerritSourceContext() { + var o = new api.GerritSourceContext(); + buildCounterGerritSourceContext++; + if (buildCounterGerritSourceContext < 3) { + o.aliasContext = buildAliasContext(); + o.gerritProject = "foo"; + o.hostUri = "foo"; + o.revisionId = "foo"; + } + buildCounterGerritSourceContext--; + return o; +} + +checkGerritSourceContext(api.GerritSourceContext o) { + buildCounterGerritSourceContext++; + if (buildCounterGerritSourceContext < 3) { + checkAliasContext(o.aliasContext); + unittest.expect(o.gerritProject, unittest.equals('foo')); + unittest.expect(o.hostUri, unittest.equals('foo')); + unittest.expect(o.revisionId, unittest.equals('foo')); + } + buildCounterGerritSourceContext--; +} + +core.int buildCounterGetIamPolicyRequest = 0; +buildGetIamPolicyRequest() { + var o = new api.GetIamPolicyRequest(); + buildCounterGetIamPolicyRequest++; + if (buildCounterGetIamPolicyRequest < 3) {} + buildCounterGetIamPolicyRequest--; + return o; +} + +checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { + buildCounterGetIamPolicyRequest++; + if (buildCounterGetIamPolicyRequest < 3) {} + buildCounterGetIamPolicyRequest--; +} + +core.int buildCounterGitSourceContext = 0; +buildGitSourceContext() { + var o = new api.GitSourceContext(); + buildCounterGitSourceContext++; + if (buildCounterGitSourceContext < 3) { + o.revisionId = "foo"; + o.url = "foo"; + } + buildCounterGitSourceContext--; + return o; +} + +checkGitSourceContext(api.GitSourceContext o) { + buildCounterGitSourceContext++; + if (buildCounterGitSourceContext < 3) { + unittest.expect(o.revisionId, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterGitSourceContext--; +} + +core.int buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata = + 0; +buildGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata() { + var o = new api.GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(); + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata++; + if (buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata < + 3) { + o.createTime = "foo"; + o.endTime = "foo"; + } + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata--; + return o; +} + +checkGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata( + api.GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata o) { + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata++; + if (buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata < + 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + } + buildCounterGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata--; +} + +core.int buildCounterGrafeasV1beta1BuildDetails = 0; +buildGrafeasV1beta1BuildDetails() { + var o = new api.GrafeasV1beta1BuildDetails(); + buildCounterGrafeasV1beta1BuildDetails++; + if (buildCounterGrafeasV1beta1BuildDetails < 3) { + o.provenance = buildBuildProvenance(); + o.provenanceBytes = "foo"; + } + buildCounterGrafeasV1beta1BuildDetails--; + return o; +} + +checkGrafeasV1beta1BuildDetails(api.GrafeasV1beta1BuildDetails o) { + buildCounterGrafeasV1beta1BuildDetails++; + if (buildCounterGrafeasV1beta1BuildDetails < 3) { + checkBuildProvenance(o.provenance); + unittest.expect(o.provenanceBytes, unittest.equals('foo')); + } + buildCounterGrafeasV1beta1BuildDetails--; +} + +core.int buildCounterGrafeasV1beta1DeploymentDetails = 0; +buildGrafeasV1beta1DeploymentDetails() { + var o = new api.GrafeasV1beta1DeploymentDetails(); + buildCounterGrafeasV1beta1DeploymentDetails++; + if (buildCounterGrafeasV1beta1DeploymentDetails < 3) { + o.deployment = buildDeployment(); + } + buildCounterGrafeasV1beta1DeploymentDetails--; + return o; +} + +checkGrafeasV1beta1DeploymentDetails(api.GrafeasV1beta1DeploymentDetails o) { + buildCounterGrafeasV1beta1DeploymentDetails++; + if (buildCounterGrafeasV1beta1DeploymentDetails < 3) { + checkDeployment(o.deployment); + } + buildCounterGrafeasV1beta1DeploymentDetails--; +} + +core.int buildCounterGrafeasV1beta1DiscoveryDetails = 0; +buildGrafeasV1beta1DiscoveryDetails() { + var o = new api.GrafeasV1beta1DiscoveryDetails(); + buildCounterGrafeasV1beta1DiscoveryDetails++; + if (buildCounterGrafeasV1beta1DiscoveryDetails < 3) { + o.discovered = buildDiscovered(); + } + buildCounterGrafeasV1beta1DiscoveryDetails--; + return o; +} + +checkGrafeasV1beta1DiscoveryDetails(api.GrafeasV1beta1DiscoveryDetails o) { + buildCounterGrafeasV1beta1DiscoveryDetails++; + if (buildCounterGrafeasV1beta1DiscoveryDetails < 3) { + checkDiscovered(o.discovered); + } + buildCounterGrafeasV1beta1DiscoveryDetails--; +} + +core.int buildCounterGrafeasV1beta1ImageDetails = 0; +buildGrafeasV1beta1ImageDetails() { + var o = new api.GrafeasV1beta1ImageDetails(); + buildCounterGrafeasV1beta1ImageDetails++; + if (buildCounterGrafeasV1beta1ImageDetails < 3) { + o.derivedImage = buildDerived(); + } + buildCounterGrafeasV1beta1ImageDetails--; + return o; +} + +checkGrafeasV1beta1ImageDetails(api.GrafeasV1beta1ImageDetails o) { + buildCounterGrafeasV1beta1ImageDetails++; + if (buildCounterGrafeasV1beta1ImageDetails < 3) { + checkDerived(o.derivedImage); + } + buildCounterGrafeasV1beta1ImageDetails--; +} + +core.int buildCounterGrafeasV1beta1PackageDetails = 0; +buildGrafeasV1beta1PackageDetails() { + var o = new api.GrafeasV1beta1PackageDetails(); + buildCounterGrafeasV1beta1PackageDetails++; + if (buildCounterGrafeasV1beta1PackageDetails < 3) { + o.installation = buildInstallation(); + } + buildCounterGrafeasV1beta1PackageDetails--; + return o; +} + +checkGrafeasV1beta1PackageDetails(api.GrafeasV1beta1PackageDetails o) { + buildCounterGrafeasV1beta1PackageDetails++; + if (buildCounterGrafeasV1beta1PackageDetails < 3) { + checkInstallation(o.installation); + } + buildCounterGrafeasV1beta1PackageDetails--; +} + +buildUnnamed4473() { + var o = new core.List<api.PackageIssue>(); + o.add(buildPackageIssue()); + o.add(buildPackageIssue()); + return o; +} + +checkUnnamed4473(core.List<api.PackageIssue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPackageIssue(o[0]); + checkPackageIssue(o[1]); +} + +buildUnnamed4474() { + var o = new core.List<api.RelatedUrl>(); + o.add(buildRelatedUrl()); + o.add(buildRelatedUrl()); + return o; +} + +checkUnnamed4474(core.List<api.RelatedUrl> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelatedUrl(o[0]); + checkRelatedUrl(o[1]); +} + +core.int buildCounterGrafeasV1beta1VulnerabilityDetails = 0; +buildGrafeasV1beta1VulnerabilityDetails() { + var o = new api.GrafeasV1beta1VulnerabilityDetails(); + buildCounterGrafeasV1beta1VulnerabilityDetails++; + if (buildCounterGrafeasV1beta1VulnerabilityDetails < 3) { + o.cvssScore = 42.0; + o.longDescription = "foo"; + o.packageIssue = buildUnnamed4473(); + o.relatedUrls = buildUnnamed4474(); + o.severity = "foo"; + o.shortDescription = "foo"; + o.type = "foo"; + } + buildCounterGrafeasV1beta1VulnerabilityDetails--; + return o; +} + +checkGrafeasV1beta1VulnerabilityDetails( + api.GrafeasV1beta1VulnerabilityDetails o) { + buildCounterGrafeasV1beta1VulnerabilityDetails++; + if (buildCounterGrafeasV1beta1VulnerabilityDetails < 3) { + unittest.expect(o.cvssScore, unittest.equals(42.0)); + unittest.expect(o.longDescription, unittest.equals('foo')); + checkUnnamed4473(o.packageIssue); + checkUnnamed4474(o.relatedUrls); + unittest.expect(o.severity, unittest.equals('foo')); + unittest.expect(o.shortDescription, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterGrafeasV1beta1VulnerabilityDetails--; +} + +core.int buildCounterHash = 0; +buildHash() { + var o = new api.Hash(); + buildCounterHash++; + if (buildCounterHash < 3) { + o.type = "foo"; + o.value = "foo"; + } + buildCounterHash--; + return o; +} + +checkHash(api.Hash o) { + buildCounterHash++; + if (buildCounterHash < 3) { + unittest.expect(o.type, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterHash--; +} + +core.int buildCounterHint = 0; +buildHint() { + var o = new api.Hint(); + buildCounterHint++; + if (buildCounterHint < 3) { + o.humanReadableName = "foo"; + } + buildCounterHint--; + return o; +} + +checkHint(api.Hint o) { + buildCounterHint++; + if (buildCounterHint < 3) { + unittest.expect(o.humanReadableName, unittest.equals('foo')); + } + buildCounterHint--; +} + +buildUnnamed4475() { + var o = new core.List<api.Location>(); + o.add(buildLocation()); + o.add(buildLocation()); + return o; +} + +checkUnnamed4475(core.List<api.Location> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLocation(o[0]); + checkLocation(o[1]); +} + +core.int buildCounterInstallation = 0; +buildInstallation() { + var o = new api.Installation(); + buildCounterInstallation++; + if (buildCounterInstallation < 3) { + o.location = buildUnnamed4475(); + o.name = "foo"; + } + buildCounterInstallation--; + return o; +} + +checkInstallation(api.Installation o) { + buildCounterInstallation++; + if (buildCounterInstallation < 3) { + checkUnnamed4475(o.location); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterInstallation--; +} + +core.int buildCounterKnowledgeBase = 0; +buildKnowledgeBase() { + var o = new api.KnowledgeBase(); + buildCounterKnowledgeBase++; + if (buildCounterKnowledgeBase < 3) { + o.name = "foo"; + o.url = "foo"; + } + buildCounterKnowledgeBase--; + return o; +} + +checkKnowledgeBase(api.KnowledgeBase o) { + buildCounterKnowledgeBase++; + if (buildCounterKnowledgeBase < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterKnowledgeBase--; +} + +core.int buildCounterLayer = 0; +buildLayer() { + var o = new api.Layer(); + buildCounterLayer++; + if (buildCounterLayer < 3) { + o.arguments = "foo"; + o.directive = "foo"; + } + buildCounterLayer--; + return o; +} + +checkLayer(api.Layer o) { + buildCounterLayer++; + if (buildCounterLayer < 3) { + unittest.expect(o.arguments, unittest.equals('foo')); + unittest.expect(o.directive, unittest.equals('foo')); + } + buildCounterLayer--; +} + +buildUnnamed4476() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4476(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterListNoteOccurrencesResponse = 0; +buildListNoteOccurrencesResponse() { + var o = new api.ListNoteOccurrencesResponse(); + buildCounterListNoteOccurrencesResponse++; + if (buildCounterListNoteOccurrencesResponse < 3) { + o.nextPageToken = "foo"; + o.occurrences = buildUnnamed4476(); + } + buildCounterListNoteOccurrencesResponse--; + return o; +} + +checkListNoteOccurrencesResponse(api.ListNoteOccurrencesResponse o) { + buildCounterListNoteOccurrencesResponse++; + if (buildCounterListNoteOccurrencesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4476(o.occurrences); + } + buildCounterListNoteOccurrencesResponse--; +} + +buildUnnamed4477() { + var o = new core.List<api.Note>(); + o.add(buildNote()); + o.add(buildNote()); + return o; +} + +checkUnnamed4477(core.List<api.Note> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNote(o[0]); + checkNote(o[1]); +} + +core.int buildCounterListNotesResponse = 0; +buildListNotesResponse() { + var o = new api.ListNotesResponse(); + buildCounterListNotesResponse++; + if (buildCounterListNotesResponse < 3) { + o.nextPageToken = "foo"; + o.notes = buildUnnamed4477(); + } + buildCounterListNotesResponse--; + return o; +} + +checkListNotesResponse(api.ListNotesResponse o) { + buildCounterListNotesResponse++; + if (buildCounterListNotesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4477(o.notes); + } + buildCounterListNotesResponse--; +} + +buildUnnamed4478() { + var o = new core.List<api.Occurrence>(); + o.add(buildOccurrence()); + o.add(buildOccurrence()); + return o; +} + +checkUnnamed4478(core.List<api.Occurrence> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOccurrence(o[0]); + checkOccurrence(o[1]); +} + +core.int buildCounterListOccurrencesResponse = 0; +buildListOccurrencesResponse() { + var o = new api.ListOccurrencesResponse(); + buildCounterListOccurrencesResponse++; + if (buildCounterListOccurrencesResponse < 3) { + o.nextPageToken = "foo"; + o.occurrences = buildUnnamed4478(); + } + buildCounterListOccurrencesResponse--; + return o; +} + +checkListOccurrencesResponse(api.ListOccurrencesResponse o) { + buildCounterListOccurrencesResponse++; + if (buildCounterListOccurrencesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4478(o.occurrences); + } + buildCounterListOccurrencesResponse--; +} + +buildUnnamed4479() { + var o = new core.List<api.ScanConfig>(); + o.add(buildScanConfig()); + o.add(buildScanConfig()); + return o; +} + +checkUnnamed4479(core.List<api.ScanConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkScanConfig(o[0]); + checkScanConfig(o[1]); +} + +core.int buildCounterListScanConfigsResponse = 0; +buildListScanConfigsResponse() { + var o = new api.ListScanConfigsResponse(); + buildCounterListScanConfigsResponse++; + if (buildCounterListScanConfigsResponse < 3) { + o.nextPageToken = "foo"; + o.scanConfigs = buildUnnamed4479(); + } + buildCounterListScanConfigsResponse--; + return o; +} + +checkListScanConfigsResponse(api.ListScanConfigsResponse o) { + buildCounterListScanConfigsResponse++; + if (buildCounterListScanConfigsResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4479(o.scanConfigs); + } + buildCounterListScanConfigsResponse--; +} + +core.int buildCounterLocation = 0; +buildLocation() { + var o = new api.Location(); + buildCounterLocation++; + if (buildCounterLocation < 3) { + o.cpeUri = "foo"; + o.path = "foo"; + o.version = buildVersion(); + } + buildCounterLocation--; + return o; +} + +checkLocation(api.Location o) { + buildCounterLocation++; + if (buildCounterLocation < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterLocation--; +} + +buildUnnamed4480() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4480(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4481() { + var o = new core.List<api.RelatedUrl>(); + o.add(buildRelatedUrl()); + o.add(buildRelatedUrl()); + return o; +} + +checkUnnamed4481(core.List<api.RelatedUrl> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelatedUrl(o[0]); + checkRelatedUrl(o[1]); +} + +core.int buildCounterNote = 0; +buildNote() { + var o = new api.Note(); + buildCounterNote++; + if (buildCounterNote < 3) { + o.attestationAuthority = buildAuthority(); + o.baseImage = buildBasis(); + o.build = buildBuild(); + o.createTime = "foo"; + o.deployable = buildDeployable(); + o.discovery = buildDiscovery(); + o.expirationTime = "foo"; + o.kind = "foo"; + o.longDescription = "foo"; + o.name = "foo"; + o.package = buildPackage(); + o.relatedNoteNames = buildUnnamed4480(); + o.relatedUrl = buildUnnamed4481(); + o.shortDescription = "foo"; + o.updateTime = "foo"; + o.vulnerability = buildVulnerability(); + } + buildCounterNote--; + return o; +} + +checkNote(api.Note o) { + buildCounterNote++; + if (buildCounterNote < 3) { + checkAuthority(o.attestationAuthority); + checkBasis(o.baseImage); + checkBuild(o.build); + unittest.expect(o.createTime, unittest.equals('foo')); + checkDeployable(o.deployable); + checkDiscovery(o.discovery); + unittest.expect(o.expirationTime, unittest.equals('foo')); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.longDescription, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkPackage(o.package); + checkUnnamed4480(o.relatedNoteNames); + checkUnnamed4481(o.relatedUrl); + unittest.expect(o.shortDescription, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + checkVulnerability(o.vulnerability); + } + buildCounterNote--; +} + +core.int buildCounterOccurrence = 0; +buildOccurrence() { + var o = new api.Occurrence(); + buildCounterOccurrence++; + if (buildCounterOccurrence < 3) { + o.attestation = buildDetails(); + o.build = buildGrafeasV1beta1BuildDetails(); + o.createTime = "foo"; + o.deployment = buildGrafeasV1beta1DeploymentDetails(); + o.derivedImage = buildGrafeasV1beta1ImageDetails(); + o.discovered = buildGrafeasV1beta1DiscoveryDetails(); + o.installation = buildGrafeasV1beta1PackageDetails(); + o.kind = "foo"; + o.name = "foo"; + o.noteName = "foo"; + o.remediation = "foo"; + o.resource = buildResource(); + o.updateTime = "foo"; + o.vulnerability = buildGrafeasV1beta1VulnerabilityDetails(); + } + buildCounterOccurrence--; + return o; +} + +checkOccurrence(api.Occurrence o) { + buildCounterOccurrence++; + if (buildCounterOccurrence < 3) { + checkDetails(o.attestation); + checkGrafeasV1beta1BuildDetails(o.build); + unittest.expect(o.createTime, unittest.equals('foo')); + checkGrafeasV1beta1DeploymentDetails(o.deployment); + checkGrafeasV1beta1ImageDetails(o.derivedImage); + checkGrafeasV1beta1DiscoveryDetails(o.discovered); + checkGrafeasV1beta1PackageDetails(o.installation); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.noteName, unittest.equals('foo')); + unittest.expect(o.remediation, unittest.equals('foo')); + checkResource(o.resource); + unittest.expect(o.updateTime, unittest.equals('foo')); + checkGrafeasV1beta1VulnerabilityDetails(o.vulnerability); + } + buildCounterOccurrence--; +} + +buildUnnamed4482() { + var o = new core.List<api.Distribution>(); + o.add(buildDistribution()); + o.add(buildDistribution()); + return o; +} + +checkUnnamed4482(core.List<api.Distribution> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDistribution(o[0]); + checkDistribution(o[1]); +} + +core.int buildCounterPackage = 0; +buildPackage() { + var o = new api.Package(); + buildCounterPackage++; + if (buildCounterPackage < 3) { + o.distribution = buildUnnamed4482(); + o.name = "foo"; + } + buildCounterPackage--; + return o; +} + +checkPackage(api.Package o) { + buildCounterPackage++; + if (buildCounterPackage < 3) { + checkUnnamed4482(o.distribution); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterPackage--; +} + +core.int buildCounterPackageIssue = 0; +buildPackageIssue() { + var o = new api.PackageIssue(); + buildCounterPackageIssue++; + if (buildCounterPackageIssue < 3) { + o.affectedLocation = buildVulnerabilityLocation(); + o.fixedLocation = buildVulnerabilityLocation(); + o.severityName = "foo"; + } + buildCounterPackageIssue--; + return o; +} + +checkPackageIssue(api.PackageIssue o) { + buildCounterPackageIssue++; + if (buildCounterPackageIssue < 3) { + checkVulnerabilityLocation(o.affectedLocation); + checkVulnerabilityLocation(o.fixedLocation); + unittest.expect(o.severityName, unittest.equals('foo')); + } + buildCounterPackageIssue--; +} + +core.int buildCounterPgpSignedAttestation = 0; +buildPgpSignedAttestation() { + var o = new api.PgpSignedAttestation(); + buildCounterPgpSignedAttestation++; + if (buildCounterPgpSignedAttestation < 3) { + o.contentType = "foo"; + o.pgpKeyId = "foo"; + o.signature = "foo"; + } + buildCounterPgpSignedAttestation--; + return o; +} + +checkPgpSignedAttestation(api.PgpSignedAttestation o) { + buildCounterPgpSignedAttestation++; + if (buildCounterPgpSignedAttestation < 3) { + unittest.expect(o.contentType, unittest.equals('foo')); + unittest.expect(o.pgpKeyId, unittest.equals('foo')); + unittest.expect(o.signature, unittest.equals('foo')); + } + buildCounterPgpSignedAttestation--; +} + +buildUnnamed4483() { + var o = new core.List<api.AuditConfig>(); + o.add(buildAuditConfig()); + o.add(buildAuditConfig()); + return o; +} + +checkUnnamed4483(core.List<api.AuditConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuditConfig(o[0]); + checkAuditConfig(o[1]); +} + +buildUnnamed4484() { + var o = new core.List<api.Binding>(); + o.add(buildBinding()); + o.add(buildBinding()); + return o; +} + +checkUnnamed4484(core.List<api.Binding> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBinding(o[0]); + checkBinding(o[1]); +} + +core.int buildCounterPolicy = 0; +buildPolicy() { + var o = new api.Policy(); + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + o.auditConfigs = buildUnnamed4483(); + o.bindings = buildUnnamed4484(); + o.etag = "foo"; + o.version = 42; + } + buildCounterPolicy--; + return o; +} + +checkPolicy(api.Policy o) { + buildCounterPolicy++; + if (buildCounterPolicy < 3) { + checkUnnamed4483(o.auditConfigs); + checkUnnamed4484(o.bindings); + unittest.expect(o.etag, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals(42)); + } + buildCounterPolicy--; +} + +core.int buildCounterProjectRepoId = 0; +buildProjectRepoId() { + var o = new api.ProjectRepoId(); + buildCounterProjectRepoId++; + if (buildCounterProjectRepoId < 3) { + o.projectId = "foo"; + o.repoName = "foo"; + } + buildCounterProjectRepoId--; + return o; +} + +checkProjectRepoId(api.ProjectRepoId o) { + buildCounterProjectRepoId++; + if (buildCounterProjectRepoId < 3) { + unittest.expect(o.projectId, unittest.equals('foo')); + unittest.expect(o.repoName, unittest.equals('foo')); + } + buildCounterProjectRepoId--; +} + +core.int buildCounterRelatedUrl = 0; +buildRelatedUrl() { + var o = new api.RelatedUrl(); + buildCounterRelatedUrl++; + if (buildCounterRelatedUrl < 3) { + o.label = "foo"; + o.url = "foo"; + } + buildCounterRelatedUrl--; + return o; +} + +checkRelatedUrl(api.RelatedUrl o) { + buildCounterRelatedUrl++; + if (buildCounterRelatedUrl < 3) { + unittest.expect(o.label, unittest.equals('foo')); + unittest.expect(o.url, unittest.equals('foo')); + } + buildCounterRelatedUrl--; +} + +core.int buildCounterRepoId = 0; +buildRepoId() { + var o = new api.RepoId(); + buildCounterRepoId++; + if (buildCounterRepoId < 3) { + o.projectRepoId = buildProjectRepoId(); + o.uid = "foo"; + } + buildCounterRepoId--; + return o; +} + +checkRepoId(api.RepoId o) { + buildCounterRepoId++; + if (buildCounterRepoId < 3) { + checkProjectRepoId(o.projectRepoId); + unittest.expect(o.uid, unittest.equals('foo')); + } + buildCounterRepoId--; +} + +core.int buildCounterResource = 0; +buildResource() { + var o = new api.Resource(); + buildCounterResource++; + if (buildCounterResource < 3) { + o.contentHash = buildHash(); + o.name = "foo"; + o.uri = "foo"; + } + buildCounterResource--; + return o; +} + +checkResource(api.Resource o) { + buildCounterResource++; + if (buildCounterResource < 3) { + checkHash(o.contentHash); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.uri, unittest.equals('foo')); + } + buildCounterResource--; +} + +core.int buildCounterScanConfig = 0; +buildScanConfig() { + var o = new api.ScanConfig(); + buildCounterScanConfig++; + if (buildCounterScanConfig < 3) { + o.createTime = "foo"; + o.description = "foo"; + o.enabled = true; + o.name = "foo"; + o.updateTime = "foo"; + } + buildCounterScanConfig--; + return o; +} + +checkScanConfig(api.ScanConfig o) { + buildCounterScanConfig++; + if (buildCounterScanConfig < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.enabled, unittest.isTrue); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterScanConfig--; +} + +core.int buildCounterSetIamPolicyRequest = 0; +buildSetIamPolicyRequest() { + var o = new api.SetIamPolicyRequest(); + buildCounterSetIamPolicyRequest++; + if (buildCounterSetIamPolicyRequest < 3) { + o.policy = buildPolicy(); + o.updateMask = "foo"; + } + buildCounterSetIamPolicyRequest--; + return o; +} + +checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { + buildCounterSetIamPolicyRequest++; + if (buildCounterSetIamPolicyRequest < 3) { + checkPolicy(o.policy); + unittest.expect(o.updateMask, unittest.equals('foo')); + } + buildCounterSetIamPolicyRequest--; +} + +buildUnnamed4485() { + var o = new core.List<api.SourceContext>(); + o.add(buildSourceContext()); + o.add(buildSourceContext()); + return o; +} + +checkUnnamed4485(core.List<api.SourceContext> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSourceContext(o[0]); + checkSourceContext(o[1]); +} + +buildUnnamed4486() { + var o = new core.Map<core.String, api.FileHashes>(); + o["x"] = buildFileHashes(); + o["y"] = buildFileHashes(); + return o; +} + +checkUnnamed4486(core.Map<core.String, api.FileHashes> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFileHashes(o["x"]); + checkFileHashes(o["y"]); +} + +core.int buildCounterSource = 0; +buildSource() { + var o = new api.Source(); + buildCounterSource++; + if (buildCounterSource < 3) { + o.additionalContexts = buildUnnamed4485(); + o.artifactStorageSourceUri = "foo"; + o.context = buildSourceContext(); + o.fileHashes = buildUnnamed4486(); + } + buildCounterSource--; + return o; +} + +checkSource(api.Source o) { + buildCounterSource++; + if (buildCounterSource < 3) { + checkUnnamed4485(o.additionalContexts); + unittest.expect(o.artifactStorageSourceUri, unittest.equals('foo')); + checkSourceContext(o.context); + checkUnnamed4486(o.fileHashes); + } + buildCounterSource--; +} + +buildUnnamed4487() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4487(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterSourceContext = 0; +buildSourceContext() { + var o = new api.SourceContext(); + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + o.cloudRepo = buildCloudRepoSourceContext(); + o.gerrit = buildGerritSourceContext(); + o.git = buildGitSourceContext(); + o.labels = buildUnnamed4487(); + } + buildCounterSourceContext--; + return o; +} + +checkSourceContext(api.SourceContext o) { + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + checkCloudRepoSourceContext(o.cloudRepo); + checkGerritSourceContext(o.gerrit); + checkGitSourceContext(o.git); + checkUnnamed4487(o.labels); + } + buildCounterSourceContext--; +} + +buildUnnamed4488() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4488(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4489() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4488()); + o.add(buildUnnamed4488()); + return o; +} + +checkUnnamed4489(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4488(o[0]); + checkUnnamed4488(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4489(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4489(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +buildUnnamed4490() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4490(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTestIamPermissionsRequest = 0; +buildTestIamPermissionsRequest() { + var o = new api.TestIamPermissionsRequest(); + buildCounterTestIamPermissionsRequest++; + if (buildCounterTestIamPermissionsRequest < 3) { + o.permissions = buildUnnamed4490(); + } + buildCounterTestIamPermissionsRequest--; + return o; +} + +checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { + buildCounterTestIamPermissionsRequest++; + if (buildCounterTestIamPermissionsRequest < 3) { + checkUnnamed4490(o.permissions); + } + buildCounterTestIamPermissionsRequest--; +} + +buildUnnamed4491() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4491(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTestIamPermissionsResponse = 0; +buildTestIamPermissionsResponse() { + var o = new api.TestIamPermissionsResponse(); + buildCounterTestIamPermissionsResponse++; + if (buildCounterTestIamPermissionsResponse < 3) { + o.permissions = buildUnnamed4491(); + } + buildCounterTestIamPermissionsResponse--; + return o; +} + +checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { + buildCounterTestIamPermissionsResponse++; + if (buildCounterTestIamPermissionsResponse < 3) { + checkUnnamed4491(o.permissions); + } + buildCounterTestIamPermissionsResponse--; +} + +core.int buildCounterVersion = 0; +buildVersion() { + var o = new api.Version(); + buildCounterVersion++; + if (buildCounterVersion < 3) { + o.epoch = 42; + o.kind = "foo"; + o.name = "foo"; + o.revision = "foo"; + } + buildCounterVersion--; + return o; +} + +checkVersion(api.Version o) { + buildCounterVersion++; + if (buildCounterVersion < 3) { + unittest.expect(o.epoch, unittest.equals(42)); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.revision, unittest.equals('foo')); + } + buildCounterVersion--; +} + +buildUnnamed4492() { + var o = new core.List<api.Detail>(); + o.add(buildDetail()); + o.add(buildDetail()); + return o; +} + +checkUnnamed4492(core.List<api.Detail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDetail(o[0]); + checkDetail(o[1]); +} + +buildUnnamed4493() { + var o = new core.List<api.WindowsDetail>(); + o.add(buildWindowsDetail()); + o.add(buildWindowsDetail()); + return o; +} + +checkUnnamed4493(core.List<api.WindowsDetail> o) { + unittest.expect(o, unittest.hasLength(2)); + checkWindowsDetail(o[0]); + checkWindowsDetail(o[1]); +} + +core.int buildCounterVulnerability = 0; +buildVulnerability() { + var o = new api.Vulnerability(); + buildCounterVulnerability++; + if (buildCounterVulnerability < 3) { + o.cvssScore = 42.0; + o.details = buildUnnamed4492(); + o.severity = "foo"; + o.windowsDetails = buildUnnamed4493(); + } + buildCounterVulnerability--; + return o; +} + +checkVulnerability(api.Vulnerability o) { + buildCounterVulnerability++; + if (buildCounterVulnerability < 3) { + unittest.expect(o.cvssScore, unittest.equals(42.0)); + checkUnnamed4492(o.details); + unittest.expect(o.severity, unittest.equals('foo')); + checkUnnamed4493(o.windowsDetails); + } + buildCounterVulnerability--; +} + +core.int buildCounterVulnerabilityLocation = 0; +buildVulnerabilityLocation() { + var o = new api.VulnerabilityLocation(); + buildCounterVulnerabilityLocation++; + if (buildCounterVulnerabilityLocation < 3) { + o.cpeUri = "foo"; + o.package = "foo"; + o.version = buildVersion(); + } + buildCounterVulnerabilityLocation--; + return o; +} + +checkVulnerabilityLocation(api.VulnerabilityLocation o) { + buildCounterVulnerabilityLocation++; + if (buildCounterVulnerabilityLocation < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.package, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterVulnerabilityLocation--; +} + +buildUnnamed4494() { + var o = new core.List<api.FixableTotalByDigest>(); + o.add(buildFixableTotalByDigest()); + o.add(buildFixableTotalByDigest()); + return o; +} + +checkUnnamed4494(core.List<api.FixableTotalByDigest> o) { + unittest.expect(o, unittest.hasLength(2)); + checkFixableTotalByDigest(o[0]); + checkFixableTotalByDigest(o[1]); +} + +core.int buildCounterVulnerabilityOccurrencesSummary = 0; +buildVulnerabilityOccurrencesSummary() { + var o = new api.VulnerabilityOccurrencesSummary(); + buildCounterVulnerabilityOccurrencesSummary++; + if (buildCounterVulnerabilityOccurrencesSummary < 3) { + o.counts = buildUnnamed4494(); + } + buildCounterVulnerabilityOccurrencesSummary--; + return o; +} + +checkVulnerabilityOccurrencesSummary(api.VulnerabilityOccurrencesSummary o) { + buildCounterVulnerabilityOccurrencesSummary++; + if (buildCounterVulnerabilityOccurrencesSummary < 3) { + checkUnnamed4494(o.counts); + } + buildCounterVulnerabilityOccurrencesSummary--; +} + +buildUnnamed4495() { + var o = new core.List<api.KnowledgeBase>(); + o.add(buildKnowledgeBase()); + o.add(buildKnowledgeBase()); + return o; +} + +checkUnnamed4495(core.List<api.KnowledgeBase> o) { + unittest.expect(o, unittest.hasLength(2)); + checkKnowledgeBase(o[0]); + checkKnowledgeBase(o[1]); +} + +core.int buildCounterWindowsDetail = 0; +buildWindowsDetail() { + var o = new api.WindowsDetail(); + buildCounterWindowsDetail++; + if (buildCounterWindowsDetail < 3) { + o.cpeUri = "foo"; + o.description = "foo"; + o.fixingKbs = buildUnnamed4495(); + o.name = "foo"; + } + buildCounterWindowsDetail--; + return o; +} + +checkWindowsDetail(api.WindowsDetail o) { + buildCounterWindowsDetail++; + if (buildCounterWindowsDetail < 3) { + unittest.expect(o.cpeUri, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4495(o.fixingKbs); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterWindowsDetail--; +} + +main() { + unittest.group("obj-schema-AliasContext", () { + unittest.test("to-json--from-json", () { + var o = buildAliasContext(); + var od = new api.AliasContext.fromJson(o.toJson()); + checkAliasContext(od); + }); + }); + + unittest.group("obj-schema-Artifact", () { + unittest.test("to-json--from-json", () { + var o = buildArtifact(); + var od = new api.Artifact.fromJson(o.toJson()); + checkArtifact(od); + }); + }); + + unittest.group("obj-schema-Attestation", () { + unittest.test("to-json--from-json", () { + var o = buildAttestation(); + var od = new api.Attestation.fromJson(o.toJson()); + checkAttestation(od); + }); + }); + + unittest.group("obj-schema-AuditConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditConfig(); + var od = new api.AuditConfig.fromJson(o.toJson()); + checkAuditConfig(od); + }); + }); + + unittest.group("obj-schema-AuditLogConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuditLogConfig(); + var od = new api.AuditLogConfig.fromJson(o.toJson()); + checkAuditLogConfig(od); + }); + }); + + unittest.group("obj-schema-Authority", () { + unittest.test("to-json--from-json", () { + var o = buildAuthority(); + var od = new api.Authority.fromJson(o.toJson()); + checkAuthority(od); + }); + }); + + unittest.group("obj-schema-Basis", () { + unittest.test("to-json--from-json", () { + var o = buildBasis(); + var od = new api.Basis.fromJson(o.toJson()); + checkBasis(od); + }); + }); + + unittest.group("obj-schema-BatchCreateNotesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateNotesRequest(); + var od = new api.BatchCreateNotesRequest.fromJson(o.toJson()); + checkBatchCreateNotesRequest(od); + }); + }); + + unittest.group("obj-schema-BatchCreateNotesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateNotesResponse(); + var od = new api.BatchCreateNotesResponse.fromJson(o.toJson()); + checkBatchCreateNotesResponse(od); + }); + }); + + unittest.group("obj-schema-BatchCreateOccurrencesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateOccurrencesRequest(); + var od = new api.BatchCreateOccurrencesRequest.fromJson(o.toJson()); + checkBatchCreateOccurrencesRequest(od); + }); + }); + + unittest.group("obj-schema-BatchCreateOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildBatchCreateOccurrencesResponse(); + var od = new api.BatchCreateOccurrencesResponse.fromJson(o.toJson()); + checkBatchCreateOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-Binding", () { + unittest.test("to-json--from-json", () { + var o = buildBinding(); + var od = new api.Binding.fromJson(o.toJson()); + checkBinding(od); + }); + }); + + unittest.group("obj-schema-Build", () { + unittest.test("to-json--from-json", () { + var o = buildBuild(); + var od = new api.Build.fromJson(o.toJson()); + checkBuild(od); + }); + }); + + unittest.group("obj-schema-BuildProvenance", () { + unittest.test("to-json--from-json", () { + var o = buildBuildProvenance(); + var od = new api.BuildProvenance.fromJson(o.toJson()); + checkBuildProvenance(od); + }); + }); + + unittest.group("obj-schema-BuildSignature", () { + unittest.test("to-json--from-json", () { + var o = buildBuildSignature(); + var od = new api.BuildSignature.fromJson(o.toJson()); + checkBuildSignature(od); + }); + }); + + unittest.group("obj-schema-CloudRepoSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildCloudRepoSourceContext(); + var od = new api.CloudRepoSourceContext.fromJson(o.toJson()); + checkCloudRepoSourceContext(od); + }); + }); + + unittest.group("obj-schema-Command", () { + unittest.test("to-json--from-json", () { + var o = buildCommand(); + var od = new api.Command.fromJson(o.toJson()); + checkCommand(od); + }); + }); + + unittest.group("obj-schema-Deployable", () { + unittest.test("to-json--from-json", () { + var o = buildDeployable(); + var od = new api.Deployable.fromJson(o.toJson()); + checkDeployable(od); + }); + }); + + unittest.group("obj-schema-Deployment", () { + unittest.test("to-json--from-json", () { + var o = buildDeployment(); + var od = new api.Deployment.fromJson(o.toJson()); + checkDeployment(od); + }); + }); + + unittest.group("obj-schema-Derived", () { + unittest.test("to-json--from-json", () { + var o = buildDerived(); + var od = new api.Derived.fromJson(o.toJson()); + checkDerived(od); + }); + }); + + unittest.group("obj-schema-Detail", () { + unittest.test("to-json--from-json", () { + var o = buildDetail(); + var od = new api.Detail.fromJson(o.toJson()); + checkDetail(od); + }); + }); + + unittest.group("obj-schema-Details", () { + unittest.test("to-json--from-json", () { + var o = buildDetails(); + var od = new api.Details.fromJson(o.toJson()); + checkDetails(od); + }); + }); + + unittest.group("obj-schema-Discovered", () { + unittest.test("to-json--from-json", () { + var o = buildDiscovered(); + var od = new api.Discovered.fromJson(o.toJson()); + checkDiscovered(od); + }); + }); + + unittest.group("obj-schema-Discovery", () { + unittest.test("to-json--from-json", () { + var o = buildDiscovery(); + var od = new api.Discovery.fromJson(o.toJson()); + checkDiscovery(od); + }); + }); + + unittest.group("obj-schema-Distribution", () { + unittest.test("to-json--from-json", () { + var o = buildDistribution(); + var od = new api.Distribution.fromJson(o.toJson()); + checkDistribution(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-Expr", () { + unittest.test("to-json--from-json", () { + var o = buildExpr(); + var od = new api.Expr.fromJson(o.toJson()); + checkExpr(od); + }); + }); + + unittest.group("obj-schema-FileHashes", () { + unittest.test("to-json--from-json", () { + var o = buildFileHashes(); + var od = new api.FileHashes.fromJson(o.toJson()); + checkFileHashes(od); + }); + }); + + unittest.group("obj-schema-Fingerprint", () { + unittest.test("to-json--from-json", () { + var o = buildFingerprint(); + var od = new api.Fingerprint.fromJson(o.toJson()); + checkFingerprint(od); + }); + }); + + unittest.group("obj-schema-FixableTotalByDigest", () { + unittest.test("to-json--from-json", () { + var o = buildFixableTotalByDigest(); + var od = new api.FixableTotalByDigest.fromJson(o.toJson()); + checkFixableTotalByDigest(od); + }); + }); + + unittest.group("obj-schema-GerritSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildGerritSourceContext(); + var od = new api.GerritSourceContext.fromJson(o.toJson()); + checkGerritSourceContext(od); + }); + }); + + unittest.group("obj-schema-GetIamPolicyRequest", () { + unittest.test("to-json--from-json", () { + var o = buildGetIamPolicyRequest(); + var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); + checkGetIamPolicyRequest(od); + }); + }); + + unittest.group("obj-schema-GitSourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildGitSourceContext(); + var od = new api.GitSourceContext.fromJson(o.toJson()); + checkGitSourceContext(od); + }); + }); + + unittest.group( + "obj-schema-GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata", + () { + unittest.test("to-json--from-json", () { + var o = buildGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(); + var od = new api + .GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata.fromJson( + o.toJson()); + checkGoogleDevtoolsContaineranalysisV1alpha1OperationMetadata(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1BuildDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1BuildDetails(); + var od = new api.GrafeasV1beta1BuildDetails.fromJson(o.toJson()); + checkGrafeasV1beta1BuildDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1DeploymentDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1DeploymentDetails(); + var od = new api.GrafeasV1beta1DeploymentDetails.fromJson(o.toJson()); + checkGrafeasV1beta1DeploymentDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1DiscoveryDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1DiscoveryDetails(); + var od = new api.GrafeasV1beta1DiscoveryDetails.fromJson(o.toJson()); + checkGrafeasV1beta1DiscoveryDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1ImageDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1ImageDetails(); + var od = new api.GrafeasV1beta1ImageDetails.fromJson(o.toJson()); + checkGrafeasV1beta1ImageDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1PackageDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1PackageDetails(); + var od = new api.GrafeasV1beta1PackageDetails.fromJson(o.toJson()); + checkGrafeasV1beta1PackageDetails(od); + }); + }); + + unittest.group("obj-schema-GrafeasV1beta1VulnerabilityDetails", () { + unittest.test("to-json--from-json", () { + var o = buildGrafeasV1beta1VulnerabilityDetails(); + var od = new api.GrafeasV1beta1VulnerabilityDetails.fromJson(o.toJson()); + checkGrafeasV1beta1VulnerabilityDetails(od); + }); + }); + + unittest.group("obj-schema-Hash", () { + unittest.test("to-json--from-json", () { + var o = buildHash(); + var od = new api.Hash.fromJson(o.toJson()); + checkHash(od); + }); + }); + + unittest.group("obj-schema-Hint", () { + unittest.test("to-json--from-json", () { + var o = buildHint(); + var od = new api.Hint.fromJson(o.toJson()); + checkHint(od); + }); + }); + + unittest.group("obj-schema-Installation", () { + unittest.test("to-json--from-json", () { + var o = buildInstallation(); + var od = new api.Installation.fromJson(o.toJson()); + checkInstallation(od); + }); + }); + + unittest.group("obj-schema-KnowledgeBase", () { + unittest.test("to-json--from-json", () { + var o = buildKnowledgeBase(); + var od = new api.KnowledgeBase.fromJson(o.toJson()); + checkKnowledgeBase(od); + }); + }); + + unittest.group("obj-schema-Layer", () { + unittest.test("to-json--from-json", () { + var o = buildLayer(); + var od = new api.Layer.fromJson(o.toJson()); + checkLayer(od); + }); + }); + + unittest.group("obj-schema-ListNoteOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListNoteOccurrencesResponse(); + var od = new api.ListNoteOccurrencesResponse.fromJson(o.toJson()); + checkListNoteOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-ListNotesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListNotesResponse(); + var od = new api.ListNotesResponse.fromJson(o.toJson()); + checkListNotesResponse(od); + }); + }); + + unittest.group("obj-schema-ListOccurrencesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListOccurrencesResponse(); + var od = new api.ListOccurrencesResponse.fromJson(o.toJson()); + checkListOccurrencesResponse(od); + }); + }); + + unittest.group("obj-schema-ListScanConfigsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListScanConfigsResponse(); + var od = new api.ListScanConfigsResponse.fromJson(o.toJson()); + checkListScanConfigsResponse(od); + }); + }); + + unittest.group("obj-schema-Location", () { + unittest.test("to-json--from-json", () { + var o = buildLocation(); + var od = new api.Location.fromJson(o.toJson()); + checkLocation(od); + }); + }); + + unittest.group("obj-schema-Note", () { + unittest.test("to-json--from-json", () { + var o = buildNote(); + var od = new api.Note.fromJson(o.toJson()); + checkNote(od); + }); + }); + + unittest.group("obj-schema-Occurrence", () { + unittest.test("to-json--from-json", () { + var o = buildOccurrence(); + var od = new api.Occurrence.fromJson(o.toJson()); + checkOccurrence(od); + }); + }); + + unittest.group("obj-schema-Package", () { + unittest.test("to-json--from-json", () { + var o = buildPackage(); + var od = new api.Package.fromJson(o.toJson()); + checkPackage(od); + }); + }); + + unittest.group("obj-schema-PackageIssue", () { + unittest.test("to-json--from-json", () { + var o = buildPackageIssue(); + var od = new api.PackageIssue.fromJson(o.toJson()); + checkPackageIssue(od); + }); + }); + + unittest.group("obj-schema-PgpSignedAttestation", () { + unittest.test("to-json--from-json", () { + var o = buildPgpSignedAttestation(); + var od = new api.PgpSignedAttestation.fromJson(o.toJson()); + checkPgpSignedAttestation(od); + }); + }); + + unittest.group("obj-schema-Policy", () { + unittest.test("to-json--from-json", () { + var o = buildPolicy(); + var od = new api.Policy.fromJson(o.toJson()); + checkPolicy(od); + }); + }); + + unittest.group("obj-schema-ProjectRepoId", () { + unittest.test("to-json--from-json", () { + var o = buildProjectRepoId(); + var od = new api.ProjectRepoId.fromJson(o.toJson()); + checkProjectRepoId(od); + }); + }); + + unittest.group("obj-schema-RelatedUrl", () { + unittest.test("to-json--from-json", () { + var o = buildRelatedUrl(); + var od = new api.RelatedUrl.fromJson(o.toJson()); + checkRelatedUrl(od); + }); + }); + + unittest.group("obj-schema-RepoId", () { + unittest.test("to-json--from-json", () { + var o = buildRepoId(); + var od = new api.RepoId.fromJson(o.toJson()); + checkRepoId(od); + }); + }); + + unittest.group("obj-schema-Resource", () { + unittest.test("to-json--from-json", () { + var o = buildResource(); + var od = new api.Resource.fromJson(o.toJson()); + checkResource(od); + }); + }); + + unittest.group("obj-schema-ScanConfig", () { + unittest.test("to-json--from-json", () { + var o = buildScanConfig(); + var od = new api.ScanConfig.fromJson(o.toJson()); + checkScanConfig(od); + }); + }); + + unittest.group("obj-schema-SetIamPolicyRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSetIamPolicyRequest(); + var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); + checkSetIamPolicyRequest(od); + }); + }); + + unittest.group("obj-schema-Source", () { + unittest.test("to-json--from-json", () { + var o = buildSource(); + var od = new api.Source.fromJson(o.toJson()); + checkSource(od); + }); + }); + + unittest.group("obj-schema-SourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildSourceContext(); + var od = new api.SourceContext.fromJson(o.toJson()); + checkSourceContext(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-TestIamPermissionsRequest", () { + unittest.test("to-json--from-json", () { + var o = buildTestIamPermissionsRequest(); + var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); + checkTestIamPermissionsRequest(od); + }); + }); + + unittest.group("obj-schema-TestIamPermissionsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildTestIamPermissionsResponse(); + var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); + checkTestIamPermissionsResponse(od); + }); + }); + + unittest.group("obj-schema-Version", () { + unittest.test("to-json--from-json", () { + var o = buildVersion(); + var od = new api.Version.fromJson(o.toJson()); + checkVersion(od); + }); + }); + + unittest.group("obj-schema-Vulnerability", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerability(); + var od = new api.Vulnerability.fromJson(o.toJson()); + checkVulnerability(od); + }); + }); + + unittest.group("obj-schema-VulnerabilityLocation", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerabilityLocation(); + var od = new api.VulnerabilityLocation.fromJson(o.toJson()); + checkVulnerabilityLocation(od); + }); + }); + + unittest.group("obj-schema-VulnerabilityOccurrencesSummary", () { + unittest.test("to-json--from-json", () { + var o = buildVulnerabilityOccurrencesSummary(); + var od = new api.VulnerabilityOccurrencesSummary.fromJson(o.toJson()); + checkVulnerabilityOccurrencesSummary(od); + }); + }); + + unittest.group("obj-schema-WindowsDetail", () { + unittest.test("to-json--from-json", () { + var o = buildWindowsDetail(); + var od = new api.WindowsDetail.fromJson(o.toJson()); + checkWindowsDetail(od); + }); + }); + + unittest.group("resource-ProjectsNotesResourceApi", () { + unittest.test("method--batchCreate", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildBatchCreateNotesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.BatchCreateNotesRequest.fromJson(json); + checkBatchCreateNotesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchCreateNotesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchCreate(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchCreateNotesResponse(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildNote(); + var arg_parent = "foo"; + var arg_noteId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Note.fromJson(json); + checkNote(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["noteId"].first, unittest.equals(arg_noteId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + noteId: arg_noteId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--getIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildGetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GetIamPolicyRequest.fromJson(json); + checkGetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListNotesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListNotesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildNote(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Note.fromJson(json); + checkNote(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--setIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildSetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SetIamPolicyRequest.fromJson(json); + checkSetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--testIamPermissions", () { + var mock = new HttpServerMock(); + api.ProjectsNotesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes; + var arg_request = buildTestIamPermissionsRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.TestIamPermissionsRequest.fromJson(json); + checkTestIamPermissionsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildTestIamPermissionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkTestIamPermissionsResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsNotesOccurrencesResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsNotesOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.notes.occurrences; + var arg_name = "foo"; + var arg_pageSize = 42; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListNoteOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_name, + pageSize: arg_pageSize, + filter: arg_filter, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListNoteOccurrencesResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsOccurrencesResourceApi", () { + unittest.test("method--batchCreate", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildBatchCreateOccurrencesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.BatchCreateOccurrencesRequest.fromJson(json); + checkBatchCreateOccurrencesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildBatchCreateOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .batchCreate(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkBatchCreateOccurrencesResponse(response); + }))); + }); + + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildOccurrence(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Occurrence.fromJson(json); + checkOccurrence(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--getIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildGetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GetIamPolicyRequest.fromJson(json); + checkGetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--getNotes", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildNote()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getNotes(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkNote(response); + }))); + }); + + unittest.test("method--getVulnerabilitySummary", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVulnerabilityOccurrencesSummary()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getVulnerabilitySummary(arg_parent, + filter: arg_filter, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVulnerabilityOccurrencesSummary(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_parent = "foo"; + var arg_pageSize = 42; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListOccurrencesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageSize: arg_pageSize, + filter: arg_filter, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListOccurrencesResponse(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildOccurrence(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Occurrence.fromJson(json); + checkOccurrence(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOccurrence()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOccurrence(response); + }))); + }); + + unittest.test("method--setIamPolicy", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildSetIamPolicyRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SetIamPolicyRequest.fromJson(json); + checkSetIamPolicyRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPolicy()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPolicy(response); + }))); + }); + + unittest.test("method--testIamPermissions", () { + var mock = new HttpServerMock(); + api.ProjectsOccurrencesResourceApi res = + new api.ContaineranalysisApi(mock).projects.occurrences; + var arg_request = buildTestIamPermissionsRequest(); + var arg_resource = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.TestIamPermissionsRequest.fromJson(json); + checkTestIamPermissionsRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildTestIamPermissionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkTestIamPermissionsResponse(response); + }))); + }); + }); + + unittest.group("resource-ProjectsScanConfigsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildScanConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkScanConfig(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_parent = "foo"; + var arg_filter = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListScanConfigsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + filter: arg_filter, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListScanConfigsResponse(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.ProjectsScanConfigsResourceApi res = + new api.ContaineranalysisApi(mock).projects.scanConfigs; + var arg_request = buildScanConfig(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ScanConfig.fromJson(json); + checkScanConfig(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildScanConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkScanConfig(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/dataflow/v1b3_test.dart b/generated/googleapis_beta/test/dataflow/v1b3_test.dart index 06acb56..e2aa3b2 100644 --- a/generated/googleapis_beta/test/dataflow/v1b3_test.dart +++ b/generated/googleapis_beta/test/dataflow/v1b3_test.dart
@@ -104,6 +104,7 @@ buildCounterApproximateSplitRequest++; if (buildCounterApproximateSplitRequest < 3) { o.fractionConsumed = 42.0; + o.fractionOfRemainder = 42.0; o.position = buildPosition(); } buildCounterApproximateSplitRequest--; @@ -114,6 +115,7 @@ buildCounterApproximateSplitRequest++; if (buildCounterApproximateSplitRequest < 3) { unittest.expect(o.fractionConsumed, unittest.equals(42.0)); + unittest.expect(o.fractionOfRemainder, unittest.equals(42.0)); checkPosition(o.position); } buildCounterApproximateSplitRequest--; @@ -286,53 +288,53 @@ buildCounterComponentTransform--; } -buildUnnamed5133() { +buildUnnamed4344() { var o = new core.List<api.StreamLocation>(); o.add(buildStreamLocation()); o.add(buildStreamLocation()); return o; } -checkUnnamed5133(core.List<api.StreamLocation> o) { +checkUnnamed4344(core.List<api.StreamLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamLocation(o[0]); checkStreamLocation(o[1]); } -buildUnnamed5134() { +buildUnnamed4345() { var o = new core.List<api.KeyRangeLocation>(); o.add(buildKeyRangeLocation()); o.add(buildKeyRangeLocation()); return o; } -checkUnnamed5134(core.List<api.KeyRangeLocation> o) { +checkUnnamed4345(core.List<api.KeyRangeLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkKeyRangeLocation(o[0]); checkKeyRangeLocation(o[1]); } -buildUnnamed5135() { +buildUnnamed4346() { var o = new core.List<api.StreamLocation>(); o.add(buildStreamLocation()); o.add(buildStreamLocation()); return o; } -checkUnnamed5135(core.List<api.StreamLocation> o) { +checkUnnamed4346(core.List<api.StreamLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamLocation(o[0]); checkStreamLocation(o[1]); } -buildUnnamed5136() { +buildUnnamed4347() { var o = new core.List<api.StateFamilyConfig>(); o.add(buildStateFamilyConfig()); o.add(buildStateFamilyConfig()); return o; } -checkUnnamed5136(core.List<api.StateFamilyConfig> o) { +checkUnnamed4347(core.List<api.StateFamilyConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkStateFamilyConfig(o[0]); checkStateFamilyConfig(o[1]); @@ -344,10 +346,10 @@ buildCounterComputationTopology++; if (buildCounterComputationTopology < 3) { o.computationId = "foo"; - o.inputs = buildUnnamed5133(); - o.keyRanges = buildUnnamed5134(); - o.outputs = buildUnnamed5135(); - o.stateFamilies = buildUnnamed5136(); + o.inputs = buildUnnamed4344(); + o.keyRanges = buildUnnamed4345(); + o.outputs = buildUnnamed4346(); + o.stateFamilies = buildUnnamed4347(); o.systemStageName = "foo"; } buildCounterComputationTopology--; @@ -358,10 +360,10 @@ buildCounterComputationTopology++; if (buildCounterComputationTopology < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5133(o.inputs); - checkUnnamed5134(o.keyRanges); - checkUnnamed5135(o.outputs); - checkUnnamed5136(o.stateFamilies); + checkUnnamed4344(o.inputs); + checkUnnamed4345(o.keyRanges); + checkUnnamed4346(o.outputs); + checkUnnamed4347(o.stateFamilies); unittest.expect(o.systemStageName, unittest.equals('foo')); } buildCounterComputationTopology--; @@ -526,14 +528,14 @@ buildCounterCounterUpdate--; } -buildUnnamed5137() { +buildUnnamed4348() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5137(core.Map<core.String, core.String> o) { +checkUnnamed4348(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -548,7 +550,7 @@ o.gcsPath = "foo"; o.jobName = "foo"; o.location = "foo"; - o.parameters = buildUnnamed5137(); + o.parameters = buildUnnamed4348(); } buildCounterCreateJobFromTemplateRequest--; return o; @@ -561,7 +563,7 @@ unittest.expect(o.gcsPath, unittest.equals('foo')); unittest.expect(o.jobName, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5137(o.parameters); + checkUnnamed4348(o.parameters); } buildCounterCreateJobFromTemplateRequest--; } @@ -585,14 +587,14 @@ buildCounterCustomSourceLocation--; } -buildUnnamed5138() { +buildUnnamed4349() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5138(core.List<core.String> o) { +checkUnnamed4349(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -603,7 +605,7 @@ var o = new api.DataDiskAssignment(); buildCounterDataDiskAssignment++; if (buildCounterDataDiskAssignment < 3) { - o.dataDisks = buildUnnamed5138(); + o.dataDisks = buildUnnamed4349(); o.vmInstance = "foo"; } buildCounterDataDiskAssignment--; @@ -613,7 +615,7 @@ checkDataDiskAssignment(api.DataDiskAssignment o) { buildCounterDataDiskAssignment++; if (buildCounterDataDiskAssignment < 3) { - checkUnnamed5138(o.dataDisks); + checkUnnamed4349(o.dataDisks); unittest.expect(o.vmInstance, unittest.equals('foo')); } buildCounterDataDiskAssignment--; @@ -775,20 +777,20 @@ buildCounterDynamicSourceSplit--; } -buildUnnamed5139() { +buildUnnamed4350() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5139(core.List<core.String> o) { +checkUnnamed4350(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5140() { +buildUnnamed4351() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -803,7 +805,7 @@ return o; } -checkUnnamed5140(core.Map<core.String, core.Object> o) { +checkUnnamed4351(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted2 = (o["x"]) as core.Map; unittest.expect(casted2, unittest.hasLength(3)); @@ -817,7 +819,7 @@ unittest.expect(casted3["string"], unittest.equals('foo')); } -buildUnnamed5141() { +buildUnnamed4352() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -832,7 +834,7 @@ return o; } -checkUnnamed5141(core.Map<core.String, core.Object> o) { +checkUnnamed4352(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLength(3)); @@ -846,7 +848,7 @@ unittest.expect(casted5["string"], unittest.equals('foo')); } -buildUnnamed5142() { +buildUnnamed4353() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -861,7 +863,7 @@ return o; } -checkUnnamed5142(core.Map<core.String, core.Object> o) { +checkUnnamed4353(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLength(3)); @@ -875,7 +877,7 @@ unittest.expect(casted7["string"], unittest.equals('foo')); } -buildUnnamed5143() { +buildUnnamed4354() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -890,7 +892,7 @@ return o; } -checkUnnamed5143(core.Map<core.String, core.Object> o) { +checkUnnamed4354(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLength(3)); @@ -904,14 +906,14 @@ unittest.expect(casted9["string"], unittest.equals('foo')); } -buildUnnamed5144() { +buildUnnamed4355() { var o = new core.List<api.WorkerPool>(); o.add(buildWorkerPool()); o.add(buildWorkerPool()); return o; } -checkUnnamed5144(core.List<api.WorkerPool> o) { +checkUnnamed4355(core.List<api.WorkerPool> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerPool(o[0]); checkWorkerPool(o[1]); @@ -924,14 +926,14 @@ if (buildCounterEnvironment < 3) { o.clusterManagerApiService = "foo"; o.dataset = "foo"; - o.experiments = buildUnnamed5139(); - o.internalExperiments = buildUnnamed5140(); - o.sdkPipelineOptions = buildUnnamed5141(); + o.experiments = buildUnnamed4350(); + o.internalExperiments = buildUnnamed4351(); + o.sdkPipelineOptions = buildUnnamed4352(); o.serviceAccountEmail = "foo"; o.tempStoragePrefix = "foo"; - o.userAgent = buildUnnamed5142(); - o.version = buildUnnamed5143(); - o.workerPools = buildUnnamed5144(); + o.userAgent = buildUnnamed4353(); + o.version = buildUnnamed4354(); + o.workerPools = buildUnnamed4355(); } buildCounterEnvironment--; return o; @@ -942,14 +944,14 @@ if (buildCounterEnvironment < 3) { unittest.expect(o.clusterManagerApiService, unittest.equals('foo')); unittest.expect(o.dataset, unittest.equals('foo')); - checkUnnamed5139(o.experiments); - checkUnnamed5140(o.internalExperiments); - checkUnnamed5141(o.sdkPipelineOptions); + checkUnnamed4350(o.experiments); + checkUnnamed4351(o.internalExperiments); + checkUnnamed4352(o.sdkPipelineOptions); unittest.expect(o.serviceAccountEmail, unittest.equals('foo')); unittest.expect(o.tempStoragePrefix, unittest.equals('foo')); - checkUnnamed5142(o.userAgent); - checkUnnamed5143(o.version); - checkUnnamed5144(o.workerPools); + checkUnnamed4353(o.userAgent); + checkUnnamed4354(o.version); + checkUnnamed4355(o.workerPools); } buildCounterEnvironment--; } @@ -977,53 +979,53 @@ buildCounterExecutionStageState--; } -buildUnnamed5145() { +buildUnnamed4356() { var o = new core.List<api.ComponentSource>(); o.add(buildComponentSource()); o.add(buildComponentSource()); return o; } -checkUnnamed5145(core.List<api.ComponentSource> o) { +checkUnnamed4356(core.List<api.ComponentSource> o) { unittest.expect(o, unittest.hasLength(2)); checkComponentSource(o[0]); checkComponentSource(o[1]); } -buildUnnamed5146() { +buildUnnamed4357() { var o = new core.List<api.ComponentTransform>(); o.add(buildComponentTransform()); o.add(buildComponentTransform()); return o; } -checkUnnamed5146(core.List<api.ComponentTransform> o) { +checkUnnamed4357(core.List<api.ComponentTransform> o) { unittest.expect(o, unittest.hasLength(2)); checkComponentTransform(o[0]); checkComponentTransform(o[1]); } -buildUnnamed5147() { +buildUnnamed4358() { var o = new core.List<api.StageSource>(); o.add(buildStageSource()); o.add(buildStageSource()); return o; } -checkUnnamed5147(core.List<api.StageSource> o) { +checkUnnamed4358(core.List<api.StageSource> o) { unittest.expect(o, unittest.hasLength(2)); checkStageSource(o[0]); checkStageSource(o[1]); } -buildUnnamed5148() { +buildUnnamed4359() { var o = new core.List<api.StageSource>(); o.add(buildStageSource()); o.add(buildStageSource()); return o; } -checkUnnamed5148(core.List<api.StageSource> o) { +checkUnnamed4359(core.List<api.StageSource> o) { unittest.expect(o, unittest.hasLength(2)); checkStageSource(o[0]); checkStageSource(o[1]); @@ -1034,13 +1036,13 @@ var o = new api.ExecutionStageSummary(); buildCounterExecutionStageSummary++; if (buildCounterExecutionStageSummary < 3) { - o.componentSource = buildUnnamed5145(); - o.componentTransform = buildUnnamed5146(); + o.componentSource = buildUnnamed4356(); + o.componentTransform = buildUnnamed4357(); o.id = "foo"; - o.inputSource = buildUnnamed5147(); + o.inputSource = buildUnnamed4358(); o.kind = "foo"; o.name = "foo"; - o.outputSource = buildUnnamed5148(); + o.outputSource = buildUnnamed4359(); } buildCounterExecutionStageSummary--; return o; @@ -1049,13 +1051,13 @@ checkExecutionStageSummary(api.ExecutionStageSummary o) { buildCounterExecutionStageSummary++; if (buildCounterExecutionStageSummary < 3) { - checkUnnamed5145(o.componentSource); - checkUnnamed5146(o.componentTransform); + checkUnnamed4356(o.componentSource); + checkUnnamed4357(o.componentTransform); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5147(o.inputSource); + checkUnnamed4358(o.inputSource); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5148(o.outputSource); + checkUnnamed4359(o.outputSource); } buildCounterExecutionStageSummary--; } @@ -1098,14 +1100,14 @@ buildCounterFileIODetails--; } -buildUnnamed5149() { +buildUnnamed4360() { var o = new core.List<api.InstructionInput>(); o.add(buildInstructionInput()); o.add(buildInstructionInput()); return o; } -checkUnnamed5149(core.List<api.InstructionInput> o) { +checkUnnamed4360(core.List<api.InstructionInput> o) { unittest.expect(o, unittest.hasLength(2)); checkInstructionInput(o[0]); checkInstructionInput(o[1]); @@ -1116,7 +1118,7 @@ var o = new api.FlattenInstruction(); buildCounterFlattenInstruction++; if (buildCounterFlattenInstruction < 3) { - o.inputs = buildUnnamed5149(); + o.inputs = buildUnnamed4360(); } buildCounterFlattenInstruction--; return o; @@ -1125,19 +1127,19 @@ checkFlattenInstruction(api.FlattenInstruction o) { buildCounterFlattenInstruction++; if (buildCounterFlattenInstruction < 3) { - checkUnnamed5149(o.inputs); + checkUnnamed4360(o.inputs); } buildCounterFlattenInstruction--; } -buildUnnamed5150() { +buildUnnamed4361() { var o = new core.List<core.double>(); o.add(42.0); o.add(42.0); return o; } -checkUnnamed5150(core.List<core.double> o) { +checkUnnamed4361(core.List<core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42.0)); unittest.expect(o[1], unittest.equals(42.0)); @@ -1148,7 +1150,7 @@ var o = new api.FloatingPointList(); buildCounterFloatingPointList++; if (buildCounterFloatingPointList < 3) { - o.elements = buildUnnamed5150(); + o.elements = buildUnnamed4361(); } buildCounterFloatingPointList--; return o; @@ -1157,7 +1159,7 @@ checkFloatingPointList(api.FloatingPointList o) { buildCounterFloatingPointList++; if (buildCounterFloatingPointList < 3) { - checkUnnamed5150(o.elements); + checkUnnamed4361(o.elements); } buildCounterFloatingPointList--; } @@ -1246,14 +1248,14 @@ buildCounterGetTemplateResponse--; } -buildUnnamed5151() { +buildUnnamed4362() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5151(core.List<core.String> o) { +checkUnnamed4362(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1264,7 +1266,7 @@ var o = new api.Histogram(); buildCounterHistogram++; if (buildCounterHistogram < 3) { - o.bucketCounts = buildUnnamed5151(); + o.bucketCounts = buildUnnamed4362(); o.firstBucketOffset = 42; } buildCounterHistogram--; @@ -1274,7 +1276,7 @@ checkHistogram(api.Histogram o) { buildCounterHistogram++; if (buildCounterHistogram < 3) { - checkUnnamed5151(o.bucketCounts); + checkUnnamed4362(o.bucketCounts); unittest.expect(o.firstBucketOffset, unittest.equals(42)); } buildCounterHistogram--; @@ -1301,7 +1303,7 @@ buildCounterInstructionInput--; } -buildUnnamed5152() { +buildUnnamed4363() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1316,7 +1318,7 @@ return o; } -checkUnnamed5152(core.Map<core.String, core.Object> o) { +checkUnnamed4363(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted10 = (o["x"]) as core.Map; unittest.expect(casted10, unittest.hasLength(3)); @@ -1335,7 +1337,7 @@ var o = new api.InstructionOutput(); buildCounterInstructionOutput++; if (buildCounterInstructionOutput < 3) { - o.codec = buildUnnamed5152(); + o.codec = buildUnnamed4363(); o.name = "foo"; o.onlyCountKeyBytes = true; o.onlyCountValueBytes = true; @@ -1349,7 +1351,7 @@ checkInstructionOutput(api.InstructionOutput o) { buildCounterInstructionOutput++; if (buildCounterInstructionOutput < 3) { - checkUnnamed5152(o.codec); + checkUnnamed4363(o.codec); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.onlyCountKeyBytes, unittest.isTrue); unittest.expect(o.onlyCountValueBytes, unittest.isTrue); @@ -1380,14 +1382,14 @@ buildCounterIntegerGauge--; } -buildUnnamed5153() { +buildUnnamed4364() { var o = new core.List<api.SplitInt64>(); o.add(buildSplitInt64()); o.add(buildSplitInt64()); return o; } -checkUnnamed5153(core.List<api.SplitInt64> o) { +checkUnnamed4364(core.List<api.SplitInt64> o) { unittest.expect(o, unittest.hasLength(2)); checkSplitInt64(o[0]); checkSplitInt64(o[1]); @@ -1398,7 +1400,7 @@ var o = new api.IntegerList(); buildCounterIntegerList++; if (buildCounterIntegerList < 3) { - o.elements = buildUnnamed5153(); + o.elements = buildUnnamed4364(); } buildCounterIntegerList--; return o; @@ -1407,7 +1409,7 @@ checkIntegerList(api.IntegerList o) { buildCounterIntegerList++; if (buildCounterIntegerList < 3) { - checkUnnamed5153(o.elements); + checkUnnamed4364(o.elements); } buildCounterIntegerList--; } @@ -1433,66 +1435,66 @@ buildCounterIntegerMean--; } -buildUnnamed5154() { +buildUnnamed4365() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5154(core.Map<core.String, core.String> o) { +checkUnnamed4365(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5155() { +buildUnnamed4366() { var o = new core.List<api.ExecutionStageState>(); o.add(buildExecutionStageState()); o.add(buildExecutionStageState()); return o; } -checkUnnamed5155(core.List<api.ExecutionStageState> o) { +checkUnnamed4366(core.List<api.ExecutionStageState> o) { unittest.expect(o, unittest.hasLength(2)); checkExecutionStageState(o[0]); checkExecutionStageState(o[1]); } -buildUnnamed5156() { +buildUnnamed4367() { var o = new core.List<api.Step>(); o.add(buildStep()); o.add(buildStep()); return o; } -checkUnnamed5156(core.List<api.Step> o) { +checkUnnamed4367(core.List<api.Step> o) { unittest.expect(o, unittest.hasLength(2)); checkStep(o[0]); checkStep(o[1]); } -buildUnnamed5157() { +buildUnnamed4368() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5157(core.List<core.String> o) { +checkUnnamed4368(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5158() { +buildUnnamed4369() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5158(core.Map<core.String, core.String> o) { +checkUnnamed4369(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1505,13 +1507,14 @@ if (buildCounterJob < 3) { o.clientRequestId = "foo"; o.createTime = "foo"; + o.createdFromSnapshotId = "foo"; o.currentState = "foo"; o.currentStateTime = "foo"; o.environment = buildEnvironment(); o.executionInfo = buildJobExecutionInfo(); o.id = "foo"; o.jobMetadata = buildJobMetadata(); - o.labels = buildUnnamed5154(); + o.labels = buildUnnamed4365(); o.location = "foo"; o.name = "foo"; o.pipelineDescription = buildPipelineDescription(); @@ -1519,10 +1522,12 @@ o.replaceJobId = "foo"; o.replacedByJobId = "foo"; o.requestedState = "foo"; - o.stageStates = buildUnnamed5155(); - o.steps = buildUnnamed5156(); - o.tempFiles = buildUnnamed5157(); - o.transformNameMapping = buildUnnamed5158(); + o.stageStates = buildUnnamed4366(); + o.startTime = "foo"; + o.steps = buildUnnamed4367(); + o.stepsLocation = "foo"; + o.tempFiles = buildUnnamed4368(); + o.transformNameMapping = buildUnnamed4369(); o.type = "foo"; } buildCounterJob--; @@ -1534,13 +1539,14 @@ if (buildCounterJob < 3) { unittest.expect(o.clientRequestId, unittest.equals('foo')); unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.createdFromSnapshotId, unittest.equals('foo')); unittest.expect(o.currentState, unittest.equals('foo')); unittest.expect(o.currentStateTime, unittest.equals('foo')); checkEnvironment(o.environment); checkJobExecutionInfo(o.executionInfo); unittest.expect(o.id, unittest.equals('foo')); checkJobMetadata(o.jobMetadata); - checkUnnamed5154(o.labels); + checkUnnamed4365(o.labels); unittest.expect(o.location, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); checkPipelineDescription(o.pipelineDescription); @@ -1548,23 +1554,25 @@ unittest.expect(o.replaceJobId, unittest.equals('foo')); unittest.expect(o.replacedByJobId, unittest.equals('foo')); unittest.expect(o.requestedState, unittest.equals('foo')); - checkUnnamed5155(o.stageStates); - checkUnnamed5156(o.steps); - checkUnnamed5157(o.tempFiles); - checkUnnamed5158(o.transformNameMapping); + checkUnnamed4366(o.stageStates); + unittest.expect(o.startTime, unittest.equals('foo')); + checkUnnamed4367(o.steps); + unittest.expect(o.stepsLocation, unittest.equals('foo')); + checkUnnamed4368(o.tempFiles); + checkUnnamed4369(o.transformNameMapping); unittest.expect(o.type, unittest.equals('foo')); } buildCounterJob--; } -buildUnnamed5159() { +buildUnnamed4370() { var o = new core.Map<core.String, api.JobExecutionStageInfo>(); o["x"] = buildJobExecutionStageInfo(); o["y"] = buildJobExecutionStageInfo(); return o; } -checkUnnamed5159(core.Map<core.String, api.JobExecutionStageInfo> o) { +checkUnnamed4370(core.Map<core.String, api.JobExecutionStageInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkJobExecutionStageInfo(o["x"]); checkJobExecutionStageInfo(o["y"]); @@ -1575,7 +1583,7 @@ var o = new api.JobExecutionInfo(); buildCounterJobExecutionInfo++; if (buildCounterJobExecutionInfo < 3) { - o.stages = buildUnnamed5159(); + o.stages = buildUnnamed4370(); } buildCounterJobExecutionInfo--; return o; @@ -1584,19 +1592,19 @@ checkJobExecutionInfo(api.JobExecutionInfo o) { buildCounterJobExecutionInfo++; if (buildCounterJobExecutionInfo < 3) { - checkUnnamed5159(o.stages); + checkUnnamed4370(o.stages); } buildCounterJobExecutionInfo--; } -buildUnnamed5160() { +buildUnnamed4371() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5160(core.List<core.String> o) { +checkUnnamed4371(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1607,7 +1615,7 @@ var o = new api.JobExecutionStageInfo(); buildCounterJobExecutionStageInfo++; if (buildCounterJobExecutionStageInfo < 3) { - o.stepName = buildUnnamed5160(); + o.stepName = buildUnnamed4371(); } buildCounterJobExecutionStageInfo--; return o; @@ -1616,7 +1624,7 @@ checkJobExecutionStageInfo(api.JobExecutionStageInfo o) { buildCounterJobExecutionStageInfo++; if (buildCounterJobExecutionStageInfo < 3) { - checkUnnamed5160(o.stepName); + checkUnnamed4371(o.stepName); } buildCounterJobExecutionStageInfo--; } @@ -1646,79 +1654,79 @@ buildCounterJobMessage--; } -buildUnnamed5161() { +buildUnnamed4372() { var o = new core.List<api.BigTableIODetails>(); o.add(buildBigTableIODetails()); o.add(buildBigTableIODetails()); return o; } -checkUnnamed5161(core.List<api.BigTableIODetails> o) { +checkUnnamed4372(core.List<api.BigTableIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkBigTableIODetails(o[0]); checkBigTableIODetails(o[1]); } -buildUnnamed5162() { +buildUnnamed4373() { var o = new core.List<api.BigQueryIODetails>(); o.add(buildBigQueryIODetails()); o.add(buildBigQueryIODetails()); return o; } -checkUnnamed5162(core.List<api.BigQueryIODetails> o) { +checkUnnamed4373(core.List<api.BigQueryIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkBigQueryIODetails(o[0]); checkBigQueryIODetails(o[1]); } -buildUnnamed5163() { +buildUnnamed4374() { var o = new core.List<api.DatastoreIODetails>(); o.add(buildDatastoreIODetails()); o.add(buildDatastoreIODetails()); return o; } -checkUnnamed5163(core.List<api.DatastoreIODetails> o) { +checkUnnamed4374(core.List<api.DatastoreIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkDatastoreIODetails(o[0]); checkDatastoreIODetails(o[1]); } -buildUnnamed5164() { +buildUnnamed4375() { var o = new core.List<api.FileIODetails>(); o.add(buildFileIODetails()); o.add(buildFileIODetails()); return o; } -checkUnnamed5164(core.List<api.FileIODetails> o) { +checkUnnamed4375(core.List<api.FileIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkFileIODetails(o[0]); checkFileIODetails(o[1]); } -buildUnnamed5165() { +buildUnnamed4376() { var o = new core.List<api.PubSubIODetails>(); o.add(buildPubSubIODetails()); o.add(buildPubSubIODetails()); return o; } -checkUnnamed5165(core.List<api.PubSubIODetails> o) { +checkUnnamed4376(core.List<api.PubSubIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkPubSubIODetails(o[0]); checkPubSubIODetails(o[1]); } -buildUnnamed5166() { +buildUnnamed4377() { var o = new core.List<api.SpannerIODetails>(); o.add(buildSpannerIODetails()); o.add(buildSpannerIODetails()); return o; } -checkUnnamed5166(core.List<api.SpannerIODetails> o) { +checkUnnamed4377(core.List<api.SpannerIODetails> o) { unittest.expect(o, unittest.hasLength(2)); checkSpannerIODetails(o[0]); checkSpannerIODetails(o[1]); @@ -1729,13 +1737,13 @@ var o = new api.JobMetadata(); buildCounterJobMetadata++; if (buildCounterJobMetadata < 3) { - o.bigTableDetails = buildUnnamed5161(); - o.bigqueryDetails = buildUnnamed5162(); - o.datastoreDetails = buildUnnamed5163(); - o.fileDetails = buildUnnamed5164(); - o.pubsubDetails = buildUnnamed5165(); + o.bigTableDetails = buildUnnamed4372(); + o.bigqueryDetails = buildUnnamed4373(); + o.datastoreDetails = buildUnnamed4374(); + o.fileDetails = buildUnnamed4375(); + o.pubsubDetails = buildUnnamed4376(); o.sdkVersion = buildSdkVersion(); - o.spannerDetails = buildUnnamed5166(); + o.spannerDetails = buildUnnamed4377(); } buildCounterJobMetadata--; return o; @@ -1744,25 +1752,25 @@ checkJobMetadata(api.JobMetadata o) { buildCounterJobMetadata++; if (buildCounterJobMetadata < 3) { - checkUnnamed5161(o.bigTableDetails); - checkUnnamed5162(o.bigqueryDetails); - checkUnnamed5163(o.datastoreDetails); - checkUnnamed5164(o.fileDetails); - checkUnnamed5165(o.pubsubDetails); + checkUnnamed4372(o.bigTableDetails); + checkUnnamed4373(o.bigqueryDetails); + checkUnnamed4374(o.datastoreDetails); + checkUnnamed4375(o.fileDetails); + checkUnnamed4376(o.pubsubDetails); checkSdkVersion(o.sdkVersion); - checkUnnamed5166(o.spannerDetails); + checkUnnamed4377(o.spannerDetails); } buildCounterJobMetadata--; } -buildUnnamed5167() { +buildUnnamed4378() { var o = new core.List<api.MetricUpdate>(); o.add(buildMetricUpdate()); o.add(buildMetricUpdate()); return o; } -checkUnnamed5167(core.List<api.MetricUpdate> o) { +checkUnnamed4378(core.List<api.MetricUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricUpdate(o[0]); checkMetricUpdate(o[1]); @@ -1774,7 +1782,7 @@ buildCounterJobMetrics++; if (buildCounterJobMetrics < 3) { o.metricTime = "foo"; - o.metrics = buildUnnamed5167(); + o.metrics = buildUnnamed4378(); } buildCounterJobMetrics--; return o; @@ -1784,7 +1792,7 @@ buildCounterJobMetrics++; if (buildCounterJobMetrics < 3) { unittest.expect(o.metricTime, unittest.equals('foo')); - checkUnnamed5167(o.metrics); + checkUnnamed4378(o.metrics); } buildCounterJobMetrics--; } @@ -1839,14 +1847,14 @@ buildCounterKeyRangeLocation--; } -buildUnnamed5168() { +buildUnnamed4379() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5168(core.Map<core.String, core.String> o) { +checkUnnamed4379(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1859,7 +1867,7 @@ if (buildCounterLaunchTemplateParameters < 3) { o.environment = buildRuntimeEnvironment(); o.jobName = "foo"; - o.parameters = buildUnnamed5168(); + o.parameters = buildUnnamed4379(); } buildCounterLaunchTemplateParameters--; return o; @@ -1870,7 +1878,7 @@ if (buildCounterLaunchTemplateParameters < 3) { checkRuntimeEnvironment(o.environment); unittest.expect(o.jobName, unittest.equals('foo')); - checkUnnamed5168(o.parameters); + checkUnnamed4379(o.parameters); } buildCounterLaunchTemplateParameters--; } @@ -1894,27 +1902,27 @@ buildCounterLaunchTemplateResponse--; } -buildUnnamed5169() { +buildUnnamed4380() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5169(core.List<core.String> o) { +checkUnnamed4380(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5170() { +buildUnnamed4381() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5170(core.List<core.String> o) { +checkUnnamed4381(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1928,8 +1936,8 @@ o.currentWorkerTime = "foo"; o.location = "foo"; o.requestedLeaseDuration = "foo"; - o.workItemTypes = buildUnnamed5169(); - o.workerCapabilities = buildUnnamed5170(); + o.workItemTypes = buildUnnamed4380(); + o.workerCapabilities = buildUnnamed4381(); o.workerId = "foo"; } buildCounterLeaseWorkItemRequest--; @@ -1942,21 +1950,21 @@ unittest.expect(o.currentWorkerTime, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); unittest.expect(o.requestedLeaseDuration, unittest.equals('foo')); - checkUnnamed5169(o.workItemTypes); - checkUnnamed5170(o.workerCapabilities); + checkUnnamed4380(o.workItemTypes); + checkUnnamed4381(o.workerCapabilities); unittest.expect(o.workerId, unittest.equals('foo')); } buildCounterLeaseWorkItemRequest--; } -buildUnnamed5171() { +buildUnnamed4382() { var o = new core.List<api.WorkItem>(); o.add(buildWorkItem()); o.add(buildWorkItem()); return o; } -checkUnnamed5171(core.List<api.WorkItem> o) { +checkUnnamed4382(core.List<api.WorkItem> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItem(o[0]); checkWorkItem(o[1]); @@ -1967,7 +1975,7 @@ var o = new api.LeaseWorkItemResponse(); buildCounterLeaseWorkItemResponse++; if (buildCounterLeaseWorkItemResponse < 3) { - o.workItems = buildUnnamed5171(); + o.workItems = buildUnnamed4382(); } buildCounterLeaseWorkItemResponse--; return o; @@ -1976,32 +1984,32 @@ checkLeaseWorkItemResponse(api.LeaseWorkItemResponse o) { buildCounterLeaseWorkItemResponse++; if (buildCounterLeaseWorkItemResponse < 3) { - checkUnnamed5171(o.workItems); + checkUnnamed4382(o.workItems); } buildCounterLeaseWorkItemResponse--; } -buildUnnamed5172() { +buildUnnamed4383() { var o = new core.List<api.AutoscalingEvent>(); o.add(buildAutoscalingEvent()); o.add(buildAutoscalingEvent()); return o; } -checkUnnamed5172(core.List<api.AutoscalingEvent> o) { +checkUnnamed4383(core.List<api.AutoscalingEvent> o) { unittest.expect(o, unittest.hasLength(2)); checkAutoscalingEvent(o[0]); checkAutoscalingEvent(o[1]); } -buildUnnamed5173() { +buildUnnamed4384() { var o = new core.List<api.JobMessage>(); o.add(buildJobMessage()); o.add(buildJobMessage()); return o; } -checkUnnamed5173(core.List<api.JobMessage> o) { +checkUnnamed4384(core.List<api.JobMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkJobMessage(o[0]); checkJobMessage(o[1]); @@ -2012,8 +2020,8 @@ var o = new api.ListJobMessagesResponse(); buildCounterListJobMessagesResponse++; if (buildCounterListJobMessagesResponse < 3) { - o.autoscalingEvents = buildUnnamed5172(); - o.jobMessages = buildUnnamed5173(); + o.autoscalingEvents = buildUnnamed4383(); + o.jobMessages = buildUnnamed4384(); o.nextPageToken = "foo"; } buildCounterListJobMessagesResponse--; @@ -2023,34 +2031,34 @@ checkListJobMessagesResponse(api.ListJobMessagesResponse o) { buildCounterListJobMessagesResponse++; if (buildCounterListJobMessagesResponse < 3) { - checkUnnamed5172(o.autoscalingEvents); - checkUnnamed5173(o.jobMessages); + checkUnnamed4383(o.autoscalingEvents); + checkUnnamed4384(o.jobMessages); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListJobMessagesResponse--; } -buildUnnamed5174() { +buildUnnamed4385() { var o = new core.List<api.FailedLocation>(); o.add(buildFailedLocation()); o.add(buildFailedLocation()); return o; } -checkUnnamed5174(core.List<api.FailedLocation> o) { +checkUnnamed4385(core.List<api.FailedLocation> o) { unittest.expect(o, unittest.hasLength(2)); checkFailedLocation(o[0]); checkFailedLocation(o[1]); } -buildUnnamed5175() { +buildUnnamed4386() { var o = new core.List<api.Job>(); o.add(buildJob()); o.add(buildJob()); return o; } -checkUnnamed5175(core.List<api.Job> o) { +checkUnnamed4386(core.List<api.Job> o) { unittest.expect(o, unittest.hasLength(2)); checkJob(o[0]); checkJob(o[1]); @@ -2061,8 +2069,8 @@ var o = new api.ListJobsResponse(); buildCounterListJobsResponse++; if (buildCounterListJobsResponse < 3) { - o.failedLocation = buildUnnamed5174(); - o.jobs = buildUnnamed5175(); + o.failedLocation = buildUnnamed4385(); + o.jobs = buildUnnamed4386(); o.nextPageToken = "foo"; } buildCounterListJobsResponse--; @@ -2072,21 +2080,21 @@ checkListJobsResponse(api.ListJobsResponse o) { buildCounterListJobsResponse++; if (buildCounterListJobsResponse < 3) { - checkUnnamed5174(o.failedLocation); - checkUnnamed5175(o.jobs); + checkUnnamed4385(o.failedLocation); + checkUnnamed4386(o.jobs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListJobsResponse--; } -buildUnnamed5176() { +buildUnnamed4387() { var o = new core.List<api.ParallelInstruction>(); o.add(buildParallelInstruction()); o.add(buildParallelInstruction()); return o; } -checkUnnamed5176(core.List<api.ParallelInstruction> o) { +checkUnnamed4387(core.List<api.ParallelInstruction> o) { unittest.expect(o, unittest.hasLength(2)); checkParallelInstruction(o[0]); checkParallelInstruction(o[1]); @@ -2097,7 +2105,8 @@ var o = new api.MapTask(); buildCounterMapTask++; if (buildCounterMapTask < 3) { - o.instructions = buildUnnamed5176(); + o.counterPrefix = "foo"; + o.instructions = buildUnnamed4387(); o.stageName = "foo"; o.systemName = "foo"; } @@ -2108,7 +2117,8 @@ checkMapTask(api.MapTask o) { buildCounterMapTask++; if (buildCounterMapTask < 3) { - checkUnnamed5176(o.instructions); + unittest.expect(o.counterPrefix, unittest.equals('foo')); + checkUnnamed4387(o.instructions); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); } @@ -2136,14 +2146,14 @@ buildCounterMetricShortId--; } -buildUnnamed5177() { +buildUnnamed4388() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5177(core.Map<core.String, core.String> o) { +checkUnnamed4388(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -2154,7 +2164,7 @@ var o = new api.MetricStructuredName(); buildCounterMetricStructuredName++; if (buildCounterMetricStructuredName < 3) { - o.context = buildUnnamed5177(); + o.context = buildUnnamed4388(); o.name = "foo"; o.origin = "foo"; } @@ -2165,7 +2175,7 @@ checkMetricStructuredName(api.MetricStructuredName o) { buildCounterMetricStructuredName++; if (buildCounterMetricStructuredName < 3) { - checkUnnamed5177(o.context); + checkUnnamed4388(o.context); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.origin, unittest.equals('foo')); } @@ -2347,33 +2357,33 @@ buildCounterPackage--; } -buildUnnamed5178() { +buildUnnamed4389() { var o = new core.List<api.MultiOutputInfo>(); o.add(buildMultiOutputInfo()); o.add(buildMultiOutputInfo()); return o; } -checkUnnamed5178(core.List<api.MultiOutputInfo> o) { +checkUnnamed4389(core.List<api.MultiOutputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkMultiOutputInfo(o[0]); checkMultiOutputInfo(o[1]); } -buildUnnamed5179() { +buildUnnamed4390() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5179(core.List<api.SideInputInfo> o) { +checkUnnamed4390(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5180() { +buildUnnamed4391() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2388,7 +2398,7 @@ return o; } -checkUnnamed5180(core.Map<core.String, core.Object> o) { +checkUnnamed4391(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLength(3)); @@ -2408,10 +2418,10 @@ buildCounterParDoInstruction++; if (buildCounterParDoInstruction < 3) { o.input = buildInstructionInput(); - o.multiOutputInfos = buildUnnamed5178(); + o.multiOutputInfos = buildUnnamed4389(); o.numOutputs = 42; - o.sideInputs = buildUnnamed5179(); - o.userFn = buildUnnamed5180(); + o.sideInputs = buildUnnamed4390(); + o.userFn = buildUnnamed4391(); } buildCounterParDoInstruction--; return o; @@ -2421,22 +2431,22 @@ buildCounterParDoInstruction++; if (buildCounterParDoInstruction < 3) { checkInstructionInput(o.input); - checkUnnamed5178(o.multiOutputInfos); + checkUnnamed4389(o.multiOutputInfos); unittest.expect(o.numOutputs, unittest.equals(42)); - checkUnnamed5179(o.sideInputs); - checkUnnamed5180(o.userFn); + checkUnnamed4390(o.sideInputs); + checkUnnamed4391(o.userFn); } buildCounterParDoInstruction--; } -buildUnnamed5181() { +buildUnnamed4392() { var o = new core.List<api.InstructionOutput>(); o.add(buildInstructionOutput()); o.add(buildInstructionOutput()); return o; } -checkUnnamed5181(core.List<api.InstructionOutput> o) { +checkUnnamed4392(core.List<api.InstructionOutput> o) { unittest.expect(o, unittest.hasLength(2)); checkInstructionOutput(o[0]); checkInstructionOutput(o[1]); @@ -2450,7 +2460,7 @@ o.flatten = buildFlattenInstruction(); o.name = "foo"; o.originalName = "foo"; - o.outputs = buildUnnamed5181(); + o.outputs = buildUnnamed4392(); o.parDo = buildParDoInstruction(); o.partialGroupByKey = buildPartialGroupByKeyInstruction(); o.read = buildReadInstruction(); @@ -2467,7 +2477,7 @@ checkFlattenInstruction(o.flatten); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.originalName, unittest.equals('foo')); - checkUnnamed5181(o.outputs); + checkUnnamed4392(o.outputs); checkParDoInstruction(o.parDo); checkPartialGroupByKeyInstruction(o.partialGroupByKey); checkReadInstruction(o.read); @@ -2506,14 +2516,14 @@ buildCounterParameter--; } -buildUnnamed5182() { +buildUnnamed4393() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5182(core.List<core.String> o) { +checkUnnamed4393(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2528,7 +2538,7 @@ o.isOptional = true; o.label = "foo"; o.name = "foo"; - o.regexes = buildUnnamed5182(); + o.regexes = buildUnnamed4393(); } buildCounterParameterMetadata--; return o; @@ -2541,12 +2551,12 @@ unittest.expect(o.isOptional, unittest.isTrue); unittest.expect(o.label, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5182(o.regexes); + checkUnnamed4393(o.regexes); } buildCounterParameterMetadata--; } -buildUnnamed5183() { +buildUnnamed4394() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2561,7 +2571,7 @@ return o; } -checkUnnamed5183(core.Map<core.String, core.Object> o) { +checkUnnamed4394(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted22 = (o["x"]) as core.Map; unittest.expect(casted22, unittest.hasLength(3)); @@ -2575,20 +2585,20 @@ unittest.expect(casted23["string"], unittest.equals('foo')); } -buildUnnamed5184() { +buildUnnamed4395() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5184(core.List<api.SideInputInfo> o) { +checkUnnamed4395(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5185() { +buildUnnamed4396() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2603,7 +2613,7 @@ return o; } -checkUnnamed5185(core.Map<core.String, core.Object> o) { +checkUnnamed4396(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted24 = (o["x"]) as core.Map; unittest.expect(casted24, unittest.hasLength(3)); @@ -2623,11 +2633,11 @@ buildCounterPartialGroupByKeyInstruction++; if (buildCounterPartialGroupByKeyInstruction < 3) { o.input = buildInstructionInput(); - o.inputElementCodec = buildUnnamed5183(); + o.inputElementCodec = buildUnnamed4394(); o.originalCombineValuesInputStoreName = "foo"; o.originalCombineValuesStepName = "foo"; - o.sideInputs = buildUnnamed5184(); - o.valueCombiningFn = buildUnnamed5185(); + o.sideInputs = buildUnnamed4395(); + o.valueCombiningFn = buildUnnamed4396(); } buildCounterPartialGroupByKeyInstruction--; return o; @@ -2637,50 +2647,50 @@ buildCounterPartialGroupByKeyInstruction++; if (buildCounterPartialGroupByKeyInstruction < 3) { checkInstructionInput(o.input); - checkUnnamed5183(o.inputElementCodec); + checkUnnamed4394(o.inputElementCodec); unittest.expect( o.originalCombineValuesInputStoreName, unittest.equals('foo')); unittest.expect(o.originalCombineValuesStepName, unittest.equals('foo')); - checkUnnamed5184(o.sideInputs); - checkUnnamed5185(o.valueCombiningFn); + checkUnnamed4395(o.sideInputs); + checkUnnamed4396(o.valueCombiningFn); } buildCounterPartialGroupByKeyInstruction--; } -buildUnnamed5186() { +buildUnnamed4397() { var o = new core.List<api.DisplayData>(); o.add(buildDisplayData()); o.add(buildDisplayData()); return o; } -checkUnnamed5186(core.List<api.DisplayData> o) { +checkUnnamed4397(core.List<api.DisplayData> o) { unittest.expect(o, unittest.hasLength(2)); checkDisplayData(o[0]); checkDisplayData(o[1]); } -buildUnnamed5187() { +buildUnnamed4398() { var o = new core.List<api.ExecutionStageSummary>(); o.add(buildExecutionStageSummary()); o.add(buildExecutionStageSummary()); return o; } -checkUnnamed5187(core.List<api.ExecutionStageSummary> o) { +checkUnnamed4398(core.List<api.ExecutionStageSummary> o) { unittest.expect(o, unittest.hasLength(2)); checkExecutionStageSummary(o[0]); checkExecutionStageSummary(o[1]); } -buildUnnamed5188() { +buildUnnamed4399() { var o = new core.List<api.TransformSummary>(); o.add(buildTransformSummary()); o.add(buildTransformSummary()); return o; } -checkUnnamed5188(core.List<api.TransformSummary> o) { +checkUnnamed4399(core.List<api.TransformSummary> o) { unittest.expect(o, unittest.hasLength(2)); checkTransformSummary(o[0]); checkTransformSummary(o[1]); @@ -2691,9 +2701,9 @@ var o = new api.PipelineDescription(); buildCounterPipelineDescription++; if (buildCounterPipelineDescription < 3) { - o.displayData = buildUnnamed5186(); - o.executionPipelineStage = buildUnnamed5187(); - o.originalPipelineTransform = buildUnnamed5188(); + o.displayData = buildUnnamed4397(); + o.executionPipelineStage = buildUnnamed4398(); + o.originalPipelineTransform = buildUnnamed4399(); } buildCounterPipelineDescription--; return o; @@ -2702,9 +2712,9 @@ checkPipelineDescription(api.PipelineDescription o) { buildCounterPipelineDescription++; if (buildCounterPipelineDescription < 3) { - checkUnnamed5186(o.displayData); - checkUnnamed5187(o.executionPipelineStage); - checkUnnamed5188(o.originalPipelineTransform); + checkUnnamed4397(o.displayData); + checkUnnamed4398(o.executionPipelineStage); + checkUnnamed4399(o.originalPipelineTransform); } buildCounterPipelineDescription--; } @@ -2809,14 +2819,14 @@ buildCounterReadInstruction--; } -buildUnnamed5189() { +buildUnnamed4400() { var o = new core.List<api.WorkItemStatus>(); o.add(buildWorkItemStatus()); o.add(buildWorkItemStatus()); return o; } -checkUnnamed5189(core.List<api.WorkItemStatus> o) { +checkUnnamed4400(core.List<api.WorkItemStatus> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItemStatus(o[0]); checkWorkItemStatus(o[1]); @@ -2829,7 +2839,7 @@ if (buildCounterReportWorkItemStatusRequest < 3) { o.currentWorkerTime = "foo"; o.location = "foo"; - o.workItemStatuses = buildUnnamed5189(); + o.workItemStatuses = buildUnnamed4400(); o.workerId = "foo"; } buildCounterReportWorkItemStatusRequest--; @@ -2841,20 +2851,20 @@ if (buildCounterReportWorkItemStatusRequest < 3) { unittest.expect(o.currentWorkerTime, unittest.equals('foo')); unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5189(o.workItemStatuses); + checkUnnamed4400(o.workItemStatuses); unittest.expect(o.workerId, unittest.equals('foo')); } buildCounterReportWorkItemStatusRequest--; } -buildUnnamed5190() { +buildUnnamed4401() { var o = new core.List<api.WorkItemServiceState>(); o.add(buildWorkItemServiceState()); o.add(buildWorkItemServiceState()); return o; } -checkUnnamed5190(core.List<api.WorkItemServiceState> o) { +checkUnnamed4401(core.List<api.WorkItemServiceState> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkItemServiceState(o[0]); checkWorkItemServiceState(o[1]); @@ -2865,7 +2875,7 @@ var o = new api.ReportWorkItemStatusResponse(); buildCounterReportWorkItemStatusResponse++; if (buildCounterReportWorkItemStatusResponse < 3) { - o.workItemServiceStates = buildUnnamed5190(); + o.workItemServiceStates = buildUnnamed4401(); } buildCounterReportWorkItemStatusResponse--; return o; @@ -2874,7 +2884,7 @@ checkReportWorkItemStatusResponse(api.ReportWorkItemStatusResponse o) { buildCounterReportWorkItemStatusResponse++; if (buildCounterReportWorkItemStatusResponse < 3) { - checkUnnamed5190(o.workItemServiceStates); + checkUnnamed4401(o.workItemServiceStates); } buildCounterReportWorkItemStatusResponse--; } @@ -2900,14 +2910,14 @@ buildCounterReportedParallelism--; } -buildUnnamed5191() { +buildUnnamed4402() { var o = new core.List<api.CPUTime>(); o.add(buildCPUTime()); o.add(buildCPUTime()); return o; } -checkUnnamed5191(core.List<api.CPUTime> o) { +checkUnnamed4402(core.List<api.CPUTime> o) { unittest.expect(o, unittest.hasLength(2)); checkCPUTime(o[0]); checkCPUTime(o[1]); @@ -2918,7 +2928,7 @@ var o = new api.ResourceUtilizationReport(); buildCounterResourceUtilizationReport++; if (buildCounterResourceUtilizationReport < 3) { - o.cpuTime = buildUnnamed5191(); + o.cpuTime = buildUnnamed4402(); } buildCounterResourceUtilizationReport--; return o; @@ -2927,7 +2937,7 @@ checkResourceUtilizationReport(api.ResourceUtilizationReport o) { buildCounterResourceUtilizationReport++; if (buildCounterResourceUtilizationReport < 3) { - checkUnnamed5191(o.cpuTime); + checkUnnamed4402(o.cpuTime); } buildCounterResourceUtilizationReport--; } @@ -2948,29 +2958,44 @@ buildCounterResourceUtilizationReportResponse--; } -buildUnnamed5192() { +buildUnnamed4403() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5192(core.List<core.String> o) { +checkUnnamed4403(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } +buildUnnamed4404() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4404(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + core.int buildCounterRuntimeEnvironment = 0; buildRuntimeEnvironment() { var o = new api.RuntimeEnvironment(); buildCounterRuntimeEnvironment++; if (buildCounterRuntimeEnvironment < 3) { - o.additionalExperiments = buildUnnamed5192(); + o.additionalExperiments = buildUnnamed4403(); + o.additionalUserLabels = buildUnnamed4404(); o.bypassTempDirValidation = true; o.machineType = "foo"; o.maxWorkers = 42; o.network = "foo"; + o.numWorkers = 42; o.serviceAccountEmail = "foo"; o.subnetwork = "foo"; o.tempLocation = "foo"; @@ -2983,11 +3008,13 @@ checkRuntimeEnvironment(api.RuntimeEnvironment o) { buildCounterRuntimeEnvironment++; if (buildCounterRuntimeEnvironment < 3) { - checkUnnamed5192(o.additionalExperiments); + checkUnnamed4403(o.additionalExperiments); + checkUnnamed4404(o.additionalUserLabels); unittest.expect(o.bypassTempDirValidation, unittest.isTrue); unittest.expect(o.machineType, unittest.equals('foo')); unittest.expect(o.maxWorkers, unittest.equals(42)); unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.numWorkers, unittest.equals(42)); unittest.expect(o.serviceAccountEmail, unittest.equals('foo')); unittest.expect(o.subnetwork, unittest.equals('foo')); unittest.expect(o.tempLocation, unittest.equals('foo')); @@ -3059,14 +3086,14 @@ buildCounterSendDebugCaptureResponse--; } -buildUnnamed5193() { +buildUnnamed4405() { var o = new core.List<api.WorkerMessage>(); o.add(buildWorkerMessage()); o.add(buildWorkerMessage()); return o; } -checkUnnamed5193(core.List<api.WorkerMessage> o) { +checkUnnamed4405(core.List<api.WorkerMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerMessage(o[0]); checkWorkerMessage(o[1]); @@ -3078,7 +3105,7 @@ buildCounterSendWorkerMessagesRequest++; if (buildCounterSendWorkerMessagesRequest < 3) { o.location = "foo"; - o.workerMessages = buildUnnamed5193(); + o.workerMessages = buildUnnamed4405(); } buildCounterSendWorkerMessagesRequest--; return o; @@ -3088,19 +3115,19 @@ buildCounterSendWorkerMessagesRequest++; if (buildCounterSendWorkerMessagesRequest < 3) { unittest.expect(o.location, unittest.equals('foo')); - checkUnnamed5193(o.workerMessages); + checkUnnamed4405(o.workerMessages); } buildCounterSendWorkerMessagesRequest--; } -buildUnnamed5194() { +buildUnnamed4406() { var o = new core.List<api.WorkerMessageResponse>(); o.add(buildWorkerMessageResponse()); o.add(buildWorkerMessageResponse()); return o; } -checkUnnamed5194(core.List<api.WorkerMessageResponse> o) { +checkUnnamed4406(core.List<api.WorkerMessageResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkWorkerMessageResponse(o[0]); checkWorkerMessageResponse(o[1]); @@ -3111,7 +3138,7 @@ var o = new api.SendWorkerMessagesResponse(); buildCounterSendWorkerMessagesResponse++; if (buildCounterSendWorkerMessagesResponse < 3) { - o.workerMessageResponses = buildUnnamed5194(); + o.workerMessageResponses = buildUnnamed4406(); } buildCounterSendWorkerMessagesResponse--; return o; @@ -3120,38 +3147,38 @@ checkSendWorkerMessagesResponse(api.SendWorkerMessagesResponse o) { buildCounterSendWorkerMessagesResponse++; if (buildCounterSendWorkerMessagesResponse < 3) { - checkUnnamed5194(o.workerMessageResponses); + checkUnnamed4406(o.workerMessageResponses); } buildCounterSendWorkerMessagesResponse--; } -buildUnnamed5195() { +buildUnnamed4407() { var o = new core.List<api.SideInputInfo>(); o.add(buildSideInputInfo()); o.add(buildSideInputInfo()); return o; } -checkUnnamed5195(core.List<api.SideInputInfo> o) { +checkUnnamed4407(core.List<api.SideInputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSideInputInfo(o[0]); checkSideInputInfo(o[1]); } -buildUnnamed5196() { +buildUnnamed4408() { var o = new core.List<api.SeqMapTaskOutputInfo>(); o.add(buildSeqMapTaskOutputInfo()); o.add(buildSeqMapTaskOutputInfo()); return o; } -checkUnnamed5196(core.List<api.SeqMapTaskOutputInfo> o) { +checkUnnamed4408(core.List<api.SeqMapTaskOutputInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkSeqMapTaskOutputInfo(o[0]); checkSeqMapTaskOutputInfo(o[1]); } -buildUnnamed5197() { +buildUnnamed4409() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3166,7 +3193,7 @@ return o; } -checkUnnamed5197(core.Map<core.String, core.Object> o) { +checkUnnamed4409(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted26 = (o["x"]) as core.Map; unittest.expect(casted26, unittest.hasLength(3)); @@ -3185,12 +3212,12 @@ var o = new api.SeqMapTask(); buildCounterSeqMapTask++; if (buildCounterSeqMapTask < 3) { - o.inputs = buildUnnamed5195(); + o.inputs = buildUnnamed4407(); o.name = "foo"; - o.outputInfos = buildUnnamed5196(); + o.outputInfos = buildUnnamed4408(); o.stageName = "foo"; o.systemName = "foo"; - o.userFn = buildUnnamed5197(); + o.userFn = buildUnnamed4409(); } buildCounterSeqMapTask--; return o; @@ -3199,12 +3226,12 @@ checkSeqMapTask(api.SeqMapTask o) { buildCounterSeqMapTask++; if (buildCounterSeqMapTask < 3) { - checkUnnamed5195(o.inputs); + checkUnnamed4407(o.inputs); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5196(o.outputInfos); + checkUnnamed4408(o.outputInfos); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); - checkUnnamed5197(o.userFn); + checkUnnamed4409(o.userFn); } buildCounterSeqMapTask--; } @@ -3251,7 +3278,7 @@ buildCounterShellTask--; } -buildUnnamed5198() { +buildUnnamed4410() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3266,7 +3293,7 @@ return o; } -checkUnnamed5198(core.Map<core.String, core.Object> o) { +checkUnnamed4410(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted28 = (o["x"]) as core.Map; unittest.expect(casted28, unittest.hasLength(3)); @@ -3280,14 +3307,14 @@ unittest.expect(casted29["string"], unittest.equals('foo')); } -buildUnnamed5199() { +buildUnnamed4411() { var o = new core.List<api.Source>(); o.add(buildSource()); o.add(buildSource()); return o; } -checkUnnamed5199(core.List<api.Source> o) { +checkUnnamed4411(core.List<api.Source> o) { unittest.expect(o, unittest.hasLength(2)); checkSource(o[0]); checkSource(o[1]); @@ -3298,8 +3325,8 @@ var o = new api.SideInputInfo(); buildCounterSideInputInfo++; if (buildCounterSideInputInfo < 3) { - o.kind = buildUnnamed5198(); - o.sources = buildUnnamed5199(); + o.kind = buildUnnamed4410(); + o.sources = buildUnnamed4411(); o.tag = "foo"; } buildCounterSideInputInfo--; @@ -3309,14 +3336,14 @@ checkSideInputInfo(api.SideInputInfo o) { buildCounterSideInputInfo++; if (buildCounterSideInputInfo < 3) { - checkUnnamed5198(o.kind); - checkUnnamed5199(o.sources); + checkUnnamed4410(o.kind); + checkUnnamed4411(o.sources); unittest.expect(o.tag, unittest.equals('foo')); } buildCounterSideInputInfo--; } -buildUnnamed5200() { +buildUnnamed4412() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3331,7 +3358,7 @@ return o; } -checkUnnamed5200(core.Map<core.String, core.Object> o) { +checkUnnamed4412(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted30 = (o["x"]) as core.Map; unittest.expect(casted30, unittest.hasLength(3)); @@ -3345,7 +3372,7 @@ unittest.expect(casted31["string"], unittest.equals('foo')); } -buildUnnamed5201() { +buildUnnamed4413() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3360,7 +3387,7 @@ return o; } -checkUnnamed5201(core.Map<core.String, core.Object> o) { +checkUnnamed4413(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted32 = (o["x"]) as core.Map; unittest.expect(casted32, unittest.hasLength(3)); @@ -3379,8 +3406,8 @@ var o = new api.Sink(); buildCounterSink++; if (buildCounterSink < 3) { - o.codec = buildUnnamed5200(); - o.spec = buildUnnamed5201(); + o.codec = buildUnnamed4412(); + o.spec = buildUnnamed4413(); } buildCounterSink--; return o; @@ -3389,13 +3416,61 @@ checkSink(api.Sink o) { buildCounterSink++; if (buildCounterSink < 3) { - checkUnnamed5200(o.codec); - checkUnnamed5201(o.spec); + checkUnnamed4412(o.codec); + checkUnnamed4413(o.spec); } buildCounterSink--; } -buildUnnamed5202() { +core.int buildCounterSnapshot = 0; +buildSnapshot() { + var o = new api.Snapshot(); + buildCounterSnapshot++; + if (buildCounterSnapshot < 3) { + o.creationTime = "foo"; + o.id = "foo"; + o.projectId = "foo"; + o.sourceJobId = "foo"; + o.ttl = "foo"; + } + buildCounterSnapshot--; + return o; +} + +checkSnapshot(api.Snapshot o) { + buildCounterSnapshot++; + if (buildCounterSnapshot < 3) { + unittest.expect(o.creationTime, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.projectId, unittest.equals('foo')); + unittest.expect(o.sourceJobId, unittest.equals('foo')); + unittest.expect(o.ttl, unittest.equals('foo')); + } + buildCounterSnapshot--; +} + +core.int buildCounterSnapshotJobRequest = 0; +buildSnapshotJobRequest() { + var o = new api.SnapshotJobRequest(); + buildCounterSnapshotJobRequest++; + if (buildCounterSnapshotJobRequest < 3) { + o.location = "foo"; + o.ttl = "foo"; + } + buildCounterSnapshotJobRequest--; + return o; +} + +checkSnapshotJobRequest(api.SnapshotJobRequest o) { + buildCounterSnapshotJobRequest++; + if (buildCounterSnapshotJobRequest < 3) { + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.ttl, unittest.equals('foo')); + } + buildCounterSnapshotJobRequest--; +} + +buildUnnamed4414() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3410,7 +3485,7 @@ return o; } -checkUnnamed5202(core.Map<core.String, core.Object> o) { +checkUnnamed4414(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted34 = (o["x"]) as core.Map; unittest.expect(casted34, unittest.hasLength(3)); @@ -3424,20 +3499,20 @@ unittest.expect(casted35["string"], unittest.equals('foo')); } -buildUnnamed5203() { +buildUnnamed4415() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5202()); - o.add(buildUnnamed5202()); + o.add(buildUnnamed4414()); + o.add(buildUnnamed4414()); return o; } -checkUnnamed5203(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4415(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5202(o[0]); - checkUnnamed5202(o[1]); + checkUnnamed4414(o[0]); + checkUnnamed4414(o[1]); } -buildUnnamed5204() { +buildUnnamed4416() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3452,7 +3527,7 @@ return o; } -checkUnnamed5204(core.Map<core.String, core.Object> o) { +checkUnnamed4416(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted36 = (o["x"]) as core.Map; unittest.expect(casted36, unittest.hasLength(3)); @@ -3466,7 +3541,7 @@ unittest.expect(casted37["string"], unittest.equals('foo')); } -buildUnnamed5205() { +buildUnnamed4417() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3481,7 +3556,7 @@ return o; } -checkUnnamed5205(core.Map<core.String, core.Object> o) { +checkUnnamed4417(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted38 = (o["x"]) as core.Map; unittest.expect(casted38, unittest.hasLength(3)); @@ -3500,11 +3575,11 @@ var o = new api.Source(); buildCounterSource++; if (buildCounterSource < 3) { - o.baseSpecs = buildUnnamed5203(); - o.codec = buildUnnamed5204(); + o.baseSpecs = buildUnnamed4415(); + o.codec = buildUnnamed4416(); o.doesNotNeedSplitting = true; o.metadata = buildSourceMetadata(); - o.spec = buildUnnamed5205(); + o.spec = buildUnnamed4417(); } buildCounterSource--; return o; @@ -3513,11 +3588,11 @@ checkSource(api.Source o) { buildCounterSource++; if (buildCounterSource < 3) { - checkUnnamed5203(o.baseSpecs); - checkUnnamed5204(o.codec); + checkUnnamed4415(o.baseSpecs); + checkUnnamed4416(o.codec); unittest.expect(o.doesNotNeedSplitting, unittest.isTrue); checkSourceMetadata(o.metadata); - checkUnnamed5205(o.spec); + checkUnnamed4417(o.spec); } buildCounterSource--; } @@ -3700,27 +3775,27 @@ buildCounterSourceSplitRequest--; } -buildUnnamed5206() { +buildUnnamed4418() { var o = new core.List<api.DerivedSource>(); o.add(buildDerivedSource()); o.add(buildDerivedSource()); return o; } -checkUnnamed5206(core.List<api.DerivedSource> o) { +checkUnnamed4418(core.List<api.DerivedSource> o) { unittest.expect(o, unittest.hasLength(2)); checkDerivedSource(o[0]); checkDerivedSource(o[1]); } -buildUnnamed5207() { +buildUnnamed4419() { var o = new core.List<api.SourceSplitShard>(); o.add(buildSourceSplitShard()); o.add(buildSourceSplitShard()); return o; } -checkUnnamed5207(core.List<api.SourceSplitShard> o) { +checkUnnamed4419(core.List<api.SourceSplitShard> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceSplitShard(o[0]); checkSourceSplitShard(o[1]); @@ -3731,9 +3806,9 @@ var o = new api.SourceSplitResponse(); buildCounterSourceSplitResponse++; if (buildCounterSourceSplitResponse < 3) { - o.bundles = buildUnnamed5206(); + o.bundles = buildUnnamed4418(); o.outcome = "foo"; - o.shards = buildUnnamed5207(); + o.shards = buildUnnamed4419(); } buildCounterSourceSplitResponse--; return o; @@ -3742,9 +3817,9 @@ checkSourceSplitResponse(api.SourceSplitResponse o) { buildCounterSourceSplitResponse++; if (buildCounterSourceSplitResponse < 3) { - checkUnnamed5206(o.bundles); + checkUnnamed4418(o.bundles); unittest.expect(o.outcome, unittest.equals('foo')); - checkUnnamed5207(o.shards); + checkUnnamed4419(o.shards); } buildCounterSourceSplitResponse--; } @@ -3860,7 +3935,7 @@ buildCounterStateFamilyConfig--; } -buildUnnamed5208() { +buildUnnamed4420() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3875,7 +3950,7 @@ return o; } -checkUnnamed5208(core.Map<core.String, core.Object> o) { +checkUnnamed4420(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted40 = (o["x"]) as core.Map; unittest.expect(casted40, unittest.hasLength(3)); @@ -3889,17 +3964,17 @@ unittest.expect(casted41["string"], unittest.equals('foo')); } -buildUnnamed5209() { +buildUnnamed4421() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5208()); - o.add(buildUnnamed5208()); + o.add(buildUnnamed4420()); + o.add(buildUnnamed4420()); return o; } -checkUnnamed5209(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4421(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5208(o[0]); - checkUnnamed5208(o[1]); + checkUnnamed4420(o[0]); + checkUnnamed4420(o[1]); } core.int buildCounterStatus = 0; @@ -3908,7 +3983,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5209(); + o.details = buildUnnamed4421(); o.message = "foo"; } buildCounterStatus--; @@ -3919,13 +3994,13 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5209(o.details); + checkUnnamed4421(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5210() { +buildUnnamed4422() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3940,7 +4015,7 @@ return o; } -checkUnnamed5210(core.Map<core.String, core.Object> o) { +checkUnnamed4422(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted42 = (o["x"]) as core.Map; unittest.expect(casted42, unittest.hasLength(3)); @@ -3961,7 +4036,7 @@ if (buildCounterStep < 3) { o.kind = "foo"; o.name = "foo"; - o.properties = buildUnnamed5210(); + o.properties = buildUnnamed4422(); } buildCounterStep--; return o; @@ -3972,7 +4047,7 @@ if (buildCounterStep < 3) { unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5210(o.properties); + checkUnnamed4422(o.properties); } buildCounterStep--; } @@ -4002,14 +4077,35 @@ buildCounterStreamLocation--; } -buildUnnamed5211() { +core.int buildCounterStreamingApplianceSnapshotConfig = 0; +buildStreamingApplianceSnapshotConfig() { + var o = new api.StreamingApplianceSnapshotConfig(); + buildCounterStreamingApplianceSnapshotConfig++; + if (buildCounterStreamingApplianceSnapshotConfig < 3) { + o.importStateEndpoint = "foo"; + o.snapshotId = "foo"; + } + buildCounterStreamingApplianceSnapshotConfig--; + return o; +} + +checkStreamingApplianceSnapshotConfig(api.StreamingApplianceSnapshotConfig o) { + buildCounterStreamingApplianceSnapshotConfig++; + if (buildCounterStreamingApplianceSnapshotConfig < 3) { + unittest.expect(o.importStateEndpoint, unittest.equals('foo')); + unittest.expect(o.snapshotId, unittest.equals('foo')); + } + buildCounterStreamingApplianceSnapshotConfig--; +} + +buildUnnamed4423() { var o = new core.List<api.ParallelInstruction>(); o.add(buildParallelInstruction()); o.add(buildParallelInstruction()); return o; } -checkUnnamed5211(core.List<api.ParallelInstruction> o) { +checkUnnamed4423(core.List<api.ParallelInstruction> o) { unittest.expect(o, unittest.hasLength(2)); checkParallelInstruction(o[0]); checkParallelInstruction(o[1]); @@ -4021,7 +4117,7 @@ buildCounterStreamingComputationConfig++; if (buildCounterStreamingComputationConfig < 3) { o.computationId = "foo"; - o.instructions = buildUnnamed5211(); + o.instructions = buildUnnamed4423(); o.stageName = "foo"; o.systemName = "foo"; } @@ -4033,21 +4129,21 @@ buildCounterStreamingComputationConfig++; if (buildCounterStreamingComputationConfig < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5211(o.instructions); + checkUnnamed4423(o.instructions); unittest.expect(o.stageName, unittest.equals('foo')); unittest.expect(o.systemName, unittest.equals('foo')); } buildCounterStreamingComputationConfig--; } -buildUnnamed5212() { +buildUnnamed4424() { var o = new core.List<api.KeyRangeDataDiskAssignment>(); o.add(buildKeyRangeDataDiskAssignment()); o.add(buildKeyRangeDataDiskAssignment()); return o; } -checkUnnamed5212(core.List<api.KeyRangeDataDiskAssignment> o) { +checkUnnamed4424(core.List<api.KeyRangeDataDiskAssignment> o) { unittest.expect(o, unittest.hasLength(2)); checkKeyRangeDataDiskAssignment(o[0]); checkKeyRangeDataDiskAssignment(o[1]); @@ -4059,7 +4155,7 @@ buildCounterStreamingComputationRanges++; if (buildCounterStreamingComputationRanges < 3) { o.computationId = "foo"; - o.rangeAssignments = buildUnnamed5212(); + o.rangeAssignments = buildUnnamed4424(); } buildCounterStreamingComputationRanges--; return o; @@ -4069,32 +4165,32 @@ buildCounterStreamingComputationRanges++; if (buildCounterStreamingComputationRanges < 3) { unittest.expect(o.computationId, unittest.equals('foo')); - checkUnnamed5212(o.rangeAssignments); + checkUnnamed4424(o.rangeAssignments); } buildCounterStreamingComputationRanges--; } -buildUnnamed5213() { +buildUnnamed4425() { var o = new core.List<api.StreamingComputationRanges>(); o.add(buildStreamingComputationRanges()); o.add(buildStreamingComputationRanges()); return o; } -checkUnnamed5213(core.List<api.StreamingComputationRanges> o) { +checkUnnamed4425(core.List<api.StreamingComputationRanges> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamingComputationRanges(o[0]); checkStreamingComputationRanges(o[1]); } -buildUnnamed5214() { +buildUnnamed4426() { var o = new core.List<api.MountedDataDisk>(); o.add(buildMountedDataDisk()); o.add(buildMountedDataDisk()); return o; } -checkUnnamed5214(core.List<api.MountedDataDisk> o) { +checkUnnamed4426(core.List<api.MountedDataDisk> o) { unittest.expect(o, unittest.hasLength(2)); checkMountedDataDisk(o[0]); checkMountedDataDisk(o[1]); @@ -4105,8 +4201,8 @@ var o = new api.StreamingComputationTask(); buildCounterStreamingComputationTask++; if (buildCounterStreamingComputationTask < 3) { - o.computationRanges = buildUnnamed5213(); - o.dataDisks = buildUnnamed5214(); + o.computationRanges = buildUnnamed4425(); + o.dataDisks = buildUnnamed4426(); o.taskType = "foo"; } buildCounterStreamingComputationTask--; @@ -4116,34 +4212,34 @@ checkStreamingComputationTask(api.StreamingComputationTask o) { buildCounterStreamingComputationTask++; if (buildCounterStreamingComputationTask < 3) { - checkUnnamed5213(o.computationRanges); - checkUnnamed5214(o.dataDisks); + checkUnnamed4425(o.computationRanges); + checkUnnamed4426(o.dataDisks); unittest.expect(o.taskType, unittest.equals('foo')); } buildCounterStreamingComputationTask--; } -buildUnnamed5215() { +buildUnnamed4427() { var o = new core.List<api.StreamingComputationConfig>(); o.add(buildStreamingComputationConfig()); o.add(buildStreamingComputationConfig()); return o; } -checkUnnamed5215(core.List<api.StreamingComputationConfig> o) { +checkUnnamed4427(core.List<api.StreamingComputationConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkStreamingComputationConfig(o[0]); checkStreamingComputationConfig(o[1]); } -buildUnnamed5216() { +buildUnnamed4428() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5216(core.Map<core.String, core.String> o) { +checkUnnamed4428(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4154,8 +4250,8 @@ var o = new api.StreamingConfigTask(); buildCounterStreamingConfigTask++; if (buildCounterStreamingConfigTask < 3) { - o.streamingComputationConfigs = buildUnnamed5215(); - o.userStepToStateFamilyNameMap = buildUnnamed5216(); + o.streamingComputationConfigs = buildUnnamed4427(); + o.userStepToStateFamilyNameMap = buildUnnamed4428(); o.windmillServiceEndpoint = "foo"; o.windmillServicePort = "foo"; } @@ -4166,8 +4262,8 @@ checkStreamingConfigTask(api.StreamingConfigTask o) { buildCounterStreamingConfigTask++; if (buildCounterStreamingConfigTask < 3) { - checkUnnamed5215(o.streamingComputationConfigs); - checkUnnamed5216(o.userStepToStateFamilyNameMap); + checkUnnamed4427(o.streamingComputationConfigs); + checkUnnamed4428(o.userStepToStateFamilyNameMap); unittest.expect(o.windmillServiceEndpoint, unittest.equals('foo')); unittest.expect(o.windmillServicePort, unittest.equals('foo')); } @@ -4181,6 +4277,7 @@ if (buildCounterStreamingSetupTask < 3) { o.drain = true; o.receiveWorkPort = 42; + o.snapshotConfig = buildStreamingApplianceSnapshotConfig(); o.streamingComputationTopology = buildTopologyConfig(); o.workerHarnessPort = 42; } @@ -4193,6 +4290,7 @@ if (buildCounterStreamingSetupTask < 3) { unittest.expect(o.drain, unittest.isTrue); unittest.expect(o.receiveWorkPort, unittest.equals(42)); + checkStreamingApplianceSnapshotConfig(o.snapshotConfig); checkTopologyConfig(o.streamingComputationTopology); unittest.expect(o.workerHarnessPort, unittest.equals(42)); } @@ -4239,14 +4337,14 @@ buildCounterStreamingStageLocation--; } -buildUnnamed5217() { +buildUnnamed4429() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5217(core.List<core.String> o) { +checkUnnamed4429(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4257,7 +4355,7 @@ var o = new api.StringList(); buildCounterStringList++; if (buildCounterStringList < 3) { - o.elements = buildUnnamed5217(); + o.elements = buildUnnamed4429(); } buildCounterStringList--; return o; @@ -4266,19 +4364,19 @@ checkStringList(api.StringList o) { buildCounterStringList++; if (buildCounterStringList < 3) { - checkUnnamed5217(o.elements); + checkUnnamed4429(o.elements); } buildCounterStringList--; } -buildUnnamed5218() { +buildUnnamed4430() { var o = new core.List<api.Parameter>(); o.add(buildParameter()); o.add(buildParameter()); return o; } -checkUnnamed5218(core.List<api.Parameter> o) { +checkUnnamed4430(core.List<api.Parameter> o) { unittest.expect(o, unittest.hasLength(2)); checkParameter(o[0]); checkParameter(o[1]); @@ -4291,7 +4389,7 @@ if (buildCounterStructuredMessage < 3) { o.messageKey = "foo"; o.messageText = "foo"; - o.parameters = buildUnnamed5218(); + o.parameters = buildUnnamed4430(); } buildCounterStructuredMessage--; return o; @@ -4302,19 +4400,19 @@ if (buildCounterStructuredMessage < 3) { unittest.expect(o.messageKey, unittest.equals('foo')); unittest.expect(o.messageText, unittest.equals('foo')); - checkUnnamed5218(o.parameters); + checkUnnamed4430(o.parameters); } buildCounterStructuredMessage--; } -buildUnnamed5219() { +buildUnnamed4431() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5219(core.List<core.String> o) { +checkUnnamed4431(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4336,7 +4434,7 @@ o.logDir = "foo"; o.logToSerialconsole = true; o.logUploadLocation = "foo"; - o.oauthScopes = buildUnnamed5219(); + o.oauthScopes = buildUnnamed4431(); o.parallelWorkerSettings = buildWorkerSettings(); o.streamingWorkerMainClass = "foo"; o.taskGroup = "foo"; @@ -4363,7 +4461,7 @@ unittest.expect(o.logDir, unittest.equals('foo')); unittest.expect(o.logToSerialconsole, unittest.isTrue); unittest.expect(o.logUploadLocation, unittest.equals('foo')); - checkUnnamed5219(o.oauthScopes); + checkUnnamed4431(o.oauthScopes); checkWorkerSettings(o.parallelWorkerSettings); unittest.expect(o.streamingWorkerMainClass, unittest.equals('foo')); unittest.expect(o.taskGroup, unittest.equals('foo')); @@ -4375,14 +4473,14 @@ buildCounterTaskRunnerSettings--; } -buildUnnamed5220() { +buildUnnamed4432() { var o = new core.List<api.ParameterMetadata>(); o.add(buildParameterMetadata()); o.add(buildParameterMetadata()); return o; } -checkUnnamed5220(core.List<api.ParameterMetadata> o) { +checkUnnamed4432(core.List<api.ParameterMetadata> o) { unittest.expect(o, unittest.hasLength(2)); checkParameterMetadata(o[0]); checkParameterMetadata(o[1]); @@ -4395,7 +4493,7 @@ if (buildCounterTemplateMetadata < 3) { o.description = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5220(); + o.parameters = buildUnnamed4432(); } buildCounterTemplateMetadata--; return o; @@ -4406,45 +4504,45 @@ if (buildCounterTemplateMetadata < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5220(o.parameters); + checkUnnamed4432(o.parameters); } buildCounterTemplateMetadata--; } -buildUnnamed5221() { +buildUnnamed4433() { var o = new core.List<api.ComputationTopology>(); o.add(buildComputationTopology()); o.add(buildComputationTopology()); return o; } -checkUnnamed5221(core.List<api.ComputationTopology> o) { +checkUnnamed4433(core.List<api.ComputationTopology> o) { unittest.expect(o, unittest.hasLength(2)); checkComputationTopology(o[0]); checkComputationTopology(o[1]); } -buildUnnamed5222() { +buildUnnamed4434() { var o = new core.List<api.DataDiskAssignment>(); o.add(buildDataDiskAssignment()); o.add(buildDataDiskAssignment()); return o; } -checkUnnamed5222(core.List<api.DataDiskAssignment> o) { +checkUnnamed4434(core.List<api.DataDiskAssignment> o) { unittest.expect(o, unittest.hasLength(2)); checkDataDiskAssignment(o[0]); checkDataDiskAssignment(o[1]); } -buildUnnamed5223() { +buildUnnamed4435() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5223(core.Map<core.String, core.String> o) { +checkUnnamed4435(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4455,11 +4553,11 @@ var o = new api.TopologyConfig(); buildCounterTopologyConfig++; if (buildCounterTopologyConfig < 3) { - o.computations = buildUnnamed5221(); - o.dataDiskAssignments = buildUnnamed5222(); + o.computations = buildUnnamed4433(); + o.dataDiskAssignments = buildUnnamed4434(); o.forwardingKeyBits = 42; o.persistentStateVersion = 42; - o.userStageToComputationNameMap = buildUnnamed5223(); + o.userStageToComputationNameMap = buildUnnamed4435(); } buildCounterTopologyConfig--; return o; @@ -4468,49 +4566,49 @@ checkTopologyConfig(api.TopologyConfig o) { buildCounterTopologyConfig++; if (buildCounterTopologyConfig < 3) { - checkUnnamed5221(o.computations); - checkUnnamed5222(o.dataDiskAssignments); + checkUnnamed4433(o.computations); + checkUnnamed4434(o.dataDiskAssignments); unittest.expect(o.forwardingKeyBits, unittest.equals(42)); unittest.expect(o.persistentStateVersion, unittest.equals(42)); - checkUnnamed5223(o.userStageToComputationNameMap); + checkUnnamed4435(o.userStageToComputationNameMap); } buildCounterTopologyConfig--; } -buildUnnamed5224() { +buildUnnamed4436() { var o = new core.List<api.DisplayData>(); o.add(buildDisplayData()); o.add(buildDisplayData()); return o; } -checkUnnamed5224(core.List<api.DisplayData> o) { +checkUnnamed4436(core.List<api.DisplayData> o) { unittest.expect(o, unittest.hasLength(2)); checkDisplayData(o[0]); checkDisplayData(o[1]); } -buildUnnamed5225() { +buildUnnamed4437() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5225(core.List<core.String> o) { +checkUnnamed4437(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5226() { +buildUnnamed4438() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5226(core.List<core.String> o) { +checkUnnamed4438(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4521,12 +4619,12 @@ var o = new api.TransformSummary(); buildCounterTransformSummary++; if (buildCounterTransformSummary < 3) { - o.displayData = buildUnnamed5224(); + o.displayData = buildUnnamed4436(); o.id = "foo"; - o.inputCollectionName = buildUnnamed5225(); + o.inputCollectionName = buildUnnamed4437(); o.kind = "foo"; o.name = "foo"; - o.outputCollectionName = buildUnnamed5226(); + o.outputCollectionName = buildUnnamed4438(); } buildCounterTransformSummary--; return o; @@ -4535,24 +4633,24 @@ checkTransformSummary(api.TransformSummary o) { buildCounterTransformSummary++; if (buildCounterTransformSummary < 3) { - checkUnnamed5224(o.displayData); + checkUnnamed4436(o.displayData); unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5225(o.inputCollectionName); + checkUnnamed4437(o.inputCollectionName); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5226(o.outputCollectionName); + checkUnnamed4438(o.outputCollectionName); } buildCounterTransformSummary--; } -buildUnnamed5227() { +buildUnnamed4439() { var o = new core.List<api.Package>(); o.add(buildPackage()); o.add(buildPackage()); return o; } -checkUnnamed5227(core.List<api.Package> o) { +checkUnnamed4439(core.List<api.Package> o) { unittest.expect(o, unittest.hasLength(2)); checkPackage(o[0]); checkPackage(o[1]); @@ -4569,7 +4667,7 @@ o.jobId = "foo"; o.leaseExpireTime = "foo"; o.mapTask = buildMapTask(); - o.packages = buildUnnamed5227(); + o.packages = buildUnnamed4439(); o.projectId = "foo"; o.reportStatusInterval = "foo"; o.seqMapTask = buildSeqMapTask(); @@ -4592,7 +4690,7 @@ unittest.expect(o.jobId, unittest.equals('foo')); unittest.expect(o.leaseExpireTime, unittest.equals('foo')); checkMapTask(o.mapTask); - checkUnnamed5227(o.packages); + checkUnnamed4439(o.packages); unittest.expect(o.projectId, unittest.equals('foo')); unittest.expect(o.reportStatusInterval, unittest.equals('foo')); checkSeqMapTask(o.seqMapTask); @@ -4605,7 +4703,7 @@ buildCounterWorkItem--; } -buildUnnamed5228() { +buildUnnamed4440() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4620,7 +4718,7 @@ return o; } -checkUnnamed5228(core.Map<core.String, core.Object> o) { +checkUnnamed4440(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted44 = (o["x"]) as core.Map; unittest.expect(casted44, unittest.hasLength(3)); @@ -4634,14 +4732,14 @@ unittest.expect(casted45["string"], unittest.equals('foo')); } -buildUnnamed5229() { +buildUnnamed4441() { var o = new core.List<api.MetricShortId>(); o.add(buildMetricShortId()); o.add(buildMetricShortId()); return o; } -checkUnnamed5229(core.List<api.MetricShortId> o) { +checkUnnamed4441(core.List<api.MetricShortId> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricShortId(o[0]); checkMetricShortId(o[1]); @@ -4652,9 +4750,9 @@ var o = new api.WorkItemServiceState(); buildCounterWorkItemServiceState++; if (buildCounterWorkItemServiceState < 3) { - o.harnessData = buildUnnamed5228(); + o.harnessData = buildUnnamed4440(); o.leaseExpireTime = "foo"; - o.metricShortId = buildUnnamed5229(); + o.metricShortId = buildUnnamed4441(); o.nextReportIndex = "foo"; o.reportStatusInterval = "foo"; o.splitRequest = buildApproximateSplitRequest(); @@ -4668,9 +4766,9 @@ checkWorkItemServiceState(api.WorkItemServiceState o) { buildCounterWorkItemServiceState++; if (buildCounterWorkItemServiceState < 3) { - checkUnnamed5228(o.harnessData); + checkUnnamed4440(o.harnessData); unittest.expect(o.leaseExpireTime, unittest.equals('foo')); - checkUnnamed5229(o.metricShortId); + checkUnnamed4441(o.metricShortId); unittest.expect(o.nextReportIndex, unittest.equals('foo')); unittest.expect(o.reportStatusInterval, unittest.equals('foo')); checkApproximateSplitRequest(o.splitRequest); @@ -4680,40 +4778,40 @@ buildCounterWorkItemServiceState--; } -buildUnnamed5230() { +buildUnnamed4442() { var o = new core.List<api.CounterUpdate>(); o.add(buildCounterUpdate()); o.add(buildCounterUpdate()); return o; } -checkUnnamed5230(core.List<api.CounterUpdate> o) { +checkUnnamed4442(core.List<api.CounterUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkCounterUpdate(o[0]); checkCounterUpdate(o[1]); } -buildUnnamed5231() { +buildUnnamed4443() { var o = new core.List<api.Status>(); o.add(buildStatus()); o.add(buildStatus()); return o; } -checkUnnamed5231(core.List<api.Status> o) { +checkUnnamed4443(core.List<api.Status> o) { unittest.expect(o, unittest.hasLength(2)); checkStatus(o[0]); checkStatus(o[1]); } -buildUnnamed5232() { +buildUnnamed4444() { var o = new core.List<api.MetricUpdate>(); o.add(buildMetricUpdate()); o.add(buildMetricUpdate()); return o; } -checkUnnamed5232(core.List<api.MetricUpdate> o) { +checkUnnamed4444(core.List<api.MetricUpdate> o) { unittest.expect(o, unittest.hasLength(2)); checkMetricUpdate(o[0]); checkMetricUpdate(o[1]); @@ -4725,10 +4823,10 @@ buildCounterWorkItemStatus++; if (buildCounterWorkItemStatus < 3) { o.completed = true; - o.counterUpdates = buildUnnamed5230(); + o.counterUpdates = buildUnnamed4442(); o.dynamicSourceSplit = buildDynamicSourceSplit(); - o.errors = buildUnnamed5231(); - o.metricUpdates = buildUnnamed5232(); + o.errors = buildUnnamed4443(); + o.metricUpdates = buildUnnamed4444(); o.progress = buildApproximateProgress(); o.reportIndex = "foo"; o.reportedProgress = buildApproximateReportedProgress(); @@ -4747,10 +4845,10 @@ buildCounterWorkItemStatus++; if (buildCounterWorkItemStatus < 3) { unittest.expect(o.completed, unittest.isTrue); - checkUnnamed5230(o.counterUpdates); + checkUnnamed4442(o.counterUpdates); checkDynamicSourceSplit(o.dynamicSourceSplit); - checkUnnamed5231(o.errors); - checkUnnamed5232(o.metricUpdates); + checkUnnamed4443(o.errors); + checkUnnamed4444(o.metricUpdates); checkApproximateProgress(o.progress); unittest.expect(o.reportIndex, unittest.equals('foo')); checkApproximateReportedProgress(o.reportedProgress); @@ -4764,7 +4862,7 @@ buildCounterWorkItemStatus--; } -buildUnnamed5233() { +buildUnnamed4445() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4779,7 +4877,7 @@ return o; } -checkUnnamed5233(core.Map<core.String, core.Object> o) { +checkUnnamed4445(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted46 = (o["x"]) as core.Map; unittest.expect(casted46, unittest.hasLength(3)); @@ -4793,17 +4891,17 @@ unittest.expect(casted47["string"], unittest.equals('foo')); } -buildUnnamed5234() { +buildUnnamed4446() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5233()); - o.add(buildUnnamed5233()); + o.add(buildUnnamed4445()); + o.add(buildUnnamed4445()); return o; } -checkUnnamed5234(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4446(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5233(o[0]); - checkUnnamed5233(o[1]); + checkUnnamed4445(o[0]); + checkUnnamed4445(o[1]); } core.int buildCounterWorkerHealthReport = 0; @@ -4811,7 +4909,7 @@ var o = new api.WorkerHealthReport(); buildCounterWorkerHealthReport++; if (buildCounterWorkerHealthReport < 3) { - o.pods = buildUnnamed5234(); + o.pods = buildUnnamed4446(); o.reportInterval = "foo"; o.vmIsHealthy = true; o.vmStartupTime = "foo"; @@ -4823,7 +4921,7 @@ checkWorkerHealthReport(api.WorkerHealthReport o) { buildCounterWorkerHealthReport++; if (buildCounterWorkerHealthReport < 3) { - checkUnnamed5234(o.pods); + checkUnnamed4446(o.pods); unittest.expect(o.reportInterval, unittest.equals('foo')); unittest.expect(o.vmIsHealthy, unittest.isTrue); unittest.expect(o.vmStartupTime, unittest.equals('foo')); @@ -4850,14 +4948,14 @@ buildCounterWorkerHealthReportResponse--; } -buildUnnamed5235() { +buildUnnamed4447() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5235(core.Map<core.String, core.String> o) { +checkUnnamed4447(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4870,7 +4968,7 @@ if (buildCounterWorkerLifecycleEvent < 3) { o.containerStartTime = "foo"; o.event = "foo"; - o.metadata = buildUnnamed5235(); + o.metadata = buildUnnamed4447(); } buildCounterWorkerLifecycleEvent--; return o; @@ -4881,19 +4979,19 @@ if (buildCounterWorkerLifecycleEvent < 3) { unittest.expect(o.containerStartTime, unittest.equals('foo')); unittest.expect(o.event, unittest.equals('foo')); - checkUnnamed5235(o.metadata); + checkUnnamed4447(o.metadata); } buildCounterWorkerLifecycleEvent--; } -buildUnnamed5236() { +buildUnnamed4448() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5236(core.Map<core.String, core.String> o) { +checkUnnamed4448(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -4904,7 +5002,7 @@ var o = new api.WorkerMessage(); buildCounterWorkerMessage++; if (buildCounterWorkerMessage < 3) { - o.labels = buildUnnamed5236(); + o.labels = buildUnnamed4448(); o.time = "foo"; o.workerHealthReport = buildWorkerHealthReport(); o.workerLifecycleEvent = buildWorkerLifecycleEvent(); @@ -4919,7 +5017,7 @@ checkWorkerMessage(api.WorkerMessage o) { buildCounterWorkerMessage++; if (buildCounterWorkerMessage < 3) { - checkUnnamed5236(o.labels); + checkUnnamed4448(o.labels); unittest.expect(o.time, unittest.equals('foo')); checkWorkerHealthReport(o.workerHealthReport); checkWorkerLifecycleEvent(o.workerLifecycleEvent); @@ -4930,7 +5028,7 @@ buildCounterWorkerMessage--; } -buildUnnamed5237() { +buildUnnamed4449() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4945,7 +5043,7 @@ return o; } -checkUnnamed5237(core.Map<core.String, core.Object> o) { +checkUnnamed4449(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted48 = (o["x"]) as core.Map; unittest.expect(casted48, unittest.hasLength(3)); @@ -4965,7 +5063,7 @@ buildCounterWorkerMessageCode++; if (buildCounterWorkerMessageCode < 3) { o.code = "foo"; - o.parameters = buildUnnamed5237(); + o.parameters = buildUnnamed4449(); } buildCounterWorkerMessageCode--; return o; @@ -4975,7 +5073,7 @@ buildCounterWorkerMessageCode++; if (buildCounterWorkerMessageCode < 3) { unittest.expect(o.code, unittest.equals('foo')); - checkUnnamed5237(o.parameters); + checkUnnamed4449(o.parameters); } buildCounterWorkerMessageCode--; } @@ -5003,46 +5101,46 @@ buildCounterWorkerMessageResponse--; } -buildUnnamed5238() { +buildUnnamed4450() { var o = new core.List<api.Disk>(); o.add(buildDisk()); o.add(buildDisk()); return o; } -checkUnnamed5238(core.List<api.Disk> o) { +checkUnnamed4450(core.List<api.Disk> o) { unittest.expect(o, unittest.hasLength(2)); checkDisk(o[0]); checkDisk(o[1]); } -buildUnnamed5239() { +buildUnnamed4451() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5239(core.Map<core.String, core.String> o) { +checkUnnamed4451(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5240() { +buildUnnamed4452() { var o = new core.List<api.Package>(); o.add(buildPackage()); o.add(buildPackage()); return o; } -checkUnnamed5240(core.List<api.Package> o) { +checkUnnamed4452(core.List<api.Package> o) { unittest.expect(o, unittest.hasLength(2)); checkPackage(o[0]); checkPackage(o[1]); } -buildUnnamed5241() { +buildUnnamed4453() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -5057,7 +5155,7 @@ return o; } -checkUnnamed5241(core.Map<core.String, core.Object> o) { +checkUnnamed4453(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted50 = (o["x"]) as core.Map; unittest.expect(casted50, unittest.hasLength(3)); @@ -5077,7 +5175,7 @@ buildCounterWorkerPool++; if (buildCounterWorkerPool < 3) { o.autoscalingSettings = buildAutoscalingSettings(); - o.dataDisks = buildUnnamed5238(); + o.dataDisks = buildUnnamed4450(); o.defaultPackageSet = "foo"; o.diskSizeGb = 42; o.diskSourceImage = "foo"; @@ -5085,13 +5183,13 @@ o.ipConfiguration = "foo"; o.kind = "foo"; o.machineType = "foo"; - o.metadata = buildUnnamed5239(); + o.metadata = buildUnnamed4451(); o.network = "foo"; o.numThreadsPerWorker = 42; o.numWorkers = 42; o.onHostMaintenance = "foo"; - o.packages = buildUnnamed5240(); - o.poolArgs = buildUnnamed5241(); + o.packages = buildUnnamed4452(); + o.poolArgs = buildUnnamed4453(); o.subnetwork = "foo"; o.taskrunnerSettings = buildTaskRunnerSettings(); o.teardownPolicy = "foo"; @@ -5106,7 +5204,7 @@ buildCounterWorkerPool++; if (buildCounterWorkerPool < 3) { checkAutoscalingSettings(o.autoscalingSettings); - checkUnnamed5238(o.dataDisks); + checkUnnamed4450(o.dataDisks); unittest.expect(o.defaultPackageSet, unittest.equals('foo')); unittest.expect(o.diskSizeGb, unittest.equals(42)); unittest.expect(o.diskSourceImage, unittest.equals('foo')); @@ -5114,13 +5212,13 @@ unittest.expect(o.ipConfiguration, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.machineType, unittest.equals('foo')); - checkUnnamed5239(o.metadata); + checkUnnamed4451(o.metadata); unittest.expect(o.network, unittest.equals('foo')); unittest.expect(o.numThreadsPerWorker, unittest.equals(42)); unittest.expect(o.numWorkers, unittest.equals(42)); unittest.expect(o.onHostMaintenance, unittest.equals('foo')); - checkUnnamed5240(o.packages); - checkUnnamed5241(o.poolArgs); + checkUnnamed4452(o.packages); + checkUnnamed4453(o.poolArgs); unittest.expect(o.subnetwork, unittest.equals('foo')); checkTaskRunnerSettings(o.taskrunnerSettings); unittest.expect(o.teardownPolicy, unittest.equals('foo')); @@ -5935,6 +6033,22 @@ }); }); + unittest.group("obj-schema-Snapshot", () { + unittest.test("to-json--from-json", () { + var o = buildSnapshot(); + var od = new api.Snapshot.fromJson(o.toJson()); + checkSnapshot(od); + }); + }); + + unittest.group("obj-schema-SnapshotJobRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSnapshotJobRequest(); + var od = new api.SnapshotJobRequest.fromJson(o.toJson()); + checkSnapshotJobRequest(od); + }); + }); + unittest.group("obj-schema-Source", () { unittest.test("to-json--from-json", () { var o = buildSource(); @@ -6079,6 +6193,14 @@ }); }); + unittest.group("obj-schema-StreamingApplianceSnapshotConfig", () { + unittest.test("to-json--from-json", () { + var o = buildStreamingApplianceSnapshotConfig(); + var od = new api.StreamingApplianceSnapshotConfig.fromJson(o.toJson()); + checkStreamingApplianceSnapshotConfig(od); + }); + }); + unittest.group("obj-schema-StreamingComputationConfig", () { unittest.test("to-json--from-json", () { var o = buildStreamingComputationConfig(); @@ -6365,11 +6487,11 @@ var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_projectId = "foo"; - var arg_pageSize = 42; - var arg_view = "foo"; var arg_filter = "foo"; var arg_location = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6410,14 +6532,14 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6428,11 +6550,11 @@ }), true); res .aggregated(arg_projectId, - pageSize: arg_pageSize, - view: arg_view, filter: arg_filter, location: arg_location, pageToken: arg_pageToken, + pageSize: arg_pageSize, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListJobsResponse(response); @@ -6444,9 +6566,9 @@ api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_request = buildJob(); var arg_projectId = "foo"; - var arg_view = "foo"; var arg_location = "foo"; var arg_replaceJobId = "foo"; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.Job.fromJson(json); @@ -6490,11 +6612,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["replaceJobId"].first, unittest.equals(arg_replaceJobId)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6505,9 +6627,9 @@ }), true); res .create(arg_request, arg_projectId, - view: arg_view, location: arg_location, replaceJobId: arg_replaceJobId, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkJob(response); @@ -6665,11 +6787,11 @@ var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; var arg_projectId = "foo"; - var arg_pageSize = 42; - var arg_view = "foo"; var arg_filter = "foo"; var arg_location = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_view = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6710,14 +6832,14 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6728,17 +6850,90 @@ }), true); res .list(arg_projectId, - pageSize: arg_pageSize, - view: arg_view, filter: arg_filter, location: arg_location, pageToken: arg_pageToken, + pageSize: arg_pageSize, + view: arg_view, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListJobsResponse(response); }))); }); + unittest.test("method--snapshot", () { + var mock = new HttpServerMock(); + api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; + var arg_request = buildSnapshotJobRequest(); + var arg_projectId = "foo"; + var arg_jobId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SnapshotJobRequest.fromJson(json); + checkSnapshotJobRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1b3/projects/")); + pathOffset += 14; + index = path.indexOf("/jobs/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_projectId")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals("/jobs/")); + pathOffset += 6; + index = path.indexOf(":snapshot", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_jobId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":snapshot")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSnapshot()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .snapshot(arg_request, arg_projectId, arg_jobId, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSnapshot(response); + }))); + }); + unittest.test("method--update", () { var mock = new HttpServerMock(); api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs; @@ -6970,8 +7165,8 @@ new api.DataflowApi(mock).projects.jobs.messages; var arg_projectId = "foo"; var arg_jobId = "foo"; - var arg_endTime = "foo"; var arg_location = "foo"; + var arg_endTime = "foo"; var arg_pageToken = "foo"; var arg_startTime = "foo"; var arg_pageSize = 42; @@ -7026,10 +7221,10 @@ } } unittest.expect( - queryMap["endTime"].first, unittest.equals(arg_endTime)); - unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect( + queryMap["endTime"].first, unittest.equals(arg_endTime)); + unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["startTime"].first, unittest.equals(arg_startTime)); @@ -7047,8 +7242,8 @@ }), true); res .list(arg_projectId, arg_jobId, - endTime: arg_endTime, location: arg_location, + endTime: arg_endTime, pageToken: arg_pageToken, startTime: arg_startTime, pageSize: arg_pageSize, @@ -7296,8 +7491,8 @@ var arg_request = buildJob(); var arg_projectId = "foo"; var arg_location = "foo"; - var arg_replaceJobId = "foo"; var arg_view = "foo"; + var arg_replaceJobId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.Job.fromJson(json); @@ -7350,9 +7545,9 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect( queryMap["replaceJobId"].first, unittest.equals(arg_replaceJobId)); - unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7363,8 +7558,8 @@ }), true); res .create(arg_request, arg_projectId, arg_location, - replaceJobId: arg_replaceJobId, view: arg_view, + replaceJobId: arg_replaceJobId, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkJob(response); @@ -7617,6 +7812,91 @@ }))); }); + unittest.test("method--snapshot", () { + var mock = new HttpServerMock(); + api.ProjectsLocationsJobsResourceApi res = + new api.DataflowApi(mock).projects.locations.jobs; + var arg_request = buildSnapshotJobRequest(); + var arg_projectId = "foo"; + var arg_location = "foo"; + var arg_jobId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SnapshotJobRequest.fromJson(json); + checkSnapshotJobRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 14), + unittest.equals("v1b3/projects/")); + pathOffset += 14; + index = path.indexOf("/locations/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_projectId")); + unittest.expect(path.substring(pathOffset, pathOffset + 11), + unittest.equals("/locations/")); + pathOffset += 11; + index = path.indexOf("/jobs/", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_location")); + unittest.expect(path.substring(pathOffset, pathOffset + 6), + unittest.equals("/jobs/")); + pathOffset += 6; + index = path.indexOf(":snapshot", pathOffset); + unittest.expect(index >= 0, unittest.isTrue); + subPart = + core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); + pathOffset = index; + unittest.expect(subPart, unittest.equals("$arg_jobId")); + unittest.expect(path.substring(pathOffset, pathOffset + 9), + unittest.equals(":snapshot")); + pathOffset += 9; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSnapshot()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .snapshot(arg_request, arg_projectId, arg_location, arg_jobId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSnapshot(response); + }))); + }); + unittest.test("method--update", () { var mock = new HttpServerMock(); api.ProjectsLocationsJobsResourceApi res = @@ -8305,6 +8585,8 @@ var arg_location = "foo"; var arg_validateOnly = true; var arg_gcsPath = "foo"; + var arg_dynamicTemplate_gcsPath = "foo"; + var arg_dynamicTemplate_stagingLocation = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.LaunchTemplateParameters.fromJson(json); @@ -8361,6 +8643,10 @@ unittest.equals("$arg_validateOnly")); unittest.expect( queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.gcsPath"].first, + unittest.equals(arg_dynamicTemplate_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.stagingLocation"].first, + unittest.equals(arg_dynamicTemplate_stagingLocation)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8373,6 +8659,9 @@ .launch(arg_request, arg_projectId, arg_location, validateOnly: arg_validateOnly, gcsPath: arg_gcsPath, + dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath, + dynamicTemplate_stagingLocation: + arg_dynamicTemplate_stagingLocation, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLaunchTemplateResponse(response); @@ -8450,9 +8739,9 @@ api.ProjectsTemplatesResourceApi res = new api.DataflowApi(mock).projects.templates; var arg_projectId = "foo"; - var arg_gcsPath = "foo"; var arg_location = "foo"; var arg_view = "foo"; + var arg_gcsPath = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -8494,10 +8783,10 @@ } } unittest.expect( - queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); - unittest.expect( queryMap["location"].first, unittest.equals(arg_location)); unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); + unittest.expect( + queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8508,9 +8797,9 @@ }), true); res .get(arg_projectId, - gcsPath: arg_gcsPath, location: arg_location, view: arg_view, + gcsPath: arg_gcsPath, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGetTemplateResponse(response); @@ -8523,9 +8812,11 @@ new api.DataflowApi(mock).projects.templates; var arg_request = buildLaunchTemplateParameters(); var arg_projectId = "foo"; - var arg_location = "foo"; + var arg_dynamicTemplate_gcsPath = "foo"; + var arg_dynamicTemplate_stagingLocation = "foo"; var arg_validateOnly = true; var arg_gcsPath = "foo"; + var arg_location = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.LaunchTemplateParameters.fromJson(json); @@ -8569,12 +8860,16 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["location"].first, unittest.equals(arg_location)); + unittest.expect(queryMap["dynamicTemplate.gcsPath"].first, + unittest.equals(arg_dynamicTemplate_gcsPath)); + unittest.expect(queryMap["dynamicTemplate.stagingLocation"].first, + unittest.equals(arg_dynamicTemplate_stagingLocation)); unittest.expect(queryMap["validateOnly"].first, unittest.equals("$arg_validateOnly")); unittest.expect( queryMap["gcsPath"].first, unittest.equals(arg_gcsPath)); + unittest.expect( + queryMap["location"].first, unittest.equals(arg_location)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8585,9 +8880,12 @@ }), true); res .launch(arg_request, arg_projectId, - location: arg_location, + dynamicTemplate_gcsPath: arg_dynamicTemplate_gcsPath, + dynamicTemplate_stagingLocation: + arg_dynamicTemplate_stagingLocation, validateOnly: arg_validateOnly, gcsPath: arg_gcsPath, + location: arg_location, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLaunchTemplateResponse(response);
diff --git a/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart b/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart index 58509fd..c91eb1e 100644 --- a/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart +++ b/generated/googleapis_beta/test/dialogflow/v2beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5471() { +buildUnnamed4883() { var o = new core.List<api.GoogleCloudDialogflowV2EntityType>(); o.add(buildGoogleCloudDialogflowV2EntityType()); o.add(buildGoogleCloudDialogflowV2EntityType()); return o; } -checkUnnamed5471(core.List<api.GoogleCloudDialogflowV2EntityType> o) { +checkUnnamed4883(core.List<api.GoogleCloudDialogflowV2EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2EntityType(o[0]); checkGoogleCloudDialogflowV2EntityType(o[1]); @@ -68,7 +68,7 @@ var o = new api.GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse(); buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5471(); + o.entityTypes = buildUnnamed4883(); } buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse--; return o; @@ -78,19 +78,19 @@ api.GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse o) { buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse < 3) { - checkUnnamed5471(o.entityTypes); + checkUnnamed4883(o.entityTypes); } buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse--; } -buildUnnamed5472() { +buildUnnamed4884() { var o = new core.List<api.GoogleCloudDialogflowV2Intent>(); o.add(buildGoogleCloudDialogflowV2Intent()); o.add(buildGoogleCloudDialogflowV2Intent()); return o; } -checkUnnamed5472(core.List<api.GoogleCloudDialogflowV2Intent> o) { +checkUnnamed4884(core.List<api.GoogleCloudDialogflowV2Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Intent(o[0]); checkGoogleCloudDialogflowV2Intent(o[1]); @@ -101,7 +101,7 @@ var o = new api.GoogleCloudDialogflowV2BatchUpdateIntentsResponse(); buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse < 3) { - o.intents = buildUnnamed5472(); + o.intents = buildUnnamed4884(); } buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse--; return o; @@ -111,12 +111,12 @@ api.GoogleCloudDialogflowV2BatchUpdateIntentsResponse o) { buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse < 3) { - checkUnnamed5472(o.intents); + checkUnnamed4884(o.intents); } buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsResponse--; } -buildUnnamed5473() { +buildUnnamed4885() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -131,7 +131,7 @@ return o; } -checkUnnamed5473(core.Map<core.String, core.Object> o) { +checkUnnamed4885(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -152,7 +152,7 @@ if (buildCounterGoogleCloudDialogflowV2Context < 3) { o.lifespanCount = 42; o.name = "foo"; - o.parameters = buildUnnamed5473(); + o.parameters = buildUnnamed4885(); } buildCounterGoogleCloudDialogflowV2Context--; return o; @@ -163,19 +163,19 @@ if (buildCounterGoogleCloudDialogflowV2Context < 3) { unittest.expect(o.lifespanCount, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5473(o.parameters); + checkUnnamed4885(o.parameters); } buildCounterGoogleCloudDialogflowV2Context--; } -buildUnnamed5474() { +buildUnnamed4886() { var o = new core.List<api.GoogleCloudDialogflowV2EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2EntityTypeEntity()); return o; } -checkUnnamed5474(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { +checkUnnamed4886(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); @@ -188,7 +188,7 @@ if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { o.autoExpansionMode = "foo"; o.displayName = "foo"; - o.entities = buildUnnamed5474(); + o.entities = buildUnnamed4886(); o.kind = "foo"; o.name = "foo"; } @@ -202,21 +202,21 @@ if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { unittest.expect(o.autoExpansionMode, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5474(o.entities); + checkUnnamed4886(o.entities); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2EntityType--; } -buildUnnamed5475() { +buildUnnamed4887() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5475(core.List<core.String> o) { +checkUnnamed4887(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -227,7 +227,7 @@ var o = new api.GoogleCloudDialogflowV2EntityTypeEntity(); buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { - o.synonyms = buildUnnamed5475(); + o.synonyms = buildUnnamed4887(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; @@ -238,13 +238,13 @@ api.GoogleCloudDialogflowV2EntityTypeEntity o) { buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { - checkUnnamed5475(o.synonyms); + checkUnnamed4887(o.synonyms); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; } -buildUnnamed5476() { +buildUnnamed4888() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -259,7 +259,7 @@ return o; } -checkUnnamed5476(core.Map<core.String, core.Object> o) { +checkUnnamed4888(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -280,7 +280,7 @@ if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { o.languageCode = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5476(); + o.parameters = buildUnnamed4888(); } buildCounterGoogleCloudDialogflowV2EventInput--; return o; @@ -292,7 +292,7 @@ if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5476(o.parameters); + checkUnnamed4888(o.parameters); } buildCounterGoogleCloudDialogflowV2EventInput--; } @@ -319,106 +319,106 @@ buildCounterGoogleCloudDialogflowV2ExportAgentResponse--; } -buildUnnamed5477() { +buildUnnamed4889() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5477(core.List<core.String> o) { +checkUnnamed4889(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5478() { +buildUnnamed4890() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5478(core.List<core.String> o) { +checkUnnamed4890(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5479() { +buildUnnamed4891() { var o = new core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo>(); o.add(buildGoogleCloudDialogflowV2IntentFollowupIntentInfo()); o.add(buildGoogleCloudDialogflowV2IntentFollowupIntentInfo()); return o; } -checkUnnamed5479( +checkUnnamed4891( core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[0]); checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[1]); } -buildUnnamed5480() { +buildUnnamed4892() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5480(core.List<core.String> o) { +checkUnnamed4892(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5481() { +buildUnnamed4893() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5481(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4893(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5482() { +buildUnnamed4894() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5482(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4894(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5483() { +buildUnnamed4895() { var o = new core.List<api.GoogleCloudDialogflowV2IntentParameter>(); o.add(buildGoogleCloudDialogflowV2IntentParameter()); o.add(buildGoogleCloudDialogflowV2IntentParameter()); return o; } -checkUnnamed5483(core.List<api.GoogleCloudDialogflowV2IntentParameter> o) { +checkUnnamed4895(core.List<api.GoogleCloudDialogflowV2IntentParameter> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentParameter(o[0]); checkGoogleCloudDialogflowV2IntentParameter(o[1]); } -buildUnnamed5484() { +buildUnnamed4896() { var o = new core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase>(); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrase()); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrase()); return o; } -checkUnnamed5484(core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> o) { +checkUnnamed4896(core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[0]); checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[1]); @@ -430,22 +430,22 @@ buildCounterGoogleCloudDialogflowV2Intent++; if (buildCounterGoogleCloudDialogflowV2Intent < 3) { o.action = "foo"; - o.defaultResponsePlatforms = buildUnnamed5477(); + o.defaultResponsePlatforms = buildUnnamed4889(); o.displayName = "foo"; - o.events = buildUnnamed5478(); - o.followupIntentInfo = buildUnnamed5479(); - o.inputContextNames = buildUnnamed5480(); + o.events = buildUnnamed4890(); + o.followupIntentInfo = buildUnnamed4891(); + o.inputContextNames = buildUnnamed4892(); o.isFallback = true; - o.messages = buildUnnamed5481(); + o.messages = buildUnnamed4893(); o.mlDisabled = true; o.name = "foo"; - o.outputContexts = buildUnnamed5482(); - o.parameters = buildUnnamed5483(); + o.outputContexts = buildUnnamed4894(); + o.parameters = buildUnnamed4895(); o.parentFollowupIntentName = "foo"; o.priority = 42; o.resetContexts = true; o.rootFollowupIntentName = "foo"; - o.trainingPhrases = buildUnnamed5484(); + o.trainingPhrases = buildUnnamed4896(); o.webhookState = "foo"; } buildCounterGoogleCloudDialogflowV2Intent--; @@ -456,22 +456,22 @@ buildCounterGoogleCloudDialogflowV2Intent++; if (buildCounterGoogleCloudDialogflowV2Intent < 3) { unittest.expect(o.action, unittest.equals('foo')); - checkUnnamed5477(o.defaultResponsePlatforms); + checkUnnamed4889(o.defaultResponsePlatforms); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5478(o.events); - checkUnnamed5479(o.followupIntentInfo); - checkUnnamed5480(o.inputContextNames); + checkUnnamed4890(o.events); + checkUnnamed4891(o.followupIntentInfo); + checkUnnamed4892(o.inputContextNames); unittest.expect(o.isFallback, unittest.isTrue); - checkUnnamed5481(o.messages); + checkUnnamed4893(o.messages); unittest.expect(o.mlDisabled, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5482(o.outputContexts); - checkUnnamed5483(o.parameters); + checkUnnamed4894(o.outputContexts); + checkUnnamed4895(o.parameters); unittest.expect(o.parentFollowupIntentName, unittest.equals('foo')); unittest.expect(o.priority, unittest.equals(42)); unittest.expect(o.resetContexts, unittest.isTrue); unittest.expect(o.rootFollowupIntentName, unittest.equals('foo')); - checkUnnamed5484(o.trainingPhrases); + checkUnnamed4896(o.trainingPhrases); unittest.expect(o.webhookState, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2Intent--; @@ -499,7 +499,7 @@ buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo--; } -buildUnnamed5485() { +buildUnnamed4897() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -514,7 +514,7 @@ return o; } -checkUnnamed5485(core.Map<core.String, core.Object> o) { +checkUnnamed4897(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -541,7 +541,7 @@ o.linkOutSuggestion = buildGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(); o.listSelect = buildGoogleCloudDialogflowV2IntentMessageListSelect(); - o.payload = buildUnnamed5485(); + o.payload = buildUnnamed4897(); o.platform = "foo"; o.quickReplies = buildGoogleCloudDialogflowV2IntentMessageQuickReplies(); o.simpleResponses = @@ -564,7 +564,7 @@ checkGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion( o.linkOutSuggestion); checkGoogleCloudDialogflowV2IntentMessageListSelect(o.listSelect); - checkUnnamed5485(o.payload); + checkUnnamed4897(o.payload); unittest.expect(o.platform, unittest.equals('foo')); checkGoogleCloudDialogflowV2IntentMessageQuickReplies(o.quickReplies); checkGoogleCloudDialogflowV2IntentMessageSimpleResponses(o.simpleResponses); @@ -574,7 +574,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessage--; } -buildUnnamed5486() { +buildUnnamed4898() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton>(); o.add(buildGoogleCloudDialogflowV2IntentMessageBasicCardButton()); @@ -582,7 +582,7 @@ return o; } -checkUnnamed5486( +checkUnnamed4898( core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[0]); @@ -594,7 +594,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageBasicCard(); buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { - o.buttons = buildUnnamed5486(); + o.buttons = buildUnnamed4898(); o.formattedText = "foo"; o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); o.subtitle = "foo"; @@ -608,7 +608,7 @@ api.GoogleCloudDialogflowV2IntentMessageBasicCard o) { buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { - checkUnnamed5486(o.buttons); + checkUnnamed4898(o.buttons); unittest.expect(o.formattedText, unittest.equals('foo')); checkGoogleCloudDialogflowV2IntentMessageImage(o.image); unittest.expect(o.subtitle, unittest.equals('foo')); @@ -666,14 +666,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction--; } -buildUnnamed5487() { +buildUnnamed4899() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton>(); o.add(buildGoogleCloudDialogflowV2IntentMessageCardButton()); o.add(buildGoogleCloudDialogflowV2IntentMessageCardButton()); return o; } -checkUnnamed5487( +checkUnnamed4899( core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageCardButton(o[0]); @@ -685,7 +685,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageCard(); buildCounterGoogleCloudDialogflowV2IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { - o.buttons = buildUnnamed5487(); + o.buttons = buildUnnamed4899(); o.imageUri = "foo"; o.subtitle = "foo"; o.title = "foo"; @@ -698,7 +698,7 @@ api.GoogleCloudDialogflowV2IntentMessageCard o) { buildCounterGoogleCloudDialogflowV2IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { - checkUnnamed5487(o.buttons); + checkUnnamed4899(o.buttons); unittest.expect(o.imageUri, unittest.equals('foo')); unittest.expect(o.subtitle, unittest.equals('foo')); unittest.expect(o.title, unittest.equals('foo')); @@ -728,7 +728,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageCardButton--; } -buildUnnamed5488() { +buildUnnamed4900() { var o = new core .List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem>(); o.add(buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem()); @@ -736,7 +736,7 @@ return o; } -checkUnnamed5488( +checkUnnamed4900( core.List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(o[0]); @@ -748,7 +748,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageCarouselSelect(); buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { - o.items = buildUnnamed5488(); + o.items = buildUnnamed4900(); } buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; return o; @@ -758,7 +758,7 @@ api.GoogleCloudDialogflowV2IntentMessageCarouselSelect o) { buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { - checkUnnamed5488(o.items); + checkUnnamed4900(o.items); } buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; } @@ -833,7 +833,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion--; } -buildUnnamed5489() { +buildUnnamed4901() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem>(); o.add(buildGoogleCloudDialogflowV2IntentMessageListSelectItem()); @@ -841,7 +841,7 @@ return o; } -checkUnnamed5489( +checkUnnamed4901( core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageListSelectItem(o[0]); @@ -853,7 +853,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageListSelect(); buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { - o.items = buildUnnamed5489(); + o.items = buildUnnamed4901(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; @@ -864,7 +864,7 @@ api.GoogleCloudDialogflowV2IntentMessageListSelect o) { buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { - checkUnnamed5489(o.items); + checkUnnamed4901(o.items); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; @@ -896,14 +896,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem--; } -buildUnnamed5490() { +buildUnnamed4902() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5490(core.List<core.String> o) { +checkUnnamed4902(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -914,7 +914,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageQuickReplies(); buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { - o.quickReplies = buildUnnamed5490(); + o.quickReplies = buildUnnamed4902(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; @@ -925,20 +925,20 @@ api.GoogleCloudDialogflowV2IntentMessageQuickReplies o) { buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { - checkUnnamed5490(o.quickReplies); + checkUnnamed4902(o.quickReplies); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; } -buildUnnamed5491() { +buildUnnamed4903() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5491(core.List<core.String> o) { +checkUnnamed4903(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -950,7 +950,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { o.key = "foo"; - o.synonyms = buildUnnamed5491(); + o.synonyms = buildUnnamed4903(); } buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; return o; @@ -961,7 +961,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { unittest.expect(o.key, unittest.equals('foo')); - checkUnnamed5491(o.synonyms); + checkUnnamed4903(o.synonyms); } buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; } @@ -990,7 +990,7 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse--; } -buildUnnamed5492() { +buildUnnamed4904() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse>(); o.add(buildGoogleCloudDialogflowV2IntentMessageSimpleResponse()); @@ -998,7 +998,7 @@ return o; } -checkUnnamed5492( +checkUnnamed4904( core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageSimpleResponse(o[0]); @@ -1010,7 +1010,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageSimpleResponses(); buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { - o.simpleResponses = buildUnnamed5492(); + o.simpleResponses = buildUnnamed4904(); } buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; return o; @@ -1020,7 +1020,7 @@ api.GoogleCloudDialogflowV2IntentMessageSimpleResponses o) { buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { - checkUnnamed5492(o.simpleResponses); + checkUnnamed4904(o.simpleResponses); } buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; } @@ -1045,14 +1045,14 @@ buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion--; } -buildUnnamed5493() { +buildUnnamed4905() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion>(); o.add(buildGoogleCloudDialogflowV2IntentMessageSuggestion()); o.add(buildGoogleCloudDialogflowV2IntentMessageSuggestion()); return o; } -checkUnnamed5493( +checkUnnamed4905( core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessageSuggestion(o[0]); @@ -1064,7 +1064,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageSuggestions(); buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { - o.suggestions = buildUnnamed5493(); + o.suggestions = buildUnnamed4905(); } buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; return o; @@ -1074,19 +1074,19 @@ api.GoogleCloudDialogflowV2IntentMessageSuggestions o) { buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { - checkUnnamed5493(o.suggestions); + checkUnnamed4905(o.suggestions); } buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; } -buildUnnamed5494() { +buildUnnamed4906() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5494(core.List<core.String> o) { +checkUnnamed4906(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1097,7 +1097,7 @@ var o = new api.GoogleCloudDialogflowV2IntentMessageText(); buildCounterGoogleCloudDialogflowV2IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { - o.text = buildUnnamed5494(); + o.text = buildUnnamed4906(); } buildCounterGoogleCloudDialogflowV2IntentMessageText--; return o; @@ -1107,19 +1107,19 @@ api.GoogleCloudDialogflowV2IntentMessageText o) { buildCounterGoogleCloudDialogflowV2IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { - checkUnnamed5494(o.text); + checkUnnamed4906(o.text); } buildCounterGoogleCloudDialogflowV2IntentMessageText--; } -buildUnnamed5495() { +buildUnnamed4907() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5495(core.List<core.String> o) { +checkUnnamed4907(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1136,7 +1136,7 @@ o.isList = true; o.mandatory = true; o.name = "foo"; - o.prompts = buildUnnamed5495(); + o.prompts = buildUnnamed4907(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2IntentParameter--; @@ -1153,20 +1153,20 @@ unittest.expect(o.isList, unittest.isTrue); unittest.expect(o.mandatory, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5495(o.prompts); + checkUnnamed4907(o.prompts); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2IntentParameter--; } -buildUnnamed5496() { +buildUnnamed4908() { var o = new core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart>(); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrasePart()); o.add(buildGoogleCloudDialogflowV2IntentTrainingPhrasePart()); return o; } -checkUnnamed5496( +checkUnnamed4908( core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentTrainingPhrasePart(o[0]); @@ -1179,7 +1179,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { o.name = "foo"; - o.parts = buildUnnamed5496(); + o.parts = buildUnnamed4908(); o.timesAddedCount = 42; o.type = "foo"; } @@ -1192,7 +1192,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5496(o.parts); + checkUnnamed4908(o.parts); unittest.expect(o.timesAddedCount, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } @@ -1225,7 +1225,7 @@ buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart--; } -buildUnnamed5497() { +buildUnnamed4909() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1240,7 +1240,7 @@ return o; } -checkUnnamed5497(core.Map<core.String, core.Object> o) { +checkUnnamed4909(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -1259,7 +1259,7 @@ var o = new api.GoogleCloudDialogflowV2OriginalDetectIntentRequest(); buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest < 3) { - o.payload = buildUnnamed5497(); + o.payload = buildUnnamed4909(); o.source = "foo"; o.version = "foo"; } @@ -1271,14 +1271,14 @@ api.GoogleCloudDialogflowV2OriginalDetectIntentRequest o) { buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest < 3) { - checkUnnamed5497(o.payload); + checkUnnamed4909(o.payload); unittest.expect(o.source, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2OriginalDetectIntentRequest--; } -buildUnnamed5498() { +buildUnnamed4910() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1293,7 +1293,7 @@ return o; } -checkUnnamed5498(core.Map<core.String, core.Object> o) { +checkUnnamed4910(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLength(3)); @@ -1307,33 +1307,33 @@ unittest.expect(casted10["string"], unittest.equals('foo')); } -buildUnnamed5499() { +buildUnnamed4911() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5499(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4911(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5500() { +buildUnnamed4912() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5500(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4912(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5501() { +buildUnnamed4913() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1348,7 +1348,7 @@ return o; } -checkUnnamed5501(core.Map<core.String, core.Object> o) { +checkUnnamed4913(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted11 = (o["x"]) as core.Map; unittest.expect(casted11, unittest.hasLength(3)); @@ -1362,7 +1362,7 @@ unittest.expect(casted12["string"], unittest.equals('foo')); } -buildUnnamed5502() { +buildUnnamed4914() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1377,7 +1377,7 @@ return o; } -checkUnnamed5502(core.Map<core.String, core.Object> o) { +checkUnnamed4914(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted13 = (o["x"]) as core.Map; unittest.expect(casted13, unittest.hasLength(3)); @@ -1398,17 +1398,17 @@ if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { o.action = "foo"; o.allRequiredParamsPresent = true; - o.diagnosticInfo = buildUnnamed5498(); - o.fulfillmentMessages = buildUnnamed5499(); + o.diagnosticInfo = buildUnnamed4910(); + o.fulfillmentMessages = buildUnnamed4911(); o.fulfillmentText = "foo"; o.intent = buildGoogleCloudDialogflowV2Intent(); o.intentDetectionConfidence = 42.0; o.languageCode = "foo"; - o.outputContexts = buildUnnamed5500(); - o.parameters = buildUnnamed5501(); + o.outputContexts = buildUnnamed4912(); + o.parameters = buildUnnamed4913(); o.queryText = "foo"; o.speechRecognitionConfidence = 42.0; - o.webhookPayload = buildUnnamed5502(); + o.webhookPayload = buildUnnamed4914(); o.webhookSource = "foo"; } buildCounterGoogleCloudDialogflowV2QueryResult--; @@ -1421,17 +1421,17 @@ if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { unittest.expect(o.action, unittest.equals('foo')); unittest.expect(o.allRequiredParamsPresent, unittest.isTrue); - checkUnnamed5498(o.diagnosticInfo); - checkUnnamed5499(o.fulfillmentMessages); + checkUnnamed4910(o.diagnosticInfo); + checkUnnamed4911(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); checkGoogleCloudDialogflowV2Intent(o.intent); unittest.expect(o.intentDetectionConfidence, unittest.equals(42.0)); unittest.expect(o.languageCode, unittest.equals('foo')); - checkUnnamed5500(o.outputContexts); - checkUnnamed5501(o.parameters); + checkUnnamed4912(o.outputContexts); + checkUnnamed4913(o.parameters); unittest.expect(o.queryText, unittest.equals('foo')); unittest.expect(o.speechRecognitionConfidence, unittest.equals(42.0)); - checkUnnamed5502(o.webhookPayload); + checkUnnamed4914(o.webhookPayload); unittest.expect(o.webhookSource, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2QueryResult--; @@ -1465,33 +1465,33 @@ buildCounterGoogleCloudDialogflowV2WebhookRequest--; } -buildUnnamed5503() { +buildUnnamed4915() { var o = new core.List<api.GoogleCloudDialogflowV2IntentMessage>(); o.add(buildGoogleCloudDialogflowV2IntentMessage()); o.add(buildGoogleCloudDialogflowV2IntentMessage()); return o; } -checkUnnamed5503(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { +checkUnnamed4915(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2IntentMessage(o[0]); checkGoogleCloudDialogflowV2IntentMessage(o[1]); } -buildUnnamed5504() { +buildUnnamed4916() { var o = new core.List<api.GoogleCloudDialogflowV2Context>(); o.add(buildGoogleCloudDialogflowV2Context()); o.add(buildGoogleCloudDialogflowV2Context()); return o; } -checkUnnamed5504(core.List<api.GoogleCloudDialogflowV2Context> o) { +checkUnnamed4916(core.List<api.GoogleCloudDialogflowV2Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2Context(o[0]); checkGoogleCloudDialogflowV2Context(o[1]); } -buildUnnamed5505() { +buildUnnamed4917() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1506,7 +1506,7 @@ return o; } -checkUnnamed5505(core.Map<core.String, core.Object> o) { +checkUnnamed4917(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted15 = (o["x"]) as core.Map; unittest.expect(casted15, unittest.hasLength(3)); @@ -1526,10 +1526,10 @@ buildCounterGoogleCloudDialogflowV2WebhookResponse++; if (buildCounterGoogleCloudDialogflowV2WebhookResponse < 3) { o.followupEventInput = buildGoogleCloudDialogflowV2EventInput(); - o.fulfillmentMessages = buildUnnamed5503(); + o.fulfillmentMessages = buildUnnamed4915(); o.fulfillmentText = "foo"; - o.outputContexts = buildUnnamed5504(); - o.payload = buildUnnamed5505(); + o.outputContexts = buildUnnamed4916(); + o.payload = buildUnnamed4917(); o.source = "foo"; } buildCounterGoogleCloudDialogflowV2WebhookResponse--; @@ -1541,23 +1541,23 @@ buildCounterGoogleCloudDialogflowV2WebhookResponse++; if (buildCounterGoogleCloudDialogflowV2WebhookResponse < 3) { checkGoogleCloudDialogflowV2EventInput(o.followupEventInput); - checkUnnamed5503(o.fulfillmentMessages); + checkUnnamed4915(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); - checkUnnamed5504(o.outputContexts); - checkUnnamed5505(o.payload); + checkUnnamed4916(o.outputContexts); + checkUnnamed4917(o.payload); unittest.expect(o.source, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2WebhookResponse--; } -buildUnnamed5506() { +buildUnnamed4918() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5506(core.List<core.String> o) { +checkUnnamed4918(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1576,7 +1576,7 @@ o.enableLogging = true; o.matchMode = "foo"; o.parent = "foo"; - o.supportedLanguageCodes = buildUnnamed5506(); + o.supportedLanguageCodes = buildUnnamed4918(); o.timeZone = "foo"; } buildCounterGoogleCloudDialogflowV2beta1Agent--; @@ -1595,20 +1595,20 @@ unittest.expect(o.enableLogging, unittest.isTrue); unittest.expect(o.matchMode, unittest.equals('foo')); unittest.expect(o.parent, unittest.equals('foo')); - checkUnnamed5506(o.supportedLanguageCodes); + checkUnnamed4918(o.supportedLanguageCodes); unittest.expect(o.timeZone, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1Agent--; } -buildUnnamed5507() { +buildUnnamed4919() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5507( +checkUnnamed4919( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -1620,7 +1620,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest < 3) { - o.entities = buildUnnamed5507(); + o.entities = buildUnnamed4919(); o.languageCode = "foo"; } buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest--; @@ -1631,20 +1631,20 @@ api.GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest < 3) { - checkUnnamed5507(o.entities); + checkUnnamed4919(o.entities); unittest.expect(o.languageCode, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest--; } -buildUnnamed5508() { +buildUnnamed4920() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5508(core.List<core.String> o) { +checkUnnamed4920(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1655,7 +1655,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest < 3) { - o.entityValues = buildUnnamed5508(); + o.entityValues = buildUnnamed4920(); o.languageCode = "foo"; } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest--; @@ -1666,20 +1666,20 @@ api.GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest < 3) { - checkUnnamed5508(o.entityValues); + checkUnnamed4920(o.entityValues); unittest.expect(o.languageCode, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest--; } -buildUnnamed5509() { +buildUnnamed4921() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5509(core.List<core.String> o) { +checkUnnamed4921(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1692,7 +1692,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest < 3) { - o.entityTypeNames = buildUnnamed5509(); + o.entityTypeNames = buildUnnamed4921(); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest--; return o; @@ -1703,19 +1703,19 @@ buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest < 3) { - checkUnnamed5509(o.entityTypeNames); + checkUnnamed4921(o.entityTypeNames); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest--; } -buildUnnamed5510() { +buildUnnamed4922() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5510(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4922(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -1726,7 +1726,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest < 3) { - o.intents = buildUnnamed5510(); + o.intents = buildUnnamed4922(); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest--; return o; @@ -1736,19 +1736,19 @@ api.GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest < 3) { - checkUnnamed5510(o.intents); + checkUnnamed4922(o.intents); } buildCounterGoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest--; } -buildUnnamed5511() { +buildUnnamed4923() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5511( +checkUnnamed4923( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -1760,7 +1760,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest(); buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest < 3) { - o.entities = buildUnnamed5511(); + o.entities = buildUnnamed4923(); o.languageCode = "foo"; o.updateMask = "foo"; } @@ -1772,7 +1772,7 @@ api.GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest o) { buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest < 3) { - checkUnnamed5511(o.entities); + checkUnnamed4923(o.entities); unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.updateMask, unittest.equals('foo')); } @@ -1809,14 +1809,14 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest--; } -buildUnnamed5512() { +buildUnnamed4924() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5512(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4924(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -1829,7 +1829,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5512(); + o.entityTypes = buildUnnamed4924(); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse--; return o; @@ -1840,7 +1840,7 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse < 3) { - checkUnnamed5512(o.entityTypes); + checkUnnamed4924(o.entityTypes); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse--; } @@ -1873,14 +1873,14 @@ buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest--; } -buildUnnamed5513() { +buildUnnamed4925() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5513(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4925(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -1891,7 +1891,7 @@ var o = new api.GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse(); buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse < 3) { - o.intents = buildUnnamed5513(); + o.intents = buildUnnamed4925(); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse--; return o; @@ -1901,12 +1901,12 @@ api.GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse < 3) { - checkUnnamed5513(o.intents); + checkUnnamed4925(o.intents); } buildCounterGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse--; } -buildUnnamed5514() { +buildUnnamed4926() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -1921,7 +1921,7 @@ return o; } -checkUnnamed5514(core.Map<core.String, core.Object> o) { +checkUnnamed4926(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted17 = (o["x"]) as core.Map; unittest.expect(casted17, unittest.hasLength(3)); @@ -1942,7 +1942,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1Context < 3) { o.lifespanCount = 42; o.name = "foo"; - o.parameters = buildUnnamed5514(); + o.parameters = buildUnnamed4926(); } buildCounterGoogleCloudDialogflowV2beta1Context--; return o; @@ -1954,7 +1954,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1Context < 3) { unittest.expect(o.lifespanCount, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5514(o.parameters); + checkUnnamed4926(o.parameters); } buildCounterGoogleCloudDialogflowV2beta1Context--; } @@ -1985,14 +1985,14 @@ buildCounterGoogleCloudDialogflowV2beta1DetectIntentRequest--; } -buildUnnamed5515() { +buildUnnamed4927() { var o = new core.List<api.GoogleCloudDialogflowV2beta1QueryResult>(); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); return o; } -checkUnnamed5515(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { +checkUnnamed4927(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1QueryResult(o[0]); checkGoogleCloudDialogflowV2beta1QueryResult(o[1]); @@ -2003,7 +2003,7 @@ var o = new api.GoogleCloudDialogflowV2beta1DetectIntentResponse(); buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse++; if (buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse < 3) { - o.alternativeQueryResults = buildUnnamed5515(); + o.alternativeQueryResults = buildUnnamed4927(); o.outputAudio = "foo"; o.outputAudioConfig = buildGoogleCloudDialogflowV2beta1OutputAudioConfig(); o.queryResult = buildGoogleCloudDialogflowV2beta1QueryResult(); @@ -2018,7 +2018,7 @@ api.GoogleCloudDialogflowV2beta1DetectIntentResponse o) { buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse++; if (buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse < 3) { - checkUnnamed5515(o.alternativeQueryResults); + checkUnnamed4927(o.alternativeQueryResults); unittest.expect(o.outputAudio, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1OutputAudioConfig(o.outputAudioConfig); checkGoogleCloudDialogflowV2beta1QueryResult(o.queryResult); @@ -2028,14 +2028,14 @@ buildCounterGoogleCloudDialogflowV2beta1DetectIntentResponse--; } -buildUnnamed5516() { +buildUnnamed4928() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5516(core.List<core.String> o) { +checkUnnamed4928(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2049,7 +2049,7 @@ o.content = "foo"; o.contentUri = "foo"; o.displayName = "foo"; - o.knowledgeTypes = buildUnnamed5516(); + o.knowledgeTypes = buildUnnamed4928(); o.mimeType = "foo"; o.name = "foo"; o.rawContent = "foo"; @@ -2065,7 +2065,7 @@ unittest.expect(o.content, unittest.equals('foo')); unittest.expect(o.contentUri, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5516(o.knowledgeTypes); + checkUnnamed4928(o.knowledgeTypes); unittest.expect(o.mimeType, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.rawContent, unittest.equals('foo')); @@ -2073,14 +2073,14 @@ buildCounterGoogleCloudDialogflowV2beta1Document--; } -buildUnnamed5517() { +buildUnnamed4929() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5517( +checkUnnamed4929( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -2094,7 +2094,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EntityType < 3) { o.autoExpansionMode = "foo"; o.displayName = "foo"; - o.entities = buildUnnamed5517(); + o.entities = buildUnnamed4929(); o.kind = "foo"; o.name = "foo"; } @@ -2108,21 +2108,21 @@ if (buildCounterGoogleCloudDialogflowV2beta1EntityType < 3) { unittest.expect(o.autoExpansionMode, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5517(o.entities); + checkUnnamed4929(o.entities); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1EntityType--; } -buildUnnamed5518() { +buildUnnamed4930() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5518(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4930(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -2133,7 +2133,7 @@ var o = new api.GoogleCloudDialogflowV2beta1EntityTypeBatch(); buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch < 3) { - o.entityTypes = buildUnnamed5518(); + o.entityTypes = buildUnnamed4930(); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch--; return o; @@ -2143,19 +2143,19 @@ api.GoogleCloudDialogflowV2beta1EntityTypeBatch o) { buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch < 3) { - checkUnnamed5518(o.entityTypes); + checkUnnamed4930(o.entityTypes); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeBatch--; } -buildUnnamed5519() { +buildUnnamed4931() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5519(core.List<core.String> o) { +checkUnnamed4931(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2166,7 +2166,7 @@ var o = new api.GoogleCloudDialogflowV2beta1EntityTypeEntity(); buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity < 3) { - o.synonyms = buildUnnamed5519(); + o.synonyms = buildUnnamed4931(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity--; @@ -2177,13 +2177,13 @@ api.GoogleCloudDialogflowV2beta1EntityTypeEntity o) { buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity++; if (buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity < 3) { - checkUnnamed5519(o.synonyms); + checkUnnamed4931(o.synonyms); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1EntityTypeEntity--; } -buildUnnamed5520() { +buildUnnamed4932() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2198,7 +2198,7 @@ return o; } -checkUnnamed5520(core.Map<core.String, core.Object> o) { +checkUnnamed4932(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted19 = (o["x"]) as core.Map; unittest.expect(casted19, unittest.hasLength(3)); @@ -2219,7 +2219,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EventInput < 3) { o.languageCode = "foo"; o.name = "foo"; - o.parameters = buildUnnamed5520(); + o.parameters = buildUnnamed4932(); } buildCounterGoogleCloudDialogflowV2beta1EventInput--; return o; @@ -2231,7 +2231,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1EventInput < 3) { unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5520(o.parameters); + checkUnnamed4932(o.parameters); } buildCounterGoogleCloudDialogflowV2beta1EventInput--; } @@ -2300,14 +2300,14 @@ buildCounterGoogleCloudDialogflowV2beta1ImportAgentRequest--; } -buildUnnamed5521() { +buildUnnamed4933() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5521(core.List<core.String> o) { +checkUnnamed4933(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -2321,7 +2321,7 @@ o.audioEncoding = "foo"; o.languageCode = "foo"; o.model = "foo"; - o.phraseHints = buildUnnamed5521(); + o.phraseHints = buildUnnamed4933(); o.sampleRateHertz = 42; } buildCounterGoogleCloudDialogflowV2beta1InputAudioConfig--; @@ -2335,39 +2335,39 @@ unittest.expect(o.audioEncoding, unittest.equals('foo')); unittest.expect(o.languageCode, unittest.equals('foo')); unittest.expect(o.model, unittest.equals('foo')); - checkUnnamed5521(o.phraseHints); + checkUnnamed4933(o.phraseHints); unittest.expect(o.sampleRateHertz, unittest.equals(42)); } buildCounterGoogleCloudDialogflowV2beta1InputAudioConfig--; } -buildUnnamed5522() { +buildUnnamed4934() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5522(core.List<core.String> o) { +checkUnnamed4934(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5523() { +buildUnnamed4935() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5523(core.List<core.String> o) { +checkUnnamed4935(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5524() { +buildUnnamed4936() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo>(); o.add(buildGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo()); @@ -2375,73 +2375,73 @@ return o; } -checkUnnamed5524( +checkUnnamed4936( core.List<api.GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo(o[0]); checkGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo(o[1]); } -buildUnnamed5525() { +buildUnnamed4937() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5525(core.List<core.String> o) { +checkUnnamed4937(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5526() { +buildUnnamed4938() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5526(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4938(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5527() { +buildUnnamed4939() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5527(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4939(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5528() { +buildUnnamed4940() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentParameter>(); o.add(buildGoogleCloudDialogflowV2beta1IntentParameter()); o.add(buildGoogleCloudDialogflowV2beta1IntentParameter()); return o; } -checkUnnamed5528(core.List<api.GoogleCloudDialogflowV2beta1IntentParameter> o) { +checkUnnamed4940(core.List<api.GoogleCloudDialogflowV2beta1IntentParameter> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentParameter(o[0]); checkGoogleCloudDialogflowV2beta1IntentParameter(o[1]); } -buildUnnamed5529() { +buildUnnamed4941() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrase>(); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrase()); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrase()); return o; } -checkUnnamed5529( +checkUnnamed4941( core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentTrainingPhrase(o[0]); @@ -2454,24 +2454,24 @@ buildCounterGoogleCloudDialogflowV2beta1Intent++; if (buildCounterGoogleCloudDialogflowV2beta1Intent < 3) { o.action = "foo"; - o.defaultResponsePlatforms = buildUnnamed5522(); + o.defaultResponsePlatforms = buildUnnamed4934(); o.displayName = "foo"; o.endInteraction = true; - o.events = buildUnnamed5523(); - o.followupIntentInfo = buildUnnamed5524(); - o.inputContextNames = buildUnnamed5525(); + o.events = buildUnnamed4935(); + o.followupIntentInfo = buildUnnamed4936(); + o.inputContextNames = buildUnnamed4937(); o.isFallback = true; - o.messages = buildUnnamed5526(); + o.messages = buildUnnamed4938(); o.mlDisabled = true; o.mlEnabled = true; o.name = "foo"; - o.outputContexts = buildUnnamed5527(); - o.parameters = buildUnnamed5528(); + o.outputContexts = buildUnnamed4939(); + o.parameters = buildUnnamed4940(); o.parentFollowupIntentName = "foo"; o.priority = 42; o.resetContexts = true; o.rootFollowupIntentName = "foo"; - o.trainingPhrases = buildUnnamed5529(); + o.trainingPhrases = buildUnnamed4941(); o.webhookState = "foo"; } buildCounterGoogleCloudDialogflowV2beta1Intent--; @@ -2483,37 +2483,37 @@ buildCounterGoogleCloudDialogflowV2beta1Intent++; if (buildCounterGoogleCloudDialogflowV2beta1Intent < 3) { unittest.expect(o.action, unittest.equals('foo')); - checkUnnamed5522(o.defaultResponsePlatforms); + checkUnnamed4934(o.defaultResponsePlatforms); unittest.expect(o.displayName, unittest.equals('foo')); unittest.expect(o.endInteraction, unittest.isTrue); - checkUnnamed5523(o.events); - checkUnnamed5524(o.followupIntentInfo); - checkUnnamed5525(o.inputContextNames); + checkUnnamed4935(o.events); + checkUnnamed4936(o.followupIntentInfo); + checkUnnamed4937(o.inputContextNames); unittest.expect(o.isFallback, unittest.isTrue); - checkUnnamed5526(o.messages); + checkUnnamed4938(o.messages); unittest.expect(o.mlDisabled, unittest.isTrue); unittest.expect(o.mlEnabled, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5527(o.outputContexts); - checkUnnamed5528(o.parameters); + checkUnnamed4939(o.outputContexts); + checkUnnamed4940(o.parameters); unittest.expect(o.parentFollowupIntentName, unittest.equals('foo')); unittest.expect(o.priority, unittest.equals(42)); unittest.expect(o.resetContexts, unittest.isTrue); unittest.expect(o.rootFollowupIntentName, unittest.equals('foo')); - checkUnnamed5529(o.trainingPhrases); + checkUnnamed4941(o.trainingPhrases); unittest.expect(o.webhookState, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1Intent--; } -buildUnnamed5530() { +buildUnnamed4942() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5530(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4942(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -2524,7 +2524,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentBatch(); buildCounterGoogleCloudDialogflowV2beta1IntentBatch++; if (buildCounterGoogleCloudDialogflowV2beta1IntentBatch < 3) { - o.intents = buildUnnamed5530(); + o.intents = buildUnnamed4942(); } buildCounterGoogleCloudDialogflowV2beta1IntentBatch--; return o; @@ -2534,7 +2534,7 @@ api.GoogleCloudDialogflowV2beta1IntentBatch o) { buildCounterGoogleCloudDialogflowV2beta1IntentBatch++; if (buildCounterGoogleCloudDialogflowV2beta1IntentBatch < 3) { - checkUnnamed5530(o.intents); + checkUnnamed4942(o.intents); } buildCounterGoogleCloudDialogflowV2beta1IntentBatch--; } @@ -2561,7 +2561,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo--; } -buildUnnamed5531() { +buildUnnamed4943() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -2576,7 +2576,7 @@ return o; } -checkUnnamed5531(core.Map<core.String, core.Object> o) { +checkUnnamed4943(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted21 = (o["x"]) as core.Map; unittest.expect(casted21, unittest.hasLength(3)); @@ -2603,7 +2603,7 @@ o.linkOutSuggestion = buildGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion(); o.listSelect = buildGoogleCloudDialogflowV2beta1IntentMessageListSelect(); - o.payload = buildUnnamed5531(); + o.payload = buildUnnamed4943(); o.platform = "foo"; o.quickReplies = buildGoogleCloudDialogflowV2beta1IntentMessageQuickReplies(); @@ -2634,7 +2634,7 @@ checkGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion( o.linkOutSuggestion); checkGoogleCloudDialogflowV2beta1IntentMessageListSelect(o.listSelect); - checkUnnamed5531(o.payload); + checkUnnamed4943(o.payload); unittest.expect(o.platform, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1IntentMessageQuickReplies(o.quickReplies); checkGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses( @@ -2651,7 +2651,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessage--; } -buildUnnamed5532() { +buildUnnamed4944() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton()); @@ -2659,7 +2659,7 @@ return o; } -checkUnnamed5532( +checkUnnamed4944( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton(o[0]); @@ -2671,7 +2671,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageBasicCard(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard < 3) { - o.buttons = buildUnnamed5532(); + o.buttons = buildUnnamed4944(); o.formattedText = "foo"; o.image = buildGoogleCloudDialogflowV2beta1IntentMessageImage(); o.subtitle = "foo"; @@ -2685,7 +2685,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageBasicCard o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCard < 3) { - checkUnnamed5532(o.buttons); + checkUnnamed4944(o.buttons); unittest.expect(o.formattedText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1IntentMessageImage(o.image); unittest.expect(o.subtitle, unittest.equals('foo')); @@ -2747,7 +2747,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction--; } -buildUnnamed5533() { +buildUnnamed4945() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCardButton>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageCardButton()); @@ -2755,7 +2755,7 @@ return o; } -checkUnnamed5533( +checkUnnamed4945( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCardButton> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageCardButton(o[0]); @@ -2767,7 +2767,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageCard(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard < 3) { - o.buttons = buildUnnamed5533(); + o.buttons = buildUnnamed4945(); o.imageUri = "foo"; o.subtitle = "foo"; o.title = "foo"; @@ -2780,7 +2780,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageCard o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCard < 3) { - checkUnnamed5533(o.buttons); + checkUnnamed4945(o.buttons); unittest.expect(o.imageUri, unittest.equals('foo')); unittest.expect(o.subtitle, unittest.equals('foo')); unittest.expect(o.title, unittest.equals('foo')); @@ -2810,7 +2810,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageCardButton--; } -buildUnnamed5534() { +buildUnnamed4946() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem()); @@ -2818,7 +2818,7 @@ return o; } -checkUnnamed5534( +checkUnnamed4946( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); @@ -2832,7 +2832,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect < 3) { - o.items = buildUnnamed5534(); + o.items = buildUnnamed4946(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect--; return o; @@ -2842,7 +2842,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect < 3) { - checkUnnamed5534(o.items); + checkUnnamed4946(o.items); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect--; } @@ -2923,7 +2923,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion--; } -buildUnnamed5535() { +buildUnnamed4947() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageListSelectItem>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageListSelectItem()); @@ -2931,7 +2931,7 @@ return o; } -checkUnnamed5535( +checkUnnamed4947( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageListSelectItem> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageListSelectItem(o[0]); @@ -2943,7 +2943,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageListSelect(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect < 3) { - o.items = buildUnnamed5535(); + o.items = buildUnnamed4947(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect--; @@ -2954,7 +2954,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageListSelect o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect < 3) { - checkUnnamed5535(o.items); + checkUnnamed4947(o.items); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelect--; @@ -2987,14 +2987,14 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageListSelectItem--; } -buildUnnamed5536() { +buildUnnamed4948() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5536(core.List<core.String> o) { +checkUnnamed4948(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3005,7 +3005,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageQuickReplies(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies < 3) { - o.quickReplies = buildUnnamed5536(); + o.quickReplies = buildUnnamed4948(); o.title = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies--; @@ -3016,20 +3016,20 @@ api.GoogleCloudDialogflowV2beta1IntentMessageQuickReplies o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies < 3) { - checkUnnamed5536(o.quickReplies); + checkUnnamed4948(o.quickReplies); unittest.expect(o.title, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageQuickReplies--; } -buildUnnamed5537() { +buildUnnamed4949() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5537(core.List<core.String> o) { +checkUnnamed4949(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3042,7 +3042,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo < 3) { o.key = "foo"; - o.synonyms = buildUnnamed5537(); + o.synonyms = buildUnnamed4949(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo--; return o; @@ -3053,7 +3053,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo < 3) { unittest.expect(o.key, unittest.equals('foo')); - checkUnnamed5537(o.synonyms); + checkUnnamed4949(o.synonyms); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo--; } @@ -3083,7 +3083,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse--; } -buildUnnamed5538() { +buildUnnamed4950() { var o = new core .List<api.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse()); @@ -3091,7 +3091,7 @@ return o; } -checkUnnamed5538( +checkUnnamed4950( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse(o[0]); @@ -3105,7 +3105,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses < 3) { - o.simpleResponses = buildUnnamed5538(); + o.simpleResponses = buildUnnamed4950(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses--; return o; @@ -3116,7 +3116,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses < 3) { - checkUnnamed5538(o.simpleResponses); + checkUnnamed4950(o.simpleResponses); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses--; } @@ -3141,7 +3141,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestion--; } -buildUnnamed5539() { +buildUnnamed4951() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSuggestion>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessageSuggestion()); @@ -3149,7 +3149,7 @@ return o; } -checkUnnamed5539( +checkUnnamed4951( core.List<api.GoogleCloudDialogflowV2beta1IntentMessageSuggestion> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessageSuggestion(o[0]); @@ -3161,7 +3161,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageSuggestions(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions < 3) { - o.suggestions = buildUnnamed5539(); + o.suggestions = buildUnnamed4951(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions--; return o; @@ -3171,7 +3171,7 @@ api.GoogleCloudDialogflowV2beta1IntentMessageSuggestions o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions < 3) { - checkUnnamed5539(o.suggestions); + checkUnnamed4951(o.suggestions); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageSuggestions--; } @@ -3251,14 +3251,14 @@ buildCounterGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall--; } -buildUnnamed5540() { +buildUnnamed4952() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5540(core.List<core.String> o) { +checkUnnamed4952(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3269,7 +3269,7 @@ var o = new api.GoogleCloudDialogflowV2beta1IntentMessageText(); buildCounterGoogleCloudDialogflowV2beta1IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageText < 3) { - o.text = buildUnnamed5540(); + o.text = buildUnnamed4952(); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageText--; return o; @@ -3279,19 +3279,19 @@ api.GoogleCloudDialogflowV2beta1IntentMessageText o) { buildCounterGoogleCloudDialogflowV2beta1IntentMessageText++; if (buildCounterGoogleCloudDialogflowV2beta1IntentMessageText < 3) { - checkUnnamed5540(o.text); + checkUnnamed4952(o.text); } buildCounterGoogleCloudDialogflowV2beta1IntentMessageText--; } -buildUnnamed5541() { +buildUnnamed4953() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5541(core.List<core.String> o) { +checkUnnamed4953(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3308,7 +3308,7 @@ o.isList = true; o.mandatory = true; o.name = "foo"; - o.prompts = buildUnnamed5541(); + o.prompts = buildUnnamed4953(); o.value = "foo"; } buildCounterGoogleCloudDialogflowV2beta1IntentParameter--; @@ -3325,13 +3325,13 @@ unittest.expect(o.isList, unittest.isTrue); unittest.expect(o.mandatory, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5541(o.prompts); + checkUnnamed4953(o.prompts); unittest.expect(o.value, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1IntentParameter--; } -buildUnnamed5542() { +buildUnnamed4954() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart>(); o.add(buildGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart()); @@ -3339,7 +3339,7 @@ return o; } -checkUnnamed5542( +checkUnnamed4954( core.List<api.GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart(o[0]); @@ -3352,7 +3352,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase < 3) { o.name = "foo"; - o.parts = buildUnnamed5542(); + o.parts = buildUnnamed4954(); o.timesAddedCount = 42; o.type = "foo"; } @@ -3365,7 +3365,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase++; if (buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrase < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5542(o.parts); + checkUnnamed4954(o.parts); unittest.expect(o.timesAddedCount, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } @@ -3398,7 +3398,7 @@ buildCounterGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart--; } -buildUnnamed5543() { +buildUnnamed4955() { var o = new core.List<api.GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer>(); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer()); @@ -3406,7 +3406,7 @@ return o; } -checkUnnamed5543( +checkUnnamed4955( core.List<api.GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer(o[0]); @@ -3418,7 +3418,7 @@ var o = new api.GoogleCloudDialogflowV2beta1KnowledgeAnswers(); buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers++; if (buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers < 3) { - o.answers = buildUnnamed5543(); + o.answers = buildUnnamed4955(); } buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers--; return o; @@ -3428,7 +3428,7 @@ api.GoogleCloudDialogflowV2beta1KnowledgeAnswers o) { buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers++; if (buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers < 3) { - checkUnnamed5543(o.answers); + checkUnnamed4955(o.answers); } buildCounterGoogleCloudDialogflowV2beta1KnowledgeAnswers--; } @@ -3503,14 +3503,14 @@ buildCounterGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata--; } -buildUnnamed5544() { +buildUnnamed4956() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5544(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4956(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); @@ -3521,7 +3521,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListContextsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse < 3) { - o.contexts = buildUnnamed5544(); + o.contexts = buildUnnamed4956(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse--; @@ -3532,20 +3532,20 @@ api.GoogleCloudDialogflowV2beta1ListContextsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse < 3) { - checkUnnamed5544(o.contexts); + checkUnnamed4956(o.contexts); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListContextsResponse--; } -buildUnnamed5545() { +buildUnnamed4957() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Document>(); o.add(buildGoogleCloudDialogflowV2beta1Document()); o.add(buildGoogleCloudDialogflowV2beta1Document()); return o; } -checkUnnamed5545(core.List<api.GoogleCloudDialogflowV2beta1Document> o) { +checkUnnamed4957(core.List<api.GoogleCloudDialogflowV2beta1Document> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Document(o[0]); checkGoogleCloudDialogflowV2beta1Document(o[1]); @@ -3556,7 +3556,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListDocumentsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse < 3) { - o.documents = buildUnnamed5545(); + o.documents = buildUnnamed4957(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse--; @@ -3567,20 +3567,20 @@ api.GoogleCloudDialogflowV2beta1ListDocumentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse < 3) { - checkUnnamed5545(o.documents); + checkUnnamed4957(o.documents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListDocumentsResponse--; } -buildUnnamed5546() { +buildUnnamed4958() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityType>(); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); o.add(buildGoogleCloudDialogflowV2beta1EntityType()); return o; } -checkUnnamed5546(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { +checkUnnamed4958(core.List<api.GoogleCloudDialogflowV2beta1EntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityType(o[0]); checkGoogleCloudDialogflowV2beta1EntityType(o[1]); @@ -3591,7 +3591,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListEntityTypesResponse(); buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse < 3) { - o.entityTypes = buildUnnamed5546(); + o.entityTypes = buildUnnamed4958(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse--; @@ -3602,20 +3602,20 @@ api.GoogleCloudDialogflowV2beta1ListEntityTypesResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse < 3) { - checkUnnamed5546(o.entityTypes); + checkUnnamed4958(o.entityTypes); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListEntityTypesResponse--; } -buildUnnamed5547() { +buildUnnamed4959() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Intent>(); o.add(buildGoogleCloudDialogflowV2beta1Intent()); o.add(buildGoogleCloudDialogflowV2beta1Intent()); return o; } -checkUnnamed5547(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { +checkUnnamed4959(core.List<api.GoogleCloudDialogflowV2beta1Intent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Intent(o[0]); checkGoogleCloudDialogflowV2beta1Intent(o[1]); @@ -3626,7 +3626,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListIntentsResponse(); buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse < 3) { - o.intents = buildUnnamed5547(); + o.intents = buildUnnamed4959(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse--; @@ -3637,20 +3637,20 @@ api.GoogleCloudDialogflowV2beta1ListIntentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse < 3) { - checkUnnamed5547(o.intents); + checkUnnamed4959(o.intents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListIntentsResponse--; } -buildUnnamed5548() { +buildUnnamed4960() { var o = new core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase>(); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); o.add(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); return o; } -checkUnnamed5548(core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase> o) { +checkUnnamed4960(core.List<api.GoogleCloudDialogflowV2beta1KnowledgeBase> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1KnowledgeBase(o[0]); checkGoogleCloudDialogflowV2beta1KnowledgeBase(o[1]); @@ -3661,7 +3661,7 @@ var o = new api.GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(); buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse < 3) { - o.knowledgeBases = buildUnnamed5548(); + o.knowledgeBases = buildUnnamed4960(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse--; @@ -3672,20 +3672,20 @@ api.GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse o) { buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse++; if (buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse < 3) { - checkUnnamed5548(o.knowledgeBases); + checkUnnamed4960(o.knowledgeBases); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse--; } -buildUnnamed5549() { +buildUnnamed4961() { var o = new core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType>(); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); return o; } -checkUnnamed5549( +checkUnnamed4961( core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1SessionEntityType(o[0]); @@ -3700,7 +3700,7 @@ if (buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse < 3) { o.nextPageToken = "foo"; - o.sessionEntityTypes = buildUnnamed5549(); + o.sessionEntityTypes = buildUnnamed4961(); } buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse--; return o; @@ -3712,12 +3712,12 @@ if (buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5549(o.sessionEntityTypes); + checkUnnamed4961(o.sessionEntityTypes); } buildCounterGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse--; } -buildUnnamed5550() { +buildUnnamed4962() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3732,7 +3732,7 @@ return o; } -checkUnnamed5550(core.Map<core.String, core.Object> o) { +checkUnnamed4962(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted23 = (o["x"]) as core.Map; unittest.expect(casted23, unittest.hasLength(3)); @@ -3752,7 +3752,7 @@ var o = new api.GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest(); buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest < 3) { - o.payload = buildUnnamed5550(); + o.payload = buildUnnamed4962(); o.source = "foo"; o.version = "foo"; } @@ -3764,7 +3764,7 @@ api.GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest o) { buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest++; if (buildCounterGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest < 3) { - checkUnnamed5550(o.payload); + checkUnnamed4962(o.payload); unittest.expect(o.source, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } @@ -3821,33 +3821,33 @@ buildCounterGoogleCloudDialogflowV2beta1QueryInput--; } -buildUnnamed5551() { +buildUnnamed4963() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5551(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4963(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5552() { +buildUnnamed4964() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5552(core.List<core.String> o) { +checkUnnamed4964(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5553() { +buildUnnamed4965() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3862,7 +3862,7 @@ return o; } -checkUnnamed5553(core.Map<core.String, core.Object> o) { +checkUnnamed4965(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted25 = (o["x"]) as core.Map; unittest.expect(casted25, unittest.hasLength(3)); @@ -3876,14 +3876,14 @@ unittest.expect(casted26["string"], unittest.equals('foo')); } -buildUnnamed5554() { +buildUnnamed4966() { var o = new core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType>(); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); o.add(buildGoogleCloudDialogflowV2beta1SessionEntityType()); return o; } -checkUnnamed5554( +checkUnnamed4966( core.List<api.GoogleCloudDialogflowV2beta1SessionEntityType> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1SessionEntityType(o[0]); @@ -3895,14 +3895,14 @@ var o = new api.GoogleCloudDialogflowV2beta1QueryParameters(); buildCounterGoogleCloudDialogflowV2beta1QueryParameters++; if (buildCounterGoogleCloudDialogflowV2beta1QueryParameters < 3) { - o.contexts = buildUnnamed5551(); + o.contexts = buildUnnamed4963(); o.geoLocation = buildGoogleTypeLatLng(); - o.knowledgeBaseNames = buildUnnamed5552(); - o.payload = buildUnnamed5553(); + o.knowledgeBaseNames = buildUnnamed4964(); + o.payload = buildUnnamed4965(); o.resetContexts = true; o.sentimentAnalysisRequestConfig = buildGoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig(); - o.sessionEntityTypes = buildUnnamed5554(); + o.sessionEntityTypes = buildUnnamed4966(); o.timeZone = "foo"; } buildCounterGoogleCloudDialogflowV2beta1QueryParameters--; @@ -3913,20 +3913,20 @@ api.GoogleCloudDialogflowV2beta1QueryParameters o) { buildCounterGoogleCloudDialogflowV2beta1QueryParameters++; if (buildCounterGoogleCloudDialogflowV2beta1QueryParameters < 3) { - checkUnnamed5551(o.contexts); + checkUnnamed4963(o.contexts); checkGoogleTypeLatLng(o.geoLocation); - checkUnnamed5552(o.knowledgeBaseNames); - checkUnnamed5553(o.payload); + checkUnnamed4964(o.knowledgeBaseNames); + checkUnnamed4965(o.payload); unittest.expect(o.resetContexts, unittest.isTrue); checkGoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig( o.sentimentAnalysisRequestConfig); - checkUnnamed5554(o.sessionEntityTypes); + checkUnnamed4966(o.sessionEntityTypes); unittest.expect(o.timeZone, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1QueryParameters--; } -buildUnnamed5555() { +buildUnnamed4967() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3941,7 +3941,7 @@ return o; } -checkUnnamed5555(core.Map<core.String, core.Object> o) { +checkUnnamed4967(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted27 = (o["x"]) as core.Map; unittest.expect(casted27, unittest.hasLength(3)); @@ -3955,33 +3955,33 @@ unittest.expect(casted28["string"], unittest.equals('foo')); } -buildUnnamed5556() { +buildUnnamed4968() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5556(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4968(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5557() { +buildUnnamed4969() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5557(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4969(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5558() { +buildUnnamed4970() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -3996,7 +3996,7 @@ return o; } -checkUnnamed5558(core.Map<core.String, core.Object> o) { +checkUnnamed4970(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted29 = (o["x"]) as core.Map; unittest.expect(casted29, unittest.hasLength(3)); @@ -4010,7 +4010,7 @@ unittest.expect(casted30["string"], unittest.equals('foo')); } -buildUnnamed5559() { +buildUnnamed4971() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4025,7 +4025,7 @@ return o; } -checkUnnamed5559(core.Map<core.String, core.Object> o) { +checkUnnamed4971(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted31 = (o["x"]) as core.Map; unittest.expect(casted31, unittest.hasLength(3)); @@ -4046,20 +4046,20 @@ if (buildCounterGoogleCloudDialogflowV2beta1QueryResult < 3) { o.action = "foo"; o.allRequiredParamsPresent = true; - o.diagnosticInfo = buildUnnamed5555(); - o.fulfillmentMessages = buildUnnamed5556(); + o.diagnosticInfo = buildUnnamed4967(); + o.fulfillmentMessages = buildUnnamed4968(); o.fulfillmentText = "foo"; o.intent = buildGoogleCloudDialogflowV2beta1Intent(); o.intentDetectionConfidence = 42.0; o.knowledgeAnswers = buildGoogleCloudDialogflowV2beta1KnowledgeAnswers(); o.languageCode = "foo"; - o.outputContexts = buildUnnamed5557(); - o.parameters = buildUnnamed5558(); + o.outputContexts = buildUnnamed4969(); + o.parameters = buildUnnamed4970(); o.queryText = "foo"; o.sentimentAnalysisResult = buildGoogleCloudDialogflowV2beta1SentimentAnalysisResult(); o.speechRecognitionConfidence = 42.0; - o.webhookPayload = buildUnnamed5559(); + o.webhookPayload = buildUnnamed4971(); o.webhookSource = "foo"; } buildCounterGoogleCloudDialogflowV2beta1QueryResult--; @@ -4072,25 +4072,41 @@ if (buildCounterGoogleCloudDialogflowV2beta1QueryResult < 3) { unittest.expect(o.action, unittest.equals('foo')); unittest.expect(o.allRequiredParamsPresent, unittest.isTrue); - checkUnnamed5555(o.diagnosticInfo); - checkUnnamed5556(o.fulfillmentMessages); + checkUnnamed4967(o.diagnosticInfo); + checkUnnamed4968(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1Intent(o.intent); unittest.expect(o.intentDetectionConfidence, unittest.equals(42.0)); checkGoogleCloudDialogflowV2beta1KnowledgeAnswers(o.knowledgeAnswers); unittest.expect(o.languageCode, unittest.equals('foo')); - checkUnnamed5557(o.outputContexts); - checkUnnamed5558(o.parameters); + checkUnnamed4969(o.outputContexts); + checkUnnamed4970(o.parameters); unittest.expect(o.queryText, unittest.equals('foo')); checkGoogleCloudDialogflowV2beta1SentimentAnalysisResult( o.sentimentAnalysisResult); unittest.expect(o.speechRecognitionConfidence, unittest.equals(42.0)); - checkUnnamed5559(o.webhookPayload); + checkUnnamed4971(o.webhookPayload); unittest.expect(o.webhookSource, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1QueryResult--; } +core.int buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest = 0; +buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest() { + var o = new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest++; + if (buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest < 3) {} + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest--; + return o; +} + +checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest( + api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest o) { + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest++; + if (buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest < 3) {} + buildCounterGoogleCloudDialogflowV2beta1ReloadDocumentRequest--; +} + core.int buildCounterGoogleCloudDialogflowV2beta1RestoreAgentRequest = 0; buildGoogleCloudDialogflowV2beta1RestoreAgentRequest() { var o = new api.GoogleCloudDialogflowV2beta1RestoreAgentRequest(); @@ -4113,14 +4129,14 @@ buildCounterGoogleCloudDialogflowV2beta1RestoreAgentRequest--; } -buildUnnamed5560() { +buildUnnamed4972() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Agent>(); o.add(buildGoogleCloudDialogflowV2beta1Agent()); o.add(buildGoogleCloudDialogflowV2beta1Agent()); return o; } -checkUnnamed5560(core.List<api.GoogleCloudDialogflowV2beta1Agent> o) { +checkUnnamed4972(core.List<api.GoogleCloudDialogflowV2beta1Agent> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Agent(o[0]); checkGoogleCloudDialogflowV2beta1Agent(o[1]); @@ -4131,7 +4147,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SearchAgentsResponse(); buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse < 3) { - o.agents = buildUnnamed5560(); + o.agents = buildUnnamed4972(); o.nextPageToken = "foo"; } buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse--; @@ -4142,7 +4158,7 @@ api.GoogleCloudDialogflowV2beta1SearchAgentsResponse o) { buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse++; if (buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse < 3) { - checkUnnamed5560(o.agents); + checkUnnamed4972(o.agents); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1SearchAgentsResponse--; @@ -4213,14 +4229,14 @@ buildCounterGoogleCloudDialogflowV2beta1SentimentAnalysisResult--; } -buildUnnamed5561() { +buildUnnamed4973() { var o = new core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity>(); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); o.add(buildGoogleCloudDialogflowV2beta1EntityTypeEntity()); return o; } -checkUnnamed5561( +checkUnnamed4973( core.List<api.GoogleCloudDialogflowV2beta1EntityTypeEntity> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1EntityTypeEntity(o[0]); @@ -4232,7 +4248,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SessionEntityType(); buildCounterGoogleCloudDialogflowV2beta1SessionEntityType++; if (buildCounterGoogleCloudDialogflowV2beta1SessionEntityType < 3) { - o.entities = buildUnnamed5561(); + o.entities = buildUnnamed4973(); o.entityOverrideMode = "foo"; o.name = "foo"; } @@ -4244,21 +4260,21 @@ api.GoogleCloudDialogflowV2beta1SessionEntityType o) { buildCounterGoogleCloudDialogflowV2beta1SessionEntityType++; if (buildCounterGoogleCloudDialogflowV2beta1SessionEntityType < 3) { - checkUnnamed5561(o.entities); + checkUnnamed4973(o.entities); unittest.expect(o.entityOverrideMode, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1SessionEntityType--; } -buildUnnamed5562() { +buildUnnamed4974() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5562(core.List<core.String> o) { +checkUnnamed4974(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -4269,7 +4285,7 @@ var o = new api.GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig(); buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig++; if (buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig < 3) { - o.effectsProfileId = buildUnnamed5562(); + o.effectsProfileId = buildUnnamed4974(); o.pitch = 42.0; o.speakingRate = 42.0; o.voice = buildGoogleCloudDialogflowV2beta1VoiceSelectionParams(); @@ -4283,7 +4299,7 @@ api.GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig o) { buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig++; if (buildCounterGoogleCloudDialogflowV2beta1SynthesizeSpeechConfig < 3) { - checkUnnamed5562(o.effectsProfileId); + checkUnnamed4974(o.effectsProfileId); unittest.expect(o.pitch, unittest.equals(42.0)); unittest.expect(o.speakingRate, unittest.equals(42.0)); checkGoogleCloudDialogflowV2beta1VoiceSelectionParams(o.voice); @@ -4352,14 +4368,14 @@ buildCounterGoogleCloudDialogflowV2beta1VoiceSelectionParams--; } -buildUnnamed5563() { +buildUnnamed4975() { var o = new core.List<api.GoogleCloudDialogflowV2beta1QueryResult>(); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); o.add(buildGoogleCloudDialogflowV2beta1QueryResult()); return o; } -checkUnnamed5563(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { +checkUnnamed4975(core.List<api.GoogleCloudDialogflowV2beta1QueryResult> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1QueryResult(o[0]); checkGoogleCloudDialogflowV2beta1QueryResult(o[1]); @@ -4370,7 +4386,7 @@ var o = new api.GoogleCloudDialogflowV2beta1WebhookRequest(); buildCounterGoogleCloudDialogflowV2beta1WebhookRequest++; if (buildCounterGoogleCloudDialogflowV2beta1WebhookRequest < 3) { - o.alternativeQueryResults = buildUnnamed5563(); + o.alternativeQueryResults = buildUnnamed4975(); o.originalDetectIntentRequest = buildGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest(); o.queryResult = buildGoogleCloudDialogflowV2beta1QueryResult(); @@ -4385,7 +4401,7 @@ api.GoogleCloudDialogflowV2beta1WebhookRequest o) { buildCounterGoogleCloudDialogflowV2beta1WebhookRequest++; if (buildCounterGoogleCloudDialogflowV2beta1WebhookRequest < 3) { - checkUnnamed5563(o.alternativeQueryResults); + checkUnnamed4975(o.alternativeQueryResults); checkGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest( o.originalDetectIntentRequest); checkGoogleCloudDialogflowV2beta1QueryResult(o.queryResult); @@ -4395,33 +4411,33 @@ buildCounterGoogleCloudDialogflowV2beta1WebhookRequest--; } -buildUnnamed5564() { +buildUnnamed4976() { var o = new core.List<api.GoogleCloudDialogflowV2beta1IntentMessage>(); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); o.add(buildGoogleCloudDialogflowV2beta1IntentMessage()); return o; } -checkUnnamed5564(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { +checkUnnamed4976(core.List<api.GoogleCloudDialogflowV2beta1IntentMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1IntentMessage(o[0]); checkGoogleCloudDialogflowV2beta1IntentMessage(o[1]); } -buildUnnamed5565() { +buildUnnamed4977() { var o = new core.List<api.GoogleCloudDialogflowV2beta1Context>(); o.add(buildGoogleCloudDialogflowV2beta1Context()); o.add(buildGoogleCloudDialogflowV2beta1Context()); return o; } -checkUnnamed5565(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { +checkUnnamed4977(core.List<api.GoogleCloudDialogflowV2beta1Context> o) { unittest.expect(o, unittest.hasLength(2)); checkGoogleCloudDialogflowV2beta1Context(o[0]); checkGoogleCloudDialogflowV2beta1Context(o[1]); } -buildUnnamed5566() { +buildUnnamed4978() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4436,7 +4452,7 @@ return o; } -checkUnnamed5566(core.Map<core.String, core.Object> o) { +checkUnnamed4978(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted33 = (o["x"]) as core.Map; unittest.expect(casted33, unittest.hasLength(3)); @@ -4457,10 +4473,10 @@ if (buildCounterGoogleCloudDialogflowV2beta1WebhookResponse < 3) { o.endInteraction = true; o.followupEventInput = buildGoogleCloudDialogflowV2beta1EventInput(); - o.fulfillmentMessages = buildUnnamed5564(); + o.fulfillmentMessages = buildUnnamed4976(); o.fulfillmentText = "foo"; - o.outputContexts = buildUnnamed5565(); - o.payload = buildUnnamed5566(); + o.outputContexts = buildUnnamed4977(); + o.payload = buildUnnamed4978(); o.source = "foo"; } buildCounterGoogleCloudDialogflowV2beta1WebhookResponse--; @@ -4473,16 +4489,16 @@ if (buildCounterGoogleCloudDialogflowV2beta1WebhookResponse < 3) { unittest.expect(o.endInteraction, unittest.isTrue); checkGoogleCloudDialogflowV2beta1EventInput(o.followupEventInput); - checkUnnamed5564(o.fulfillmentMessages); + checkUnnamed4976(o.fulfillmentMessages); unittest.expect(o.fulfillmentText, unittest.equals('foo')); - checkUnnamed5565(o.outputContexts); - checkUnnamed5566(o.payload); + checkUnnamed4977(o.outputContexts); + checkUnnamed4978(o.payload); unittest.expect(o.source, unittest.equals('foo')); } buildCounterGoogleCloudDialogflowV2beta1WebhookResponse--; } -buildUnnamed5567() { +buildUnnamed4979() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4497,7 +4513,7 @@ return o; } -checkUnnamed5567(core.Map<core.String, core.Object> o) { +checkUnnamed4979(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted35 = (o["x"]) as core.Map; unittest.expect(casted35, unittest.hasLength(3)); @@ -4511,7 +4527,7 @@ unittest.expect(casted36["string"], unittest.equals('foo')); } -buildUnnamed5568() { +buildUnnamed4980() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4526,7 +4542,7 @@ return o; } -checkUnnamed5568(core.Map<core.String, core.Object> o) { +checkUnnamed4980(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted37 = (o["x"]) as core.Map; unittest.expect(casted37, unittest.hasLength(3)); @@ -4547,9 +4563,9 @@ if (buildCounterGoogleLongrunningOperation < 3) { o.done = true; o.error = buildGoogleRpcStatus(); - o.metadata = buildUnnamed5567(); + o.metadata = buildUnnamed4979(); o.name = "foo"; - o.response = buildUnnamed5568(); + o.response = buildUnnamed4980(); } buildCounterGoogleLongrunningOperation--; return o; @@ -4560,9 +4576,9 @@ if (buildCounterGoogleLongrunningOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkGoogleRpcStatus(o.error); - checkUnnamed5567(o.metadata); + checkUnnamed4979(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5568(o.response); + checkUnnamed4980(o.response); } buildCounterGoogleLongrunningOperation--; } @@ -4582,7 +4598,7 @@ buildCounterGoogleProtobufEmpty--; } -buildUnnamed5569() { +buildUnnamed4981() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -4597,7 +4613,7 @@ return o; } -checkUnnamed5569(core.Map<core.String, core.Object> o) { +checkUnnamed4981(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted39 = (o["x"]) as core.Map; unittest.expect(casted39, unittest.hasLength(3)); @@ -4611,17 +4627,17 @@ unittest.expect(casted40["string"], unittest.equals('foo')); } -buildUnnamed5570() { +buildUnnamed4982() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5569()); - o.add(buildUnnamed5569()); + o.add(buildUnnamed4981()); + o.add(buildUnnamed4981()); return o; } -checkUnnamed5570(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4982(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5569(o[0]); - checkUnnamed5569(o[1]); + checkUnnamed4981(o[0]); + checkUnnamed4981(o[1]); } core.int buildCounterGoogleRpcStatus = 0; @@ -4630,7 +4646,7 @@ buildCounterGoogleRpcStatus++; if (buildCounterGoogleRpcStatus < 3) { o.code = 42; - o.details = buildUnnamed5570(); + o.details = buildUnnamed4982(); o.message = "foo"; } buildCounterGoogleRpcStatus--; @@ -4641,7 +4657,7 @@ buildCounterGoogleRpcStatus++; if (buildCounterGoogleRpcStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5570(o.details); + checkUnnamed4982(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterGoogleRpcStatus--; @@ -5702,6 +5718,17 @@ }); }); + unittest.group("obj-schema-GoogleCloudDialogflowV2beta1ReloadDocumentRequest", + () { + unittest.test("to-json--from-json", () { + var o = buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var od = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + o.toJson()); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(od); + }); + }); + unittest.group("obj-schema-GoogleCloudDialogflowV2beta1RestoreAgentRequest", () { unittest.test("to-json--from-json", () { @@ -6499,9 +6526,9 @@ api.ProjectsAgentEntityTypesResourceApi res = new api.DialogflowApi(mock).projects.agent.entityTypes; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_languageCode = "foo"; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -6534,12 +6561,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -6551,9 +6578,9 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, languageCode: arg_languageCode, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListEntityTypesResponse(response); @@ -7444,8 +7471,8 @@ .sessions .entityTypes; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -7478,10 +7505,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7493,8 +7520,8 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse( @@ -7697,8 +7724,8 @@ new api.DialogflowApi(mock).projects.agent.intents; var arg_request = buildGoogleCloudDialogflowV2beta1Intent(); var arg_parent = "foo"; - var arg_languageCode = "foo"; var arg_intentView = "foo"; + var arg_languageCode = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.GoogleCloudDialogflowV2beta1Intent.fromJson(json); @@ -7735,9 +7762,9 @@ } } unittest.expect( - queryMap["languageCode"].first, unittest.equals(arg_languageCode)); - unittest.expect( queryMap["intentView"].first, unittest.equals(arg_intentView)); + unittest.expect( + queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -7749,8 +7776,8 @@ }), true); res .create(arg_request, arg_parent, - languageCode: arg_languageCode, intentView: arg_intentView, + languageCode: arg_languageCode, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1Intent(response); @@ -7947,9 +7974,9 @@ new api.DialogflowApi(mock).projects.agent.intents; var arg_request = buildGoogleCloudDialogflowV2beta1Intent(); var arg_name = "foo"; + var arg_intentView = "foo"; var arg_languageCode = "foo"; var arg_updateMask = "foo"; - var arg_intentView = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.GoogleCloudDialogflowV2beta1Intent.fromJson(json); @@ -7986,11 +8013,11 @@ } } unittest.expect( + queryMap["intentView"].first, unittest.equals(arg_intentView)); + unittest.expect( queryMap["languageCode"].first, unittest.equals(arg_languageCode)); unittest.expect( queryMap["updateMask"].first, unittest.equals(arg_updateMask)); - unittest.expect( - queryMap["intentView"].first, unittest.equals(arg_intentView)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8002,9 +8029,9 @@ }), true); res .patch(arg_request, arg_name, + intentView: arg_intentView, languageCode: arg_languageCode, updateMask: arg_updateMask, - intentView: arg_intentView, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1Intent(response); @@ -8239,6 +8266,68 @@ checkGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases; + var arg_request = buildGoogleCloudDialogflowV2beta1KnowledgeBase(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(json); + checkGoogleCloudDialogflowV2beta1KnowledgeBase(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json + .encode(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleCloudDialogflowV2beta1KnowledgeBase(response); + }))); + }); }); unittest.group("resource-ProjectsAgentKnowledgeBasesDocumentsResourceApi", @@ -8465,6 +8554,125 @@ checkGoogleCloudDialogflowV2beta1ListDocumentsResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases.documents; + var arg_request = buildGoogleCloudDialogflowV2beta1Document(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GoogleCloudDialogflowV2beta1Document.fromJson(json); + checkGoogleCloudDialogflowV2beta1Document(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); + + unittest.test("method--reload", () { + var mock = new HttpServerMock(); + api.ProjectsAgentKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.agent.knowledgeBases.documents; + var arg_request = + buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + json); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .reload(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); }); unittest.group("resource-ProjectsAgentSessionsResourceApi", () { @@ -8748,8 +8956,8 @@ api.ProjectsAgentSessionsContextsResourceApi res = new api.DialogflowApi(mock).projects.agent.sessions.contexts; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -8782,10 +8990,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -8797,8 +9005,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListContextsResponse(response); @@ -9386,6 +9594,68 @@ checkGoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases; + var arg_request = buildGoogleCloudDialogflowV2beta1KnowledgeBase(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1KnowledgeBase.fromJson(json); + checkGoogleCloudDialogflowV2beta1KnowledgeBase(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json + .encode(buildGoogleCloudDialogflowV2beta1KnowledgeBase()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleCloudDialogflowV2beta1KnowledgeBase(response); + }))); + }); }); unittest.group("resource-ProjectsKnowledgeBasesDocumentsResourceApi", () { @@ -9555,8 +9825,8 @@ api.ProjectsKnowledgeBasesDocumentsResourceApi res = new api.DialogflowApi(mock).projects.knowledgeBases.documents; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -9589,10 +9859,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -9604,13 +9874,132 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkGoogleCloudDialogflowV2beta1ListDocumentsResponse(response); }))); }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases.documents; + var arg_request = buildGoogleCloudDialogflowV2beta1Document(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.GoogleCloudDialogflowV2beta1Document.fromJson(json); + checkGoogleCloudDialogflowV2beta1Document(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); + + unittest.test("method--reload", () { + var mock = new HttpServerMock(); + api.ProjectsKnowledgeBasesDocumentsResourceApi res = + new api.DialogflowApi(mock).projects.knowledgeBases.documents; + var arg_request = + buildGoogleCloudDialogflowV2beta1ReloadDocumentRequest(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = + new api.GoogleCloudDialogflowV2beta1ReloadDocumentRequest.fromJson( + json); + checkGoogleCloudDialogflowV2beta1ReloadDocumentRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v2beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildGoogleLongrunningOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .reload(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkGoogleLongrunningOperation(response); + }))); + }); }); unittest.group("resource-ProjectsOperationsResourceApi", () {
diff --git a/generated/googleapis_beta/test/dns/v2beta1_test.dart b/generated/googleapis_beta/test/dns/v2beta1_test.dart index 4e324b6..5134497 100644 --- a/generated/googleapis_beta/test/dns/v2beta1_test.dart +++ b/generated/googleapis_beta/test/dns/v2beta1_test.dart
@@ -50,27 +50,27 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5610() { +buildUnnamed4734() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5610(core.List<api.ResourceRecordSet> o) { +checkUnnamed4734(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); } -buildUnnamed5611() { +buildUnnamed4735() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5611(core.List<api.ResourceRecordSet> o) { +checkUnnamed4735(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); @@ -81,8 +81,8 @@ var o = new api.Change(); buildCounterChange++; if (buildCounterChange < 3) { - o.additions = buildUnnamed5610(); - o.deletions = buildUnnamed5611(); + o.additions = buildUnnamed4734(); + o.deletions = buildUnnamed4735(); o.id = "foo"; o.isServing = true; o.kind = "foo"; @@ -96,8 +96,8 @@ checkChange(api.Change o) { buildCounterChange++; if (buildCounterChange < 3) { - checkUnnamed5610(o.additions); - checkUnnamed5611(o.deletions); + checkUnnamed4734(o.additions); + checkUnnamed4735(o.deletions); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.isServing, unittest.isTrue); unittest.expect(o.kind, unittest.equals('foo')); @@ -107,14 +107,14 @@ buildCounterChange--; } -buildUnnamed5612() { +buildUnnamed4736() { var o = new core.List<api.Change>(); o.add(buildChange()); o.add(buildChange()); return o; } -checkUnnamed5612(core.List<api.Change> o) { +checkUnnamed4736(core.List<api.Change> o) { unittest.expect(o, unittest.hasLength(2)); checkChange(o[0]); checkChange(o[1]); @@ -125,7 +125,7 @@ var o = new api.ChangesListResponse(); buildCounterChangesListResponse++; if (buildCounterChangesListResponse < 3) { - o.changes = buildUnnamed5612(); + o.changes = buildUnnamed4736(); o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; @@ -137,7 +137,7 @@ checkChangesListResponse(api.ChangesListResponse o) { buildCounterChangesListResponse++; if (buildCounterChangesListResponse < 3) { - checkUnnamed5612(o.changes); + checkUnnamed4736(o.changes); checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); @@ -145,14 +145,14 @@ buildCounterChangesListResponse--; } -buildUnnamed5613() { +buildUnnamed4737() { var o = new core.List<api.DnsKeyDigest>(); o.add(buildDnsKeyDigest()); o.add(buildDnsKeyDigest()); return o; } -checkUnnamed5613(core.List<api.DnsKeyDigest> o) { +checkUnnamed4737(core.List<api.DnsKeyDigest> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeyDigest(o[0]); checkDnsKeyDigest(o[1]); @@ -166,7 +166,7 @@ o.algorithm = "foo"; o.creationTime = "foo"; o.description = "foo"; - o.digests = buildUnnamed5613(); + o.digests = buildUnnamed4737(); o.id = "foo"; o.isActive = true; o.keyLength = 42; @@ -185,7 +185,7 @@ unittest.expect(o.algorithm, unittest.equals('foo')); unittest.expect(o.creationTime, unittest.equals('foo')); unittest.expect(o.description, unittest.equals('foo')); - checkUnnamed5613(o.digests); + checkUnnamed4737(o.digests); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.isActive, unittest.isTrue); unittest.expect(o.keyLength, unittest.equals(42)); @@ -243,14 +243,14 @@ buildCounterDnsKeySpec--; } -buildUnnamed5614() { +buildUnnamed4738() { var o = new core.List<api.DnsKey>(); o.add(buildDnsKey()); o.add(buildDnsKey()); return o; } -checkUnnamed5614(core.List<api.DnsKey> o) { +checkUnnamed4738(core.List<api.DnsKey> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKey(o[0]); checkDnsKey(o[1]); @@ -261,7 +261,7 @@ var o = new api.DnsKeysListResponse(); buildCounterDnsKeysListResponse++; if (buildCounterDnsKeysListResponse < 3) { - o.dnsKeys = buildUnnamed5614(); + o.dnsKeys = buildUnnamed4738(); o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; @@ -273,7 +273,7 @@ checkDnsKeysListResponse(api.DnsKeysListResponse o) { buildCounterDnsKeysListResponse++; if (buildCounterDnsKeysListResponse < 3) { - checkUnnamed5614(o.dnsKeys); + checkUnnamed4738(o.dnsKeys); checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); @@ -281,27 +281,27 @@ buildCounterDnsKeysListResponse--; } -buildUnnamed5615() { +buildUnnamed4739() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5615(core.Map<core.String, core.String> o) { +checkUnnamed4739(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5616() { +buildUnnamed4740() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5616(core.List<core.String> o) { +checkUnnamed4740(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -318,10 +318,10 @@ o.dnssecConfig = buildManagedZoneDnsSecConfig(); o.id = "foo"; o.kind = "foo"; - o.labels = buildUnnamed5615(); + o.labels = buildUnnamed4739(); o.name = "foo"; o.nameServerSet = "foo"; - o.nameServers = buildUnnamed5616(); + o.nameServers = buildUnnamed4740(); } buildCounterManagedZone--; return o; @@ -336,22 +336,22 @@ checkManagedZoneDnsSecConfig(o.dnssecConfig); unittest.expect(o.id, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5615(o.labels); + checkUnnamed4739(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.nameServerSet, unittest.equals('foo')); - checkUnnamed5616(o.nameServers); + checkUnnamed4740(o.nameServers); } buildCounterManagedZone--; } -buildUnnamed5617() { +buildUnnamed4741() { var o = new core.List<api.DnsKeySpec>(); o.add(buildDnsKeySpec()); o.add(buildDnsKeySpec()); return o; } -checkUnnamed5617(core.List<api.DnsKeySpec> o) { +checkUnnamed4741(core.List<api.DnsKeySpec> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeySpec(o[0]); checkDnsKeySpec(o[1]); @@ -362,7 +362,7 @@ var o = new api.ManagedZoneDnsSecConfig(); buildCounterManagedZoneDnsSecConfig++; if (buildCounterManagedZoneDnsSecConfig < 3) { - o.defaultKeySpecs = buildUnnamed5617(); + o.defaultKeySpecs = buildUnnamed4741(); o.kind = "foo"; o.nonExistence = "foo"; o.state = "foo"; @@ -374,7 +374,7 @@ checkManagedZoneDnsSecConfig(api.ManagedZoneDnsSecConfig o) { buildCounterManagedZoneDnsSecConfig++; if (buildCounterManagedZoneDnsSecConfig < 3) { - checkUnnamed5617(o.defaultKeySpecs); + checkUnnamed4741(o.defaultKeySpecs); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nonExistence, unittest.equals('foo')); unittest.expect(o.state, unittest.equals('foo')); @@ -382,14 +382,14 @@ buildCounterManagedZoneDnsSecConfig--; } -buildUnnamed5618() { +buildUnnamed4742() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5618(core.List<api.Operation> o) { +checkUnnamed4742(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -403,7 +403,7 @@ o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; - o.operations = buildUnnamed5618(); + o.operations = buildUnnamed4742(); } buildCounterManagedZoneOperationsListResponse--; return o; @@ -416,19 +416,19 @@ checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5618(o.operations); + checkUnnamed4742(o.operations); } buildCounterManagedZoneOperationsListResponse--; } -buildUnnamed5619() { +buildUnnamed4743() { var o = new core.List<api.ManagedZone>(); o.add(buildManagedZone()); o.add(buildManagedZone()); return o; } -checkUnnamed5619(core.List<api.ManagedZone> o) { +checkUnnamed4743(core.List<api.ManagedZone> o) { unittest.expect(o, unittest.hasLength(2)); checkManagedZone(o[0]); checkManagedZone(o[1]); @@ -441,7 +441,7 @@ if (buildCounterManagedZonesListResponse < 3) { o.header = buildResponseHeader(); o.kind = "foo"; - o.managedZones = buildUnnamed5619(); + o.managedZones = buildUnnamed4743(); o.nextPageToken = "foo"; } buildCounterManagedZonesListResponse--; @@ -453,7 +453,7 @@ if (buildCounterManagedZonesListResponse < 3) { checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5619(o.managedZones); + checkUnnamed4743(o.managedZones); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterManagedZonesListResponse--; @@ -559,14 +559,14 @@ buildCounterProject--; } -buildUnnamed5620() { +buildUnnamed4744() { var o = new core.List<api.DnsKeySpec>(); o.add(buildDnsKeySpec()); o.add(buildDnsKeySpec()); return o; } -checkUnnamed5620(core.List<api.DnsKeySpec> o) { +checkUnnamed4744(core.List<api.DnsKeySpec> o) { unittest.expect(o, unittest.hasLength(2)); checkDnsKeySpec(o[0]); checkDnsKeySpec(o[1]); @@ -585,7 +585,7 @@ o.rrsetDeletionsPerChange = 42; o.rrsetsPerManagedZone = 42; o.totalRrdataSizePerChange = 42; - o.whitelistedKeySpecs = buildUnnamed5620(); + o.whitelistedKeySpecs = buildUnnamed4744(); } buildCounterQuota--; return o; @@ -602,32 +602,32 @@ unittest.expect(o.rrsetDeletionsPerChange, unittest.equals(42)); unittest.expect(o.rrsetsPerManagedZone, unittest.equals(42)); unittest.expect(o.totalRrdataSizePerChange, unittest.equals(42)); - checkUnnamed5620(o.whitelistedKeySpecs); + checkUnnamed4744(o.whitelistedKeySpecs); } buildCounterQuota--; } -buildUnnamed5621() { +buildUnnamed4745() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5621(core.List<core.String> o) { +checkUnnamed4745(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5622() { +buildUnnamed4746() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5622(core.List<core.String> o) { +checkUnnamed4746(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -640,8 +640,8 @@ if (buildCounterResourceRecordSet < 3) { o.kind = "foo"; o.name = "foo"; - o.rrdatas = buildUnnamed5621(); - o.signatureRrdatas = buildUnnamed5622(); + o.rrdatas = buildUnnamed4745(); + o.signatureRrdatas = buildUnnamed4746(); o.ttl = 42; o.type = "foo"; } @@ -654,22 +654,22 @@ if (buildCounterResourceRecordSet < 3) { unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5621(o.rrdatas); - checkUnnamed5622(o.signatureRrdatas); + checkUnnamed4745(o.rrdatas); + checkUnnamed4746(o.signatureRrdatas); unittest.expect(o.ttl, unittest.equals(42)); unittest.expect(o.type, unittest.equals('foo')); } buildCounterResourceRecordSet--; } -buildUnnamed5623() { +buildUnnamed4747() { var o = new core.List<api.ResourceRecordSet>(); o.add(buildResourceRecordSet()); o.add(buildResourceRecordSet()); return o; } -checkUnnamed5623(core.List<api.ResourceRecordSet> o) { +checkUnnamed4747(core.List<api.ResourceRecordSet> o) { unittest.expect(o, unittest.hasLength(2)); checkResourceRecordSet(o[0]); checkResourceRecordSet(o[1]); @@ -683,7 +683,7 @@ o.header = buildResponseHeader(); o.kind = "foo"; o.nextPageToken = "foo"; - o.rrsets = buildUnnamed5623(); + o.rrsets = buildUnnamed4747(); } buildCounterResourceRecordSetsListResponse--; return o; @@ -695,7 +695,7 @@ checkResponseHeader(o.header); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5623(o.rrsets); + checkUnnamed4747(o.rrsets); } buildCounterResourceRecordSetsListResponse--; }
diff --git a/generated/googleapis_beta/test/redis/v1beta1_test.dart b/generated/googleapis_beta/test/file/v1beta1_test.dart similarity index 83% rename from generated/googleapis_beta/test/redis/v1beta1_test.dart rename to generated/googleapis_beta/test/file/v1beta1_test.dart index 67cf4bd..6c1c645 100644 --- a/generated/googleapis_beta/test/redis/v1beta1_test.dart +++ b/generated/googleapis_beta/test/file/v1beta1_test.dart
@@ -1,4 +1,4 @@ -library googleapis_beta.redis.v1beta1.test; +library googleapis_beta.file.v1beta1.test; import "dart:core" as core; import "dart:async" as async; @@ -7,7 +7,7 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart' as unittest; -import 'package:googleapis_beta/redis/v1beta1.dart' as api; +import 'package:googleapis_beta/file/v1beta1.dart' as api; class HttpServerMock extends http.BaseClient { core.Function _callback; @@ -50,6 +50,21 @@ return new http.StreamedResponse(stream, status, headers: headers); } +core.int buildCounterCancelOperationRequest = 0; +buildCancelOperationRequest() { + var o = new api.CancelOperationRequest(); + buildCounterCancelOperationRequest++; + if (buildCounterCancelOperationRequest < 3) {} + buildCounterCancelOperationRequest--; + return o; +} + +checkCancelOperationRequest(api.CancelOperationRequest o) { + buildCounterCancelOperationRequest++; + if (buildCounterCancelOperationRequest < 3) {} + buildCounterCancelOperationRequest--; +} + core.int buildCounterEmpty = 0; buildEmpty() { var o = new api.Empty(); @@ -65,112 +80,64 @@ buildCounterEmpty--; } -core.int buildCounterGoogleCloudCommonOperationMetadata = 0; -buildGoogleCloudCommonOperationMetadata() { - var o = new api.GoogleCloudCommonOperationMetadata(); - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - o.apiVersion = "foo"; - o.cancelRequested = true; - o.createTime = "foo"; - o.endTime = "foo"; - o.statusDetail = "foo"; - o.target = "foo"; - o.verb = "foo"; +core.int buildCounterFileShareConfig = 0; +buildFileShareConfig() { + var o = new api.FileShareConfig(); + buildCounterFileShareConfig++; + if (buildCounterFileShareConfig < 3) { + o.capacityGb = "foo"; + o.name = "foo"; } - buildCounterGoogleCloudCommonOperationMetadata--; + buildCounterFileShareConfig--; return o; } -checkGoogleCloudCommonOperationMetadata( - api.GoogleCloudCommonOperationMetadata o) { - buildCounterGoogleCloudCommonOperationMetadata++; - if (buildCounterGoogleCloudCommonOperationMetadata < 3) { - unittest.expect(o.apiVersion, unittest.equals('foo')); - unittest.expect(o.cancelRequested, unittest.isTrue); - unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - unittest.expect(o.statusDetail, unittest.equals('foo')); - unittest.expect(o.target, unittest.equals('foo')); - unittest.expect(o.verb, unittest.equals('foo')); +checkFileShareConfig(api.FileShareConfig o) { + buildCounterFileShareConfig++; + if (buildCounterFileShareConfig < 3) { + unittest.expect(o.capacityGb, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); } - buildCounterGoogleCloudCommonOperationMetadata--; + buildCounterFileShareConfig--; } -buildUnnamed5359() { - var o = new core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata>(); - o["x"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); - o["y"] = buildGoogleCloudRedisV1beta1ZoneMetadata(); +buildUnnamed5059() { + var o = new core.List<api.FileShareConfig>(); + o.add(buildFileShareConfig()); + o.add(buildFileShareConfig()); return o; } -checkUnnamed5359( - core.Map<core.String, api.GoogleCloudRedisV1beta1ZoneMetadata> o) { +checkUnnamed5059(core.List<api.FileShareConfig> o) { unittest.expect(o, unittest.hasLength(2)); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["x"]); - checkGoogleCloudRedisV1beta1ZoneMetadata(o["y"]); + checkFileShareConfig(o[0]); + checkFileShareConfig(o[1]); } -core.int buildCounterGoogleCloudRedisV1beta1LocationMetadata = 0; -buildGoogleCloudRedisV1beta1LocationMetadata() { - var o = new api.GoogleCloudRedisV1beta1LocationMetadata(); - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - o.availableZones = buildUnnamed5359(); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1LocationMetadata( - api.GoogleCloudRedisV1beta1LocationMetadata o) { - buildCounterGoogleCloudRedisV1beta1LocationMetadata++; - if (buildCounterGoogleCloudRedisV1beta1LocationMetadata < 3) { - checkUnnamed5359(o.availableZones); - } - buildCounterGoogleCloudRedisV1beta1LocationMetadata--; -} - -core.int buildCounterGoogleCloudRedisV1beta1ZoneMetadata = 0; -buildGoogleCloudRedisV1beta1ZoneMetadata() { - var o = new api.GoogleCloudRedisV1beta1ZoneMetadata(); - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; - return o; -} - -checkGoogleCloudRedisV1beta1ZoneMetadata( - api.GoogleCloudRedisV1beta1ZoneMetadata o) { - buildCounterGoogleCloudRedisV1beta1ZoneMetadata++; - if (buildCounterGoogleCloudRedisV1beta1ZoneMetadata < 3) {} - buildCounterGoogleCloudRedisV1beta1ZoneMetadata--; -} - -buildUnnamed5360() { +buildUnnamed5060() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5360(core.Map<core.String, core.String> o) { +checkUnnamed5060(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5361() { - var o = new core.Map<core.String, core.String>(); - o["x"] = "foo"; - o["y"] = "foo"; +buildUnnamed5061() { + var o = new core.List<api.NetworkConfig>(); + o.add(buildNetworkConfig()); + o.add(buildNetworkConfig()); return o; } -checkUnnamed5361(core.Map<core.String, core.String> o) { +checkUnnamed5061(core.List<api.NetworkConfig> o) { unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o["x"], unittest.equals('foo')); - unittest.expect(o["y"], unittest.equals('foo')); + checkNetworkConfig(o[0]); + checkNetworkConfig(o[1]); } core.int buildCounterInstance = 0; @@ -178,20 +145,13 @@ var o = new api.Instance(); buildCounterInstance++; if (buildCounterInstance < 3) { - o.alternativeLocationId = "foo"; - o.authorizedNetwork = "foo"; o.createTime = "foo"; - o.currentLocationId = "foo"; - o.displayName = "foo"; - o.host = "foo"; - o.labels = buildUnnamed5360(); - o.locationId = "foo"; - o.memorySizeGb = 42; + o.description = "foo"; + o.etag = "foo"; + o.fileShares = buildUnnamed5059(); + o.labels = buildUnnamed5060(); o.name = "foo"; - o.port = 42; - o.redisConfigs = buildUnnamed5361(); - o.redisVersion = "foo"; - o.reservedIpRange = "foo"; + o.networks = buildUnnamed5061(); o.state = "foo"; o.statusMessage = "foo"; o.tier = "foo"; @@ -203,20 +163,13 @@ checkInstance(api.Instance o) { buildCounterInstance++; if (buildCounterInstance < 3) { - unittest.expect(o.alternativeLocationId, unittest.equals('foo')); - unittest.expect(o.authorizedNetwork, unittest.equals('foo')); unittest.expect(o.createTime, unittest.equals('foo')); - unittest.expect(o.currentLocationId, unittest.equals('foo')); - unittest.expect(o.displayName, unittest.equals('foo')); - unittest.expect(o.host, unittest.equals('foo')); - checkUnnamed5360(o.labels); - unittest.expect(o.locationId, unittest.equals('foo')); - unittest.expect(o.memorySizeGb, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.etag, unittest.equals('foo')); + checkUnnamed5059(o.fileShares); + checkUnnamed5060(o.labels); unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.port, unittest.equals(42)); - checkUnnamed5361(o.redisConfigs); - unittest.expect(o.redisVersion, unittest.equals('foo')); - unittest.expect(o.reservedIpRange, unittest.equals('foo')); + checkUnnamed5061(o.networks); unittest.expect(o.state, unittest.equals('foo')); unittest.expect(o.statusMessage, unittest.equals('foo')); unittest.expect(o.tier, unittest.equals('foo')); @@ -224,26 +177,40 @@ buildCounterInstance--; } -buildUnnamed5362() { +buildUnnamed5062() { var o = new core.List<api.Instance>(); o.add(buildInstance()); o.add(buildInstance()); return o; } -checkUnnamed5362(core.List<api.Instance> o) { +checkUnnamed5062(core.List<api.Instance> o) { unittest.expect(o, unittest.hasLength(2)); checkInstance(o[0]); checkInstance(o[1]); } +buildUnnamed5063() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5063(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + core.int buildCounterListInstancesResponse = 0; buildListInstancesResponse() { var o = new api.ListInstancesResponse(); buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - o.instances = buildUnnamed5362(); + o.instances = buildUnnamed5062(); o.nextPageToken = "foo"; + o.unreachable = buildUnnamed5063(); } buildCounterListInstancesResponse--; return o; @@ -252,20 +219,21 @@ checkListInstancesResponse(api.ListInstancesResponse o) { buildCounterListInstancesResponse++; if (buildCounterListInstancesResponse < 3) { - checkUnnamed5362(o.instances); + checkUnnamed5062(o.instances); unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed5063(o.unreachable); } buildCounterListInstancesResponse--; } -buildUnnamed5363() { +buildUnnamed5064() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5363(core.List<api.Location> o) { +checkUnnamed5064(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -276,7 +244,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5363(); + o.locations = buildUnnamed5064(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -286,20 +254,20 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5363(o.locations); + checkUnnamed5064(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5364() { +buildUnnamed5065() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5364(core.List<api.Operation> o) { +checkUnnamed5065(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -311,7 +279,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5364(); + o.operations = buildUnnamed5065(); } buildCounterListOperationsResponse--; return o; @@ -321,25 +289,25 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5364(o.operations); + checkUnnamed5065(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5365() { +buildUnnamed5066() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5365(core.Map<core.String, core.String> o) { +checkUnnamed5066(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5366() { +buildUnnamed5067() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -354,7 +322,7 @@ return o; } -checkUnnamed5366(core.Map<core.String, core.Object> o) { +checkUnnamed5067(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -374,9 +342,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5365(); + o.labels = buildUnnamed5066(); o.locationId = "foo"; - o.metadata = buildUnnamed5366(); + o.metadata = buildUnnamed5067(); o.name = "foo"; } buildCounterLocation--; @@ -387,15 +355,66 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5365(o.labels); + checkUnnamed5066(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5366(o.metadata); + checkUnnamed5067(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; } -buildUnnamed5367() { +buildUnnamed5068() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5068(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed5069() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed5069(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterNetworkConfig = 0; +buildNetworkConfig() { + var o = new api.NetworkConfig(); + buildCounterNetworkConfig++; + if (buildCounterNetworkConfig < 3) { + o.ipAddresses = buildUnnamed5068(); + o.modes = buildUnnamed5069(); + o.network = "foo"; + o.reservedIpRange = "foo"; + } + buildCounterNetworkConfig--; + return o; +} + +checkNetworkConfig(api.NetworkConfig o) { + buildCounterNetworkConfig++; + if (buildCounterNetworkConfig < 3) { + checkUnnamed5068(o.ipAddresses); + checkUnnamed5069(o.modes); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.reservedIpRange, unittest.equals('foo')); + } + buildCounterNetworkConfig--; +} + +buildUnnamed5070() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -410,7 +429,7 @@ return o; } -checkUnnamed5367(core.Map<core.String, core.Object> o) { +checkUnnamed5070(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -424,7 +443,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5368() { +buildUnnamed5071() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -439,7 +458,7 @@ return o; } -checkUnnamed5368(core.Map<core.String, core.Object> o) { +checkUnnamed5071(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -460,9 +479,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5367(); + o.metadata = buildUnnamed5070(); o.name = "foo"; - o.response = buildUnnamed5368(); + o.response = buildUnnamed5071(); } buildCounterOperation--; return o; @@ -473,14 +492,45 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5367(o.metadata); + checkUnnamed5070(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5368(o.response); + checkUnnamed5071(o.response); } buildCounterOperation--; } -buildUnnamed5369() { +core.int buildCounterOperationMetadata = 0; +buildOperationMetadata() { + var o = new api.OperationMetadata(); + buildCounterOperationMetadata++; + if (buildCounterOperationMetadata < 3) { + o.apiVersion = "foo"; + o.cancelRequested = true; + o.createTime = "foo"; + o.endTime = "foo"; + o.statusDetail = "foo"; + o.target = "foo"; + o.verb = "foo"; + } + buildCounterOperationMetadata--; + return o; +} + +checkOperationMetadata(api.OperationMetadata o) { + buildCounterOperationMetadata++; + if (buildCounterOperationMetadata < 3) { + unittest.expect(o.apiVersion, unittest.equals('foo')); + unittest.expect(o.cancelRequested, unittest.isTrue); + unittest.expect(o.createTime, unittest.equals('foo')); + unittest.expect(o.endTime, unittest.equals('foo')); + unittest.expect(o.statusDetail, unittest.equals('foo')); + unittest.expect(o.target, unittest.equals('foo')); + unittest.expect(o.verb, unittest.equals('foo')); + } + buildCounterOperationMetadata--; +} + +buildUnnamed5072() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -495,7 +545,7 @@ return o; } -checkUnnamed5369(core.Map<core.String, core.Object> o) { +checkUnnamed5072(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -509,17 +559,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5370() { +buildUnnamed5073() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5369()); - o.add(buildUnnamed5369()); + o.add(buildUnnamed5072()); + o.add(buildUnnamed5072()); return o; } -checkUnnamed5370(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5073(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5369(o[0]); - checkUnnamed5369(o[1]); + checkUnnamed5072(o[0]); + checkUnnamed5072(o[1]); } core.int buildCounterStatus = 0; @@ -528,7 +578,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5370(); + o.details = buildUnnamed5073(); o.message = "foo"; } buildCounterStatus--; @@ -539,13 +589,21 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5370(o.details); + checkUnnamed5073(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } main() { + unittest.group("obj-schema-CancelOperationRequest", () { + unittest.test("to-json--from-json", () { + var o = buildCancelOperationRequest(); + var od = new api.CancelOperationRequest.fromJson(o.toJson()); + checkCancelOperationRequest(od); + }); + }); + unittest.group("obj-schema-Empty", () { unittest.test("to-json--from-json", () { var o = buildEmpty(); @@ -554,28 +612,11 @@ }); }); - unittest.group("obj-schema-GoogleCloudCommonOperationMetadata", () { + unittest.group("obj-schema-FileShareConfig", () { unittest.test("to-json--from-json", () { - var o = buildGoogleCloudCommonOperationMetadata(); - var od = new api.GoogleCloudCommonOperationMetadata.fromJson(o.toJson()); - checkGoogleCloudCommonOperationMetadata(od); - }); - }); - - unittest.group("obj-schema-GoogleCloudRedisV1beta1LocationMetadata", () { - unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1LocationMetadata(); - var od = - new api.GoogleCloudRedisV1beta1LocationMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1LocationMetadata(od); - }); - }); - - unittest.group("obj-schema-GoogleCloudRedisV1beta1ZoneMetadata", () { - unittest.test("to-json--from-json", () { - var o = buildGoogleCloudRedisV1beta1ZoneMetadata(); - var od = new api.GoogleCloudRedisV1beta1ZoneMetadata.fromJson(o.toJson()); - checkGoogleCloudRedisV1beta1ZoneMetadata(od); + var o = buildFileShareConfig(); + var od = new api.FileShareConfig.fromJson(o.toJson()); + checkFileShareConfig(od); }); }); @@ -619,6 +660,14 @@ }); }); + unittest.group("obj-schema-NetworkConfig", () { + unittest.test("to-json--from-json", () { + var o = buildNetworkConfig(); + var od = new api.NetworkConfig.fromJson(o.toJson()); + checkNetworkConfig(od); + }); + }); + unittest.group("obj-schema-Operation", () { unittest.test("to-json--from-json", () { var o = buildOperation(); @@ -627,6 +676,14 @@ }); }); + unittest.group("obj-schema-OperationMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildOperationMetadata(); + var od = new api.OperationMetadata.fromJson(o.toJson()); + checkOperationMetadata(od); + }); + }); + unittest.group("obj-schema-Status", () { unittest.test("to-json--from-json", () { var o = buildStatus(); @@ -639,7 +696,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.FileApi(mock).projects.locations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -691,11 +748,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsResourceApi res = - new api.RedisApi(mock).projects.locations; + new api.FileApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageToken = "foo"; var arg_pageSize = 42; var arg_filter = "foo"; - var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -728,11 +785,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -743,9 +800,9 @@ }), true); res .list(arg_name, + pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter, - pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -757,7 +814,7 @@ unittest.test("method--create", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_request = buildInstance(); var arg_parent = "foo"; var arg_instanceId = "foo"; @@ -817,7 +874,7 @@ unittest.test("method--delete", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -869,7 +926,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -921,9 +978,11 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_parent = "foo"; + var arg_filter = "foo"; var arg_pageToken = "foo"; + var arg_orderBy = "foo"; var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -957,8 +1016,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect( + queryMap["orderBy"].first, unittest.equals(arg_orderBy)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); @@ -971,7 +1033,9 @@ }), true); res .list(arg_parent, + filter: arg_filter, pageToken: arg_pageToken, + orderBy: arg_orderBy, pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { @@ -982,7 +1046,7 @@ unittest.test("method--patch", () { var mock = new HttpServerMock(); api.ProjectsLocationsInstancesResourceApi res = - new api.RedisApi(mock).projects.locations.instances; + new api.FileApi(mock).projects.locations.instances; var arg_request = buildInstance(); var arg_name = "foo"; var arg_updateMask = "foo"; @@ -1044,10 +1108,14 @@ unittest.test("method--cancel", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; + var arg_request = buildCancelOperationRequest(); var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.CancelOperationRequest.fromJson(json); + checkCancelOperationRequest(obj); + var path = (req.url).path; var pathOffset = 0; var index; @@ -1087,7 +1155,7 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .cancel(arg_name, $fields: arg_$fields) + .cancel(arg_request, arg_name, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkEmpty(response); }))); @@ -1096,7 +1164,7 @@ unittest.test("method--delete", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -1148,7 +1216,7 @@ unittest.test("method--get", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { @@ -1200,7 +1268,7 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.ProjectsLocationsOperationsResourceApi res = - new api.RedisApi(mock).projects.locations.operations; + new api.FileApi(mock).projects.locations.operations; var arg_name = "foo"; var arg_filter = "foo"; var arg_pageToken = "foo";
diff --git a/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart b/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart new file mode 100644 index 0000000..90f9ede --- /dev/null +++ b/generated/googleapis_beta/test/firebasehosting/v1beta1_test.dart
@@ -0,0 +1,1671 @@ +library googleapis_beta.firebasehosting.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/firebasehosting/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterActingUser = 0; +buildActingUser() { + var o = new api.ActingUser(); + buildCounterActingUser++; + if (buildCounterActingUser < 3) { + o.email = "foo"; + o.imageUrl = "foo"; + } + buildCounterActingUser--; + return o; +} + +checkActingUser(api.ActingUser o) { + buildCounterActingUser++; + if (buildCounterActingUser < 3) { + unittest.expect(o.email, unittest.equals('foo')); + unittest.expect(o.imageUrl, unittest.equals('foo')); + } + buildCounterActingUser--; +} + +core.int buildCounterCertDnsChallenge = 0; +buildCertDnsChallenge() { + var o = new api.CertDnsChallenge(); + buildCounterCertDnsChallenge++; + if (buildCounterCertDnsChallenge < 3) { + o.domainName = "foo"; + o.token = "foo"; + } + buildCounterCertDnsChallenge--; + return o; +} + +checkCertDnsChallenge(api.CertDnsChallenge o) { + buildCounterCertDnsChallenge++; + if (buildCounterCertDnsChallenge < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + unittest.expect(o.token, unittest.equals('foo')); + } + buildCounterCertDnsChallenge--; +} + +core.int buildCounterCertHttpChallenge = 0; +buildCertHttpChallenge() { + var o = new api.CertHttpChallenge(); + buildCounterCertHttpChallenge++; + if (buildCounterCertHttpChallenge < 3) { + o.path = "foo"; + o.token = "foo"; + } + buildCounterCertHttpChallenge--; + return o; +} + +checkCertHttpChallenge(api.CertHttpChallenge o) { + buildCounterCertHttpChallenge++; + if (buildCounterCertHttpChallenge < 3) { + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.token, unittest.equals('foo')); + } + buildCounterCertHttpChallenge--; +} + +core.int buildCounterDomain = 0; +buildDomain() { + var o = new api.Domain(); + buildCounterDomain++; + if (buildCounterDomain < 3) { + o.domainName = "foo"; + o.domainRedirect = buildDomainRedirect(); + o.provisioning = buildDomainProvisioning(); + o.site = "foo"; + o.status = "foo"; + o.updateTime = "foo"; + } + buildCounterDomain--; + return o; +} + +checkDomain(api.Domain o) { + buildCounterDomain++; + if (buildCounterDomain < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + checkDomainRedirect(o.domainRedirect); + checkDomainProvisioning(o.provisioning); + unittest.expect(o.site, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); + } + buildCounterDomain--; +} + +buildUnnamed4657() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4657(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4658() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4658(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4659() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4659(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterDomainProvisioning = 0; +buildDomainProvisioning() { + var o = new api.DomainProvisioning(); + buildCounterDomainProvisioning++; + if (buildCounterDomainProvisioning < 3) { + o.certChallengeDiscoveredTxt = buildUnnamed4657(); + o.certChallengeDns = buildCertDnsChallenge(); + o.certChallengeHttp = buildCertHttpChallenge(); + o.certStatus = "foo"; + o.discoveredIps = buildUnnamed4658(); + o.dnsFetchTime = "foo"; + o.dnsStatus = "foo"; + o.expectedIps = buildUnnamed4659(); + } + buildCounterDomainProvisioning--; + return o; +} + +checkDomainProvisioning(api.DomainProvisioning o) { + buildCounterDomainProvisioning++; + if (buildCounterDomainProvisioning < 3) { + checkUnnamed4657(o.certChallengeDiscoveredTxt); + checkCertDnsChallenge(o.certChallengeDns); + checkCertHttpChallenge(o.certChallengeHttp); + unittest.expect(o.certStatus, unittest.equals('foo')); + checkUnnamed4658(o.discoveredIps); + unittest.expect(o.dnsFetchTime, unittest.equals('foo')); + unittest.expect(o.dnsStatus, unittest.equals('foo')); + checkUnnamed4659(o.expectedIps); + } + buildCounterDomainProvisioning--; +} + +core.int buildCounterDomainRedirect = 0; +buildDomainRedirect() { + var o = new api.DomainRedirect(); + buildCounterDomainRedirect++; + if (buildCounterDomainRedirect < 3) { + o.domainName = "foo"; + o.type = "foo"; + } + buildCounterDomainRedirect--; + return o; +} + +checkDomainRedirect(api.DomainRedirect o) { + buildCounterDomainRedirect++; + if (buildCounterDomainRedirect < 3) { + unittest.expect(o.domainName, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterDomainRedirect--; +} + +core.int buildCounterEmpty = 0; +buildEmpty() { + var o = new api.Empty(); + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; + return o; +} + +checkEmpty(api.Empty o) { + buildCounterEmpty++; + if (buildCounterEmpty < 3) {} + buildCounterEmpty--; +} + +buildUnnamed4660() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4660(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterHeader = 0; +buildHeader() { + var o = new api.Header(); + buildCounterHeader++; + if (buildCounterHeader < 3) { + o.glob = "foo"; + o.headers = buildUnnamed4660(); + } + buildCounterHeader--; + return o; +} + +checkHeader(api.Header o) { + buildCounterHeader++; + if (buildCounterHeader < 3) { + unittest.expect(o.glob, unittest.equals('foo')); + checkUnnamed4660(o.headers); + } + buildCounterHeader--; +} + +buildUnnamed4661() { + var o = new core.List<api.Domain>(); + o.add(buildDomain()); + o.add(buildDomain()); + return o; +} + +checkUnnamed4661(core.List<api.Domain> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDomain(o[0]); + checkDomain(o[1]); +} + +core.int buildCounterListDomainsResponse = 0; +buildListDomainsResponse() { + var o = new api.ListDomainsResponse(); + buildCounterListDomainsResponse++; + if (buildCounterListDomainsResponse < 3) { + o.domains = buildUnnamed4661(); + o.nextPageToken = "foo"; + } + buildCounterListDomainsResponse--; + return o; +} + +checkListDomainsResponse(api.ListDomainsResponse o) { + buildCounterListDomainsResponse++; + if (buildCounterListDomainsResponse < 3) { + checkUnnamed4661(o.domains); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListDomainsResponse--; +} + +buildUnnamed4662() { + var o = new core.List<api.Release>(); + o.add(buildRelease()); + o.add(buildRelease()); + return o; +} + +checkUnnamed4662(core.List<api.Release> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRelease(o[0]); + checkRelease(o[1]); +} + +core.int buildCounterListReleasesResponse = 0; +buildListReleasesResponse() { + var o = new api.ListReleasesResponse(); + buildCounterListReleasesResponse++; + if (buildCounterListReleasesResponse < 3) { + o.nextPageToken = "foo"; + o.releases = buildUnnamed4662(); + } + buildCounterListReleasesResponse--; + return o; +} + +checkListReleasesResponse(api.ListReleasesResponse o) { + buildCounterListReleasesResponse++; + if (buildCounterListReleasesResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4662(o.releases); + } + buildCounterListReleasesResponse--; +} + +buildUnnamed4663() { + var o = new core.List<api.VersionFile>(); + o.add(buildVersionFile()); + o.add(buildVersionFile()); + return o; +} + +checkUnnamed4663(core.List<api.VersionFile> o) { + unittest.expect(o, unittest.hasLength(2)); + checkVersionFile(o[0]); + checkVersionFile(o[1]); +} + +core.int buildCounterListVersionFilesResponse = 0; +buildListVersionFilesResponse() { + var o = new api.ListVersionFilesResponse(); + buildCounterListVersionFilesResponse++; + if (buildCounterListVersionFilesResponse < 3) { + o.files = buildUnnamed4663(); + o.nextPageToken = "foo"; + } + buildCounterListVersionFilesResponse--; + return o; +} + +checkListVersionFilesResponse(api.ListVersionFilesResponse o) { + buildCounterListVersionFilesResponse++; + if (buildCounterListVersionFilesResponse < 3) { + checkUnnamed4663(o.files); + unittest.expect(o.nextPageToken, unittest.equals('foo')); + } + buildCounterListVersionFilesResponse--; +} + +buildUnnamed4664() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4664(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterPopulateVersionFilesRequest = 0; +buildPopulateVersionFilesRequest() { + var o = new api.PopulateVersionFilesRequest(); + buildCounterPopulateVersionFilesRequest++; + if (buildCounterPopulateVersionFilesRequest < 3) { + o.files = buildUnnamed4664(); + } + buildCounterPopulateVersionFilesRequest--; + return o; +} + +checkPopulateVersionFilesRequest(api.PopulateVersionFilesRequest o) { + buildCounterPopulateVersionFilesRequest++; + if (buildCounterPopulateVersionFilesRequest < 3) { + checkUnnamed4664(o.files); + } + buildCounterPopulateVersionFilesRequest--; +} + +buildUnnamed4665() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4665(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPopulateVersionFilesResponse = 0; +buildPopulateVersionFilesResponse() { + var o = new api.PopulateVersionFilesResponse(); + buildCounterPopulateVersionFilesResponse++; + if (buildCounterPopulateVersionFilesResponse < 3) { + o.uploadRequiredHashes = buildUnnamed4665(); + o.uploadUrl = "foo"; + } + buildCounterPopulateVersionFilesResponse--; + return o; +} + +checkPopulateVersionFilesResponse(api.PopulateVersionFilesResponse o) { + buildCounterPopulateVersionFilesResponse++; + if (buildCounterPopulateVersionFilesResponse < 3) { + checkUnnamed4665(o.uploadRequiredHashes); + unittest.expect(o.uploadUrl, unittest.equals('foo')); + } + buildCounterPopulateVersionFilesResponse--; +} + +core.int buildCounterRedirect = 0; +buildRedirect() { + var o = new api.Redirect(); + buildCounterRedirect++; + if (buildCounterRedirect < 3) { + o.glob = "foo"; + o.location = "foo"; + o.statusCode = 42; + } + buildCounterRedirect--; + return o; +} + +checkRedirect(api.Redirect o) { + buildCounterRedirect++; + if (buildCounterRedirect < 3) { + unittest.expect(o.glob, unittest.equals('foo')); + unittest.expect(o.location, unittest.equals('foo')); + unittest.expect(o.statusCode, unittest.equals(42)); + } + buildCounterRedirect--; +} + +core.int buildCounterRelease = 0; +buildRelease() { + var o = new api.Release(); + buildCounterRelease++; + if (buildCounterRelease < 3) { + o.message = "foo"; + o.name = "foo"; + o.releaseTime = "foo"; + o.releaseUser = buildActingUser(); + o.type = "foo"; + o.version = buildVersion(); + } + buildCounterRelease--; + return o; +} + +checkRelease(api.Release o) { + buildCounterRelease++; + if (buildCounterRelease < 3) { + unittest.expect(o.message, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.releaseTime, unittest.equals('foo')); + checkActingUser(o.releaseUser); + unittest.expect(o.type, unittest.equals('foo')); + checkVersion(o.version); + } + buildCounterRelease--; +} + +core.int buildCounterRewrite = 0; +buildRewrite() { + var o = new api.Rewrite(); + buildCounterRewrite++; + if (buildCounterRewrite < 3) { + o.dynamicLinks = true; + o.function = "foo"; + o.glob = "foo"; + o.path = "foo"; + } + buildCounterRewrite--; + return o; +} + +checkRewrite(api.Rewrite o) { + buildCounterRewrite++; + if (buildCounterRewrite < 3) { + unittest.expect(o.dynamicLinks, unittest.isTrue); + unittest.expect(o.function, unittest.equals('foo')); + unittest.expect(o.glob, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + } + buildCounterRewrite--; +} + +buildUnnamed4666() { + var o = new core.List<api.Header>(); + o.add(buildHeader()); + o.add(buildHeader()); + return o; +} + +checkUnnamed4666(core.List<api.Header> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHeader(o[0]); + checkHeader(o[1]); +} + +buildUnnamed4667() { + var o = new core.List<api.Redirect>(); + o.add(buildRedirect()); + o.add(buildRedirect()); + return o; +} + +checkUnnamed4667(core.List<api.Redirect> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRedirect(o[0]); + checkRedirect(o[1]); +} + +buildUnnamed4668() { + var o = new core.List<api.Rewrite>(); + o.add(buildRewrite()); + o.add(buildRewrite()); + return o; +} + +checkUnnamed4668(core.List<api.Rewrite> o) { + unittest.expect(o, unittest.hasLength(2)); + checkRewrite(o[0]); + checkRewrite(o[1]); +} + +core.int buildCounterServingConfig = 0; +buildServingConfig() { + var o = new api.ServingConfig(); + buildCounterServingConfig++; + if (buildCounterServingConfig < 3) { + o.appAssociation = "foo"; + o.cleanUrls = true; + o.headers = buildUnnamed4666(); + o.redirects = buildUnnamed4667(); + o.rewrites = buildUnnamed4668(); + o.trailingSlashBehavior = "foo"; + } + buildCounterServingConfig--; + return o; +} + +checkServingConfig(api.ServingConfig o) { + buildCounterServingConfig++; + if (buildCounterServingConfig < 3) { + unittest.expect(o.appAssociation, unittest.equals('foo')); + unittest.expect(o.cleanUrls, unittest.isTrue); + checkUnnamed4666(o.headers); + checkUnnamed4667(o.redirects); + checkUnnamed4668(o.rewrites); + unittest.expect(o.trailingSlashBehavior, unittest.equals('foo')); + } + buildCounterServingConfig--; +} + +core.int buildCounterSiteConfig = 0; +buildSiteConfig() { + var o = new api.SiteConfig(); + buildCounterSiteConfig++; + if (buildCounterSiteConfig < 3) { + o.maxVersions = "foo"; + } + buildCounterSiteConfig--; + return o; +} + +checkSiteConfig(api.SiteConfig o) { + buildCounterSiteConfig++; + if (buildCounterSiteConfig < 3) { + unittest.expect(o.maxVersions, unittest.equals('foo')); + } + buildCounterSiteConfig--; +} + +buildUnnamed4669() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4669(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterVersion = 0; +buildVersion() { + var o = new api.Version(); + buildCounterVersion++; + if (buildCounterVersion < 3) { + o.config = buildServingConfig(); + o.createTime = "foo"; + o.createUser = buildActingUser(); + o.deleteTime = "foo"; + o.deleteUser = buildActingUser(); + o.fileCount = "foo"; + o.finalizeTime = "foo"; + o.finalizeUser = buildActingUser(); + o.labels = buildUnnamed4669(); + o.name = "foo"; + o.status = "foo"; + o.versionBytes = "foo"; + } + buildCounterVersion--; + return o; +} + +checkVersion(api.Version o) { + buildCounterVersion++; + if (buildCounterVersion < 3) { + checkServingConfig(o.config); + unittest.expect(o.createTime, unittest.equals('foo')); + checkActingUser(o.createUser); + unittest.expect(o.deleteTime, unittest.equals('foo')); + checkActingUser(o.deleteUser); + unittest.expect(o.fileCount, unittest.equals('foo')); + unittest.expect(o.finalizeTime, unittest.equals('foo')); + checkActingUser(o.finalizeUser); + checkUnnamed4669(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + unittest.expect(o.versionBytes, unittest.equals('foo')); + } + buildCounterVersion--; +} + +core.int buildCounterVersionFile = 0; +buildVersionFile() { + var o = new api.VersionFile(); + buildCounterVersionFile++; + if (buildCounterVersionFile < 3) { + o.hash = "foo"; + o.path = "foo"; + o.status = "foo"; + } + buildCounterVersionFile--; + return o; +} + +checkVersionFile(api.VersionFile o) { + buildCounterVersionFile++; + if (buildCounterVersionFile < 3) { + unittest.expect(o.hash, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.status, unittest.equals('foo')); + } + buildCounterVersionFile--; +} + +main() { + unittest.group("obj-schema-ActingUser", () { + unittest.test("to-json--from-json", () { + var o = buildActingUser(); + var od = new api.ActingUser.fromJson(o.toJson()); + checkActingUser(od); + }); + }); + + unittest.group("obj-schema-CertDnsChallenge", () { + unittest.test("to-json--from-json", () { + var o = buildCertDnsChallenge(); + var od = new api.CertDnsChallenge.fromJson(o.toJson()); + checkCertDnsChallenge(od); + }); + }); + + unittest.group("obj-schema-CertHttpChallenge", () { + unittest.test("to-json--from-json", () { + var o = buildCertHttpChallenge(); + var od = new api.CertHttpChallenge.fromJson(o.toJson()); + checkCertHttpChallenge(od); + }); + }); + + unittest.group("obj-schema-Domain", () { + unittest.test("to-json--from-json", () { + var o = buildDomain(); + var od = new api.Domain.fromJson(o.toJson()); + checkDomain(od); + }); + }); + + unittest.group("obj-schema-DomainProvisioning", () { + unittest.test("to-json--from-json", () { + var o = buildDomainProvisioning(); + var od = new api.DomainProvisioning.fromJson(o.toJson()); + checkDomainProvisioning(od); + }); + }); + + unittest.group("obj-schema-DomainRedirect", () { + unittest.test("to-json--from-json", () { + var o = buildDomainRedirect(); + var od = new api.DomainRedirect.fromJson(o.toJson()); + checkDomainRedirect(od); + }); + }); + + unittest.group("obj-schema-Empty", () { + unittest.test("to-json--from-json", () { + var o = buildEmpty(); + var od = new api.Empty.fromJson(o.toJson()); + checkEmpty(od); + }); + }); + + unittest.group("obj-schema-Header", () { + unittest.test("to-json--from-json", () { + var o = buildHeader(); + var od = new api.Header.fromJson(o.toJson()); + checkHeader(od); + }); + }); + + unittest.group("obj-schema-ListDomainsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListDomainsResponse(); + var od = new api.ListDomainsResponse.fromJson(o.toJson()); + checkListDomainsResponse(od); + }); + }); + + unittest.group("obj-schema-ListReleasesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListReleasesResponse(); + var od = new api.ListReleasesResponse.fromJson(o.toJson()); + checkListReleasesResponse(od); + }); + }); + + unittest.group("obj-schema-ListVersionFilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListVersionFilesResponse(); + var od = new api.ListVersionFilesResponse.fromJson(o.toJson()); + checkListVersionFilesResponse(od); + }); + }); + + unittest.group("obj-schema-PopulateVersionFilesRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPopulateVersionFilesRequest(); + var od = new api.PopulateVersionFilesRequest.fromJson(o.toJson()); + checkPopulateVersionFilesRequest(od); + }); + }); + + unittest.group("obj-schema-PopulateVersionFilesResponse", () { + unittest.test("to-json--from-json", () { + var o = buildPopulateVersionFilesResponse(); + var od = new api.PopulateVersionFilesResponse.fromJson(o.toJson()); + checkPopulateVersionFilesResponse(od); + }); + }); + + unittest.group("obj-schema-Redirect", () { + unittest.test("to-json--from-json", () { + var o = buildRedirect(); + var od = new api.Redirect.fromJson(o.toJson()); + checkRedirect(od); + }); + }); + + unittest.group("obj-schema-Release", () { + unittest.test("to-json--from-json", () { + var o = buildRelease(); + var od = new api.Release.fromJson(o.toJson()); + checkRelease(od); + }); + }); + + unittest.group("obj-schema-Rewrite", () { + unittest.test("to-json--from-json", () { + var o = buildRewrite(); + var od = new api.Rewrite.fromJson(o.toJson()); + checkRewrite(od); + }); + }); + + unittest.group("obj-schema-ServingConfig", () { + unittest.test("to-json--from-json", () { + var o = buildServingConfig(); + var od = new api.ServingConfig.fromJson(o.toJson()); + checkServingConfig(od); + }); + }); + + unittest.group("obj-schema-SiteConfig", () { + unittest.test("to-json--from-json", () { + var o = buildSiteConfig(); + var od = new api.SiteConfig.fromJson(o.toJson()); + checkSiteConfig(od); + }); + }); + + unittest.group("obj-schema-Version", () { + unittest.test("to-json--from-json", () { + var o = buildVersion(); + var od = new api.Version.fromJson(o.toJson()); + checkVersion(od); + }); + }); + + unittest.group("obj-schema-VersionFile", () { + unittest.test("to-json--from-json", () { + var o = buildVersionFile(); + var od = new api.VersionFile.fromJson(o.toJson()); + checkVersionFile(od); + }); + }); + + unittest.group("resource-SitesResourceApi", () { + unittest.test("method--getConfig", () { + var mock = new HttpServerMock(); + api.SitesResourceApi res = new api.FirebasehostingApi(mock).sites; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSiteConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .getConfig(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSiteConfig(response); + }))); + }); + + unittest.test("method--updateConfig", () { + var mock = new HttpServerMock(); + api.SitesResourceApi res = new api.FirebasehostingApi(mock).sites; + var arg_request = buildSiteConfig(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SiteConfig.fromJson(json); + checkSiteConfig(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildSiteConfig()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updateConfig(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkSiteConfig(response); + }))); + }); + }); + + unittest.group("resource-SitesDomainsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_request = buildDomain(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Domain.fromJson(json); + checkDomain(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListDomainsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListDomainsResponse(response); + }))); + }); + + unittest.test("method--update", () { + var mock = new HttpServerMock(); + api.SitesDomainsResourceApi res = + new api.FirebasehostingApi(mock).sites.domains; + var arg_request = buildDomain(); + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Domain.fromJson(json); + checkDomain(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildDomain()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .update(arg_request, arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkDomain(response); + }))); + }); + }); + + unittest.group("resource-SitesReleasesResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesReleasesResourceApi res = + new api.FirebasehostingApi(mock).sites.releases; + var arg_request = buildRelease(); + var arg_parent = "foo"; + var arg_versionName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Release.fromJson(json); + checkRelease(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["versionName"].first, unittest.equals(arg_versionName)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildRelease()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + versionName: arg_versionName, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkRelease(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesReleasesResourceApi res = + new api.FirebasehostingApi(mock).sites.releases; + var arg_parent = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListReleasesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListReleasesResponse(response); + }))); + }); + }); + + unittest.group("resource-SitesVersionsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildVersion(); + var arg_parent = "foo"; + var arg_sizeBytes = "foo"; + var arg_versionId = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Version.fromJson(json); + checkVersion(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["sizeBytes"].first, unittest.equals(arg_sizeBytes)); + unittest.expect( + queryMap["versionId"].first, unittest.equals(arg_versionId)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVersion()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, + sizeBytes: arg_sizeBytes, + versionId: arg_versionId, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVersion(response); + }))); + }); + + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildEmpty()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkEmpty(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildVersion(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Version.fromJson(json); + checkVersion(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildVersion()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkVersion(response); + }))); + }); + + unittest.test("method--populateFiles", () { + var mock = new HttpServerMock(); + api.SitesVersionsResourceApi res = + new api.FirebasehostingApi(mock).sites.versions; + var arg_request = buildPopulateVersionFilesRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PopulateVersionFilesRequest.fromJson(json); + checkPopulateVersionFilesRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPopulateVersionFilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .populateFiles(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPopulateVersionFilesResponse(response); + }))); + }); + }); + + unittest.group("resource-SitesVersionsFilesResourceApi", () { + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.SitesVersionsFilesResourceApi res = + new api.FirebasehostingApi(mock).sites.versions.files; + var arg_parent = "foo"; + var arg_status = "foo"; + var arg_pageToken = "foo"; + var arg_pageSize = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 8), + unittest.equals("v1beta1/")); + pathOffset += 8; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListVersionFilesResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, + status: arg_status, + pageToken: arg_pageToken, + pageSize: arg_pageSize, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListVersionFilesResponse(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/iap/v1beta1_test.dart b/generated/googleapis_beta/test/iap/v1beta1_test.dart deleted file mode 100644 index a002398..0000000 --- a/generated/googleapis_beta/test/iap/v1beta1_test.dart +++ /dev/null
@@ -1,912 +0,0 @@ -library googleapis_beta.iap.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/iap/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -buildUnnamed5464() { - var o = new core.List<api.AuditLogConfig>(); - o.add(buildAuditLogConfig()); - o.add(buildAuditLogConfig()); - return o; -} - -checkUnnamed5464(core.List<api.AuditLogConfig> o) { - unittest.expect(o, unittest.hasLength(2)); - checkAuditLogConfig(o[0]); - checkAuditLogConfig(o[1]); -} - -core.int buildCounterAuditConfig = 0; -buildAuditConfig() { - var o = new api.AuditConfig(); - buildCounterAuditConfig++; - if (buildCounterAuditConfig < 3) { - o.auditLogConfigs = buildUnnamed5464(); - o.service = "foo"; - } - buildCounterAuditConfig--; - return o; -} - -checkAuditConfig(api.AuditConfig o) { - buildCounterAuditConfig++; - if (buildCounterAuditConfig < 3) { - checkUnnamed5464(o.auditLogConfigs); - unittest.expect(o.service, unittest.equals('foo')); - } - buildCounterAuditConfig--; -} - -buildUnnamed5465() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5465(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterAuditLogConfig = 0; -buildAuditLogConfig() { - var o = new api.AuditLogConfig(); - buildCounterAuditLogConfig++; - if (buildCounterAuditLogConfig < 3) { - o.exemptedMembers = buildUnnamed5465(); - o.logType = "foo"; - } - buildCounterAuditLogConfig--; - return o; -} - -checkAuditLogConfig(api.AuditLogConfig o) { - buildCounterAuditLogConfig++; - if (buildCounterAuditLogConfig < 3) { - checkUnnamed5465(o.exemptedMembers); - unittest.expect(o.logType, unittest.equals('foo')); - } - buildCounterAuditLogConfig--; -} - -buildUnnamed5466() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5466(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterBinding = 0; -buildBinding() { - var o = new api.Binding(); - buildCounterBinding++; - if (buildCounterBinding < 3) { - o.condition = buildExpr(); - o.members = buildUnnamed5466(); - o.role = "foo"; - } - buildCounterBinding--; - return o; -} - -checkBinding(api.Binding o) { - buildCounterBinding++; - if (buildCounterBinding < 3) { - checkExpr(o.condition); - checkUnnamed5466(o.members); - unittest.expect(o.role, unittest.equals('foo')); - } - buildCounterBinding--; -} - -core.int buildCounterExpr = 0; -buildExpr() { - var o = new api.Expr(); - buildCounterExpr++; - if (buildCounterExpr < 3) { - o.description = "foo"; - o.expression = "foo"; - o.location = "foo"; - o.title = "foo"; - } - buildCounterExpr--; - return o; -} - -checkExpr(api.Expr o) { - buildCounterExpr++; - if (buildCounterExpr < 3) { - unittest.expect(o.description, unittest.equals('foo')); - unittest.expect(o.expression, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.title, unittest.equals('foo')); - } - buildCounterExpr--; -} - -core.int buildCounterGetIamPolicyRequest = 0; -buildGetIamPolicyRequest() { - var o = new api.GetIamPolicyRequest(); - buildCounterGetIamPolicyRequest++; - if (buildCounterGetIamPolicyRequest < 3) {} - buildCounterGetIamPolicyRequest--; - return o; -} - -checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { - buildCounterGetIamPolicyRequest++; - if (buildCounterGetIamPolicyRequest < 3) {} - buildCounterGetIamPolicyRequest--; -} - -buildUnnamed5467() { - var o = new core.List<api.AuditConfig>(); - o.add(buildAuditConfig()); - o.add(buildAuditConfig()); - return o; -} - -checkUnnamed5467(core.List<api.AuditConfig> o) { - unittest.expect(o, unittest.hasLength(2)); - checkAuditConfig(o[0]); - checkAuditConfig(o[1]); -} - -buildUnnamed5468() { - var o = new core.List<api.Binding>(); - o.add(buildBinding()); - o.add(buildBinding()); - return o; -} - -checkUnnamed5468(core.List<api.Binding> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBinding(o[0]); - checkBinding(o[1]); -} - -core.int buildCounterPolicy = 0; -buildPolicy() { - var o = new api.Policy(); - buildCounterPolicy++; - if (buildCounterPolicy < 3) { - o.auditConfigs = buildUnnamed5467(); - o.bindings = buildUnnamed5468(); - o.etag = "foo"; - o.version = 42; - } - buildCounterPolicy--; - return o; -} - -checkPolicy(api.Policy o) { - buildCounterPolicy++; - if (buildCounterPolicy < 3) { - checkUnnamed5467(o.auditConfigs); - checkUnnamed5468(o.bindings); - unittest.expect(o.etag, unittest.equals('foo')); - unittest.expect(o.version, unittest.equals(42)); - } - buildCounterPolicy--; -} - -core.int buildCounterSetIamPolicyRequest = 0; -buildSetIamPolicyRequest() { - var o = new api.SetIamPolicyRequest(); - buildCounterSetIamPolicyRequest++; - if (buildCounterSetIamPolicyRequest < 3) { - o.policy = buildPolicy(); - o.updateMask = "foo"; - } - buildCounterSetIamPolicyRequest--; - return o; -} - -checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { - buildCounterSetIamPolicyRequest++; - if (buildCounterSetIamPolicyRequest < 3) { - checkPolicy(o.policy); - unittest.expect(o.updateMask, unittest.equals('foo')); - } - buildCounterSetIamPolicyRequest--; -} - -buildUnnamed5469() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5469(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTestIamPermissionsRequest = 0; -buildTestIamPermissionsRequest() { - var o = new api.TestIamPermissionsRequest(); - buildCounterTestIamPermissionsRequest++; - if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5469(); - } - buildCounterTestIamPermissionsRequest--; - return o; -} - -checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { - buildCounterTestIamPermissionsRequest++; - if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5469(o.permissions); - } - buildCounterTestIamPermissionsRequest--; -} - -buildUnnamed5470() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5470(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTestIamPermissionsResponse = 0; -buildTestIamPermissionsResponse() { - var o = new api.TestIamPermissionsResponse(); - buildCounterTestIamPermissionsResponse++; - if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5470(); - } - buildCounterTestIamPermissionsResponse--; - return o; -} - -checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { - buildCounterTestIamPermissionsResponse++; - if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5470(o.permissions); - } - buildCounterTestIamPermissionsResponse--; -} - -main() { - unittest.group("obj-schema-AuditConfig", () { - unittest.test("to-json--from-json", () { - var o = buildAuditConfig(); - var od = new api.AuditConfig.fromJson(o.toJson()); - checkAuditConfig(od); - }); - }); - - unittest.group("obj-schema-AuditLogConfig", () { - unittest.test("to-json--from-json", () { - var o = buildAuditLogConfig(); - var od = new api.AuditLogConfig.fromJson(o.toJson()); - checkAuditLogConfig(od); - }); - }); - - unittest.group("obj-schema-Binding", () { - unittest.test("to-json--from-json", () { - var o = buildBinding(); - var od = new api.Binding.fromJson(o.toJson()); - checkBinding(od); - }); - }); - - unittest.group("obj-schema-Expr", () { - unittest.test("to-json--from-json", () { - var o = buildExpr(); - var od = new api.Expr.fromJson(o.toJson()); - checkExpr(od); - }); - }); - - unittest.group("obj-schema-GetIamPolicyRequest", () { - unittest.test("to-json--from-json", () { - var o = buildGetIamPolicyRequest(); - var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); - checkGetIamPolicyRequest(od); - }); - }); - - unittest.group("obj-schema-Policy", () { - unittest.test("to-json--from-json", () { - var o = buildPolicy(); - var od = new api.Policy.fromJson(o.toJson()); - checkPolicy(od); - }); - }); - - unittest.group("obj-schema-SetIamPolicyRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSetIamPolicyRequest(); - var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); - checkSetIamPolicyRequest(od); - }); - }); - - unittest.group("obj-schema-TestIamPermissionsRequest", () { - unittest.test("to-json--from-json", () { - var o = buildTestIamPermissionsRequest(); - var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); - checkTestIamPermissionsRequest(od); - }); - }); - - unittest.group("obj-schema-TestIamPermissionsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildTestIamPermissionsResponse(); - var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); - checkTestIamPermissionsResponse(od); - }); - }); - - unittest.group("resource-ProjectsIapWebResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebResourceApi res = new api.IapApi(mock).projects.iapWeb; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsIapWebServicesResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesResourceApi res = - new api.IapApi(mock).projects.iapWeb.services; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsIapWebServicesVersionsResourceApi", () { - unittest.test("method--getIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildGetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.GetIamPolicyRequest.fromJson(json); - checkGetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .getIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--setIamPolicy", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildSetIamPolicyRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SetIamPolicyRequest.fromJson(json); - checkSetIamPolicyRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildPolicy()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setIamPolicy(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkPolicy(response); - }))); - }); - - unittest.test("method--testIamPermissions", () { - var mock = new HttpServerMock(); - api.ProjectsIapWebServicesVersionsResourceApi res = - new api.IapApi(mock).projects.iapWeb.services.versions; - var arg_request = buildTestIamPermissionsRequest(); - var arg_resource = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.TestIamPermissionsRequest.fromJson(json); - checkTestIamPermissionsRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v1beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTestIamPermissionsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .testIamPermissions(arg_request, arg_resource, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTestIamPermissionsResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/language/v1beta1_test.dart b/generated/googleapis_beta/test/language/v1beta1_test.dart index 75ff8c4..7d06974 100644 --- a/generated/googleapis_beta/test/language/v1beta1_test.dart +++ b/generated/googleapis_beta/test/language/v1beta1_test.dart
@@ -71,14 +71,14 @@ buildCounterAnalyzeEntitiesRequest--; } -buildUnnamed5580() { +buildUnnamed5074() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5580(core.List<api.Entity> o) { +checkUnnamed5074(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -89,7 +89,7 @@ var o = new api.AnalyzeEntitiesResponse(); buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - o.entities = buildUnnamed5580(); + o.entities = buildUnnamed5074(); o.language = "foo"; } buildCounterAnalyzeEntitiesResponse--; @@ -99,7 +99,7 @@ checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - checkUnnamed5580(o.entities); + checkUnnamed5074(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitiesResponse--; @@ -126,14 +126,14 @@ buildCounterAnalyzeSentimentRequest--; } -buildUnnamed5581() { +buildUnnamed5075() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5581(core.List<api.Sentence> o) { +checkUnnamed5075(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); @@ -146,7 +146,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { o.documentSentiment = buildSentiment(); o.language = "foo"; - o.sentences = buildUnnamed5581(); + o.sentences = buildUnnamed5075(); } buildCounterAnalyzeSentimentResponse--; return o; @@ -157,7 +157,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { checkSentiment(o.documentSentiment); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5581(o.sentences); + checkUnnamed5075(o.sentences); } buildCounterAnalyzeSentimentResponse--; } @@ -183,27 +183,27 @@ buildCounterAnalyzeSyntaxRequest--; } -buildUnnamed5582() { +buildUnnamed5076() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5582(core.List<api.Sentence> o) { +checkUnnamed5076(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5583() { +buildUnnamed5077() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5583(core.List<api.Token> o) { +checkUnnamed5077(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -215,8 +215,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { o.language = "foo"; - o.sentences = buildUnnamed5582(); - o.tokens = buildUnnamed5583(); + o.sentences = buildUnnamed5076(); + o.tokens = buildUnnamed5077(); } buildCounterAnalyzeSyntaxResponse--; return o; @@ -226,8 +226,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5582(o.sentences); - checkUnnamed5583(o.tokens); + checkUnnamed5076(o.sentences); + checkUnnamed5077(o.tokens); } buildCounterAnalyzeSyntaxResponse--; } @@ -255,40 +255,40 @@ buildCounterAnnotateTextRequest--; } -buildUnnamed5584() { +buildUnnamed5078() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5584(core.List<api.Entity> o) { +checkUnnamed5078(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); } -buildUnnamed5585() { +buildUnnamed5079() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5585(core.List<api.Sentence> o) { +checkUnnamed5079(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5586() { +buildUnnamed5080() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5586(core.List<api.Token> o) { +checkUnnamed5080(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -300,10 +300,10 @@ buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { o.documentSentiment = buildSentiment(); - o.entities = buildUnnamed5584(); + o.entities = buildUnnamed5078(); o.language = "foo"; - o.sentences = buildUnnamed5585(); - o.tokens = buildUnnamed5586(); + o.sentences = buildUnnamed5079(); + o.tokens = buildUnnamed5080(); } buildCounterAnnotateTextResponse--; return o; @@ -313,10 +313,10 @@ buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { checkSentiment(o.documentSentiment); - checkUnnamed5584(o.entities); + checkUnnamed5078(o.entities); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5585(o.sentences); - checkUnnamed5586(o.tokens); + checkUnnamed5079(o.sentences); + checkUnnamed5080(o.tokens); } buildCounterAnnotateTextResponse--; } @@ -367,27 +367,27 @@ buildCounterDocument--; } -buildUnnamed5587() { +buildUnnamed5081() { var o = new core.List<api.EntityMention>(); o.add(buildEntityMention()); o.add(buildEntityMention()); return o; } -checkUnnamed5587(core.List<api.EntityMention> o) { +checkUnnamed5081(core.List<api.EntityMention> o) { unittest.expect(o, unittest.hasLength(2)); checkEntityMention(o[0]); checkEntityMention(o[1]); } -buildUnnamed5588() { +buildUnnamed5082() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5588(core.Map<core.String, core.String> o) { +checkUnnamed5082(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -398,8 +398,8 @@ var o = new api.Entity(); buildCounterEntity++; if (buildCounterEntity < 3) { - o.mentions = buildUnnamed5587(); - o.metadata = buildUnnamed5588(); + o.mentions = buildUnnamed5081(); + o.metadata = buildUnnamed5082(); o.name = "foo"; o.salience = 42.0; o.type = "foo"; @@ -411,8 +411,8 @@ checkEntity(api.Entity o) { buildCounterEntity++; if (buildCounterEntity < 3) { - checkUnnamed5587(o.mentions); - checkUnnamed5588(o.metadata); + checkUnnamed5081(o.mentions); + checkUnnamed5082(o.metadata); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.salience, unittest.equals(42.0)); unittest.expect(o.type, unittest.equals('foo')); @@ -549,7 +549,7 @@ buildCounterSentiment--; } -buildUnnamed5589() { +buildUnnamed5083() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -564,7 +564,7 @@ return o; } -checkUnnamed5589(core.Map<core.String, core.Object> o) { +checkUnnamed5083(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -578,17 +578,17 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5590() { +buildUnnamed5084() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5589()); - o.add(buildUnnamed5589()); + o.add(buildUnnamed5083()); + o.add(buildUnnamed5083()); return o; } -checkUnnamed5590(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed5084(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5589(o[0]); - checkUnnamed5589(o[1]); + checkUnnamed5083(o[0]); + checkUnnamed5083(o[1]); } core.int buildCounterStatus = 0; @@ -597,7 +597,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5590(); + o.details = buildUnnamed5084(); o.message = "foo"; } buildCounterStatus--; @@ -608,7 +608,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5590(o.details); + checkUnnamed5084(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--;
diff --git a/generated/googleapis_beta/test/language/v1beta2_test.dart b/generated/googleapis_beta/test/language/v1beta2_test.dart index e4612b6..f92ddb1 100644 --- a/generated/googleapis_beta/test/language/v1beta2_test.dart +++ b/generated/googleapis_beta/test/language/v1beta2_test.dart
@@ -71,14 +71,14 @@ buildCounterAnalyzeEntitiesRequest--; } -buildUnnamed5397() { +buildUnnamed4316() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5397(core.List<api.Entity> o) { +checkUnnamed4316(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -89,7 +89,7 @@ var o = new api.AnalyzeEntitiesResponse(); buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - o.entities = buildUnnamed5397(); + o.entities = buildUnnamed4316(); o.language = "foo"; } buildCounterAnalyzeEntitiesResponse--; @@ -99,7 +99,7 @@ checkAnalyzeEntitiesResponse(api.AnalyzeEntitiesResponse o) { buildCounterAnalyzeEntitiesResponse++; if (buildCounterAnalyzeEntitiesResponse < 3) { - checkUnnamed5397(o.entities); + checkUnnamed4316(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitiesResponse--; @@ -126,14 +126,14 @@ buildCounterAnalyzeEntitySentimentRequest--; } -buildUnnamed5398() { +buildUnnamed4317() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5398(core.List<api.Entity> o) { +checkUnnamed4317(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); @@ -144,7 +144,7 @@ var o = new api.AnalyzeEntitySentimentResponse(); buildCounterAnalyzeEntitySentimentResponse++; if (buildCounterAnalyzeEntitySentimentResponse < 3) { - o.entities = buildUnnamed5398(); + o.entities = buildUnnamed4317(); o.language = "foo"; } buildCounterAnalyzeEntitySentimentResponse--; @@ -154,7 +154,7 @@ checkAnalyzeEntitySentimentResponse(api.AnalyzeEntitySentimentResponse o) { buildCounterAnalyzeEntitySentimentResponse++; if (buildCounterAnalyzeEntitySentimentResponse < 3) { - checkUnnamed5398(o.entities); + checkUnnamed4317(o.entities); unittest.expect(o.language, unittest.equals('foo')); } buildCounterAnalyzeEntitySentimentResponse--; @@ -181,14 +181,14 @@ buildCounterAnalyzeSentimentRequest--; } -buildUnnamed5399() { +buildUnnamed4318() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5399(core.List<api.Sentence> o) { +checkUnnamed4318(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); @@ -201,7 +201,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { o.documentSentiment = buildSentiment(); o.language = "foo"; - o.sentences = buildUnnamed5399(); + o.sentences = buildUnnamed4318(); } buildCounterAnalyzeSentimentResponse--; return o; @@ -212,7 +212,7 @@ if (buildCounterAnalyzeSentimentResponse < 3) { checkSentiment(o.documentSentiment); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5399(o.sentences); + checkUnnamed4318(o.sentences); } buildCounterAnalyzeSentimentResponse--; } @@ -238,27 +238,27 @@ buildCounterAnalyzeSyntaxRequest--; } -buildUnnamed5400() { +buildUnnamed4319() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5400(core.List<api.Sentence> o) { +checkUnnamed4319(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5401() { +buildUnnamed4320() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5401(core.List<api.Token> o) { +checkUnnamed4320(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -270,8 +270,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { o.language = "foo"; - o.sentences = buildUnnamed5400(); - o.tokens = buildUnnamed5401(); + o.sentences = buildUnnamed4319(); + o.tokens = buildUnnamed4320(); } buildCounterAnalyzeSyntaxResponse--; return o; @@ -281,8 +281,8 @@ buildCounterAnalyzeSyntaxResponse++; if (buildCounterAnalyzeSyntaxResponse < 3) { unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5400(o.sentences); - checkUnnamed5401(o.tokens); + checkUnnamed4319(o.sentences); + checkUnnamed4320(o.tokens); } buildCounterAnalyzeSyntaxResponse--; } @@ -310,53 +310,53 @@ buildCounterAnnotateTextRequest--; } -buildUnnamed5402() { +buildUnnamed4321() { var o = new core.List<api.ClassificationCategory>(); o.add(buildClassificationCategory()); o.add(buildClassificationCategory()); return o; } -checkUnnamed5402(core.List<api.ClassificationCategory> o) { +checkUnnamed4321(core.List<api.ClassificationCategory> o) { unittest.expect(o, unittest.hasLength(2)); checkClassificationCategory(o[0]); checkClassificationCategory(o[1]); } -buildUnnamed5403() { +buildUnnamed4322() { var o = new core.List<api.Entity>(); o.add(buildEntity()); o.add(buildEntity()); return o; } -checkUnnamed5403(core.List<api.Entity> o) { +checkUnnamed4322(core.List<api.Entity> o) { unittest.expect(o, unittest.hasLength(2)); checkEntity(o[0]); checkEntity(o[1]); } -buildUnnamed5404() { +buildUnnamed4323() { var o = new core.List<api.Sentence>(); o.add(buildSentence()); o.add(buildSentence()); return o; } -checkUnnamed5404(core.List<api.Sentence> o) { +checkUnnamed4323(core.List<api.Sentence> o) { unittest.expect(o, unittest.hasLength(2)); checkSentence(o[0]); checkSentence(o[1]); } -buildUnnamed5405() { +buildUnnamed4324() { var o = new core.List<api.Token>(); o.add(buildToken()); o.add(buildToken()); return o; } -checkUnnamed5405(core.List<api.Token> o) { +checkUnnamed4324(core.List<api.Token> o) { unittest.expect(o, unittest.hasLength(2)); checkToken(o[0]); checkToken(o[1]); @@ -367,12 +367,12 @@ var o = new api.AnnotateTextResponse(); buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { - o.categories = buildUnnamed5402(); + o.categories = buildUnnamed4321(); o.documentSentiment = buildSentiment(); - o.entities = buildUnnamed5403(); + o.entities = buildUnnamed4322(); o.language = "foo"; - o.sentences = buildUnnamed5404(); - o.tokens = buildUnnamed5405(); + o.sentences = buildUnnamed4323(); + o.tokens = buildUnnamed4324(); } buildCounterAnnotateTextResponse--; return o; @@ -381,12 +381,12 @@ checkAnnotateTextResponse(api.AnnotateTextResponse o) { buildCounterAnnotateTextResponse++; if (buildCounterAnnotateTextResponse < 3) { - checkUnnamed5402(o.categories); + checkUnnamed4321(o.categories); checkSentiment(o.documentSentiment); - checkUnnamed5403(o.entities); + checkUnnamed4322(o.entities); unittest.expect(o.language, unittest.equals('foo')); - checkUnnamed5404(o.sentences); - checkUnnamed5405(o.tokens); + checkUnnamed4323(o.sentences); + checkUnnamed4324(o.tokens); } buildCounterAnnotateTextResponse--; } @@ -431,14 +431,14 @@ buildCounterClassifyTextRequest--; } -buildUnnamed5406() { +buildUnnamed4325() { var o = new core.List<api.ClassificationCategory>(); o.add(buildClassificationCategory()); o.add(buildClassificationCategory()); return o; } -checkUnnamed5406(core.List<api.ClassificationCategory> o) { +checkUnnamed4325(core.List<api.ClassificationCategory> o) { unittest.expect(o, unittest.hasLength(2)); checkClassificationCategory(o[0]); checkClassificationCategory(o[1]); @@ -449,7 +449,7 @@ var o = new api.ClassifyTextResponse(); buildCounterClassifyTextResponse++; if (buildCounterClassifyTextResponse < 3) { - o.categories = buildUnnamed5406(); + o.categories = buildUnnamed4325(); } buildCounterClassifyTextResponse--; return o; @@ -458,7 +458,7 @@ checkClassifyTextResponse(api.ClassifyTextResponse o) { buildCounterClassifyTextResponse++; if (buildCounterClassifyTextResponse < 3) { - checkUnnamed5406(o.categories); + checkUnnamed4325(o.categories); } buildCounterClassifyTextResponse--; } @@ -509,27 +509,27 @@ buildCounterDocument--; } -buildUnnamed5407() { +buildUnnamed4326() { var o = new core.List<api.EntityMention>(); o.add(buildEntityMention()); o.add(buildEntityMention()); return o; } -checkUnnamed5407(core.List<api.EntityMention> o) { +checkUnnamed4326(core.List<api.EntityMention> o) { unittest.expect(o, unittest.hasLength(2)); checkEntityMention(o[0]); checkEntityMention(o[1]); } -buildUnnamed5408() { +buildUnnamed4327() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5408(core.Map<core.String, core.String> o) { +checkUnnamed4327(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -540,8 +540,8 @@ var o = new api.Entity(); buildCounterEntity++; if (buildCounterEntity < 3) { - o.mentions = buildUnnamed5407(); - o.metadata = buildUnnamed5408(); + o.mentions = buildUnnamed4326(); + o.metadata = buildUnnamed4327(); o.name = "foo"; o.salience = 42.0; o.sentiment = buildSentiment(); @@ -554,8 +554,8 @@ checkEntity(api.Entity o) { buildCounterEntity++; if (buildCounterEntity < 3) { - checkUnnamed5407(o.mentions); - checkUnnamed5408(o.metadata); + checkUnnamed4326(o.mentions); + checkUnnamed4327(o.metadata); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.salience, unittest.equals(42.0)); checkSentiment(o.sentiment); @@ -697,7 +697,7 @@ buildCounterSentiment--; } -buildUnnamed5409() { +buildUnnamed4328() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -712,7 +712,7 @@ return o; } -checkUnnamed5409(core.Map<core.String, core.Object> o) { +checkUnnamed4328(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -726,17 +726,17 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5410() { +buildUnnamed4329() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5409()); - o.add(buildUnnamed5409()); + o.add(buildUnnamed4328()); + o.add(buildUnnamed4328()); return o; } -checkUnnamed5410(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4329(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5409(o[0]); - checkUnnamed5409(o[1]); + checkUnnamed4328(o[0]); + checkUnnamed4328(o[1]); } core.int buildCounterStatus = 0; @@ -745,7 +745,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5410(); + o.details = buildUnnamed4329(); o.message = "foo"; } buildCounterStatus--; @@ -756,7 +756,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5410(o.details); + checkUnnamed4329(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--;
diff --git a/generated/googleapis_beta/test/logging/v2beta1_test.dart b/generated/googleapis_beta/test/logging/v2beta1_test.dart index f5b078d..93fdd3c 100644 --- a/generated/googleapis_beta/test/logging/v2beta1_test.dart +++ b/generated/googleapis_beta/test/logging/v2beta1_test.dart
@@ -88,14 +88,14 @@ buildCounterEmpty--; } -buildUnnamed5101() { +buildUnnamed5015() { var o = new core.List<core.double>(); o.add(42.0); o.add(42.0); return o; } -checkUnnamed5101(core.List<core.double> o) { +checkUnnamed5015(core.List<core.double> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals(42.0)); unittest.expect(o[1], unittest.equals(42.0)); @@ -106,7 +106,7 @@ var o = new api.Explicit(); buildCounterExplicit++; if (buildCounterExplicit < 3) { - o.bounds = buildUnnamed5101(); + o.bounds = buildUnnamed5015(); } buildCounterExplicit--; return o; @@ -115,7 +115,7 @@ checkExplicit(api.Explicit o) { buildCounterExplicit++; if (buildCounterExplicit < 3) { - checkUnnamed5101(o.bounds); + checkUnnamed5015(o.bounds); } buildCounterExplicit--; } @@ -236,27 +236,27 @@ buildCounterLinear--; } -buildUnnamed5102() { +buildUnnamed5016() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5102(core.List<core.String> o) { +checkUnnamed5016(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5103() { +buildUnnamed5017() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5103(core.List<core.String> o) { +checkUnnamed5017(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -271,8 +271,8 @@ o.orderBy = "foo"; o.pageSize = 42; o.pageToken = "foo"; - o.projectIds = buildUnnamed5102(); - o.resourceNames = buildUnnamed5103(); + o.projectIds = buildUnnamed5016(); + o.resourceNames = buildUnnamed5017(); } buildCounterListLogEntriesRequest--; return o; @@ -285,20 +285,20 @@ unittest.expect(o.orderBy, unittest.equals('foo')); unittest.expect(o.pageSize, unittest.equals(42)); unittest.expect(o.pageToken, unittest.equals('foo')); - checkUnnamed5102(o.projectIds); - checkUnnamed5103(o.resourceNames); + checkUnnamed5016(o.projectIds); + checkUnnamed5017(o.resourceNames); } buildCounterListLogEntriesRequest--; } -buildUnnamed5104() { +buildUnnamed5018() { var o = new core.List<api.LogEntry>(); o.add(buildLogEntry()); o.add(buildLogEntry()); return o; } -checkUnnamed5104(core.List<api.LogEntry> o) { +checkUnnamed5018(core.List<api.LogEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkLogEntry(o[0]); checkLogEntry(o[1]); @@ -309,7 +309,7 @@ var o = new api.ListLogEntriesResponse(); buildCounterListLogEntriesResponse++; if (buildCounterListLogEntriesResponse < 3) { - o.entries = buildUnnamed5104(); + o.entries = buildUnnamed5018(); o.nextPageToken = "foo"; } buildCounterListLogEntriesResponse--; @@ -319,20 +319,20 @@ checkListLogEntriesResponse(api.ListLogEntriesResponse o) { buildCounterListLogEntriesResponse++; if (buildCounterListLogEntriesResponse < 3) { - checkUnnamed5104(o.entries); + checkUnnamed5018(o.entries); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLogEntriesResponse--; } -buildUnnamed5105() { +buildUnnamed5019() { var o = new core.List<api.LogMetric>(); o.add(buildLogMetric()); o.add(buildLogMetric()); return o; } -checkUnnamed5105(core.List<api.LogMetric> o) { +checkUnnamed5019(core.List<api.LogMetric> o) { unittest.expect(o, unittest.hasLength(2)); checkLogMetric(o[0]); checkLogMetric(o[1]); @@ -343,7 +343,7 @@ var o = new api.ListLogMetricsResponse(); buildCounterListLogMetricsResponse++; if (buildCounterListLogMetricsResponse < 3) { - o.metrics = buildUnnamed5105(); + o.metrics = buildUnnamed5019(); o.nextPageToken = "foo"; } buildCounterListLogMetricsResponse--; @@ -353,54 +353,20 @@ checkListLogMetricsResponse(api.ListLogMetricsResponse o) { buildCounterListLogMetricsResponse++; if (buildCounterListLogMetricsResponse < 3) { - checkUnnamed5105(o.metrics); + checkUnnamed5019(o.metrics); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLogMetricsResponse--; } -buildUnnamed5106() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5106(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterListLogsResponse = 0; -buildListLogsResponse() { - var o = new api.ListLogsResponse(); - buildCounterListLogsResponse++; - if (buildCounterListLogsResponse < 3) { - o.logNames = buildUnnamed5106(); - o.nextPageToken = "foo"; - } - buildCounterListLogsResponse--; - return o; -} - -checkListLogsResponse(api.ListLogsResponse o) { - buildCounterListLogsResponse++; - if (buildCounterListLogsResponse < 3) { - checkUnnamed5106(o.logNames); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterListLogsResponse--; -} - -buildUnnamed5107() { +buildUnnamed5020() { var o = new core.List<api.MonitoredResourceDescriptor>(); o.add(buildMonitoredResourceDescriptor()); o.add(buildMonitoredResourceDescriptor()); return o; } -checkUnnamed5107(core.List<api.MonitoredResourceDescriptor> o) { +checkUnnamed5020(core.List<api.MonitoredResourceDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkMonitoredResourceDescriptor(o[0]); checkMonitoredResourceDescriptor(o[1]); @@ -412,7 +378,7 @@ buildCounterListMonitoredResourceDescriptorsResponse++; if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { o.nextPageToken = "foo"; - o.resourceDescriptors = buildUnnamed5107(); + o.resourceDescriptors = buildUnnamed5020(); } buildCounterListMonitoredResourceDescriptorsResponse--; return o; @@ -423,19 +389,19 @@ buildCounterListMonitoredResourceDescriptorsResponse++; if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5107(o.resourceDescriptors); + checkUnnamed5020(o.resourceDescriptors); } buildCounterListMonitoredResourceDescriptorsResponse--; } -buildUnnamed5108() { +buildUnnamed5021() { var o = new core.List<api.LogSink>(); o.add(buildLogSink()); o.add(buildLogSink()); return o; } -checkUnnamed5108(core.List<api.LogSink> o) { +checkUnnamed5021(core.List<api.LogSink> o) { unittest.expect(o, unittest.hasLength(2)); checkLogSink(o[0]); checkLogSink(o[1]); @@ -447,7 +413,7 @@ buildCounterListSinksResponse++; if (buildCounterListSinksResponse < 3) { o.nextPageToken = "foo"; - o.sinks = buildUnnamed5108(); + o.sinks = buildUnnamed5021(); } buildCounterListSinksResponse--; return o; @@ -457,12 +423,12 @@ buildCounterListSinksResponse++; if (buildCounterListSinksResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5108(o.sinks); + checkUnnamed5021(o.sinks); } buildCounterListSinksResponse--; } -buildUnnamed5109() { +buildUnnamed5022() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -477,7 +443,7 @@ return o; } -checkUnnamed5109(core.Map<core.String, core.Object> o) { +checkUnnamed5022(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -491,20 +457,20 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5110() { +buildUnnamed5023() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5110(core.Map<core.String, core.String> o) { +checkUnnamed5023(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5111() { +buildUnnamed5024() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -519,7 +485,7 @@ return o; } -checkUnnamed5111(core.Map<core.String, core.Object> o) { +checkUnnamed5024(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -540,12 +506,12 @@ if (buildCounterLogEntry < 3) { o.httpRequest = buildHttpRequest(); o.insertId = "foo"; - o.jsonPayload = buildUnnamed5109(); - o.labels = buildUnnamed5110(); + o.jsonPayload = buildUnnamed5022(); + o.labels = buildUnnamed5023(); o.logName = "foo"; o.metadata = buildMonitoredResourceMetadata(); o.operation = buildLogEntryOperation(); - o.protoPayload = buildUnnamed5111(); + o.protoPayload = buildUnnamed5024(); o.receiveTimestamp = "foo"; o.resource = buildMonitoredResource(); o.severity = "foo"; @@ -554,6 +520,7 @@ o.textPayload = "foo"; o.timestamp = "foo"; o.trace = "foo"; + o.traceSampled = true; } buildCounterLogEntry--; return o; @@ -564,12 +531,12 @@ if (buildCounterLogEntry < 3) { checkHttpRequest(o.httpRequest); unittest.expect(o.insertId, unittest.equals('foo')); - checkUnnamed5109(o.jsonPayload); - checkUnnamed5110(o.labels); + checkUnnamed5022(o.jsonPayload); + checkUnnamed5023(o.labels); unittest.expect(o.logName, unittest.equals('foo')); checkMonitoredResourceMetadata(o.metadata); checkLogEntryOperation(o.operation); - checkUnnamed5111(o.protoPayload); + checkUnnamed5024(o.protoPayload); unittest.expect(o.receiveTimestamp, unittest.equals('foo')); checkMonitoredResource(o.resource); unittest.expect(o.severity, unittest.equals('foo')); @@ -578,6 +545,7 @@ unittest.expect(o.textPayload, unittest.equals('foo')); unittest.expect(o.timestamp, unittest.equals('foo')); unittest.expect(o.trace, unittest.equals('foo')); + unittest.expect(o.traceSampled, unittest.isTrue); } buildCounterLogEntry--; } @@ -655,14 +623,14 @@ buildCounterLogLine--; } -buildUnnamed5112() { +buildUnnamed5025() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5112(core.Map<core.String, core.String> o) { +checkUnnamed5025(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -674,11 +642,13 @@ buildCounterLogMetric++; if (buildCounterLogMetric < 3) { o.bucketOptions = buildBucketOptions(); + o.createTime = "foo"; o.description = "foo"; o.filter = "foo"; - o.labelExtractors = buildUnnamed5112(); + o.labelExtractors = buildUnnamed5025(); o.metricDescriptor = buildMetricDescriptor(); o.name = "foo"; + o.updateTime = "foo"; o.valueExtractor = "foo"; o.version = "foo"; } @@ -690,11 +660,13 @@ buildCounterLogMetric++; if (buildCounterLogMetric < 3) { checkBucketOptions(o.bucketOptions); + unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.filter, unittest.equals('foo')); - checkUnnamed5112(o.labelExtractors); + checkUnnamed5025(o.labelExtractors); checkMetricDescriptor(o.metricDescriptor); unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); unittest.expect(o.valueExtractor, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } @@ -706,13 +678,13 @@ var o = new api.LogSink(); buildCounterLogSink++; if (buildCounterLogSink < 3) { + o.createTime = "foo"; o.destination = "foo"; - o.endTime = "foo"; o.filter = "foo"; o.includeChildren = true; o.name = "foo"; o.outputVersionFormat = "foo"; - o.startTime = "foo"; + o.updateTime = "foo"; o.writerIdentity = "foo"; } buildCounterLogSink--; @@ -722,26 +694,26 @@ checkLogSink(api.LogSink o) { buildCounterLogSink++; if (buildCounterLogSink < 3) { + unittest.expect(o.createTime, unittest.equals('foo')); unittest.expect(o.destination, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); unittest.expect(o.filter, unittest.equals('foo')); unittest.expect(o.includeChildren, unittest.isTrue); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.outputVersionFormat, unittest.equals('foo')); - unittest.expect(o.startTime, unittest.equals('foo')); + unittest.expect(o.updateTime, unittest.equals('foo')); unittest.expect(o.writerIdentity, unittest.equals('foo')); } buildCounterLogSink--; } -buildUnnamed5113() { +buildUnnamed5026() { var o = new core.List<api.LabelDescriptor>(); o.add(buildLabelDescriptor()); o.add(buildLabelDescriptor()); return o; } -checkUnnamed5113(core.List<api.LabelDescriptor> o) { +checkUnnamed5026(core.List<api.LabelDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkLabelDescriptor(o[0]); checkLabelDescriptor(o[1]); @@ -754,7 +726,7 @@ if (buildCounterMetricDescriptor < 3) { o.description = "foo"; o.displayName = "foo"; - o.labels = buildUnnamed5113(); + o.labels = buildUnnamed5026(); o.metadata = buildMetricDescriptorMetadata(); o.metricKind = "foo"; o.name = "foo"; @@ -771,7 +743,7 @@ if (buildCounterMetricDescriptor < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5113(o.labels); + checkUnnamed5026(o.labels); checkMetricDescriptorMetadata(o.metadata); unittest.expect(o.metricKind, unittest.equals('foo')); unittest.expect(o.name, unittest.equals('foo')); @@ -805,14 +777,14 @@ buildCounterMetricDescriptorMetadata--; } -buildUnnamed5114() { +buildUnnamed5027() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5114(core.Map<core.String, core.String> o) { +checkUnnamed5027(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -823,7 +795,7 @@ var o = new api.MonitoredResource(); buildCounterMonitoredResource++; if (buildCounterMonitoredResource < 3) { - o.labels = buildUnnamed5114(); + o.labels = buildUnnamed5027(); o.type = "foo"; } buildCounterMonitoredResource--; @@ -833,20 +805,20 @@ checkMonitoredResource(api.MonitoredResource o) { buildCounterMonitoredResource++; if (buildCounterMonitoredResource < 3) { - checkUnnamed5114(o.labels); + checkUnnamed5027(o.labels); unittest.expect(o.type, unittest.equals('foo')); } buildCounterMonitoredResource--; } -buildUnnamed5115() { +buildUnnamed5028() { var o = new core.List<api.LabelDescriptor>(); o.add(buildLabelDescriptor()); o.add(buildLabelDescriptor()); return o; } -checkUnnamed5115(core.List<api.LabelDescriptor> o) { +checkUnnamed5028(core.List<api.LabelDescriptor> o) { unittest.expect(o, unittest.hasLength(2)); checkLabelDescriptor(o[0]); checkLabelDescriptor(o[1]); @@ -859,7 +831,7 @@ if (buildCounterMonitoredResourceDescriptor < 3) { o.description = "foo"; o.displayName = "foo"; - o.labels = buildUnnamed5115(); + o.labels = buildUnnamed5028(); o.name = "foo"; o.type = "foo"; } @@ -872,14 +844,14 @@ if (buildCounterMonitoredResourceDescriptor < 3) { unittest.expect(o.description, unittest.equals('foo')); unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5115(o.labels); + checkUnnamed5028(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.type, unittest.equals('foo')); } buildCounterMonitoredResourceDescriptor--; } -buildUnnamed5116() { +buildUnnamed5029() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -894,7 +866,7 @@ return o; } -checkUnnamed5116(core.Map<core.String, core.Object> o) { +checkUnnamed5029(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -908,14 +880,14 @@ unittest.expect(casted6["string"], unittest.equals('foo')); } -buildUnnamed5117() { +buildUnnamed5030() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5117(core.Map<core.String, core.String> o) { +checkUnnamed5030(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -926,8 +898,8 @@ var o = new api.MonitoredResourceMetadata(); buildCounterMonitoredResourceMetadata++; if (buildCounterMonitoredResourceMetadata < 3) { - o.systemLabels = buildUnnamed5116(); - o.userLabels = buildUnnamed5117(); + o.systemLabels = buildUnnamed5029(); + o.userLabels = buildUnnamed5030(); } buildCounterMonitoredResourceMetadata--; return o; @@ -936,33 +908,33 @@ checkMonitoredResourceMetadata(api.MonitoredResourceMetadata o) { buildCounterMonitoredResourceMetadata++; if (buildCounterMonitoredResourceMetadata < 3) { - checkUnnamed5116(o.systemLabels); - checkUnnamed5117(o.userLabels); + checkUnnamed5029(o.systemLabels); + checkUnnamed5030(o.userLabels); } buildCounterMonitoredResourceMetadata--; } -buildUnnamed5118() { +buildUnnamed5031() { var o = new core.List<api.LogLine>(); o.add(buildLogLine()); o.add(buildLogLine()); return o; } -checkUnnamed5118(core.List<api.LogLine> o) { +checkUnnamed5031(core.List<api.LogLine> o) { unittest.expect(o, unittest.hasLength(2)); checkLogLine(o[0]); checkLogLine(o[1]); } -buildUnnamed5119() { +buildUnnamed5032() { var o = new core.List<api.SourceReference>(); o.add(buildSourceReference()); o.add(buildSourceReference()); return o; } -checkUnnamed5119(core.List<api.SourceReference> o) { +checkUnnamed5032(core.List<api.SourceReference> o) { unittest.expect(o, unittest.hasLength(2)); checkSourceReference(o[0]); checkSourceReference(o[1]); @@ -985,7 +957,7 @@ o.instanceIndex = 42; o.ip = "foo"; o.latency = "foo"; - o.line = buildUnnamed5118(); + o.line = buildUnnamed5031(); o.megaCycles = "foo"; o.method = "foo"; o.moduleId = "foo"; @@ -995,7 +967,7 @@ o.requestId = "foo"; o.resource = "foo"; o.responseSize = "foo"; - o.sourceReference = buildUnnamed5119(); + o.sourceReference = buildUnnamed5032(); o.startTime = "foo"; o.status = 42; o.taskName = "foo"; @@ -1026,7 +998,7 @@ unittest.expect(o.instanceIndex, unittest.equals(42)); unittest.expect(o.ip, unittest.equals('foo')); unittest.expect(o.latency, unittest.equals('foo')); - checkUnnamed5118(o.line); + checkUnnamed5031(o.line); unittest.expect(o.megaCycles, unittest.equals('foo')); unittest.expect(o.method, unittest.equals('foo')); unittest.expect(o.moduleId, unittest.equals('foo')); @@ -1036,7 +1008,7 @@ unittest.expect(o.requestId, unittest.equals('foo')); unittest.expect(o.resource, unittest.equals('foo')); unittest.expect(o.responseSize, unittest.equals('foo')); - checkUnnamed5119(o.sourceReference); + checkUnnamed5032(o.sourceReference); unittest.expect(o.startTime, unittest.equals('foo')); unittest.expect(o.status, unittest.equals(42)); unittest.expect(o.taskName, unittest.equals('foo')); @@ -1095,27 +1067,27 @@ buildCounterSourceReference--; } -buildUnnamed5120() { +buildUnnamed5033() { var o = new core.List<api.LogEntry>(); o.add(buildLogEntry()); o.add(buildLogEntry()); return o; } -checkUnnamed5120(core.List<api.LogEntry> o) { +checkUnnamed5033(core.List<api.LogEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkLogEntry(o[0]); checkLogEntry(o[1]); } -buildUnnamed5121() { +buildUnnamed5034() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5121(core.Map<core.String, core.String> o) { +checkUnnamed5034(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1127,8 +1099,8 @@ buildCounterWriteLogEntriesRequest++; if (buildCounterWriteLogEntriesRequest < 3) { o.dryRun = true; - o.entries = buildUnnamed5120(); - o.labels = buildUnnamed5121(); + o.entries = buildUnnamed5033(); + o.labels = buildUnnamed5034(); o.logName = "foo"; o.partialSuccess = true; o.resource = buildMonitoredResource(); @@ -1141,8 +1113,8 @@ buildCounterWriteLogEntriesRequest++; if (buildCounterWriteLogEntriesRequest < 3) { unittest.expect(o.dryRun, unittest.isTrue); - checkUnnamed5120(o.entries); - checkUnnamed5121(o.labels); + checkUnnamed5033(o.entries); + checkUnnamed5034(o.labels); unittest.expect(o.logName, unittest.equals('foo')); unittest.expect(o.partialSuccess, unittest.isTrue); checkMonitoredResource(o.resource); @@ -1246,14 +1218,6 @@ }); }); - unittest.group("obj-schema-ListLogsResponse", () { - unittest.test("to-json--from-json", () { - var o = buildListLogsResponse(); - var od = new api.ListLogsResponse.fromJson(o.toJson()); - checkListLogsResponse(od); - }); - }); - unittest.group("obj-schema-ListMonitoredResourceDescriptorsResponse", () { unittest.test("to-json--from-json", () { var o = buildListMonitoredResourceDescriptorsResponse(); @@ -1399,121 +1363,6 @@ }); }); - unittest.group("resource-BillingAccountsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.BillingAccountsLogsResourceApi res = - new api.LoggingApi(mock).billingAccounts.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.BillingAccountsLogsResourceApi res = - new api.LoggingApi(mock).billingAccounts.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - unittest.group("resource-EntriesResourceApi", () { unittest.test("method--list", () { var mock = new HttpServerMock(); @@ -1627,8 +1476,8 @@ var mock = new HttpServerMock(); api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock).monitoredResourceDescriptors; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1660,10 +1509,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1675,8 +1524,8 @@ }), true); res .list( - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListMonitoredResourceDescriptorsResponse(response); @@ -1684,234 +1533,6 @@ }); }); - unittest.group("resource-OrganizationsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.OrganizationsLogsResourceApi res = - new api.LoggingApi(mock).organizations.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.OrganizationsLogsResourceApi res = - new api.LoggingApi(mock).organizations.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - - unittest.group("resource-ProjectsLogsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; - var arg_logName = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildEmpty()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_logName, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkEmpty(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; - var arg_parent = "foo"; - var arg_pageToken = "foo"; - var arg_pageSize = 42; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("v2beta1/")); - pathOffset += 8; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildListLogsResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_parent, - pageToken: arg_pageToken, - pageSize: arg_pageSize, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkListLogsResponse(response); - }))); - }); - }); - unittest.group("resource-ProjectsMetricsResourceApi", () { unittest.test("method--create", () { var mock = new HttpServerMock(); @@ -2078,8 +1699,8 @@ api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.metrics; var arg_parent = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -2112,10 +1733,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -2126,8 +1747,8 @@ }), true); res .list(arg_parent, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLogMetricsResponse(response);
diff --git a/generated/googleapis_beta/test/oslogin/v1alpha_test.dart b/generated/googleapis_beta/test/oslogin/v1alpha_test.dart index 72b9ba1..be105b2 100644 --- a/generated/googleapis_beta/test/oslogin/v1alpha_test.dart +++ b/generated/googleapis_beta/test/oslogin/v1alpha_test.dart
@@ -84,27 +84,27 @@ buildCounterImportSshPublicKeyResponse--; } -buildUnnamed5357() { +buildUnnamed4983() { var o = new core.List<api.PosixAccount>(); o.add(buildPosixAccount()); o.add(buildPosixAccount()); return o; } -checkUnnamed5357(core.List<api.PosixAccount> o) { +checkUnnamed4983(core.List<api.PosixAccount> o) { unittest.expect(o, unittest.hasLength(2)); checkPosixAccount(o[0]); checkPosixAccount(o[1]); } -buildUnnamed5358() { +buildUnnamed4984() { var o = new core.Map<core.String, api.SshPublicKey>(); o["x"] = buildSshPublicKey(); o["y"] = buildSshPublicKey(); return o; } -checkUnnamed5358(core.Map<core.String, api.SshPublicKey> o) { +checkUnnamed4984(core.Map<core.String, api.SshPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkSshPublicKey(o["x"]); checkSshPublicKey(o["y"]); @@ -116,8 +116,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { o.name = "foo"; - o.posixAccounts = buildUnnamed5357(); - o.sshPublicKeys = buildUnnamed5358(); + o.posixAccounts = buildUnnamed4983(); + o.sshPublicKeys = buildUnnamed4984(); } buildCounterLoginProfile--; return o; @@ -127,8 +127,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5357(o.posixAccounts); - checkUnnamed5358(o.sshPublicKeys); + checkUnnamed4983(o.posixAccounts); + checkUnnamed4984(o.sshPublicKeys); } buildCounterLoginProfile--; } @@ -239,6 +239,9 @@ var mock = new HttpServerMock(); api.UsersResourceApi res = new api.OsloginApi(mock).users; var arg_name = "foo"; + var arg_operatingSystemType = "foo"; + var arg_projectId = "foo"; + var arg_systemId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -271,6 +274,12 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(queryMap["operatingSystemType"].first, + unittest.equals(arg_operatingSystemType)); + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["systemId"].first, unittest.equals(arg_systemId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -280,7 +289,11 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .getLoginProfile(arg_name, $fields: arg_$fields) + .getLoginProfile(arg_name, + operatingSystemType: arg_operatingSystemType, + projectId: arg_projectId, + systemId: arg_systemId, + $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLoginProfile(response); })));
diff --git a/generated/googleapis_beta/test/oslogin/v1beta_test.dart b/generated/googleapis_beta/test/oslogin/v1beta_test.dart index 9758009..b5bacf3 100644 --- a/generated/googleapis_beta/test/oslogin/v1beta_test.dart +++ b/generated/googleapis_beta/test/oslogin/v1beta_test.dart
@@ -84,27 +84,27 @@ buildCounterImportSshPublicKeyResponse--; } -buildUnnamed5578() { +buildUnnamed4985() { var o = new core.List<api.PosixAccount>(); o.add(buildPosixAccount()); o.add(buildPosixAccount()); return o; } -checkUnnamed5578(core.List<api.PosixAccount> o) { +checkUnnamed4985(core.List<api.PosixAccount> o) { unittest.expect(o, unittest.hasLength(2)); checkPosixAccount(o[0]); checkPosixAccount(o[1]); } -buildUnnamed5579() { +buildUnnamed4986() { var o = new core.Map<core.String, api.SshPublicKey>(); o["x"] = buildSshPublicKey(); o["y"] = buildSshPublicKey(); return o; } -checkUnnamed5579(core.Map<core.String, api.SshPublicKey> o) { +checkUnnamed4986(core.Map<core.String, api.SshPublicKey> o) { unittest.expect(o, unittest.hasLength(2)); checkSshPublicKey(o["x"]); checkSshPublicKey(o["y"]); @@ -116,8 +116,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { o.name = "foo"; - o.posixAccounts = buildUnnamed5578(); - o.sshPublicKeys = buildUnnamed5579(); + o.posixAccounts = buildUnnamed4985(); + o.sshPublicKeys = buildUnnamed4986(); } buildCounterLoginProfile--; return o; @@ -127,8 +127,8 @@ buildCounterLoginProfile++; if (buildCounterLoginProfile < 3) { unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5578(o.posixAccounts); - checkUnnamed5579(o.sshPublicKeys); + checkUnnamed4985(o.posixAccounts); + checkUnnamed4986(o.sshPublicKeys); } buildCounterLoginProfile--; } @@ -239,6 +239,8 @@ var mock = new HttpServerMock(); api.UsersResourceApi res = new api.OsloginApi(mock).users; var arg_name = "foo"; + var arg_projectId = "foo"; + var arg_systemId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -271,6 +273,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["systemId"].first, unittest.equals(arg_systemId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -280,7 +286,10 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .getLoginProfile(arg_name, $fields: arg_$fields) + .getLoginProfile(arg_name, + projectId: arg_projectId, + systemId: arg_systemId, + $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkLoginProfile(response); })));
diff --git a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart index 0c25393..00496bd 100644 --- a/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart +++ b/generated/googleapis_beta/test/proximitybeacon/v1beta1_test.dart
@@ -94,14 +94,14 @@ buildCounterAttachmentInfo--; } -buildUnnamed5624() { +buildUnnamed4620() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5624(core.Map<core.String, core.String> o) { +checkUnnamed4620(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -120,7 +120,7 @@ o.indoorLevel = buildIndoorLevel(); o.latLng = buildLatLng(); o.placeId = "foo"; - o.properties = buildUnnamed5624(); + o.properties = buildUnnamed4620(); o.provisioningKey = "foo"; o.status = "foo"; } @@ -139,7 +139,7 @@ checkIndoorLevel(o.indoorLevel); checkLatLng(o.latLng); unittest.expect(o.placeId, unittest.equals('foo')); - checkUnnamed5624(o.properties); + checkUnnamed4620(o.properties); unittest.expect(o.provisioningKey, unittest.equals('foo')); unittest.expect(o.status, unittest.equals('foo')); } @@ -173,14 +173,14 @@ buildCounterBeaconAttachment--; } -buildUnnamed5625() { +buildUnnamed4621() { var o = new core.List<api.AttachmentInfo>(); o.add(buildAttachmentInfo()); o.add(buildAttachmentInfo()); return o; } -checkUnnamed5625(core.List<api.AttachmentInfo> o) { +checkUnnamed4621(core.List<api.AttachmentInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkAttachmentInfo(o[0]); checkAttachmentInfo(o[1]); @@ -192,7 +192,7 @@ buildCounterBeaconInfo++; if (buildCounterBeaconInfo < 3) { o.advertisedId = buildAdvertisedId(); - o.attachments = buildUnnamed5625(); + o.attachments = buildUnnamed4621(); o.beaconName = "foo"; } buildCounterBeaconInfo--; @@ -203,7 +203,7 @@ buildCounterBeaconInfo++; if (buildCounterBeaconInfo < 3) { checkAdvertisedId(o.advertisedId); - checkUnnamed5625(o.attachments); + checkUnnamed4621(o.attachments); unittest.expect(o.beaconName, unittest.equals('foo')); } buildCounterBeaconInfo--; @@ -251,14 +251,14 @@ buildCounterDeleteAttachmentsResponse--; } -buildUnnamed5626() { +buildUnnamed4622() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5626(core.List<core.String> o) { +checkUnnamed4622(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -269,7 +269,7 @@ var o = new api.Diagnostics(); buildCounterDiagnostics++; if (buildCounterDiagnostics < 3) { - o.alerts = buildUnnamed5626(); + o.alerts = buildUnnamed4622(); o.beaconName = "foo"; o.estimatedLowBatteryDate = buildDate(); } @@ -280,7 +280,7 @@ checkDiagnostics(api.Diagnostics o) { buildCounterDiagnostics++; if (buildCounterDiagnostics < 3) { - checkUnnamed5626(o.alerts); + checkUnnamed4622(o.alerts); unittest.expect(o.beaconName, unittest.equals('foo')); checkDate(o.estimatedLowBatteryDate); } @@ -354,27 +354,27 @@ buildCounterEphemeralIdRegistrationParams--; } -buildUnnamed5627() { +buildUnnamed4623() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5627(core.List<core.String> o) { +checkUnnamed4623(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5628() { +buildUnnamed4624() { var o = new core.List<api.Observation>(); o.add(buildObservation()); o.add(buildObservation()); return o; } -checkUnnamed5628(core.List<api.Observation> o) { +checkUnnamed4624(core.List<api.Observation> o) { unittest.expect(o, unittest.hasLength(2)); checkObservation(o[0]); checkObservation(o[1]); @@ -385,8 +385,8 @@ var o = new api.GetInfoForObservedBeaconsRequest(); buildCounterGetInfoForObservedBeaconsRequest++; if (buildCounterGetInfoForObservedBeaconsRequest < 3) { - o.namespacedTypes = buildUnnamed5627(); - o.observations = buildUnnamed5628(); + o.namespacedTypes = buildUnnamed4623(); + o.observations = buildUnnamed4624(); } buildCounterGetInfoForObservedBeaconsRequest--; return o; @@ -395,20 +395,20 @@ checkGetInfoForObservedBeaconsRequest(api.GetInfoForObservedBeaconsRequest o) { buildCounterGetInfoForObservedBeaconsRequest++; if (buildCounterGetInfoForObservedBeaconsRequest < 3) { - checkUnnamed5627(o.namespacedTypes); - checkUnnamed5628(o.observations); + checkUnnamed4623(o.namespacedTypes); + checkUnnamed4624(o.observations); } buildCounterGetInfoForObservedBeaconsRequest--; } -buildUnnamed5629() { +buildUnnamed4625() { var o = new core.List<api.BeaconInfo>(); o.add(buildBeaconInfo()); o.add(buildBeaconInfo()); return o; } -checkUnnamed5629(core.List<api.BeaconInfo> o) { +checkUnnamed4625(core.List<api.BeaconInfo> o) { unittest.expect(o, unittest.hasLength(2)); checkBeaconInfo(o[0]); checkBeaconInfo(o[1]); @@ -419,7 +419,7 @@ var o = new api.GetInfoForObservedBeaconsResponse(); buildCounterGetInfoForObservedBeaconsResponse++; if (buildCounterGetInfoForObservedBeaconsResponse < 3) { - o.beacons = buildUnnamed5629(); + o.beacons = buildUnnamed4625(); } buildCounterGetInfoForObservedBeaconsResponse--; return o; @@ -429,7 +429,7 @@ api.GetInfoForObservedBeaconsResponse o) { buildCounterGetInfoForObservedBeaconsResponse++; if (buildCounterGetInfoForObservedBeaconsResponse < 3) { - checkUnnamed5629(o.beacons); + checkUnnamed4625(o.beacons); } buildCounterGetInfoForObservedBeaconsResponse--; } @@ -474,14 +474,14 @@ buildCounterLatLng--; } -buildUnnamed5630() { +buildUnnamed4626() { var o = new core.List<api.BeaconAttachment>(); o.add(buildBeaconAttachment()); o.add(buildBeaconAttachment()); return o; } -checkUnnamed5630(core.List<api.BeaconAttachment> o) { +checkUnnamed4626(core.List<api.BeaconAttachment> o) { unittest.expect(o, unittest.hasLength(2)); checkBeaconAttachment(o[0]); checkBeaconAttachment(o[1]); @@ -492,7 +492,7 @@ var o = new api.ListBeaconAttachmentsResponse(); buildCounterListBeaconAttachmentsResponse++; if (buildCounterListBeaconAttachmentsResponse < 3) { - o.attachments = buildUnnamed5630(); + o.attachments = buildUnnamed4626(); } buildCounterListBeaconAttachmentsResponse--; return o; @@ -501,19 +501,19 @@ checkListBeaconAttachmentsResponse(api.ListBeaconAttachmentsResponse o) { buildCounterListBeaconAttachmentsResponse++; if (buildCounterListBeaconAttachmentsResponse < 3) { - checkUnnamed5630(o.attachments); + checkUnnamed4626(o.attachments); } buildCounterListBeaconAttachmentsResponse--; } -buildUnnamed5631() { +buildUnnamed4627() { var o = new core.List<api.Beacon>(); o.add(buildBeacon()); o.add(buildBeacon()); return o; } -checkUnnamed5631(core.List<api.Beacon> o) { +checkUnnamed4627(core.List<api.Beacon> o) { unittest.expect(o, unittest.hasLength(2)); checkBeacon(o[0]); checkBeacon(o[1]); @@ -524,7 +524,7 @@ var o = new api.ListBeaconsResponse(); buildCounterListBeaconsResponse++; if (buildCounterListBeaconsResponse < 3) { - o.beacons = buildUnnamed5631(); + o.beacons = buildUnnamed4627(); o.nextPageToken = "foo"; o.totalCount = "foo"; } @@ -535,21 +535,21 @@ checkListBeaconsResponse(api.ListBeaconsResponse o) { buildCounterListBeaconsResponse++; if (buildCounterListBeaconsResponse < 3) { - checkUnnamed5631(o.beacons); + checkUnnamed4627(o.beacons); unittest.expect(o.nextPageToken, unittest.equals('foo')); unittest.expect(o.totalCount, unittest.equals('foo')); } buildCounterListBeaconsResponse--; } -buildUnnamed5632() { +buildUnnamed4628() { var o = new core.List<api.Diagnostics>(); o.add(buildDiagnostics()); o.add(buildDiagnostics()); return o; } -checkUnnamed5632(core.List<api.Diagnostics> o) { +checkUnnamed4628(core.List<api.Diagnostics> o) { unittest.expect(o, unittest.hasLength(2)); checkDiagnostics(o[0]); checkDiagnostics(o[1]); @@ -560,7 +560,7 @@ var o = new api.ListDiagnosticsResponse(); buildCounterListDiagnosticsResponse++; if (buildCounterListDiagnosticsResponse < 3) { - o.diagnostics = buildUnnamed5632(); + o.diagnostics = buildUnnamed4628(); o.nextPageToken = "foo"; } buildCounterListDiagnosticsResponse--; @@ -570,20 +570,20 @@ checkListDiagnosticsResponse(api.ListDiagnosticsResponse o) { buildCounterListDiagnosticsResponse++; if (buildCounterListDiagnosticsResponse < 3) { - checkUnnamed5632(o.diagnostics); + checkUnnamed4628(o.diagnostics); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListDiagnosticsResponse--; } -buildUnnamed5633() { +buildUnnamed4629() { var o = new core.List<api.Namespace>(); o.add(buildNamespace()); o.add(buildNamespace()); return o; } -checkUnnamed5633(core.List<api.Namespace> o) { +checkUnnamed4629(core.List<api.Namespace> o) { unittest.expect(o, unittest.hasLength(2)); checkNamespace(o[0]); checkNamespace(o[1]); @@ -594,7 +594,7 @@ var o = new api.ListNamespacesResponse(); buildCounterListNamespacesResponse++; if (buildCounterListNamespacesResponse < 3) { - o.namespaces = buildUnnamed5633(); + o.namespaces = buildUnnamed4629(); } buildCounterListNamespacesResponse--; return o; @@ -603,7 +603,7 @@ checkListNamespacesResponse(api.ListNamespacesResponse o) { buildCounterListNamespacesResponse++; if (buildCounterListNamespacesResponse < 3) { - checkUnnamed5633(o.namespaces); + checkUnnamed4629(o.namespaces); } buildCounterListNamespacesResponse--; } @@ -1156,10 +1156,10 @@ unittest.test("method--list", () { var mock = new HttpServerMock(); api.BeaconsResourceApi res = new api.ProximitybeaconApi(mock).beacons; - var arg_pageToken = "foo"; var arg_q = "foo"; var arg_pageSize = 42; var arg_projectId = "foo"; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1191,13 +1191,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); unittest.expect( queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1208,10 +1208,10 @@ }), true); res .list( - pageToken: arg_pageToken, q: arg_q, pageSize: arg_pageSize, projectId: arg_projectId, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListBeaconsResponse(response); @@ -1340,8 +1340,8 @@ api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; var arg_beaconName = "foo"; - var arg_projectId = "foo"; var arg_namespacedType = "foo"; + var arg_projectId = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1374,10 +1374,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["projectId"].first, unittest.equals(arg_projectId)); unittest.expect(queryMap["namespacedType"].first, unittest.equals(arg_namespacedType)); + unittest.expect( + queryMap["projectId"].first, unittest.equals(arg_projectId)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1388,8 +1388,8 @@ }), true); res .batchDelete(arg_beaconName, - projectId: arg_projectId, namespacedType: arg_namespacedType, + projectId: arg_projectId, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkDeleteAttachmentsResponse(response); @@ -1517,8 +1517,8 @@ api.BeaconsAttachmentsResourceApi res = new api.ProximitybeaconApi(mock).beacons.attachments; var arg_beaconName = "foo"; - var arg_namespacedType = "foo"; var arg_projectId = "foo"; + var arg_namespacedType = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1551,10 +1551,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["namespacedType"].first, - unittest.equals(arg_namespacedType)); unittest.expect( queryMap["projectId"].first, unittest.equals(arg_projectId)); + unittest.expect(queryMap["namespacedType"].first, + unittest.equals(arg_namespacedType)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1565,8 +1565,8 @@ }), true); res .list(arg_beaconName, - namespacedType: arg_namespacedType, projectId: arg_projectId, + namespacedType: arg_namespacedType, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListBeaconAttachmentsResponse(response);
diff --git a/generated/googleapis_beta/test/pubsub/v1beta2_test.dart b/generated/googleapis_beta/test/pubsub/v1beta2_test.dart index 2d0f82f..6a45f7b 100644 --- a/generated/googleapis_beta/test/pubsub/v1beta2_test.dart +++ b/generated/googleapis_beta/test/pubsub/v1beta2_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5422() { +buildUnnamed4496() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5422(core.List<core.String> o) { +checkUnnamed4496(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -68,7 +68,7 @@ var o = new api.AcknowledgeRequest(); buildCounterAcknowledgeRequest++; if (buildCounterAcknowledgeRequest < 3) { - o.ackIds = buildUnnamed5422(); + o.ackIds = buildUnnamed4496(); } buildCounterAcknowledgeRequest--; return o; @@ -77,19 +77,19 @@ checkAcknowledgeRequest(api.AcknowledgeRequest o) { buildCounterAcknowledgeRequest++; if (buildCounterAcknowledgeRequest < 3) { - checkUnnamed5422(o.ackIds); + checkUnnamed4496(o.ackIds); } buildCounterAcknowledgeRequest--; } -buildUnnamed5423() { +buildUnnamed4497() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5423(core.List<core.String> o) { +checkUnnamed4497(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -101,7 +101,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5423(); + o.members = buildUnnamed4497(); o.role = "foo"; } buildCounterBinding--; @@ -112,7 +112,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5423(o.members); + checkUnnamed4497(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -158,14 +158,14 @@ buildCounterExpr--; } -buildUnnamed5424() { +buildUnnamed4498() { var o = new core.List<api.Subscription>(); o.add(buildSubscription()); o.add(buildSubscription()); return o; } -checkUnnamed5424(core.List<api.Subscription> o) { +checkUnnamed4498(core.List<api.Subscription> o) { unittest.expect(o, unittest.hasLength(2)); checkSubscription(o[0]); checkSubscription(o[1]); @@ -177,7 +177,7 @@ buildCounterListSubscriptionsResponse++; if (buildCounterListSubscriptionsResponse < 3) { o.nextPageToken = "foo"; - o.subscriptions = buildUnnamed5424(); + o.subscriptions = buildUnnamed4498(); } buildCounterListSubscriptionsResponse--; return o; @@ -187,19 +187,19 @@ buildCounterListSubscriptionsResponse++; if (buildCounterListSubscriptionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5424(o.subscriptions); + checkUnnamed4498(o.subscriptions); } buildCounterListSubscriptionsResponse--; } -buildUnnamed5425() { +buildUnnamed4499() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5425(core.List<core.String> o) { +checkUnnamed4499(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -211,7 +211,7 @@ buildCounterListTopicSubscriptionsResponse++; if (buildCounterListTopicSubscriptionsResponse < 3) { o.nextPageToken = "foo"; - o.subscriptions = buildUnnamed5425(); + o.subscriptions = buildUnnamed4499(); } buildCounterListTopicSubscriptionsResponse--; return o; @@ -221,19 +221,19 @@ buildCounterListTopicSubscriptionsResponse++; if (buildCounterListTopicSubscriptionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5425(o.subscriptions); + checkUnnamed4499(o.subscriptions); } buildCounterListTopicSubscriptionsResponse--; } -buildUnnamed5426() { +buildUnnamed4500() { var o = new core.List<api.Topic>(); o.add(buildTopic()); o.add(buildTopic()); return o; } -checkUnnamed5426(core.List<api.Topic> o) { +checkUnnamed4500(core.List<api.Topic> o) { unittest.expect(o, unittest.hasLength(2)); checkTopic(o[0]); checkTopic(o[1]); @@ -245,7 +245,7 @@ buildCounterListTopicsResponse++; if (buildCounterListTopicsResponse < 3) { o.nextPageToken = "foo"; - o.topics = buildUnnamed5426(); + o.topics = buildUnnamed4500(); } buildCounterListTopicsResponse--; return o; @@ -255,19 +255,19 @@ buildCounterListTopicsResponse++; if (buildCounterListTopicsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5426(o.topics); + checkUnnamed4500(o.topics); } buildCounterListTopicsResponse--; } -buildUnnamed5427() { +buildUnnamed4501() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5427(core.List<core.String> o) { +checkUnnamed4501(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -280,7 +280,7 @@ if (buildCounterModifyAckDeadlineRequest < 3) { o.ackDeadlineSeconds = 42; o.ackId = "foo"; - o.ackIds = buildUnnamed5427(); + o.ackIds = buildUnnamed4501(); } buildCounterModifyAckDeadlineRequest--; return o; @@ -291,7 +291,7 @@ if (buildCounterModifyAckDeadlineRequest < 3) { unittest.expect(o.ackDeadlineSeconds, unittest.equals(42)); unittest.expect(o.ackId, unittest.equals('foo')); - checkUnnamed5427(o.ackIds); + checkUnnamed4501(o.ackIds); } buildCounterModifyAckDeadlineRequest--; } @@ -315,14 +315,14 @@ buildCounterModifyPushConfigRequest--; } -buildUnnamed5428() { +buildUnnamed4502() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5428(core.List<api.Binding> o) { +checkUnnamed4502(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -333,7 +333,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5428(); + o.bindings = buildUnnamed4502(); o.etag = "foo"; o.version = 42; } @@ -344,21 +344,21 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5428(o.bindings); + checkUnnamed4502(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } buildCounterPolicy--; } -buildUnnamed5429() { +buildUnnamed4503() { var o = new core.List<api.PubsubMessage>(); o.add(buildPubsubMessage()); o.add(buildPubsubMessage()); return o; } -checkUnnamed5429(core.List<api.PubsubMessage> o) { +checkUnnamed4503(core.List<api.PubsubMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkPubsubMessage(o[0]); checkPubsubMessage(o[1]); @@ -369,7 +369,7 @@ var o = new api.PublishRequest(); buildCounterPublishRequest++; if (buildCounterPublishRequest < 3) { - o.messages = buildUnnamed5429(); + o.messages = buildUnnamed4503(); } buildCounterPublishRequest--; return o; @@ -378,19 +378,19 @@ checkPublishRequest(api.PublishRequest o) { buildCounterPublishRequest++; if (buildCounterPublishRequest < 3) { - checkUnnamed5429(o.messages); + checkUnnamed4503(o.messages); } buildCounterPublishRequest--; } -buildUnnamed5430() { +buildUnnamed4504() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5430(core.List<core.String> o) { +checkUnnamed4504(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -401,7 +401,7 @@ var o = new api.PublishResponse(); buildCounterPublishResponse++; if (buildCounterPublishResponse < 3) { - o.messageIds = buildUnnamed5430(); + o.messageIds = buildUnnamed4504(); } buildCounterPublishResponse--; return o; @@ -410,19 +410,19 @@ checkPublishResponse(api.PublishResponse o) { buildCounterPublishResponse++; if (buildCounterPublishResponse < 3) { - checkUnnamed5430(o.messageIds); + checkUnnamed4504(o.messageIds); } buildCounterPublishResponse--; } -buildUnnamed5431() { +buildUnnamed4505() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5431(core.Map<core.String, core.String> o) { +checkUnnamed4505(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -433,7 +433,7 @@ var o = new api.PubsubMessage(); buildCounterPubsubMessage++; if (buildCounterPubsubMessage < 3) { - o.attributes = buildUnnamed5431(); + o.attributes = buildUnnamed4505(); o.data = "foo"; o.messageId = "foo"; o.publishTime = "foo"; @@ -445,7 +445,7 @@ checkPubsubMessage(api.PubsubMessage o) { buildCounterPubsubMessage++; if (buildCounterPubsubMessage < 3) { - checkUnnamed5431(o.attributes); + checkUnnamed4505(o.attributes); unittest.expect(o.data, unittest.equals('foo')); unittest.expect(o.messageId, unittest.equals('foo')); unittest.expect(o.publishTime, unittest.equals('foo')); @@ -474,14 +474,14 @@ buildCounterPullRequest--; } -buildUnnamed5432() { +buildUnnamed4506() { var o = new core.List<api.ReceivedMessage>(); o.add(buildReceivedMessage()); o.add(buildReceivedMessage()); return o; } -checkUnnamed5432(core.List<api.ReceivedMessage> o) { +checkUnnamed4506(core.List<api.ReceivedMessage> o) { unittest.expect(o, unittest.hasLength(2)); checkReceivedMessage(o[0]); checkReceivedMessage(o[1]); @@ -492,7 +492,7 @@ var o = new api.PullResponse(); buildCounterPullResponse++; if (buildCounterPullResponse < 3) { - o.receivedMessages = buildUnnamed5432(); + o.receivedMessages = buildUnnamed4506(); } buildCounterPullResponse--; return o; @@ -501,19 +501,19 @@ checkPullResponse(api.PullResponse o) { buildCounterPullResponse++; if (buildCounterPullResponse < 3) { - checkUnnamed5432(o.receivedMessages); + checkUnnamed4506(o.receivedMessages); } buildCounterPullResponse--; } -buildUnnamed5433() { +buildUnnamed4507() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5433(core.Map<core.String, core.String> o) { +checkUnnamed4507(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -524,7 +524,7 @@ var o = new api.PushConfig(); buildCounterPushConfig++; if (buildCounterPushConfig < 3) { - o.attributes = buildUnnamed5433(); + o.attributes = buildUnnamed4507(); o.pushEndpoint = "foo"; } buildCounterPushConfig--; @@ -534,7 +534,7 @@ checkPushConfig(api.PushConfig o) { buildCounterPushConfig++; if (buildCounterPushConfig < 3) { - checkUnnamed5433(o.attributes); + checkUnnamed4507(o.attributes); unittest.expect(o.pushEndpoint, unittest.equals('foo')); } buildCounterPushConfig--; @@ -605,14 +605,14 @@ buildCounterSubscription--; } -buildUnnamed5434() { +buildUnnamed4508() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5434(core.List<core.String> o) { +checkUnnamed4508(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -623,7 +623,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5434(); + o.permissions = buildUnnamed4508(); } buildCounterTestIamPermissionsRequest--; return o; @@ -632,19 +632,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5434(o.permissions); + checkUnnamed4508(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5435() { +buildUnnamed4509() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5435(core.List<core.String> o) { +checkUnnamed4509(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -655,7 +655,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5435(); + o.permissions = buildUnnamed4509(); } buildCounterTestIamPermissionsResponse--; return o; @@ -664,7 +664,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5435(o.permissions); + checkUnnamed4509(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1139,8 +1139,8 @@ api.ProjectsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.subscriptions; var arg_project = "foo"; - var arg_pageToken = "foo"; var arg_pageSize = 42; + var arg_pageToken = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1173,10 +1173,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1187,8 +1187,8 @@ }), true); res .list(arg_project, - pageToken: arg_pageToken, pageSize: arg_pageSize, + pageToken: arg_pageToken, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListSubscriptionsResponse(response); @@ -1926,8 +1926,8 @@ api.ProjectsTopicsSubscriptionsResourceApi res = new api.PubsubApi(mock).projects.topics.subscriptions; var arg_topic = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1960,10 +1960,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1974,8 +1974,8 @@ }), true); res .list(arg_topic, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTopicSubscriptionsResponse(response);
diff --git a/generated/googleapis_beta/test/replicapool/v1beta1_test.dart b/generated/googleapis_beta/test/replicapool/v1beta1_test.dart new file mode 100644 index 0000000..36d5cfc --- /dev/null +++ b/generated/googleapis_beta/test/replicapool/v1beta1_test.dart
@@ -0,0 +1,1569 @@ +library googleapis_beta.replicapool.v1beta1.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/replicapool/v1beta1.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +core.int buildCounterAccessConfig = 0; +buildAccessConfig() { + var o = new api.AccessConfig(); + buildCounterAccessConfig++; + if (buildCounterAccessConfig < 3) { + o.name = "foo"; + o.natIp = "foo"; + o.type = "foo"; + } + buildCounterAccessConfig--; + return o; +} + +checkAccessConfig(api.AccessConfig o) { + buildCounterAccessConfig++; + if (buildCounterAccessConfig < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.natIp, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterAccessConfig--; +} + +buildUnnamed4775() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4775(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4776() { + var o = new core.List<api.EnvVariable>(); + o.add(buildEnvVariable()); + o.add(buildEnvVariable()); + return o; +} + +checkUnnamed4776(core.List<api.EnvVariable> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnvVariable(o[0]); + checkEnvVariable(o[1]); +} + +core.int buildCounterAction = 0; +buildAction() { + var o = new api.Action(); + buildCounterAction++; + if (buildCounterAction < 3) { + o.commands = buildUnnamed4775(); + o.envVariables = buildUnnamed4776(); + o.timeoutMilliSeconds = 42; + } + buildCounterAction--; + return o; +} + +checkAction(api.Action o) { + buildCounterAction++; + if (buildCounterAction < 3) { + checkUnnamed4775(o.commands); + checkUnnamed4776(o.envVariables); + unittest.expect(o.timeoutMilliSeconds, unittest.equals(42)); + } + buildCounterAction--; +} + +core.int buildCounterDiskAttachment = 0; +buildDiskAttachment() { + var o = new api.DiskAttachment(); + buildCounterDiskAttachment++; + if (buildCounterDiskAttachment < 3) { + o.deviceName = "foo"; + o.index = 42; + } + buildCounterDiskAttachment--; + return o; +} + +checkDiskAttachment(api.DiskAttachment o) { + buildCounterDiskAttachment++; + if (buildCounterDiskAttachment < 3) { + unittest.expect(o.deviceName, unittest.equals('foo')); + unittest.expect(o.index, unittest.equals(42)); + } + buildCounterDiskAttachment--; +} + +core.int buildCounterEnvVariable = 0; +buildEnvVariable() { + var o = new api.EnvVariable(); + buildCounterEnvVariable++; + if (buildCounterEnvVariable < 3) { + o.hidden = true; + o.name = "foo"; + o.value = "foo"; + } + buildCounterEnvVariable--; + return o; +} + +checkEnvVariable(api.EnvVariable o) { + buildCounterEnvVariable++; + if (buildCounterEnvVariable < 3) { + unittest.expect(o.hidden, unittest.isTrue); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterEnvVariable--; +} + +core.int buildCounterExistingDisk = 0; +buildExistingDisk() { + var o = new api.ExistingDisk(); + buildCounterExistingDisk++; + if (buildCounterExistingDisk < 3) { + o.attachment = buildDiskAttachment(); + o.source = "foo"; + } + buildCounterExistingDisk--; + return o; +} + +checkExistingDisk(api.ExistingDisk o) { + buildCounterExistingDisk++; + if (buildCounterExistingDisk < 3) { + checkDiskAttachment(o.attachment); + unittest.expect(o.source, unittest.equals('foo')); + } + buildCounterExistingDisk--; +} + +core.int buildCounterHealthCheck = 0; +buildHealthCheck() { + var o = new api.HealthCheck(); + buildCounterHealthCheck++; + if (buildCounterHealthCheck < 3) { + o.checkIntervalSec = 42; + o.description = "foo"; + o.healthyThreshold = 42; + o.host = "foo"; + o.name = "foo"; + o.path = "foo"; + o.port = 42; + o.timeoutSec = 42; + o.unhealthyThreshold = 42; + } + buildCounterHealthCheck--; + return o; +} + +checkHealthCheck(api.HealthCheck o) { + buildCounterHealthCheck++; + if (buildCounterHealthCheck < 3) { + unittest.expect(o.checkIntervalSec, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.healthyThreshold, unittest.equals(42)); + unittest.expect(o.host, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + unittest.expect(o.port, unittest.equals(42)); + unittest.expect(o.timeoutSec, unittest.equals(42)); + unittest.expect(o.unhealthyThreshold, unittest.equals(42)); + } + buildCounterHealthCheck--; +} + +core.int buildCounterLabel = 0; +buildLabel() { + var o = new api.Label(); + buildCounterLabel++; + if (buildCounterLabel < 3) { + o.key = "foo"; + o.value = "foo"; + } + buildCounterLabel--; + return o; +} + +checkLabel(api.Label o) { + buildCounterLabel++; + if (buildCounterLabel < 3) { + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterLabel--; +} + +buildUnnamed4777() { + var o = new core.List<api.MetadataItem>(); + o.add(buildMetadataItem()); + o.add(buildMetadataItem()); + return o; +} + +checkUnnamed4777(core.List<api.MetadataItem> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetadataItem(o[0]); + checkMetadataItem(o[1]); +} + +core.int buildCounterMetadata = 0; +buildMetadata() { + var o = new api.Metadata(); + buildCounterMetadata++; + if (buildCounterMetadata < 3) { + o.fingerPrint = "foo"; + o.items = buildUnnamed4777(); + } + buildCounterMetadata--; + return o; +} + +checkMetadata(api.Metadata o) { + buildCounterMetadata++; + if (buildCounterMetadata < 3) { + unittest.expect(o.fingerPrint, unittest.equals('foo')); + checkUnnamed4777(o.items); + } + buildCounterMetadata--; +} + +core.int buildCounterMetadataItem = 0; +buildMetadataItem() { + var o = new api.MetadataItem(); + buildCounterMetadataItem++; + if (buildCounterMetadataItem < 3) { + o.key = "foo"; + o.value = "foo"; + } + buildCounterMetadataItem--; + return o; +} + +checkMetadataItem(api.MetadataItem o) { + buildCounterMetadataItem++; + if (buildCounterMetadataItem < 3) { + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.value, unittest.equals('foo')); + } + buildCounterMetadataItem--; +} + +buildUnnamed4778() { + var o = new core.List<api.AccessConfig>(); + o.add(buildAccessConfig()); + o.add(buildAccessConfig()); + return o; +} + +checkUnnamed4778(core.List<api.AccessConfig> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAccessConfig(o[0]); + checkAccessConfig(o[1]); +} + +core.int buildCounterNetworkInterface = 0; +buildNetworkInterface() { + var o = new api.NetworkInterface(); + buildCounterNetworkInterface++; + if (buildCounterNetworkInterface < 3) { + o.accessConfigs = buildUnnamed4778(); + o.network = "foo"; + o.networkIp = "foo"; + } + buildCounterNetworkInterface--; + return o; +} + +checkNetworkInterface(api.NetworkInterface o) { + buildCounterNetworkInterface++; + if (buildCounterNetworkInterface < 3) { + checkUnnamed4778(o.accessConfigs); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.networkIp, unittest.equals('foo')); + } + buildCounterNetworkInterface--; +} + +core.int buildCounterNewDisk = 0; +buildNewDisk() { + var o = new api.NewDisk(); + buildCounterNewDisk++; + if (buildCounterNewDisk < 3) { + o.attachment = buildDiskAttachment(); + o.autoDelete = true; + o.boot = true; + o.initializeParams = buildNewDiskInitializeParams(); + } + buildCounterNewDisk--; + return o; +} + +checkNewDisk(api.NewDisk o) { + buildCounterNewDisk++; + if (buildCounterNewDisk < 3) { + checkDiskAttachment(o.attachment); + unittest.expect(o.autoDelete, unittest.isTrue); + unittest.expect(o.boot, unittest.isTrue); + checkNewDiskInitializeParams(o.initializeParams); + } + buildCounterNewDisk--; +} + +core.int buildCounterNewDiskInitializeParams = 0; +buildNewDiskInitializeParams() { + var o = new api.NewDiskInitializeParams(); + buildCounterNewDiskInitializeParams++; + if (buildCounterNewDiskInitializeParams < 3) { + o.diskSizeGb = "foo"; + o.diskType = "foo"; + o.sourceImage = "foo"; + } + buildCounterNewDiskInitializeParams--; + return o; +} + +checkNewDiskInitializeParams(api.NewDiskInitializeParams o) { + buildCounterNewDiskInitializeParams++; + if (buildCounterNewDiskInitializeParams < 3) { + unittest.expect(o.diskSizeGb, unittest.equals('foo')); + unittest.expect(o.diskType, unittest.equals('foo')); + unittest.expect(o.sourceImage, unittest.equals('foo')); + } + buildCounterNewDiskInitializeParams--; +} + +buildUnnamed4779() { + var o = new core.List<api.HealthCheck>(); + o.add(buildHealthCheck()); + o.add(buildHealthCheck()); + return o; +} + +checkUnnamed4779(core.List<api.HealthCheck> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHealthCheck(o[0]); + checkHealthCheck(o[1]); +} + +buildUnnamed4780() { + var o = new core.List<api.Label>(); + o.add(buildLabel()); + o.add(buildLabel()); + return o; +} + +checkUnnamed4780(core.List<api.Label> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabel(o[0]); + checkLabel(o[1]); +} + +buildUnnamed4781() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4781(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4782() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4782(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPool = 0; +buildPool() { + var o = new api.Pool(); + buildCounterPool++; + if (buildCounterPool < 3) { + o.autoRestart = true; + o.baseInstanceName = "foo"; + o.currentNumReplicas = 42; + o.description = "foo"; + o.healthChecks = buildUnnamed4779(); + o.initialNumReplicas = 42; + o.labels = buildUnnamed4780(); + o.name = "foo"; + o.numReplicas = 42; + o.resourceViews = buildUnnamed4781(); + o.selfLink = "foo"; + o.targetPool = "foo"; + o.targetPools = buildUnnamed4782(); + o.template = buildTemplate(); + o.type = "foo"; + } + buildCounterPool--; + return o; +} + +checkPool(api.Pool o) { + buildCounterPool++; + if (buildCounterPool < 3) { + unittest.expect(o.autoRestart, unittest.isTrue); + unittest.expect(o.baseInstanceName, unittest.equals('foo')); + unittest.expect(o.currentNumReplicas, unittest.equals(42)); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4779(o.healthChecks); + unittest.expect(o.initialNumReplicas, unittest.equals(42)); + checkUnnamed4780(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.numReplicas, unittest.equals(42)); + checkUnnamed4781(o.resourceViews); + unittest.expect(o.selfLink, unittest.equals('foo')); + unittest.expect(o.targetPool, unittest.equals('foo')); + checkUnnamed4782(o.targetPools); + checkTemplate(o.template); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterPool--; +} + +buildUnnamed4783() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4783(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterPoolsDeleteRequest = 0; +buildPoolsDeleteRequest() { + var o = new api.PoolsDeleteRequest(); + buildCounterPoolsDeleteRequest++; + if (buildCounterPoolsDeleteRequest < 3) { + o.abandonInstances = buildUnnamed4783(); + } + buildCounterPoolsDeleteRequest--; + return o; +} + +checkPoolsDeleteRequest(api.PoolsDeleteRequest o) { + buildCounterPoolsDeleteRequest++; + if (buildCounterPoolsDeleteRequest < 3) { + checkUnnamed4783(o.abandonInstances); + } + buildCounterPoolsDeleteRequest--; +} + +buildUnnamed4784() { + var o = new core.List<api.Pool>(); + o.add(buildPool()); + o.add(buildPool()); + return o; +} + +checkUnnamed4784(core.List<api.Pool> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPool(o[0]); + checkPool(o[1]); +} + +core.int buildCounterPoolsListResponse = 0; +buildPoolsListResponse() { + var o = new api.PoolsListResponse(); + buildCounterPoolsListResponse++; + if (buildCounterPoolsListResponse < 3) { + o.nextPageToken = "foo"; + o.resources = buildUnnamed4784(); + } + buildCounterPoolsListResponse--; + return o; +} + +checkPoolsListResponse(api.PoolsListResponse o) { + buildCounterPoolsListResponse++; + if (buildCounterPoolsListResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4784(o.resources); + } + buildCounterPoolsListResponse--; +} + +core.int buildCounterReplica = 0; +buildReplica() { + var o = new api.Replica(); + buildCounterReplica++; + if (buildCounterReplica < 3) { + o.name = "foo"; + o.selfLink = "foo"; + o.status = buildReplicaStatus(); + } + buildCounterReplica--; + return o; +} + +checkReplica(api.Replica o) { + buildCounterReplica++; + if (buildCounterReplica < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.selfLink, unittest.equals('foo')); + checkReplicaStatus(o.status); + } + buildCounterReplica--; +} + +core.int buildCounterReplicaStatus = 0; +buildReplicaStatus() { + var o = new api.ReplicaStatus(); + buildCounterReplicaStatus++; + if (buildCounterReplicaStatus < 3) { + o.details = "foo"; + o.state = "foo"; + o.templateVersion = "foo"; + o.vmLink = "foo"; + o.vmStartTime = "foo"; + } + buildCounterReplicaStatus--; + return o; +} + +checkReplicaStatus(api.ReplicaStatus o) { + buildCounterReplicaStatus++; + if (buildCounterReplicaStatus < 3) { + unittest.expect(o.details, unittest.equals('foo')); + unittest.expect(o.state, unittest.equals('foo')); + unittest.expect(o.templateVersion, unittest.equals('foo')); + unittest.expect(o.vmLink, unittest.equals('foo')); + unittest.expect(o.vmStartTime, unittest.equals('foo')); + } + buildCounterReplicaStatus--; +} + +core.int buildCounterReplicasDeleteRequest = 0; +buildReplicasDeleteRequest() { + var o = new api.ReplicasDeleteRequest(); + buildCounterReplicasDeleteRequest++; + if (buildCounterReplicasDeleteRequest < 3) { + o.abandonInstance = true; + } + buildCounterReplicasDeleteRequest--; + return o; +} + +checkReplicasDeleteRequest(api.ReplicasDeleteRequest o) { + buildCounterReplicasDeleteRequest++; + if (buildCounterReplicasDeleteRequest < 3) { + unittest.expect(o.abandonInstance, unittest.isTrue); + } + buildCounterReplicasDeleteRequest--; +} + +buildUnnamed4785() { + var o = new core.List<api.Replica>(); + o.add(buildReplica()); + o.add(buildReplica()); + return o; +} + +checkUnnamed4785(core.List<api.Replica> o) { + unittest.expect(o, unittest.hasLength(2)); + checkReplica(o[0]); + checkReplica(o[1]); +} + +core.int buildCounterReplicasListResponse = 0; +buildReplicasListResponse() { + var o = new api.ReplicasListResponse(); + buildCounterReplicasListResponse++; + if (buildCounterReplicasListResponse < 3) { + o.nextPageToken = "foo"; + o.resources = buildUnnamed4785(); + } + buildCounterReplicasListResponse--; + return o; +} + +checkReplicasListResponse(api.ReplicasListResponse o) { + buildCounterReplicasListResponse++; + if (buildCounterReplicasListResponse < 3) { + unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed4785(o.resources); + } + buildCounterReplicasListResponse--; +} + +buildUnnamed4786() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4786(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterServiceAccount = 0; +buildServiceAccount() { + var o = new api.ServiceAccount(); + buildCounterServiceAccount++; + if (buildCounterServiceAccount < 3) { + o.email = "foo"; + o.scopes = buildUnnamed4786(); + } + buildCounterServiceAccount--; + return o; +} + +checkServiceAccount(api.ServiceAccount o) { + buildCounterServiceAccount++; + if (buildCounterServiceAccount < 3) { + unittest.expect(o.email, unittest.equals('foo')); + checkUnnamed4786(o.scopes); + } + buildCounterServiceAccount--; +} + +buildUnnamed4787() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4787(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterTag = 0; +buildTag() { + var o = new api.Tag(); + buildCounterTag++; + if (buildCounterTag < 3) { + o.fingerPrint = "foo"; + o.items = buildUnnamed4787(); + } + buildCounterTag--; + return o; +} + +checkTag(api.Tag o) { + buildCounterTag++; + if (buildCounterTag < 3) { + unittest.expect(o.fingerPrint, unittest.equals('foo')); + checkUnnamed4787(o.items); + } + buildCounterTag--; +} + +buildUnnamed4788() { + var o = new core.List<api.HealthCheck>(); + o.add(buildHealthCheck()); + o.add(buildHealthCheck()); + return o; +} + +checkUnnamed4788(core.List<api.HealthCheck> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHealthCheck(o[0]); + checkHealthCheck(o[1]); +} + +core.int buildCounterTemplate = 0; +buildTemplate() { + var o = new api.Template(); + buildCounterTemplate++; + if (buildCounterTemplate < 3) { + o.action = buildAction(); + o.healthChecks = buildUnnamed4788(); + o.version = "foo"; + o.vmParams = buildVmParams(); + } + buildCounterTemplate--; + return o; +} + +checkTemplate(api.Template o) { + buildCounterTemplate++; + if (buildCounterTemplate < 3) { + checkAction(o.action); + checkUnnamed4788(o.healthChecks); + unittest.expect(o.version, unittest.equals('foo')); + checkVmParams(o.vmParams); + } + buildCounterTemplate--; +} + +buildUnnamed4789() { + var o = new core.List<api.ExistingDisk>(); + o.add(buildExistingDisk()); + o.add(buildExistingDisk()); + return o; +} + +checkUnnamed4789(core.List<api.ExistingDisk> o) { + unittest.expect(o, unittest.hasLength(2)); + checkExistingDisk(o[0]); + checkExistingDisk(o[1]); +} + +buildUnnamed4790() { + var o = new core.List<api.NewDisk>(); + o.add(buildNewDisk()); + o.add(buildNewDisk()); + return o; +} + +checkUnnamed4790(core.List<api.NewDisk> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNewDisk(o[0]); + checkNewDisk(o[1]); +} + +buildUnnamed4791() { + var o = new core.List<api.NetworkInterface>(); + o.add(buildNetworkInterface()); + o.add(buildNetworkInterface()); + return o; +} + +checkUnnamed4791(core.List<api.NetworkInterface> o) { + unittest.expect(o, unittest.hasLength(2)); + checkNetworkInterface(o[0]); + checkNetworkInterface(o[1]); +} + +buildUnnamed4792() { + var o = new core.List<api.ServiceAccount>(); + o.add(buildServiceAccount()); + o.add(buildServiceAccount()); + return o; +} + +checkUnnamed4792(core.List<api.ServiceAccount> o) { + unittest.expect(o, unittest.hasLength(2)); + checkServiceAccount(o[0]); + checkServiceAccount(o[1]); +} + +core.int buildCounterVmParams = 0; +buildVmParams() { + var o = new api.VmParams(); + buildCounterVmParams++; + if (buildCounterVmParams < 3) { + o.baseInstanceName = "foo"; + o.canIpForward = true; + o.description = "foo"; + o.disksToAttach = buildUnnamed4789(); + o.disksToCreate = buildUnnamed4790(); + o.machineType = "foo"; + o.metadata = buildMetadata(); + o.networkInterfaces = buildUnnamed4791(); + o.onHostMaintenance = "foo"; + o.serviceAccounts = buildUnnamed4792(); + o.tags = buildTag(); + } + buildCounterVmParams--; + return o; +} + +checkVmParams(api.VmParams o) { + buildCounterVmParams++; + if (buildCounterVmParams < 3) { + unittest.expect(o.baseInstanceName, unittest.equals('foo')); + unittest.expect(o.canIpForward, unittest.isTrue); + unittest.expect(o.description, unittest.equals('foo')); + checkUnnamed4789(o.disksToAttach); + checkUnnamed4790(o.disksToCreate); + unittest.expect(o.machineType, unittest.equals('foo')); + checkMetadata(o.metadata); + checkUnnamed4791(o.networkInterfaces); + unittest.expect(o.onHostMaintenance, unittest.equals('foo')); + checkUnnamed4792(o.serviceAccounts); + checkTag(o.tags); + } + buildCounterVmParams--; +} + +main() { + unittest.group("obj-schema-AccessConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAccessConfig(); + var od = new api.AccessConfig.fromJson(o.toJson()); + checkAccessConfig(od); + }); + }); + + unittest.group("obj-schema-Action", () { + unittest.test("to-json--from-json", () { + var o = buildAction(); + var od = new api.Action.fromJson(o.toJson()); + checkAction(od); + }); + }); + + unittest.group("obj-schema-DiskAttachment", () { + unittest.test("to-json--from-json", () { + var o = buildDiskAttachment(); + var od = new api.DiskAttachment.fromJson(o.toJson()); + checkDiskAttachment(od); + }); + }); + + unittest.group("obj-schema-EnvVariable", () { + unittest.test("to-json--from-json", () { + var o = buildEnvVariable(); + var od = new api.EnvVariable.fromJson(o.toJson()); + checkEnvVariable(od); + }); + }); + + unittest.group("obj-schema-ExistingDisk", () { + unittest.test("to-json--from-json", () { + var o = buildExistingDisk(); + var od = new api.ExistingDisk.fromJson(o.toJson()); + checkExistingDisk(od); + }); + }); + + unittest.group("obj-schema-HealthCheck", () { + unittest.test("to-json--from-json", () { + var o = buildHealthCheck(); + var od = new api.HealthCheck.fromJson(o.toJson()); + checkHealthCheck(od); + }); + }); + + unittest.group("obj-schema-Label", () { + unittest.test("to-json--from-json", () { + var o = buildLabel(); + var od = new api.Label.fromJson(o.toJson()); + checkLabel(od); + }); + }); + + unittest.group("obj-schema-Metadata", () { + unittest.test("to-json--from-json", () { + var o = buildMetadata(); + var od = new api.Metadata.fromJson(o.toJson()); + checkMetadata(od); + }); + }); + + unittest.group("obj-schema-MetadataItem", () { + unittest.test("to-json--from-json", () { + var o = buildMetadataItem(); + var od = new api.MetadataItem.fromJson(o.toJson()); + checkMetadataItem(od); + }); + }); + + unittest.group("obj-schema-NetworkInterface", () { + unittest.test("to-json--from-json", () { + var o = buildNetworkInterface(); + var od = new api.NetworkInterface.fromJson(o.toJson()); + checkNetworkInterface(od); + }); + }); + + unittest.group("obj-schema-NewDisk", () { + unittest.test("to-json--from-json", () { + var o = buildNewDisk(); + var od = new api.NewDisk.fromJson(o.toJson()); + checkNewDisk(od); + }); + }); + + unittest.group("obj-schema-NewDiskInitializeParams", () { + unittest.test("to-json--from-json", () { + var o = buildNewDiskInitializeParams(); + var od = new api.NewDiskInitializeParams.fromJson(o.toJson()); + checkNewDiskInitializeParams(od); + }); + }); + + unittest.group("obj-schema-Pool", () { + unittest.test("to-json--from-json", () { + var o = buildPool(); + var od = new api.Pool.fromJson(o.toJson()); + checkPool(od); + }); + }); + + unittest.group("obj-schema-PoolsDeleteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildPoolsDeleteRequest(); + var od = new api.PoolsDeleteRequest.fromJson(o.toJson()); + checkPoolsDeleteRequest(od); + }); + }); + + unittest.group("obj-schema-PoolsListResponse", () { + unittest.test("to-json--from-json", () { + var o = buildPoolsListResponse(); + var od = new api.PoolsListResponse.fromJson(o.toJson()); + checkPoolsListResponse(od); + }); + }); + + unittest.group("obj-schema-Replica", () { + unittest.test("to-json--from-json", () { + var o = buildReplica(); + var od = new api.Replica.fromJson(o.toJson()); + checkReplica(od); + }); + }); + + unittest.group("obj-schema-ReplicaStatus", () { + unittest.test("to-json--from-json", () { + var o = buildReplicaStatus(); + var od = new api.ReplicaStatus.fromJson(o.toJson()); + checkReplicaStatus(od); + }); + }); + + unittest.group("obj-schema-ReplicasDeleteRequest", () { + unittest.test("to-json--from-json", () { + var o = buildReplicasDeleteRequest(); + var od = new api.ReplicasDeleteRequest.fromJson(o.toJson()); + checkReplicasDeleteRequest(od); + }); + }); + + unittest.group("obj-schema-ReplicasListResponse", () { + unittest.test("to-json--from-json", () { + var o = buildReplicasListResponse(); + var od = new api.ReplicasListResponse.fromJson(o.toJson()); + checkReplicasListResponse(od); + }); + }); + + unittest.group("obj-schema-ServiceAccount", () { + unittest.test("to-json--from-json", () { + var o = buildServiceAccount(); + var od = new api.ServiceAccount.fromJson(o.toJson()); + checkServiceAccount(od); + }); + }); + + unittest.group("obj-schema-Tag", () { + unittest.test("to-json--from-json", () { + var o = buildTag(); + var od = new api.Tag.fromJson(o.toJson()); + checkTag(od); + }); + }); + + unittest.group("obj-schema-Template", () { + unittest.test("to-json--from-json", () { + var o = buildTemplate(); + var od = new api.Template.fromJson(o.toJson()); + checkTemplate(od); + }); + }); + + unittest.group("obj-schema-VmParams", () { + unittest.test("to-json--from-json", () { + var o = buildVmParams(); + var od = new api.VmParams.fromJson(o.toJson()); + checkVmParams(od); + }); + }); + + unittest.group("resource-PoolsResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildPoolsDeleteRequest(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.PoolsDeleteRequest.fromJson(json); + checkPoolsDeleteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = ""; + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_request, arg_projectName, arg_zone, arg_poolName, + $fields: arg_$fields) + .then(unittest.expectAsync1((_) {})); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_projectName, arg_zone, arg_poolName, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--insert", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildPool(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Pool.fromJson(json); + checkPool(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .insert(arg_request, arg_projectName, arg_zone, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_maxResults = 42; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["maxResults"].first), + unittest.equals(arg_maxResults)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPoolsListResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_projectName, arg_zone, + maxResults: arg_maxResults, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPoolsListResponse(response); + }))); + }); + + unittest.test("method--resize", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_numReplicas = 42; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["numReplicas"].first), + unittest.equals(arg_numReplicas)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildPool()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .resize(arg_projectName, arg_zone, arg_poolName, + numReplicas: arg_numReplicas, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkPool(response); + }))); + }); + + unittest.test("method--updatetemplate", () { + var mock = new HttpServerMock(); + api.PoolsResourceApi res = new api.ReplicapoolApi(mock).pools; + var arg_request = buildTemplate(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Template.fromJson(json); + checkTemplate(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = ""; + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .updatetemplate(arg_request, arg_projectName, arg_zone, arg_poolName, + $fields: arg_$fields) + .then(unittest.expectAsync1((_) {})); + }); + }); + + unittest.group("resource-ReplicasResourceApi", () { + unittest.test("method--delete", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_request = buildReplicasDeleteRequest(); + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.ReplicasDeleteRequest.fromJson(json); + checkReplicasDeleteRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .delete(arg_request, arg_projectName, arg_zone, arg_poolName, + arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_projectName, arg_zone, arg_poolName, arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_maxResults = 42; + var arg_pageToken = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(core.int.parse(queryMap["maxResults"].first), + unittest.equals(arg_maxResults)); + unittest.expect( + queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplicasListResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_projectName, arg_zone, arg_poolName, + maxResults: arg_maxResults, + pageToken: arg_pageToken, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplicasListResponse(response); + }))); + }); + + unittest.test("method--restart", () { + var mock = new HttpServerMock(); + api.ReplicasResourceApi res = new api.ReplicapoolApi(mock).replicas; + var arg_projectName = "foo"; + var arg_zone = "foo"; + var arg_poolName = "foo"; + var arg_replicaName = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildReplica()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .restart(arg_projectName, arg_zone, arg_poolName, arg_replicaName, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkReplica(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart b/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart deleted file mode 100644 index 0503116..0000000 --- a/generated/googleapis_beta/test/replicapoolupdater/v1beta1_test.dart +++ /dev/null
@@ -1,1228 +0,0 @@ -library googleapis_beta.replicapoolupdater.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/replicapoolupdater/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterInstanceUpdateErrorErrors = 0; -buildInstanceUpdateErrorErrors() { - var o = new api.InstanceUpdateErrorErrors(); - buildCounterInstanceUpdateErrorErrors++; - if (buildCounterInstanceUpdateErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterInstanceUpdateErrorErrors--; - return o; -} - -checkInstanceUpdateErrorErrors(api.InstanceUpdateErrorErrors o) { - buildCounterInstanceUpdateErrorErrors++; - if (buildCounterInstanceUpdateErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterInstanceUpdateErrorErrors--; -} - -buildUnnamed5242() { - var o = new core.List<api.InstanceUpdateErrorErrors>(); - o.add(buildInstanceUpdateErrorErrors()); - o.add(buildInstanceUpdateErrorErrors()); - return o; -} - -checkUnnamed5242(core.List<api.InstanceUpdateErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceUpdateErrorErrors(o[0]); - checkInstanceUpdateErrorErrors(o[1]); -} - -core.int buildCounterInstanceUpdateError = 0; -buildInstanceUpdateError() { - var o = new api.InstanceUpdateError(); - buildCounterInstanceUpdateError++; - if (buildCounterInstanceUpdateError < 3) { - o.errors = buildUnnamed5242(); - } - buildCounterInstanceUpdateError--; - return o; -} - -checkInstanceUpdateError(api.InstanceUpdateError o) { - buildCounterInstanceUpdateError++; - if (buildCounterInstanceUpdateError < 3) { - checkUnnamed5242(o.errors); - } - buildCounterInstanceUpdateError--; -} - -core.int buildCounterInstanceUpdate = 0; -buildInstanceUpdate() { - var o = new api.InstanceUpdate(); - buildCounterInstanceUpdate++; - if (buildCounterInstanceUpdate < 3) { - o.error = buildInstanceUpdateError(); - o.instance = "foo"; - o.status = "foo"; - } - buildCounterInstanceUpdate--; - return o; -} - -checkInstanceUpdate(api.InstanceUpdate o) { - buildCounterInstanceUpdate++; - if (buildCounterInstanceUpdate < 3) { - checkInstanceUpdateError(o.error); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - } - buildCounterInstanceUpdate--; -} - -buildUnnamed5243() { - var o = new core.List<api.InstanceUpdate>(); - o.add(buildInstanceUpdate()); - o.add(buildInstanceUpdate()); - return o; -} - -checkUnnamed5243(core.List<api.InstanceUpdate> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceUpdate(o[0]); - checkInstanceUpdate(o[1]); -} - -core.int buildCounterInstanceUpdateList = 0; -buildInstanceUpdateList() { - var o = new api.InstanceUpdateList(); - buildCounterInstanceUpdateList++; - if (buildCounterInstanceUpdateList < 3) { - o.items = buildUnnamed5243(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterInstanceUpdateList--; - return o; -} - -checkInstanceUpdateList(api.InstanceUpdateList o) { - buildCounterInstanceUpdateList++; - if (buildCounterInstanceUpdateList < 3) { - checkUnnamed5243(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterInstanceUpdateList--; -} - -core.int buildCounterOperationErrorErrors = 0; -buildOperationErrorErrors() { - var o = new api.OperationErrorErrors(); - buildCounterOperationErrorErrors++; - if (buildCounterOperationErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterOperationErrorErrors--; - return o; -} - -checkOperationErrorErrors(api.OperationErrorErrors o) { - buildCounterOperationErrorErrors++; - if (buildCounterOperationErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterOperationErrorErrors--; -} - -buildUnnamed5244() { - var o = new core.List<api.OperationErrorErrors>(); - o.add(buildOperationErrorErrors()); - o.add(buildOperationErrorErrors()); - return o; -} - -checkUnnamed5244(core.List<api.OperationErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationErrorErrors(o[0]); - checkOperationErrorErrors(o[1]); -} - -core.int buildCounterOperationError = 0; -buildOperationError() { - var o = new api.OperationError(); - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - o.errors = buildUnnamed5244(); - } - buildCounterOperationError--; - return o; -} - -checkOperationError(api.OperationError o) { - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - checkUnnamed5244(o.errors); - } - buildCounterOperationError--; -} - -core.int buildCounterOperationWarningsData = 0; -buildOperationWarningsData() { - var o = new api.OperationWarningsData(); - buildCounterOperationWarningsData++; - if (buildCounterOperationWarningsData < 3) { - o.key = "foo"; - o.value = "foo"; - } - buildCounterOperationWarningsData--; - return o; -} - -checkOperationWarningsData(api.OperationWarningsData o) { - buildCounterOperationWarningsData++; - if (buildCounterOperationWarningsData < 3) { - unittest.expect(o.key, unittest.equals('foo')); - unittest.expect(o.value, unittest.equals('foo')); - } - buildCounterOperationWarningsData--; -} - -buildUnnamed5245() { - var o = new core.List<api.OperationWarningsData>(); - o.add(buildOperationWarningsData()); - o.add(buildOperationWarningsData()); - return o; -} - -checkUnnamed5245(core.List<api.OperationWarningsData> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationWarningsData(o[0]); - checkOperationWarningsData(o[1]); -} - -core.int buildCounterOperationWarnings = 0; -buildOperationWarnings() { - var o = new api.OperationWarnings(); - buildCounterOperationWarnings++; - if (buildCounterOperationWarnings < 3) { - o.code = "foo"; - o.data = buildUnnamed5245(); - o.message = "foo"; - } - buildCounterOperationWarnings--; - return o; -} - -checkOperationWarnings(api.OperationWarnings o) { - buildCounterOperationWarnings++; - if (buildCounterOperationWarnings < 3) { - unittest.expect(o.code, unittest.equals('foo')); - checkUnnamed5245(o.data); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterOperationWarnings--; -} - -buildUnnamed5246() { - var o = new core.List<api.OperationWarnings>(); - o.add(buildOperationWarnings()); - o.add(buildOperationWarnings()); - return o; -} - -checkUnnamed5246(core.List<api.OperationWarnings> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationWarnings(o[0]); - checkOperationWarnings(o[1]); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.clientOperationId = "foo"; - o.creationTimestamp = "foo"; - o.endTime = "foo"; - o.error = buildOperationError(); - o.httpErrorMessage = "foo"; - o.httpErrorStatusCode = 42; - o.id = "foo"; - o.insertTime = "foo"; - o.kind = "foo"; - o.name = "foo"; - o.operationType = "foo"; - o.progress = 42; - o.region = "foo"; - o.selfLink = "foo"; - o.startTime = "foo"; - o.status = "foo"; - o.statusMessage = "foo"; - o.targetId = "foo"; - o.targetLink = "foo"; - o.user = "foo"; - o.warnings = buildUnnamed5246(); - o.zone = "foo"; - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.clientOperationId, unittest.equals('foo')); - unittest.expect(o.creationTimestamp, unittest.equals('foo')); - unittest.expect(o.endTime, unittest.equals('foo')); - checkOperationError(o.error); - unittest.expect(o.httpErrorMessage, unittest.equals('foo')); - unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.insertTime, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.operationType, unittest.equals('foo')); - unittest.expect(o.progress, unittest.equals(42)); - unittest.expect(o.region, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - unittest.expect(o.startTime, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.targetId, unittest.equals('foo')); - unittest.expect(o.targetLink, unittest.equals('foo')); - unittest.expect(o.user, unittest.equals('foo')); - checkUnnamed5246(o.warnings); - unittest.expect(o.zone, unittest.equals('foo')); - } - buildCounterOperation--; -} - -buildUnnamed5247() { - var o = new core.List<api.Operation>(); - o.add(buildOperation()); - o.add(buildOperation()); - return o; -} - -checkUnnamed5247(core.List<api.Operation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperation(o[0]); - checkOperation(o[1]); -} - -core.int buildCounterOperationList = 0; -buildOperationList() { - var o = new api.OperationList(); - buildCounterOperationList++; - if (buildCounterOperationList < 3) { - o.id = "foo"; - o.items = buildUnnamed5247(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterOperationList--; - return o; -} - -checkOperationList(api.OperationList o) { - buildCounterOperationList++; - if (buildCounterOperationList < 3) { - unittest.expect(o.id, unittest.equals('foo')); - checkUnnamed5247(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterOperationList--; -} - -core.int buildCounterRollingUpdateErrorErrors = 0; -buildRollingUpdateErrorErrors() { - var o = new api.RollingUpdateErrorErrors(); - buildCounterRollingUpdateErrorErrors++; - if (buildCounterRollingUpdateErrorErrors < 3) { - o.code = "foo"; - o.location = "foo"; - o.message = "foo"; - } - buildCounterRollingUpdateErrorErrors--; - return o; -} - -checkRollingUpdateErrorErrors(api.RollingUpdateErrorErrors o) { - buildCounterRollingUpdateErrorErrors++; - if (buildCounterRollingUpdateErrorErrors < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.location, unittest.equals('foo')); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterRollingUpdateErrorErrors--; -} - -buildUnnamed5248() { - var o = new core.List<api.RollingUpdateErrorErrors>(); - o.add(buildRollingUpdateErrorErrors()); - o.add(buildRollingUpdateErrorErrors()); - return o; -} - -checkUnnamed5248(core.List<api.RollingUpdateErrorErrors> o) { - unittest.expect(o, unittest.hasLength(2)); - checkRollingUpdateErrorErrors(o[0]); - checkRollingUpdateErrorErrors(o[1]); -} - -core.int buildCounterRollingUpdateError = 0; -buildRollingUpdateError() { - var o = new api.RollingUpdateError(); - buildCounterRollingUpdateError++; - if (buildCounterRollingUpdateError < 3) { - o.errors = buildUnnamed5248(); - } - buildCounterRollingUpdateError--; - return o; -} - -checkRollingUpdateError(api.RollingUpdateError o) { - buildCounterRollingUpdateError++; - if (buildCounterRollingUpdateError < 3) { - checkUnnamed5248(o.errors); - } - buildCounterRollingUpdateError--; -} - -core.int buildCounterRollingUpdatePolicy = 0; -buildRollingUpdatePolicy() { - var o = new api.RollingUpdatePolicy(); - buildCounterRollingUpdatePolicy++; - if (buildCounterRollingUpdatePolicy < 3) { - o.autoPauseAfterInstances = 42; - o.instanceStartupTimeoutSec = 42; - o.maxNumConcurrentInstances = 42; - o.maxNumFailedInstances = 42; - o.minInstanceUpdateTimeSec = 42; - } - buildCounterRollingUpdatePolicy--; - return o; -} - -checkRollingUpdatePolicy(api.RollingUpdatePolicy o) { - buildCounterRollingUpdatePolicy++; - if (buildCounterRollingUpdatePolicy < 3) { - unittest.expect(o.autoPauseAfterInstances, unittest.equals(42)); - unittest.expect(o.instanceStartupTimeoutSec, unittest.equals(42)); - unittest.expect(o.maxNumConcurrentInstances, unittest.equals(42)); - unittest.expect(o.maxNumFailedInstances, unittest.equals(42)); - unittest.expect(o.minInstanceUpdateTimeSec, unittest.equals(42)); - } - buildCounterRollingUpdatePolicy--; -} - -core.int buildCounterRollingUpdate = 0; -buildRollingUpdate() { - var o = new api.RollingUpdate(); - buildCounterRollingUpdate++; - if (buildCounterRollingUpdate < 3) { - o.actionType = "foo"; - o.creationTimestamp = "foo"; - o.description = "foo"; - o.error = buildRollingUpdateError(); - o.id = "foo"; - o.instanceGroup = "foo"; - o.instanceGroupManager = "foo"; - o.instanceTemplate = "foo"; - o.kind = "foo"; - o.oldInstanceTemplate = "foo"; - o.policy = buildRollingUpdatePolicy(); - o.progress = 42; - o.selfLink = "foo"; - o.status = "foo"; - o.statusMessage = "foo"; - o.user = "foo"; - } - buildCounterRollingUpdate--; - return o; -} - -checkRollingUpdate(api.RollingUpdate o) { - buildCounterRollingUpdate++; - if (buildCounterRollingUpdate < 3) { - unittest.expect(o.actionType, unittest.equals('foo')); - unittest.expect(o.creationTimestamp, unittest.equals('foo')); - unittest.expect(o.description, unittest.equals('foo')); - checkRollingUpdateError(o.error); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.instanceGroup, unittest.equals('foo')); - unittest.expect(o.instanceGroupManager, unittest.equals('foo')); - unittest.expect(o.instanceTemplate, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.oldInstanceTemplate, unittest.equals('foo')); - checkRollingUpdatePolicy(o.policy); - unittest.expect(o.progress, unittest.equals(42)); - unittest.expect(o.selfLink, unittest.equals('foo')); - unittest.expect(o.status, unittest.equals('foo')); - unittest.expect(o.statusMessage, unittest.equals('foo')); - unittest.expect(o.user, unittest.equals('foo')); - } - buildCounterRollingUpdate--; -} - -buildUnnamed5249() { - var o = new core.List<api.RollingUpdate>(); - o.add(buildRollingUpdate()); - o.add(buildRollingUpdate()); - return o; -} - -checkUnnamed5249(core.List<api.RollingUpdate> o) { - unittest.expect(o, unittest.hasLength(2)); - checkRollingUpdate(o[0]); - checkRollingUpdate(o[1]); -} - -core.int buildCounterRollingUpdateList = 0; -buildRollingUpdateList() { - var o = new api.RollingUpdateList(); - buildCounterRollingUpdateList++; - if (buildCounterRollingUpdateList < 3) { - o.items = buildUnnamed5249(); - o.kind = "foo"; - o.nextPageToken = "foo"; - o.selfLink = "foo"; - } - buildCounterRollingUpdateList--; - return o; -} - -checkRollingUpdateList(api.RollingUpdateList o) { - buildCounterRollingUpdateList++; - if (buildCounterRollingUpdateList < 3) { - checkUnnamed5249(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - unittest.expect(o.selfLink, unittest.equals('foo')); - } - buildCounterRollingUpdateList--; -} - -main() { - unittest.group("obj-schema-InstanceUpdateErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateErrorErrors(); - var od = new api.InstanceUpdateErrorErrors.fromJson(o.toJson()); - checkInstanceUpdateErrorErrors(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdateError", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateError(); - var od = new api.InstanceUpdateError.fromJson(o.toJson()); - checkInstanceUpdateError(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdate", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdate(); - var od = new api.InstanceUpdate.fromJson(o.toJson()); - checkInstanceUpdate(od); - }); - }); - - unittest.group("obj-schema-InstanceUpdateList", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceUpdateList(); - var od = new api.InstanceUpdateList.fromJson(o.toJson()); - checkInstanceUpdateList(od); - }); - }); - - unittest.group("obj-schema-OperationErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildOperationErrorErrors(); - var od = new api.OperationErrorErrors.fromJson(o.toJson()); - checkOperationErrorErrors(od); - }); - }); - - unittest.group("obj-schema-OperationError", () { - unittest.test("to-json--from-json", () { - var o = buildOperationError(); - var od = new api.OperationError.fromJson(o.toJson()); - checkOperationError(od); - }); - }); - - unittest.group("obj-schema-OperationWarningsData", () { - unittest.test("to-json--from-json", () { - var o = buildOperationWarningsData(); - var od = new api.OperationWarningsData.fromJson(o.toJson()); - checkOperationWarningsData(od); - }); - }); - - unittest.group("obj-schema-OperationWarnings", () { - unittest.test("to-json--from-json", () { - var o = buildOperationWarnings(); - var od = new api.OperationWarnings.fromJson(o.toJson()); - checkOperationWarnings(od); - }); - }); - - unittest.group("obj-schema-Operation", () { - unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); - }); - }); - - unittest.group("obj-schema-OperationList", () { - unittest.test("to-json--from-json", () { - var o = buildOperationList(); - var od = new api.OperationList.fromJson(o.toJson()); - checkOperationList(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateErrorErrors", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateErrorErrors(); - var od = new api.RollingUpdateErrorErrors.fromJson(o.toJson()); - checkRollingUpdateErrorErrors(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateError", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateError(); - var od = new api.RollingUpdateError.fromJson(o.toJson()); - checkRollingUpdateError(od); - }); - }); - - unittest.group("obj-schema-RollingUpdatePolicy", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdatePolicy(); - var od = new api.RollingUpdatePolicy.fromJson(o.toJson()); - checkRollingUpdatePolicy(od); - }); - }); - - unittest.group("obj-schema-RollingUpdate", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdate(); - var od = new api.RollingUpdate.fromJson(o.toJson()); - checkRollingUpdate(od); - }); - }); - - unittest.group("obj-schema-RollingUpdateList", () { - unittest.test("to-json--from-json", () { - var o = buildRollingUpdateList(); - var od = new api.RollingUpdateList.fromJson(o.toJson()); - checkRollingUpdateList(od); - }); - }); - - unittest.group("resource-RollingUpdatesResourceApi", () { - unittest.test("method--cancel", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .cancel(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildRollingUpdate()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_zone, arg_rollingUpdate, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkRollingUpdate(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_request = buildRollingUpdate(); - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.RollingUpdate.fromJson(json); - checkRollingUpdate(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, arg_zone, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildRollingUpdateList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_zone, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkRollingUpdateList(response); - }))); - }); - - unittest.test("method--listInstanceUpdates", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstanceUpdateList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .listInstanceUpdates(arg_project, arg_zone, arg_rollingUpdate, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstanceUpdateList(response); - }))); - }); - - unittest.test("method--pause", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .pause(arg_project, arg_zone, arg_rollingUpdate, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--resume", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .resume(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--rollback", () { - var mock = new HttpServerMock(); - api.RollingUpdatesResourceApi res = - new api.ReplicapoolupdaterApi(mock).rollingUpdates; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_rollingUpdate = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .rollback(arg_project, arg_zone, arg_rollingUpdate, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - }); - - unittest.group("resource-ZoneOperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.ZoneOperationsResourceApi res = - new api.ReplicapoolupdaterApi(mock).zoneOperations; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_operation = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_zone, arg_operation, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.ZoneOperationsResourceApi res = - new api.ReplicapoolupdaterApi(mock).zoneOperations; - var arg_project = "foo"; - var arg_zone = "foo"; - var arg_filter = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperationList()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_zone, - filter: arg_filter, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperationList(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart index be88a39..e5995d8 100644 --- a/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart +++ b/generated/googleapis_beta/test/runtimeconfig/v1beta1_test.dart
@@ -50,14 +50,14 @@ return new http.StreamedResponse(stream, status, headers: headers); } -buildUnnamed5122() { +buildUnnamed4723() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5122(core.List<core.String> o) { +checkUnnamed4723(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -69,7 +69,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { o.condition = buildExpr(); - o.members = buildUnnamed5122(); + o.members = buildUnnamed4723(); o.role = "foo"; } buildCounterBinding--; @@ -80,7 +80,7 @@ buildCounterBinding++; if (buildCounterBinding < 3) { checkExpr(o.condition); - checkUnnamed5122(o.members); + checkUnnamed4723(o.members); unittest.expect(o.role, unittest.equals('foo')); } buildCounterBinding--; @@ -166,14 +166,14 @@ buildCounterExpr--; } -buildUnnamed5123() { +buildUnnamed4724() { var o = new core.List<api.RuntimeConfig>(); o.add(buildRuntimeConfig()); o.add(buildRuntimeConfig()); return o; } -checkUnnamed5123(core.List<api.RuntimeConfig> o) { +checkUnnamed4724(core.List<api.RuntimeConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkRuntimeConfig(o[0]); checkRuntimeConfig(o[1]); @@ -184,7 +184,7 @@ var o = new api.ListConfigsResponse(); buildCounterListConfigsResponse++; if (buildCounterListConfigsResponse < 3) { - o.configs = buildUnnamed5123(); + o.configs = buildUnnamed4724(); o.nextPageToken = "foo"; } buildCounterListConfigsResponse--; @@ -194,20 +194,20 @@ checkListConfigsResponse(api.ListConfigsResponse o) { buildCounterListConfigsResponse++; if (buildCounterListConfigsResponse < 3) { - checkUnnamed5123(o.configs); + checkUnnamed4724(o.configs); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListConfigsResponse--; } -buildUnnamed5124() { +buildUnnamed4725() { var o = new core.List<api.Variable>(); o.add(buildVariable()); o.add(buildVariable()); return o; } -checkUnnamed5124(core.List<api.Variable> o) { +checkUnnamed4725(core.List<api.Variable> o) { unittest.expect(o, unittest.hasLength(2)); checkVariable(o[0]); checkVariable(o[1]); @@ -219,7 +219,7 @@ buildCounterListVariablesResponse++; if (buildCounterListVariablesResponse < 3) { o.nextPageToken = "foo"; - o.variables = buildUnnamed5124(); + o.variables = buildUnnamed4725(); } buildCounterListVariablesResponse--; return o; @@ -229,19 +229,19 @@ buildCounterListVariablesResponse++; if (buildCounterListVariablesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5124(o.variables); + checkUnnamed4725(o.variables); } buildCounterListVariablesResponse--; } -buildUnnamed5125() { +buildUnnamed4726() { var o = new core.List<api.Waiter>(); o.add(buildWaiter()); o.add(buildWaiter()); return o; } -checkUnnamed5125(core.List<api.Waiter> o) { +checkUnnamed4726(core.List<api.Waiter> o) { unittest.expect(o, unittest.hasLength(2)); checkWaiter(o[0]); checkWaiter(o[1]); @@ -253,7 +253,7 @@ buildCounterListWaitersResponse++; if (buildCounterListWaitersResponse < 3) { o.nextPageToken = "foo"; - o.waiters = buildUnnamed5125(); + o.waiters = buildUnnamed4726(); } buildCounterListWaitersResponse--; return o; @@ -263,12 +263,12 @@ buildCounterListWaitersResponse++; if (buildCounterListWaitersResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5125(o.waiters); + checkUnnamed4726(o.waiters); } buildCounterListWaitersResponse--; } -buildUnnamed5126() { +buildUnnamed4727() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -283,7 +283,7 @@ return o; } -checkUnnamed5126(core.Map<core.String, core.Object> o) { +checkUnnamed4727(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -297,7 +297,7 @@ unittest.expect(casted2["string"], unittest.equals('foo')); } -buildUnnamed5127() { +buildUnnamed4728() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -312,7 +312,7 @@ return o; } -checkUnnamed5127(core.Map<core.String, core.Object> o) { +checkUnnamed4728(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -333,9 +333,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5126(); + o.metadata = buildUnnamed4727(); o.name = "foo"; - o.response = buildUnnamed5127(); + o.response = buildUnnamed4728(); } buildCounterOperation--; return o; @@ -346,21 +346,21 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5126(o.metadata); + checkUnnamed4727(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5127(o.response); + checkUnnamed4728(o.response); } buildCounterOperation--; } -buildUnnamed5128() { +buildUnnamed4729() { var o = new core.List<api.Binding>(); o.add(buildBinding()); o.add(buildBinding()); return o; } -checkUnnamed5128(core.List<api.Binding> o) { +checkUnnamed4729(core.List<api.Binding> o) { unittest.expect(o, unittest.hasLength(2)); checkBinding(o[0]); checkBinding(o[1]); @@ -371,7 +371,7 @@ var o = new api.Policy(); buildCounterPolicy++; if (buildCounterPolicy < 3) { - o.bindings = buildUnnamed5128(); + o.bindings = buildUnnamed4729(); o.etag = "foo"; o.version = 42; } @@ -382,7 +382,7 @@ checkPolicy(api.Policy o) { buildCounterPolicy++; if (buildCounterPolicy < 3) { - checkUnnamed5128(o.bindings); + checkUnnamed4729(o.bindings); unittest.expect(o.etag, unittest.equals('foo')); unittest.expect(o.version, unittest.equals(42)); } @@ -429,7 +429,7 @@ buildCounterSetIamPolicyRequest--; } -buildUnnamed5129() { +buildUnnamed4730() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -444,7 +444,7 @@ return o; } -checkUnnamed5129(core.Map<core.String, core.Object> o) { +checkUnnamed4730(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -458,17 +458,17 @@ unittest.expect(casted6["string"], unittest.equals('foo')); } -buildUnnamed5130() { +buildUnnamed4731() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5129()); - o.add(buildUnnamed5129()); + o.add(buildUnnamed4730()); + o.add(buildUnnamed4730()); return o; } -checkUnnamed5130(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4731(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5129(o[0]); - checkUnnamed5129(o[1]); + checkUnnamed4730(o[0]); + checkUnnamed4730(o[1]); } core.int buildCounterStatus = 0; @@ -477,7 +477,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5130(); + o.details = buildUnnamed4731(); o.message = "foo"; } buildCounterStatus--; @@ -488,20 +488,20 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5130(o.details); + checkUnnamed4731(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5131() { +buildUnnamed4732() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5131(core.List<core.String> o) { +checkUnnamed4732(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -512,7 +512,7 @@ var o = new api.TestIamPermissionsRequest(); buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - o.permissions = buildUnnamed5131(); + o.permissions = buildUnnamed4732(); } buildCounterTestIamPermissionsRequest--; return o; @@ -521,19 +521,19 @@ checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { buildCounterTestIamPermissionsRequest++; if (buildCounterTestIamPermissionsRequest < 3) { - checkUnnamed5131(o.permissions); + checkUnnamed4732(o.permissions); } buildCounterTestIamPermissionsRequest--; } -buildUnnamed5132() { +buildUnnamed4733() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5132(core.List<core.String> o) { +checkUnnamed4733(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -544,7 +544,7 @@ var o = new api.TestIamPermissionsResponse(); buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - o.permissions = buildUnnamed5132(); + o.permissions = buildUnnamed4733(); } buildCounterTestIamPermissionsResponse--; return o; @@ -553,7 +553,7 @@ checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { buildCounterTestIamPermissionsResponse++; if (buildCounterTestIamPermissionsResponse < 3) { - checkUnnamed5132(o.permissions); + checkUnnamed4733(o.permissions); } buildCounterTestIamPermissionsResponse--; } @@ -1510,10 +1510,10 @@ api.ProjectsConfigsVariablesResourceApi res = new api.RuntimeconfigApi(mock).projects.configs.variables; var arg_parent = "foo"; - var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_returnValues = true; var arg_pageSize = 42; + var arg_filter = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1546,13 +1546,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect(queryMap["returnValues"].first, unittest.equals("$arg_returnValues")); unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1563,10 +1563,10 @@ }), true); res .list(arg_parent, - filter: arg_filter, pageToken: arg_pageToken, returnValues: arg_returnValues, pageSize: arg_pageSize, + filter: arg_filter, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListVariablesResponse(response);
diff --git a/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart b/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart new file mode 100644 index 0000000..9ca8188 --- /dev/null +++ b/generated/googleapis_beta/test/servicenetworking/v1beta_test.dart
@@ -0,0 +1,3297 @@ +library googleapis_beta.servicenetworking.v1beta.test; + +import "dart:core" as core; +import "dart:async" as async; +import "dart:convert" as convert; + +import 'package:http/http.dart' as http; +import 'package:test/test.dart' as unittest; + +import 'package:googleapis_beta/servicenetworking/v1beta.dart' as api; + +class HttpServerMock extends http.BaseClient { + core.Function _callback; + core.bool _expectJson; + + void register(core.Function callback, core.bool expectJson) { + _callback = callback; + _expectJson = expectJson; + } + + async.Future<http.StreamedResponse> send(http.BaseRequest request) { + if (_expectJson) { + return request + .finalize() + .transform(convert.utf8.decoder) + .join('') + .then((core.String jsonString) { + if (jsonString.isEmpty) { + return _callback(request, null); + } else { + return _callback(request, convert.json.decode(jsonString)); + } + }); + } else { + var stream = request.finalize(); + if (stream == null) { + return _callback(request, []); + } else { + return stream.toBytes().then((data) { + return _callback(request, data); + }); + } + } + } +} + +http.StreamedResponse stringResponse(core.int status, + core.Map<core.String, core.String> headers, core.String body) { + var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); + return new http.StreamedResponse(stream, status, headers: headers); +} + +buildUnnamed4554() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4554(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterAddSubnetworkRequest = 0; +buildAddSubnetworkRequest() { + var o = new api.AddSubnetworkRequest(); + buildCounterAddSubnetworkRequest++; + if (buildCounterAddSubnetworkRequest < 3) { + o.consumer = "foo"; + o.consumerNetwork = "foo"; + o.description = "foo"; + o.ipPrefixLength = 42; + o.region = "foo"; + o.requestedAddress = "foo"; + o.subnetwork = "foo"; + o.subnetworkUsers = buildUnnamed4554(); + } + buildCounterAddSubnetworkRequest--; + return o; +} + +checkAddSubnetworkRequest(api.AddSubnetworkRequest o) { + buildCounterAddSubnetworkRequest++; + if (buildCounterAddSubnetworkRequest < 3) { + unittest.expect(o.consumer, unittest.equals('foo')); + unittest.expect(o.consumerNetwork, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.ipPrefixLength, unittest.equals(42)); + unittest.expect(o.region, unittest.equals('foo')); + unittest.expect(o.requestedAddress, unittest.equals('foo')); + unittest.expect(o.subnetwork, unittest.equals('foo')); + checkUnnamed4554(o.subnetworkUsers); + } + buildCounterAddSubnetworkRequest--; +} + +buildUnnamed4555() { + var o = new core.List<api.Method>(); + o.add(buildMethod()); + o.add(buildMethod()); + return o; +} + +checkUnnamed4555(core.List<api.Method> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMethod(o[0]); + checkMethod(o[1]); +} + +buildUnnamed4556() { + var o = new core.List<api.Mixin>(); + o.add(buildMixin()); + o.add(buildMixin()); + return o; +} + +checkUnnamed4556(core.List<api.Mixin> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMixin(o[0]); + checkMixin(o[1]); +} + +buildUnnamed4557() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4557(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterApi = 0; +buildApi() { + var o = new api.Api(); + buildCounterApi++; + if (buildCounterApi < 3) { + o.methods = buildUnnamed4555(); + o.mixins = buildUnnamed4556(); + o.name = "foo"; + o.options = buildUnnamed4557(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + o.version = "foo"; + } + buildCounterApi--; + return o; +} + +checkApi(api.Api o) { + buildCounterApi++; + if (buildCounterApi < 3) { + checkUnnamed4555(o.methods); + checkUnnamed4556(o.mixins); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4557(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + unittest.expect(o.version, unittest.equals('foo')); + } + buildCounterApi--; +} + +core.int buildCounterAuthProvider = 0; +buildAuthProvider() { + var o = new api.AuthProvider(); + buildCounterAuthProvider++; + if (buildCounterAuthProvider < 3) { + o.audiences = "foo"; + o.authorizationUrl = "foo"; + o.id = "foo"; + o.issuer = "foo"; + o.jwksUri = "foo"; + } + buildCounterAuthProvider--; + return o; +} + +checkAuthProvider(api.AuthProvider o) { + buildCounterAuthProvider++; + if (buildCounterAuthProvider < 3) { + unittest.expect(o.audiences, unittest.equals('foo')); + unittest.expect(o.authorizationUrl, unittest.equals('foo')); + unittest.expect(o.id, unittest.equals('foo')); + unittest.expect(o.issuer, unittest.equals('foo')); + unittest.expect(o.jwksUri, unittest.equals('foo')); + } + buildCounterAuthProvider--; +} + +core.int buildCounterAuthRequirement = 0; +buildAuthRequirement() { + var o = new api.AuthRequirement(); + buildCounterAuthRequirement++; + if (buildCounterAuthRequirement < 3) { + o.audiences = "foo"; + o.providerId = "foo"; + } + buildCounterAuthRequirement--; + return o; +} + +checkAuthRequirement(api.AuthRequirement o) { + buildCounterAuthRequirement++; + if (buildCounterAuthRequirement < 3) { + unittest.expect(o.audiences, unittest.equals('foo')); + unittest.expect(o.providerId, unittest.equals('foo')); + } + buildCounterAuthRequirement--; +} + +buildUnnamed4558() { + var o = new core.List<api.AuthProvider>(); + o.add(buildAuthProvider()); + o.add(buildAuthProvider()); + return o; +} + +checkUnnamed4558(core.List<api.AuthProvider> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthProvider(o[0]); + checkAuthProvider(o[1]); +} + +buildUnnamed4559() { + var o = new core.List<api.AuthenticationRule>(); + o.add(buildAuthenticationRule()); + o.add(buildAuthenticationRule()); + return o; +} + +checkUnnamed4559(core.List<api.AuthenticationRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthenticationRule(o[0]); + checkAuthenticationRule(o[1]); +} + +core.int buildCounterAuthentication = 0; +buildAuthentication() { + var o = new api.Authentication(); + buildCounterAuthentication++; + if (buildCounterAuthentication < 3) { + o.providers = buildUnnamed4558(); + o.rules = buildUnnamed4559(); + } + buildCounterAuthentication--; + return o; +} + +checkAuthentication(api.Authentication o) { + buildCounterAuthentication++; + if (buildCounterAuthentication < 3) { + checkUnnamed4558(o.providers); + checkUnnamed4559(o.rules); + } + buildCounterAuthentication--; +} + +buildUnnamed4560() { + var o = new core.List<api.AuthRequirement>(); + o.add(buildAuthRequirement()); + o.add(buildAuthRequirement()); + return o; +} + +checkUnnamed4560(core.List<api.AuthRequirement> o) { + unittest.expect(o, unittest.hasLength(2)); + checkAuthRequirement(o[0]); + checkAuthRequirement(o[1]); +} + +core.int buildCounterAuthenticationRule = 0; +buildAuthenticationRule() { + var o = new api.AuthenticationRule(); + buildCounterAuthenticationRule++; + if (buildCounterAuthenticationRule < 3) { + o.allowWithoutCredential = true; + o.oauth = buildOAuthRequirements(); + o.requirements = buildUnnamed4560(); + o.selector = "foo"; + } + buildCounterAuthenticationRule--; + return o; +} + +checkAuthenticationRule(api.AuthenticationRule o) { + buildCounterAuthenticationRule++; + if (buildCounterAuthenticationRule < 3) { + unittest.expect(o.allowWithoutCredential, unittest.isTrue); + checkOAuthRequirements(o.oauth); + checkUnnamed4560(o.requirements); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterAuthenticationRule--; +} + +core.int buildCounterAuthorizationConfig = 0; +buildAuthorizationConfig() { + var o = new api.AuthorizationConfig(); + buildCounterAuthorizationConfig++; + if (buildCounterAuthorizationConfig < 3) { + o.provider = "foo"; + } + buildCounterAuthorizationConfig--; + return o; +} + +checkAuthorizationConfig(api.AuthorizationConfig o) { + buildCounterAuthorizationConfig++; + if (buildCounterAuthorizationConfig < 3) { + unittest.expect(o.provider, unittest.equals('foo')); + } + buildCounterAuthorizationConfig--; +} + +buildUnnamed4561() { + var o = new core.List<api.BackendRule>(); + o.add(buildBackendRule()); + o.add(buildBackendRule()); + return o; +} + +checkUnnamed4561(core.List<api.BackendRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBackendRule(o[0]); + checkBackendRule(o[1]); +} + +core.int buildCounterBackend = 0; +buildBackend() { + var o = new api.Backend(); + buildCounterBackend++; + if (buildCounterBackend < 3) { + o.rules = buildUnnamed4561(); + } + buildCounterBackend--; + return o; +} + +checkBackend(api.Backend o) { + buildCounterBackend++; + if (buildCounterBackend < 3) { + checkUnnamed4561(o.rules); + } + buildCounterBackend--; +} + +core.int buildCounterBackendRule = 0; +buildBackendRule() { + var o = new api.BackendRule(); + buildCounterBackendRule++; + if (buildCounterBackendRule < 3) { + o.address = "foo"; + o.deadline = 42.0; + o.jwtAudience = "foo"; + o.minDeadline = 42.0; + o.operationDeadline = 42.0; + o.pathTranslation = "foo"; + o.selector = "foo"; + } + buildCounterBackendRule--; + return o; +} + +checkBackendRule(api.BackendRule o) { + buildCounterBackendRule++; + if (buildCounterBackendRule < 3) { + unittest.expect(o.address, unittest.equals('foo')); + unittest.expect(o.deadline, unittest.equals(42.0)); + unittest.expect(o.jwtAudience, unittest.equals('foo')); + unittest.expect(o.minDeadline, unittest.equals(42.0)); + unittest.expect(o.operationDeadline, unittest.equals(42.0)); + unittest.expect(o.pathTranslation, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterBackendRule--; +} + +buildUnnamed4562() { + var o = new core.List<api.BillingDestination>(); + o.add(buildBillingDestination()); + o.add(buildBillingDestination()); + return o; +} + +checkUnnamed4562(core.List<api.BillingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkBillingDestination(o[0]); + checkBillingDestination(o[1]); +} + +core.int buildCounterBilling = 0; +buildBilling() { + var o = new api.Billing(); + buildCounterBilling++; + if (buildCounterBilling < 3) { + o.consumerDestinations = buildUnnamed4562(); + } + buildCounterBilling--; + return o; +} + +checkBilling(api.Billing o) { + buildCounterBilling++; + if (buildCounterBilling < 3) { + checkUnnamed4562(o.consumerDestinations); + } + buildCounterBilling--; +} + +buildUnnamed4563() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4563(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterBillingDestination = 0; +buildBillingDestination() { + var o = new api.BillingDestination(); + buildCounterBillingDestination++; + if (buildCounterBillingDestination < 3) { + o.metrics = buildUnnamed4563(); + o.monitoredResource = "foo"; + } + buildCounterBillingDestination--; + return o; +} + +checkBillingDestination(api.BillingDestination o) { + buildCounterBillingDestination++; + if (buildCounterBillingDestination < 3) { + checkUnnamed4563(o.metrics); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterBillingDestination--; +} + +buildUnnamed4564() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4564(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterConnection = 0; +buildConnection() { + var o = new api.Connection(); + buildCounterConnection++; + if (buildCounterConnection < 3) { + o.network = "foo"; + o.peering = "foo"; + o.reservedPeeringRanges = buildUnnamed4564(); + o.service = "foo"; + } + buildCounterConnection--; + return o; +} + +checkConnection(api.Connection o) { + buildCounterConnection++; + if (buildCounterConnection < 3) { + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.peering, unittest.equals('foo')); + checkUnnamed4564(o.reservedPeeringRanges); + unittest.expect(o.service, unittest.equals('foo')); + } + buildCounterConnection--; +} + +buildUnnamed4565() { + var o = new core.List<api.ContextRule>(); + o.add(buildContextRule()); + o.add(buildContextRule()); + return o; +} + +checkUnnamed4565(core.List<api.ContextRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkContextRule(o[0]); + checkContextRule(o[1]); +} + +core.int buildCounterContext = 0; +buildContext() { + var o = new api.Context(); + buildCounterContext++; + if (buildCounterContext < 3) { + o.rules = buildUnnamed4565(); + } + buildCounterContext--; + return o; +} + +checkContext(api.Context o) { + buildCounterContext++; + if (buildCounterContext < 3) { + checkUnnamed4565(o.rules); + } + buildCounterContext--; +} + +buildUnnamed4566() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4566(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4567() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4567(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4568() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4568(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4569() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4569(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterContextRule = 0; +buildContextRule() { + var o = new api.ContextRule(); + buildCounterContextRule++; + if (buildCounterContextRule < 3) { + o.allowedRequestExtensions = buildUnnamed4566(); + o.allowedResponseExtensions = buildUnnamed4567(); + o.provided = buildUnnamed4568(); + o.requested = buildUnnamed4569(); + o.selector = "foo"; + } + buildCounterContextRule--; + return o; +} + +checkContextRule(api.ContextRule o) { + buildCounterContextRule++; + if (buildCounterContextRule < 3) { + checkUnnamed4566(o.allowedRequestExtensions); + checkUnnamed4567(o.allowedResponseExtensions); + checkUnnamed4568(o.provided); + checkUnnamed4569(o.requested); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterContextRule--; +} + +core.int buildCounterControl = 0; +buildControl() { + var o = new api.Control(); + buildCounterControl++; + if (buildCounterControl < 3) { + o.environment = "foo"; + } + buildCounterControl--; + return o; +} + +checkControl(api.Control o) { + buildCounterControl++; + if (buildCounterControl < 3) { + unittest.expect(o.environment, unittest.equals('foo')); + } + buildCounterControl--; +} + +buildUnnamed4570() { + var o = new core.List<api.CustomErrorRule>(); + o.add(buildCustomErrorRule()); + o.add(buildCustomErrorRule()); + return o; +} + +checkUnnamed4570(core.List<api.CustomErrorRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkCustomErrorRule(o[0]); + checkCustomErrorRule(o[1]); +} + +buildUnnamed4571() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4571(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterCustomError = 0; +buildCustomError() { + var o = new api.CustomError(); + buildCounterCustomError++; + if (buildCounterCustomError < 3) { + o.rules = buildUnnamed4570(); + o.types = buildUnnamed4571(); + } + buildCounterCustomError--; + return o; +} + +checkCustomError(api.CustomError o) { + buildCounterCustomError++; + if (buildCounterCustomError < 3) { + checkUnnamed4570(o.rules); + checkUnnamed4571(o.types); + } + buildCounterCustomError--; +} + +core.int buildCounterCustomErrorRule = 0; +buildCustomErrorRule() { + var o = new api.CustomErrorRule(); + buildCounterCustomErrorRule++; + if (buildCounterCustomErrorRule < 3) { + o.isErrorType = true; + o.selector = "foo"; + } + buildCounterCustomErrorRule--; + return o; +} + +checkCustomErrorRule(api.CustomErrorRule o) { + buildCounterCustomErrorRule++; + if (buildCounterCustomErrorRule < 3) { + unittest.expect(o.isErrorType, unittest.isTrue); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterCustomErrorRule--; +} + +core.int buildCounterCustomHttpPattern = 0; +buildCustomHttpPattern() { + var o = new api.CustomHttpPattern(); + buildCounterCustomHttpPattern++; + if (buildCounterCustomHttpPattern < 3) { + o.kind = "foo"; + o.path = "foo"; + } + buildCounterCustomHttpPattern--; + return o; +} + +checkCustomHttpPattern(api.CustomHttpPattern o) { + buildCounterCustomHttpPattern++; + if (buildCounterCustomHttpPattern < 3) { + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.path, unittest.equals('foo')); + } + buildCounterCustomHttpPattern--; +} + +buildUnnamed4572() { + var o = new core.List<api.Page>(); + o.add(buildPage()); + o.add(buildPage()); + return o; +} + +checkUnnamed4572(core.List<api.Page> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPage(o[0]); + checkPage(o[1]); +} + +buildUnnamed4573() { + var o = new core.List<api.DocumentationRule>(); + o.add(buildDocumentationRule()); + o.add(buildDocumentationRule()); + return o; +} + +checkUnnamed4573(core.List<api.DocumentationRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkDocumentationRule(o[0]); + checkDocumentationRule(o[1]); +} + +core.int buildCounterDocumentation = 0; +buildDocumentation() { + var o = new api.Documentation(); + buildCounterDocumentation++; + if (buildCounterDocumentation < 3) { + o.documentationRootUrl = "foo"; + o.overview = "foo"; + o.pages = buildUnnamed4572(); + o.rules = buildUnnamed4573(); + o.summary = "foo"; + } + buildCounterDocumentation--; + return o; +} + +checkDocumentation(api.Documentation o) { + buildCounterDocumentation++; + if (buildCounterDocumentation < 3) { + unittest.expect(o.documentationRootUrl, unittest.equals('foo')); + unittest.expect(o.overview, unittest.equals('foo')); + checkUnnamed4572(o.pages); + checkUnnamed4573(o.rules); + unittest.expect(o.summary, unittest.equals('foo')); + } + buildCounterDocumentation--; +} + +core.int buildCounterDocumentationRule = 0; +buildDocumentationRule() { + var o = new api.DocumentationRule(); + buildCounterDocumentationRule++; + if (buildCounterDocumentationRule < 3) { + o.deprecationDescription = "foo"; + o.description = "foo"; + o.selector = "foo"; + } + buildCounterDocumentationRule--; + return o; +} + +checkDocumentationRule(api.DocumentationRule o) { + buildCounterDocumentationRule++; + if (buildCounterDocumentationRule < 3) { + unittest.expect(o.deprecationDescription, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterDocumentationRule--; +} + +buildUnnamed4574() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4574(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4575() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4575(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterEndpoint = 0; +buildEndpoint() { + var o = new api.Endpoint(); + buildCounterEndpoint++; + if (buildCounterEndpoint < 3) { + o.aliases = buildUnnamed4574(); + o.allowCors = true; + o.features = buildUnnamed4575(); + o.name = "foo"; + o.target = "foo"; + } + buildCounterEndpoint--; + return o; +} + +checkEndpoint(api.Endpoint o) { + buildCounterEndpoint++; + if (buildCounterEndpoint < 3) { + checkUnnamed4574(o.aliases); + unittest.expect(o.allowCors, unittest.isTrue); + checkUnnamed4575(o.features); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.target, unittest.equals('foo')); + } + buildCounterEndpoint--; +} + +buildUnnamed4576() { + var o = new core.List<api.EnumValue>(); + o.add(buildEnumValue()); + o.add(buildEnumValue()); + return o; +} + +checkUnnamed4576(core.List<api.EnumValue> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnumValue(o[0]); + checkEnumValue(o[1]); +} + +buildUnnamed4577() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4577(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterEnum = 0; +buildEnum() { + var o = new api.Enum(); + buildCounterEnum++; + if (buildCounterEnum < 3) { + o.enumvalue = buildUnnamed4576(); + o.name = "foo"; + o.options = buildUnnamed4577(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + } + buildCounterEnum--; + return o; +} + +checkEnum(api.Enum o) { + buildCounterEnum++; + if (buildCounterEnum < 3) { + checkUnnamed4576(o.enumvalue); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4577(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterEnum--; +} + +buildUnnamed4578() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4578(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterEnumValue = 0; +buildEnumValue() { + var o = new api.EnumValue(); + buildCounterEnumValue++; + if (buildCounterEnumValue < 3) { + o.name = "foo"; + o.number = 42; + o.options = buildUnnamed4578(); + } + buildCounterEnumValue--; + return o; +} + +checkEnumValue(api.EnumValue o) { + buildCounterEnumValue++; + if (buildCounterEnumValue < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.number, unittest.equals(42)); + checkUnnamed4578(o.options); + } + buildCounterEnumValue--; +} + +core.int buildCounterExperimental = 0; +buildExperimental() { + var o = new api.Experimental(); + buildCounterExperimental++; + if (buildCounterExperimental < 3) { + o.authorization = buildAuthorizationConfig(); + } + buildCounterExperimental--; + return o; +} + +checkExperimental(api.Experimental o) { + buildCounterExperimental++; + if (buildCounterExperimental < 3) { + checkAuthorizationConfig(o.authorization); + } + buildCounterExperimental--; +} + +buildUnnamed4579() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4579(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterField = 0; +buildField() { + var o = new api.Field(); + buildCounterField++; + if (buildCounterField < 3) { + o.cardinality = "foo"; + o.defaultValue = "foo"; + o.jsonName = "foo"; + o.kind = "foo"; + o.name = "foo"; + o.number = 42; + o.oneofIndex = 42; + o.options = buildUnnamed4579(); + o.packed = true; + o.typeUrl = "foo"; + } + buildCounterField--; + return o; +} + +checkField(api.Field o) { + buildCounterField++; + if (buildCounterField < 3) { + unittest.expect(o.cardinality, unittest.equals('foo')); + unittest.expect(o.defaultValue, unittest.equals('foo')); + unittest.expect(o.jsonName, unittest.equals('foo')); + unittest.expect(o.kind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.number, unittest.equals(42)); + unittest.expect(o.oneofIndex, unittest.equals(42)); + checkUnnamed4579(o.options); + unittest.expect(o.packed, unittest.isTrue); + unittest.expect(o.typeUrl, unittest.equals('foo')); + } + buildCounterField--; +} + +core.int buildCounterGoogleCloudServicenetworkingV1betaSubnetwork = 0; +buildGoogleCloudServicenetworkingV1betaSubnetwork() { + var o = new api.GoogleCloudServicenetworkingV1betaSubnetwork(); + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork++; + if (buildCounterGoogleCloudServicenetworkingV1betaSubnetwork < 3) { + o.ipCidrRange = "foo"; + o.name = "foo"; + o.network = "foo"; + o.outsideAllocation = true; + } + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork--; + return o; +} + +checkGoogleCloudServicenetworkingV1betaSubnetwork( + api.GoogleCloudServicenetworkingV1betaSubnetwork o) { + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork++; + if (buildCounterGoogleCloudServicenetworkingV1betaSubnetwork < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.outsideAllocation, unittest.isTrue); + } + buildCounterGoogleCloudServicenetworkingV1betaSubnetwork--; +} + +buildUnnamed4580() { + var o = new core.List<api.HttpRule>(); + o.add(buildHttpRule()); + o.add(buildHttpRule()); + return o; +} + +checkUnnamed4580(core.List<api.HttpRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHttpRule(o[0]); + checkHttpRule(o[1]); +} + +core.int buildCounterHttp = 0; +buildHttp() { + var o = new api.Http(); + buildCounterHttp++; + if (buildCounterHttp < 3) { + o.fullyDecodeReservedExpansion = true; + o.rules = buildUnnamed4580(); + } + buildCounterHttp--; + return o; +} + +checkHttp(api.Http o) { + buildCounterHttp++; + if (buildCounterHttp < 3) { + unittest.expect(o.fullyDecodeReservedExpansion, unittest.isTrue); + checkUnnamed4580(o.rules); + } + buildCounterHttp--; +} + +buildUnnamed4581() { + var o = new core.List<api.HttpRule>(); + o.add(buildHttpRule()); + o.add(buildHttpRule()); + return o; +} + +checkUnnamed4581(core.List<api.HttpRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkHttpRule(o[0]); + checkHttpRule(o[1]); +} + +core.int buildCounterHttpRule = 0; +buildHttpRule() { + var o = new api.HttpRule(); + buildCounterHttpRule++; + if (buildCounterHttpRule < 3) { + o.additionalBindings = buildUnnamed4581(); + o.body = "foo"; + o.custom = buildCustomHttpPattern(); + o.delete = "foo"; + o.get = "foo"; + o.patch = "foo"; + o.post = "foo"; + o.put = "foo"; + o.responseBody = "foo"; + o.selector = "foo"; + } + buildCounterHttpRule--; + return o; +} + +checkHttpRule(api.HttpRule o) { + buildCounterHttpRule++; + if (buildCounterHttpRule < 3) { + checkUnnamed4581(o.additionalBindings); + unittest.expect(o.body, unittest.equals('foo')); + checkCustomHttpPattern(o.custom); + unittest.expect(o.delete, unittest.equals('foo')); + unittest.expect(o.get, unittest.equals('foo')); + unittest.expect(o.patch, unittest.equals('foo')); + unittest.expect(o.post, unittest.equals('foo')); + unittest.expect(o.put, unittest.equals('foo')); + unittest.expect(o.responseBody, unittest.equals('foo')); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterHttpRule--; +} + +core.int buildCounterLabelDescriptor = 0; +buildLabelDescriptor() { + var o = new api.LabelDescriptor(); + buildCounterLabelDescriptor++; + if (buildCounterLabelDescriptor < 3) { + o.description = "foo"; + o.key = "foo"; + o.valueType = "foo"; + } + buildCounterLabelDescriptor--; + return o; +} + +checkLabelDescriptor(api.LabelDescriptor o) { + buildCounterLabelDescriptor++; + if (buildCounterLabelDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.key, unittest.equals('foo')); + unittest.expect(o.valueType, unittest.equals('foo')); + } + buildCounterLabelDescriptor--; +} + +buildUnnamed4582() { + var o = new core.List<api.Connection>(); + o.add(buildConnection()); + o.add(buildConnection()); + return o; +} + +checkUnnamed4582(core.List<api.Connection> o) { + unittest.expect(o, unittest.hasLength(2)); + checkConnection(o[0]); + checkConnection(o[1]); +} + +core.int buildCounterListConnectionsResponse = 0; +buildListConnectionsResponse() { + var o = new api.ListConnectionsResponse(); + buildCounterListConnectionsResponse++; + if (buildCounterListConnectionsResponse < 3) { + o.connections = buildUnnamed4582(); + } + buildCounterListConnectionsResponse--; + return o; +} + +checkListConnectionsResponse(api.ListConnectionsResponse o) { + buildCounterListConnectionsResponse++; + if (buildCounterListConnectionsResponse < 3) { + checkUnnamed4582(o.connections); + } + buildCounterListConnectionsResponse--; +} + +buildUnnamed4583() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4583(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterLogDescriptor = 0; +buildLogDescriptor() { + var o = new api.LogDescriptor(); + buildCounterLogDescriptor++; + if (buildCounterLogDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4583(); + o.name = "foo"; + } + buildCounterLogDescriptor--; + return o; +} + +checkLogDescriptor(api.LogDescriptor o) { + buildCounterLogDescriptor++; + if (buildCounterLogDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4583(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + } + buildCounterLogDescriptor--; +} + +buildUnnamed4584() { + var o = new core.List<api.LoggingDestination>(); + o.add(buildLoggingDestination()); + o.add(buildLoggingDestination()); + return o; +} + +checkUnnamed4584(core.List<api.LoggingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLoggingDestination(o[0]); + checkLoggingDestination(o[1]); +} + +buildUnnamed4585() { + var o = new core.List<api.LoggingDestination>(); + o.add(buildLoggingDestination()); + o.add(buildLoggingDestination()); + return o; +} + +checkUnnamed4585(core.List<api.LoggingDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLoggingDestination(o[0]); + checkLoggingDestination(o[1]); +} + +core.int buildCounterLogging = 0; +buildLogging() { + var o = new api.Logging(); + buildCounterLogging++; + if (buildCounterLogging < 3) { + o.consumerDestinations = buildUnnamed4584(); + o.producerDestinations = buildUnnamed4585(); + } + buildCounterLogging--; + return o; +} + +checkLogging(api.Logging o) { + buildCounterLogging++; + if (buildCounterLogging < 3) { + checkUnnamed4584(o.consumerDestinations); + checkUnnamed4585(o.producerDestinations); + } + buildCounterLogging--; +} + +buildUnnamed4586() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4586(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterLoggingDestination = 0; +buildLoggingDestination() { + var o = new api.LoggingDestination(); + buildCounterLoggingDestination++; + if (buildCounterLoggingDestination < 3) { + o.logs = buildUnnamed4586(); + o.monitoredResource = "foo"; + } + buildCounterLoggingDestination--; + return o; +} + +checkLoggingDestination(api.LoggingDestination o) { + buildCounterLoggingDestination++; + if (buildCounterLoggingDestination < 3) { + checkUnnamed4586(o.logs); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterLoggingDestination--; +} + +buildUnnamed4587() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4587(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterMethod = 0; +buildMethod() { + var o = new api.Method(); + buildCounterMethod++; + if (buildCounterMethod < 3) { + o.name = "foo"; + o.options = buildUnnamed4587(); + o.requestStreaming = true; + o.requestTypeUrl = "foo"; + o.responseStreaming = true; + o.responseTypeUrl = "foo"; + o.syntax = "foo"; + } + buildCounterMethod--; + return o; +} + +checkMethod(api.Method o) { + buildCounterMethod++; + if (buildCounterMethod < 3) { + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4587(o.options); + unittest.expect(o.requestStreaming, unittest.isTrue); + unittest.expect(o.requestTypeUrl, unittest.equals('foo')); + unittest.expect(o.responseStreaming, unittest.isTrue); + unittest.expect(o.responseTypeUrl, unittest.equals('foo')); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterMethod--; +} + +buildUnnamed4588() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4588(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterMetricDescriptor = 0; +buildMetricDescriptor() { + var o = new api.MetricDescriptor(); + buildCounterMetricDescriptor++; + if (buildCounterMetricDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4588(); + o.metadata = buildMetricDescriptorMetadata(); + o.metricKind = "foo"; + o.name = "foo"; + o.type = "foo"; + o.unit = "foo"; + o.valueType = "foo"; + } + buildCounterMetricDescriptor--; + return o; +} + +checkMetricDescriptor(api.MetricDescriptor o) { + buildCounterMetricDescriptor++; + if (buildCounterMetricDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4588(o.labels); + checkMetricDescriptorMetadata(o.metadata); + unittest.expect(o.metricKind, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + unittest.expect(o.unit, unittest.equals('foo')); + unittest.expect(o.valueType, unittest.equals('foo')); + } + buildCounterMetricDescriptor--; +} + +core.int buildCounterMetricDescriptorMetadata = 0; +buildMetricDescriptorMetadata() { + var o = new api.MetricDescriptorMetadata(); + buildCounterMetricDescriptorMetadata++; + if (buildCounterMetricDescriptorMetadata < 3) { + o.ingestDelay = "foo"; + o.launchStage = "foo"; + o.samplePeriod = "foo"; + } + buildCounterMetricDescriptorMetadata--; + return o; +} + +checkMetricDescriptorMetadata(api.MetricDescriptorMetadata o) { + buildCounterMetricDescriptorMetadata++; + if (buildCounterMetricDescriptorMetadata < 3) { + unittest.expect(o.ingestDelay, unittest.equals('foo')); + unittest.expect(o.launchStage, unittest.equals('foo')); + unittest.expect(o.samplePeriod, unittest.equals('foo')); + } + buildCounterMetricDescriptorMetadata--; +} + +buildUnnamed4589() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4589(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterMetricRule = 0; +buildMetricRule() { + var o = new api.MetricRule(); + buildCounterMetricRule++; + if (buildCounterMetricRule < 3) { + o.metricCosts = buildUnnamed4589(); + o.selector = "foo"; + } + buildCounterMetricRule--; + return o; +} + +checkMetricRule(api.MetricRule o) { + buildCounterMetricRule++; + if (buildCounterMetricRule < 3) { + checkUnnamed4589(o.metricCosts); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterMetricRule--; +} + +core.int buildCounterMixin = 0; +buildMixin() { + var o = new api.Mixin(); + buildCounterMixin++; + if (buildCounterMixin < 3) { + o.name = "foo"; + o.root = "foo"; + } + buildCounterMixin--; + return o; +} + +checkMixin(api.Mixin o) { + buildCounterMixin++; + if (buildCounterMixin < 3) { + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.root, unittest.equals('foo')); + } + buildCounterMixin--; +} + +buildUnnamed4590() { + var o = new core.List<api.LabelDescriptor>(); + o.add(buildLabelDescriptor()); + o.add(buildLabelDescriptor()); + return o; +} + +checkUnnamed4590(core.List<api.LabelDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLabelDescriptor(o[0]); + checkLabelDescriptor(o[1]); +} + +core.int buildCounterMonitoredResourceDescriptor = 0; +buildMonitoredResourceDescriptor() { + var o = new api.MonitoredResourceDescriptor(); + buildCounterMonitoredResourceDescriptor++; + if (buildCounterMonitoredResourceDescriptor < 3) { + o.description = "foo"; + o.displayName = "foo"; + o.labels = buildUnnamed4590(); + o.name = "foo"; + o.type = "foo"; + } + buildCounterMonitoredResourceDescriptor--; + return o; +} + +checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { + buildCounterMonitoredResourceDescriptor++; + if (buildCounterMonitoredResourceDescriptor < 3) { + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + checkUnnamed4590(o.labels); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.type, unittest.equals('foo')); + } + buildCounterMonitoredResourceDescriptor--; +} + +buildUnnamed4591() { + var o = new core.List<api.MonitoringDestination>(); + o.add(buildMonitoringDestination()); + o.add(buildMonitoringDestination()); + return o; +} + +checkUnnamed4591(core.List<api.MonitoringDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoringDestination(o[0]); + checkMonitoringDestination(o[1]); +} + +buildUnnamed4592() { + var o = new core.List<api.MonitoringDestination>(); + o.add(buildMonitoringDestination()); + o.add(buildMonitoringDestination()); + return o; +} + +checkUnnamed4592(core.List<api.MonitoringDestination> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoringDestination(o[0]); + checkMonitoringDestination(o[1]); +} + +core.int buildCounterMonitoring = 0; +buildMonitoring() { + var o = new api.Monitoring(); + buildCounterMonitoring++; + if (buildCounterMonitoring < 3) { + o.consumerDestinations = buildUnnamed4591(); + o.producerDestinations = buildUnnamed4592(); + } + buildCounterMonitoring--; + return o; +} + +checkMonitoring(api.Monitoring o) { + buildCounterMonitoring++; + if (buildCounterMonitoring < 3) { + checkUnnamed4591(o.consumerDestinations); + checkUnnamed4592(o.producerDestinations); + } + buildCounterMonitoring--; +} + +buildUnnamed4593() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4593(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +core.int buildCounterMonitoringDestination = 0; +buildMonitoringDestination() { + var o = new api.MonitoringDestination(); + buildCounterMonitoringDestination++; + if (buildCounterMonitoringDestination < 3) { + o.metrics = buildUnnamed4593(); + o.monitoredResource = "foo"; + } + buildCounterMonitoringDestination--; + return o; +} + +checkMonitoringDestination(api.MonitoringDestination o) { + buildCounterMonitoringDestination++; + if (buildCounterMonitoringDestination < 3) { + checkUnnamed4593(o.metrics); + unittest.expect(o.monitoredResource, unittest.equals('foo')); + } + buildCounterMonitoringDestination--; +} + +core.int buildCounterOAuthRequirements = 0; +buildOAuthRequirements() { + var o = new api.OAuthRequirements(); + buildCounterOAuthRequirements++; + if (buildCounterOAuthRequirements < 3) { + o.canonicalScopes = "foo"; + } + buildCounterOAuthRequirements--; + return o; +} + +checkOAuthRequirements(api.OAuthRequirements o) { + buildCounterOAuthRequirements++; + if (buildCounterOAuthRequirements < 3) { + unittest.expect(o.canonicalScopes, unittest.equals('foo')); + } + buildCounterOAuthRequirements--; +} + +buildUnnamed4594() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4594(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted1 = (o["x"]) as core.Map; + unittest.expect(casted1, unittest.hasLength(3)); + unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted1["bool"], unittest.equals(true)); + unittest.expect(casted1["string"], unittest.equals('foo')); + var casted2 = (o["y"]) as core.Map; + unittest.expect(casted2, unittest.hasLength(3)); + unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted2["bool"], unittest.equals(true)); + unittest.expect(casted2["string"], unittest.equals('foo')); +} + +buildUnnamed4595() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4595(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted3 = (o["x"]) as core.Map; + unittest.expect(casted3, unittest.hasLength(3)); + unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted3["bool"], unittest.equals(true)); + unittest.expect(casted3["string"], unittest.equals('foo')); + var casted4 = (o["y"]) as core.Map; + unittest.expect(casted4, unittest.hasLength(3)); + unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted4["bool"], unittest.equals(true)); + unittest.expect(casted4["string"], unittest.equals('foo')); +} + +core.int buildCounterOperation = 0; +buildOperation() { + var o = new api.Operation(); + buildCounterOperation++; + if (buildCounterOperation < 3) { + o.done = true; + o.error = buildStatus(); + o.metadata = buildUnnamed4594(); + o.name = "foo"; + o.response = buildUnnamed4595(); + } + buildCounterOperation--; + return o; +} + +checkOperation(api.Operation o) { + buildCounterOperation++; + if (buildCounterOperation < 3) { + unittest.expect(o.done, unittest.isTrue); + checkStatus(o.error); + checkUnnamed4594(o.metadata); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4595(o.response); + } + buildCounterOperation--; +} + +buildUnnamed4596() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4596(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted5 = (o["x"]) as core.Map; + unittest.expect(casted5, unittest.hasLength(3)); + unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted5["bool"], unittest.equals(true)); + unittest.expect(casted5["string"], unittest.equals('foo')); + var casted6 = (o["y"]) as core.Map; + unittest.expect(casted6, unittest.hasLength(3)); + unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted6["bool"], unittest.equals(true)); + unittest.expect(casted6["string"], unittest.equals('foo')); +} + +core.int buildCounterOption = 0; +buildOption() { + var o = new api.Option(); + buildCounterOption++; + if (buildCounterOption < 3) { + o.name = "foo"; + o.value = buildUnnamed4596(); + } + buildCounterOption--; + return o; +} + +checkOption(api.Option o) { + buildCounterOption++; + if (buildCounterOption < 3) { + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4596(o.value); + } + buildCounterOption--; +} + +buildUnnamed4597() { + var o = new core.List<api.Page>(); + o.add(buildPage()); + o.add(buildPage()); + return o; +} + +checkUnnamed4597(core.List<api.Page> o) { + unittest.expect(o, unittest.hasLength(2)); + checkPage(o[0]); + checkPage(o[1]); +} + +core.int buildCounterPage = 0; +buildPage() { + var o = new api.Page(); + buildCounterPage++; + if (buildCounterPage < 3) { + o.content = "foo"; + o.name = "foo"; + o.subpages = buildUnnamed4597(); + } + buildCounterPage--; + return o; +} + +checkPage(api.Page o) { + buildCounterPage++; + if (buildCounterPage < 3) { + unittest.expect(o.content, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4597(o.subpages); + } + buildCounterPage--; +} + +buildUnnamed4598() { + var o = new core.List<api.QuotaLimit>(); + o.add(buildQuotaLimit()); + o.add(buildQuotaLimit()); + return o; +} + +checkUnnamed4598(core.List<api.QuotaLimit> o) { + unittest.expect(o, unittest.hasLength(2)); + checkQuotaLimit(o[0]); + checkQuotaLimit(o[1]); +} + +buildUnnamed4599() { + var o = new core.List<api.MetricRule>(); + o.add(buildMetricRule()); + o.add(buildMetricRule()); + return o; +} + +checkUnnamed4599(core.List<api.MetricRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetricRule(o[0]); + checkMetricRule(o[1]); +} + +core.int buildCounterQuota = 0; +buildQuota() { + var o = new api.Quota(); + buildCounterQuota++; + if (buildCounterQuota < 3) { + o.limits = buildUnnamed4598(); + o.metricRules = buildUnnamed4599(); + } + buildCounterQuota--; + return o; +} + +checkQuota(api.Quota o) { + buildCounterQuota++; + if (buildCounterQuota < 3) { + checkUnnamed4598(o.limits); + checkUnnamed4599(o.metricRules); + } + buildCounterQuota--; +} + +buildUnnamed4600() { + var o = new core.Map<core.String, core.String>(); + o["x"] = "foo"; + o["y"] = "foo"; + return o; +} + +checkUnnamed4600(core.Map<core.String, core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o["x"], unittest.equals('foo')); + unittest.expect(o["y"], unittest.equals('foo')); +} + +core.int buildCounterQuotaLimit = 0; +buildQuotaLimit() { + var o = new api.QuotaLimit(); + buildCounterQuotaLimit++; + if (buildCounterQuotaLimit < 3) { + o.defaultLimit = "foo"; + o.description = "foo"; + o.displayName = "foo"; + o.duration = "foo"; + o.freeTier = "foo"; + o.maxLimit = "foo"; + o.metric = "foo"; + o.name = "foo"; + o.unit = "foo"; + o.values = buildUnnamed4600(); + } + buildCounterQuotaLimit--; + return o; +} + +checkQuotaLimit(api.QuotaLimit o) { + buildCounterQuotaLimit++; + if (buildCounterQuotaLimit < 3) { + unittest.expect(o.defaultLimit, unittest.equals('foo')); + unittest.expect(o.description, unittest.equals('foo')); + unittest.expect(o.displayName, unittest.equals('foo')); + unittest.expect(o.duration, unittest.equals('foo')); + unittest.expect(o.freeTier, unittest.equals('foo')); + unittest.expect(o.maxLimit, unittest.equals('foo')); + unittest.expect(o.metric, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.unit, unittest.equals('foo')); + checkUnnamed4600(o.values); + } + buildCounterQuotaLimit--; +} + +core.int buildCounterRange = 0; +buildRange() { + var o = new api.Range(); + buildCounterRange++; + if (buildCounterRange < 3) { + o.ipCidrRange = "foo"; + o.network = "foo"; + } + buildCounterRange--; + return o; +} + +checkRange(api.Range o) { + buildCounterRange++; + if (buildCounterRange < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + } + buildCounterRange--; +} + +core.int buildCounterSearchRangeRequest = 0; +buildSearchRangeRequest() { + var o = new api.SearchRangeRequest(); + buildCounterSearchRangeRequest++; + if (buildCounterSearchRangeRequest < 3) { + o.ipPrefixLength = 42; + o.network = "foo"; + } + buildCounterSearchRangeRequest--; + return o; +} + +checkSearchRangeRequest(api.SearchRangeRequest o) { + buildCounterSearchRangeRequest++; + if (buildCounterSearchRangeRequest < 3) { + unittest.expect(o.ipPrefixLength, unittest.equals(42)); + unittest.expect(o.network, unittest.equals('foo')); + } + buildCounterSearchRangeRequest--; +} + +buildUnnamed4601() { + var o = new core.List<api.Api>(); + o.add(buildApi()); + o.add(buildApi()); + return o; +} + +checkUnnamed4601(core.List<api.Api> o) { + unittest.expect(o, unittest.hasLength(2)); + checkApi(o[0]); + checkApi(o[1]); +} + +buildUnnamed4602() { + var o = new core.List<api.Endpoint>(); + o.add(buildEndpoint()); + o.add(buildEndpoint()); + return o; +} + +checkUnnamed4602(core.List<api.Endpoint> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEndpoint(o[0]); + checkEndpoint(o[1]); +} + +buildUnnamed4603() { + var o = new core.List<api.Enum>(); + o.add(buildEnum()); + o.add(buildEnum()); + return o; +} + +checkUnnamed4603(core.List<api.Enum> o) { + unittest.expect(o, unittest.hasLength(2)); + checkEnum(o[0]); + checkEnum(o[1]); +} + +buildUnnamed4604() { + var o = new core.List<api.LogDescriptor>(); + o.add(buildLogDescriptor()); + o.add(buildLogDescriptor()); + return o; +} + +checkUnnamed4604(core.List<api.LogDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkLogDescriptor(o[0]); + checkLogDescriptor(o[1]); +} + +buildUnnamed4605() { + var o = new core.List<api.MetricDescriptor>(); + o.add(buildMetricDescriptor()); + o.add(buildMetricDescriptor()); + return o; +} + +checkUnnamed4605(core.List<api.MetricDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMetricDescriptor(o[0]); + checkMetricDescriptor(o[1]); +} + +buildUnnamed4606() { + var o = new core.List<api.MonitoredResourceDescriptor>(); + o.add(buildMonitoredResourceDescriptor()); + o.add(buildMonitoredResourceDescriptor()); + return o; +} + +checkUnnamed4606(core.List<api.MonitoredResourceDescriptor> o) { + unittest.expect(o, unittest.hasLength(2)); + checkMonitoredResourceDescriptor(o[0]); + checkMonitoredResourceDescriptor(o[1]); +} + +buildUnnamed4607() { + var o = new core.List<api.Type>(); + o.add(buildType()); + o.add(buildType()); + return o; +} + +checkUnnamed4607(core.List<api.Type> o) { + unittest.expect(o, unittest.hasLength(2)); + checkType(o[0]); + checkType(o[1]); +} + +buildUnnamed4608() { + var o = new core.List<api.Type>(); + o.add(buildType()); + o.add(buildType()); + return o; +} + +checkUnnamed4608(core.List<api.Type> o) { + unittest.expect(o, unittest.hasLength(2)); + checkType(o[0]); + checkType(o[1]); +} + +core.int buildCounterService = 0; +buildService() { + var o = new api.Service(); + buildCounterService++; + if (buildCounterService < 3) { + o.apis = buildUnnamed4601(); + o.authentication = buildAuthentication(); + o.backend = buildBackend(); + o.billing = buildBilling(); + o.configVersion = 42; + o.context = buildContext(); + o.control = buildControl(); + o.customError = buildCustomError(); + o.documentation = buildDocumentation(); + o.endpoints = buildUnnamed4602(); + o.enums = buildUnnamed4603(); + o.experimental = buildExperimental(); + o.http = buildHttp(); + o.id = "foo"; + o.logging = buildLogging(); + o.logs = buildUnnamed4604(); + o.metrics = buildUnnamed4605(); + o.monitoredResources = buildUnnamed4606(); + o.monitoring = buildMonitoring(); + o.name = "foo"; + o.producerProjectId = "foo"; + o.quota = buildQuota(); + o.sourceInfo = buildSourceInfo(); + o.systemParameters = buildSystemParameters(); + o.systemTypes = buildUnnamed4607(); + o.title = "foo"; + o.types = buildUnnamed4608(); + o.usage = buildUsage(); + } + buildCounterService--; + return o; +} + +checkService(api.Service o) { + buildCounterService++; + if (buildCounterService < 3) { + checkUnnamed4601(o.apis); + checkAuthentication(o.authentication); + checkBackend(o.backend); + checkBilling(o.billing); + unittest.expect(o.configVersion, unittest.equals(42)); + checkContext(o.context); + checkControl(o.control); + checkCustomError(o.customError); + checkDocumentation(o.documentation); + checkUnnamed4602(o.endpoints); + checkUnnamed4603(o.enums); + checkExperimental(o.experimental); + checkHttp(o.http); + unittest.expect(o.id, unittest.equals('foo')); + checkLogging(o.logging); + checkUnnamed4604(o.logs); + checkUnnamed4605(o.metrics); + checkUnnamed4606(o.monitoredResources); + checkMonitoring(o.monitoring); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.producerProjectId, unittest.equals('foo')); + checkQuota(o.quota); + checkSourceInfo(o.sourceInfo); + checkSystemParameters(o.systemParameters); + checkUnnamed4607(o.systemTypes); + unittest.expect(o.title, unittest.equals('foo')); + checkUnnamed4608(o.types); + checkUsage(o.usage); + } + buildCounterService--; +} + +core.int buildCounterSourceContext = 0; +buildSourceContext() { + var o = new api.SourceContext(); + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + o.fileName = "foo"; + } + buildCounterSourceContext--; + return o; +} + +checkSourceContext(api.SourceContext o) { + buildCounterSourceContext++; + if (buildCounterSourceContext < 3) { + unittest.expect(o.fileName, unittest.equals('foo')); + } + buildCounterSourceContext--; +} + +buildUnnamed4609() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4609(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted7 = (o["x"]) as core.Map; + unittest.expect(casted7, unittest.hasLength(3)); + unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted7["bool"], unittest.equals(true)); + unittest.expect(casted7["string"], unittest.equals('foo')); + var casted8 = (o["y"]) as core.Map; + unittest.expect(casted8, unittest.hasLength(3)); + unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted8["bool"], unittest.equals(true)); + unittest.expect(casted8["string"], unittest.equals('foo')); +} + +buildUnnamed4610() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4609()); + o.add(buildUnnamed4609()); + return o; +} + +checkUnnamed4610(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4609(o[0]); + checkUnnamed4609(o[1]); +} + +core.int buildCounterSourceInfo = 0; +buildSourceInfo() { + var o = new api.SourceInfo(); + buildCounterSourceInfo++; + if (buildCounterSourceInfo < 3) { + o.sourceFiles = buildUnnamed4610(); + } + buildCounterSourceInfo--; + return o; +} + +checkSourceInfo(api.SourceInfo o) { + buildCounterSourceInfo++; + if (buildCounterSourceInfo < 3) { + checkUnnamed4610(o.sourceFiles); + } + buildCounterSourceInfo--; +} + +buildUnnamed4611() { + var o = new core.Map<core.String, core.Object>(); + o["x"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + o["y"] = { + 'list': [1, 2, 3], + 'bool': true, + 'string': 'foo' + }; + return o; +} + +checkUnnamed4611(core.Map<core.String, core.Object> o) { + unittest.expect(o, unittest.hasLength(2)); + var casted9 = (o["x"]) as core.Map; + unittest.expect(casted9, unittest.hasLength(3)); + unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted9["bool"], unittest.equals(true)); + unittest.expect(casted9["string"], unittest.equals('foo')); + var casted10 = (o["y"]) as core.Map; + unittest.expect(casted10, unittest.hasLength(3)); + unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); + unittest.expect(casted10["bool"], unittest.equals(true)); + unittest.expect(casted10["string"], unittest.equals('foo')); +} + +buildUnnamed4612() { + var o = new core.List<core.Map<core.String, core.Object>>(); + o.add(buildUnnamed4611()); + o.add(buildUnnamed4611()); + return o; +} + +checkUnnamed4612(core.List<core.Map<core.String, core.Object>> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUnnamed4611(o[0]); + checkUnnamed4611(o[1]); +} + +core.int buildCounterStatus = 0; +buildStatus() { + var o = new api.Status(); + buildCounterStatus++; + if (buildCounterStatus < 3) { + o.code = 42; + o.details = buildUnnamed4612(); + o.message = "foo"; + } + buildCounterStatus--; + return o; +} + +checkStatus(api.Status o) { + buildCounterStatus++; + if (buildCounterStatus < 3) { + unittest.expect(o.code, unittest.equals(42)); + checkUnnamed4612(o.details); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterStatus--; +} + +core.int buildCounterSubnetwork = 0; +buildSubnetwork() { + var o = new api.Subnetwork(); + buildCounterSubnetwork++; + if (buildCounterSubnetwork < 3) { + o.ipCidrRange = "foo"; + o.name = "foo"; + o.network = "foo"; + o.outsideAllocation = true; + } + buildCounterSubnetwork--; + return o; +} + +checkSubnetwork(api.Subnetwork o) { + buildCounterSubnetwork++; + if (buildCounterSubnetwork < 3) { + unittest.expect(o.ipCidrRange, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.network, unittest.equals('foo')); + unittest.expect(o.outsideAllocation, unittest.isTrue); + } + buildCounterSubnetwork--; +} + +core.int buildCounterSystemParameter = 0; +buildSystemParameter() { + var o = new api.SystemParameter(); + buildCounterSystemParameter++; + if (buildCounterSystemParameter < 3) { + o.httpHeader = "foo"; + o.name = "foo"; + o.urlQueryParameter = "foo"; + } + buildCounterSystemParameter--; + return o; +} + +checkSystemParameter(api.SystemParameter o) { + buildCounterSystemParameter++; + if (buildCounterSystemParameter < 3) { + unittest.expect(o.httpHeader, unittest.equals('foo')); + unittest.expect(o.name, unittest.equals('foo')); + unittest.expect(o.urlQueryParameter, unittest.equals('foo')); + } + buildCounterSystemParameter--; +} + +buildUnnamed4613() { + var o = new core.List<api.SystemParameter>(); + o.add(buildSystemParameter()); + o.add(buildSystemParameter()); + return o; +} + +checkUnnamed4613(core.List<api.SystemParameter> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSystemParameter(o[0]); + checkSystemParameter(o[1]); +} + +core.int buildCounterSystemParameterRule = 0; +buildSystemParameterRule() { + var o = new api.SystemParameterRule(); + buildCounterSystemParameterRule++; + if (buildCounterSystemParameterRule < 3) { + o.parameters = buildUnnamed4613(); + o.selector = "foo"; + } + buildCounterSystemParameterRule--; + return o; +} + +checkSystemParameterRule(api.SystemParameterRule o) { + buildCounterSystemParameterRule++; + if (buildCounterSystemParameterRule < 3) { + checkUnnamed4613(o.parameters); + unittest.expect(o.selector, unittest.equals('foo')); + } + buildCounterSystemParameterRule--; +} + +buildUnnamed4614() { + var o = new core.List<api.SystemParameterRule>(); + o.add(buildSystemParameterRule()); + o.add(buildSystemParameterRule()); + return o; +} + +checkUnnamed4614(core.List<api.SystemParameterRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkSystemParameterRule(o[0]); + checkSystemParameterRule(o[1]); +} + +core.int buildCounterSystemParameters = 0; +buildSystemParameters() { + var o = new api.SystemParameters(); + buildCounterSystemParameters++; + if (buildCounterSystemParameters < 3) { + o.rules = buildUnnamed4614(); + } + buildCounterSystemParameters--; + return o; +} + +checkSystemParameters(api.SystemParameters o) { + buildCounterSystemParameters++; + if (buildCounterSystemParameters < 3) { + checkUnnamed4614(o.rules); + } + buildCounterSystemParameters--; +} + +buildUnnamed4615() { + var o = new core.List<api.Field>(); + o.add(buildField()); + o.add(buildField()); + return o; +} + +checkUnnamed4615(core.List<api.Field> o) { + unittest.expect(o, unittest.hasLength(2)); + checkField(o[0]); + checkField(o[1]); +} + +buildUnnamed4616() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4616(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4617() { + var o = new core.List<api.Option>(); + o.add(buildOption()); + o.add(buildOption()); + return o; +} + +checkUnnamed4617(core.List<api.Option> o) { + unittest.expect(o, unittest.hasLength(2)); + checkOption(o[0]); + checkOption(o[1]); +} + +core.int buildCounterType = 0; +buildType() { + var o = new api.Type(); + buildCounterType++; + if (buildCounterType < 3) { + o.fields = buildUnnamed4615(); + o.name = "foo"; + o.oneofs = buildUnnamed4616(); + o.options = buildUnnamed4617(); + o.sourceContext = buildSourceContext(); + o.syntax = "foo"; + } + buildCounterType--; + return o; +} + +checkType(api.Type o) { + buildCounterType++; + if (buildCounterType < 3) { + checkUnnamed4615(o.fields); + unittest.expect(o.name, unittest.equals('foo')); + checkUnnamed4616(o.oneofs); + checkUnnamed4617(o.options); + checkSourceContext(o.sourceContext); + unittest.expect(o.syntax, unittest.equals('foo')); + } + buildCounterType--; +} + +buildUnnamed4618() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4618(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + +buildUnnamed4619() { + var o = new core.List<api.UsageRule>(); + o.add(buildUsageRule()); + o.add(buildUsageRule()); + return o; +} + +checkUnnamed4619(core.List<api.UsageRule> o) { + unittest.expect(o, unittest.hasLength(2)); + checkUsageRule(o[0]); + checkUsageRule(o[1]); +} + +core.int buildCounterUsage = 0; +buildUsage() { + var o = new api.Usage(); + buildCounterUsage++; + if (buildCounterUsage < 3) { + o.producerNotificationChannel = "foo"; + o.requirements = buildUnnamed4618(); + o.rules = buildUnnamed4619(); + } + buildCounterUsage--; + return o; +} + +checkUsage(api.Usage o) { + buildCounterUsage++; + if (buildCounterUsage < 3) { + unittest.expect(o.producerNotificationChannel, unittest.equals('foo')); + checkUnnamed4618(o.requirements); + checkUnnamed4619(o.rules); + } + buildCounterUsage--; +} + +core.int buildCounterUsageRule = 0; +buildUsageRule() { + var o = new api.UsageRule(); + buildCounterUsageRule++; + if (buildCounterUsageRule < 3) { + o.allowUnregisteredCalls = true; + o.selector = "foo"; + o.skipServiceControl = true; + } + buildCounterUsageRule--; + return o; +} + +checkUsageRule(api.UsageRule o) { + buildCounterUsageRule++; + if (buildCounterUsageRule < 3) { + unittest.expect(o.allowUnregisteredCalls, unittest.isTrue); + unittest.expect(o.selector, unittest.equals('foo')); + unittest.expect(o.skipServiceControl, unittest.isTrue); + } + buildCounterUsageRule--; +} + +main() { + unittest.group("obj-schema-AddSubnetworkRequest", () { + unittest.test("to-json--from-json", () { + var o = buildAddSubnetworkRequest(); + var od = new api.AddSubnetworkRequest.fromJson(o.toJson()); + checkAddSubnetworkRequest(od); + }); + }); + + unittest.group("obj-schema-Api", () { + unittest.test("to-json--from-json", () { + var o = buildApi(); + var od = new api.Api.fromJson(o.toJson()); + checkApi(od); + }); + }); + + unittest.group("obj-schema-AuthProvider", () { + unittest.test("to-json--from-json", () { + var o = buildAuthProvider(); + var od = new api.AuthProvider.fromJson(o.toJson()); + checkAuthProvider(od); + }); + }); + + unittest.group("obj-schema-AuthRequirement", () { + unittest.test("to-json--from-json", () { + var o = buildAuthRequirement(); + var od = new api.AuthRequirement.fromJson(o.toJson()); + checkAuthRequirement(od); + }); + }); + + unittest.group("obj-schema-Authentication", () { + unittest.test("to-json--from-json", () { + var o = buildAuthentication(); + var od = new api.Authentication.fromJson(o.toJson()); + checkAuthentication(od); + }); + }); + + unittest.group("obj-schema-AuthenticationRule", () { + unittest.test("to-json--from-json", () { + var o = buildAuthenticationRule(); + var od = new api.AuthenticationRule.fromJson(o.toJson()); + checkAuthenticationRule(od); + }); + }); + + unittest.group("obj-schema-AuthorizationConfig", () { + unittest.test("to-json--from-json", () { + var o = buildAuthorizationConfig(); + var od = new api.AuthorizationConfig.fromJson(o.toJson()); + checkAuthorizationConfig(od); + }); + }); + + unittest.group("obj-schema-Backend", () { + unittest.test("to-json--from-json", () { + var o = buildBackend(); + var od = new api.Backend.fromJson(o.toJson()); + checkBackend(od); + }); + }); + + unittest.group("obj-schema-BackendRule", () { + unittest.test("to-json--from-json", () { + var o = buildBackendRule(); + var od = new api.BackendRule.fromJson(o.toJson()); + checkBackendRule(od); + }); + }); + + unittest.group("obj-schema-Billing", () { + unittest.test("to-json--from-json", () { + var o = buildBilling(); + var od = new api.Billing.fromJson(o.toJson()); + checkBilling(od); + }); + }); + + unittest.group("obj-schema-BillingDestination", () { + unittest.test("to-json--from-json", () { + var o = buildBillingDestination(); + var od = new api.BillingDestination.fromJson(o.toJson()); + checkBillingDestination(od); + }); + }); + + unittest.group("obj-schema-Connection", () { + unittest.test("to-json--from-json", () { + var o = buildConnection(); + var od = new api.Connection.fromJson(o.toJson()); + checkConnection(od); + }); + }); + + unittest.group("obj-schema-Context", () { + unittest.test("to-json--from-json", () { + var o = buildContext(); + var od = new api.Context.fromJson(o.toJson()); + checkContext(od); + }); + }); + + unittest.group("obj-schema-ContextRule", () { + unittest.test("to-json--from-json", () { + var o = buildContextRule(); + var od = new api.ContextRule.fromJson(o.toJson()); + checkContextRule(od); + }); + }); + + unittest.group("obj-schema-Control", () { + unittest.test("to-json--from-json", () { + var o = buildControl(); + var od = new api.Control.fromJson(o.toJson()); + checkControl(od); + }); + }); + + unittest.group("obj-schema-CustomError", () { + unittest.test("to-json--from-json", () { + var o = buildCustomError(); + var od = new api.CustomError.fromJson(o.toJson()); + checkCustomError(od); + }); + }); + + unittest.group("obj-schema-CustomErrorRule", () { + unittest.test("to-json--from-json", () { + var o = buildCustomErrorRule(); + var od = new api.CustomErrorRule.fromJson(o.toJson()); + checkCustomErrorRule(od); + }); + }); + + unittest.group("obj-schema-CustomHttpPattern", () { + unittest.test("to-json--from-json", () { + var o = buildCustomHttpPattern(); + var od = new api.CustomHttpPattern.fromJson(o.toJson()); + checkCustomHttpPattern(od); + }); + }); + + unittest.group("obj-schema-Documentation", () { + unittest.test("to-json--from-json", () { + var o = buildDocumentation(); + var od = new api.Documentation.fromJson(o.toJson()); + checkDocumentation(od); + }); + }); + + unittest.group("obj-schema-DocumentationRule", () { + unittest.test("to-json--from-json", () { + var o = buildDocumentationRule(); + var od = new api.DocumentationRule.fromJson(o.toJson()); + checkDocumentationRule(od); + }); + }); + + unittest.group("obj-schema-Endpoint", () { + unittest.test("to-json--from-json", () { + var o = buildEndpoint(); + var od = new api.Endpoint.fromJson(o.toJson()); + checkEndpoint(od); + }); + }); + + unittest.group("obj-schema-Enum", () { + unittest.test("to-json--from-json", () { + var o = buildEnum(); + var od = new api.Enum.fromJson(o.toJson()); + checkEnum(od); + }); + }); + + unittest.group("obj-schema-EnumValue", () { + unittest.test("to-json--from-json", () { + var o = buildEnumValue(); + var od = new api.EnumValue.fromJson(o.toJson()); + checkEnumValue(od); + }); + }); + + unittest.group("obj-schema-Experimental", () { + unittest.test("to-json--from-json", () { + var o = buildExperimental(); + var od = new api.Experimental.fromJson(o.toJson()); + checkExperimental(od); + }); + }); + + unittest.group("obj-schema-Field", () { + unittest.test("to-json--from-json", () { + var o = buildField(); + var od = new api.Field.fromJson(o.toJson()); + checkField(od); + }); + }); + + unittest.group("obj-schema-GoogleCloudServicenetworkingV1betaSubnetwork", () { + unittest.test("to-json--from-json", () { + var o = buildGoogleCloudServicenetworkingV1betaSubnetwork(); + var od = new api.GoogleCloudServicenetworkingV1betaSubnetwork.fromJson( + o.toJson()); + checkGoogleCloudServicenetworkingV1betaSubnetwork(od); + }); + }); + + unittest.group("obj-schema-Http", () { + unittest.test("to-json--from-json", () { + var o = buildHttp(); + var od = new api.Http.fromJson(o.toJson()); + checkHttp(od); + }); + }); + + unittest.group("obj-schema-HttpRule", () { + unittest.test("to-json--from-json", () { + var o = buildHttpRule(); + var od = new api.HttpRule.fromJson(o.toJson()); + checkHttpRule(od); + }); + }); + + unittest.group("obj-schema-LabelDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildLabelDescriptor(); + var od = new api.LabelDescriptor.fromJson(o.toJson()); + checkLabelDescriptor(od); + }); + }); + + unittest.group("obj-schema-ListConnectionsResponse", () { + unittest.test("to-json--from-json", () { + var o = buildListConnectionsResponse(); + var od = new api.ListConnectionsResponse.fromJson(o.toJson()); + checkListConnectionsResponse(od); + }); + }); + + unittest.group("obj-schema-LogDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildLogDescriptor(); + var od = new api.LogDescriptor.fromJson(o.toJson()); + checkLogDescriptor(od); + }); + }); + + unittest.group("obj-schema-Logging", () { + unittest.test("to-json--from-json", () { + var o = buildLogging(); + var od = new api.Logging.fromJson(o.toJson()); + checkLogging(od); + }); + }); + + unittest.group("obj-schema-LoggingDestination", () { + unittest.test("to-json--from-json", () { + var o = buildLoggingDestination(); + var od = new api.LoggingDestination.fromJson(o.toJson()); + checkLoggingDestination(od); + }); + }); + + unittest.group("obj-schema-Method", () { + unittest.test("to-json--from-json", () { + var o = buildMethod(); + var od = new api.Method.fromJson(o.toJson()); + checkMethod(od); + }); + }); + + unittest.group("obj-schema-MetricDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildMetricDescriptor(); + var od = new api.MetricDescriptor.fromJson(o.toJson()); + checkMetricDescriptor(od); + }); + }); + + unittest.group("obj-schema-MetricDescriptorMetadata", () { + unittest.test("to-json--from-json", () { + var o = buildMetricDescriptorMetadata(); + var od = new api.MetricDescriptorMetadata.fromJson(o.toJson()); + checkMetricDescriptorMetadata(od); + }); + }); + + unittest.group("obj-schema-MetricRule", () { + unittest.test("to-json--from-json", () { + var o = buildMetricRule(); + var od = new api.MetricRule.fromJson(o.toJson()); + checkMetricRule(od); + }); + }); + + unittest.group("obj-schema-Mixin", () { + unittest.test("to-json--from-json", () { + var o = buildMixin(); + var od = new api.Mixin.fromJson(o.toJson()); + checkMixin(od); + }); + }); + + unittest.group("obj-schema-MonitoredResourceDescriptor", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoredResourceDescriptor(); + var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson()); + checkMonitoredResourceDescriptor(od); + }); + }); + + unittest.group("obj-schema-Monitoring", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoring(); + var od = new api.Monitoring.fromJson(o.toJson()); + checkMonitoring(od); + }); + }); + + unittest.group("obj-schema-MonitoringDestination", () { + unittest.test("to-json--from-json", () { + var o = buildMonitoringDestination(); + var od = new api.MonitoringDestination.fromJson(o.toJson()); + checkMonitoringDestination(od); + }); + }); + + unittest.group("obj-schema-OAuthRequirements", () { + unittest.test("to-json--from-json", () { + var o = buildOAuthRequirements(); + var od = new api.OAuthRequirements.fromJson(o.toJson()); + checkOAuthRequirements(od); + }); + }); + + unittest.group("obj-schema-Operation", () { + unittest.test("to-json--from-json", () { + var o = buildOperation(); + var od = new api.Operation.fromJson(o.toJson()); + checkOperation(od); + }); + }); + + unittest.group("obj-schema-Option", () { + unittest.test("to-json--from-json", () { + var o = buildOption(); + var od = new api.Option.fromJson(o.toJson()); + checkOption(od); + }); + }); + + unittest.group("obj-schema-Page", () { + unittest.test("to-json--from-json", () { + var o = buildPage(); + var od = new api.Page.fromJson(o.toJson()); + checkPage(od); + }); + }); + + unittest.group("obj-schema-Quota", () { + unittest.test("to-json--from-json", () { + var o = buildQuota(); + var od = new api.Quota.fromJson(o.toJson()); + checkQuota(od); + }); + }); + + unittest.group("obj-schema-QuotaLimit", () { + unittest.test("to-json--from-json", () { + var o = buildQuotaLimit(); + var od = new api.QuotaLimit.fromJson(o.toJson()); + checkQuotaLimit(od); + }); + }); + + unittest.group("obj-schema-Range", () { + unittest.test("to-json--from-json", () { + var o = buildRange(); + var od = new api.Range.fromJson(o.toJson()); + checkRange(od); + }); + }); + + unittest.group("obj-schema-SearchRangeRequest", () { + unittest.test("to-json--from-json", () { + var o = buildSearchRangeRequest(); + var od = new api.SearchRangeRequest.fromJson(o.toJson()); + checkSearchRangeRequest(od); + }); + }); + + unittest.group("obj-schema-Service", () { + unittest.test("to-json--from-json", () { + var o = buildService(); + var od = new api.Service.fromJson(o.toJson()); + checkService(od); + }); + }); + + unittest.group("obj-schema-SourceContext", () { + unittest.test("to-json--from-json", () { + var o = buildSourceContext(); + var od = new api.SourceContext.fromJson(o.toJson()); + checkSourceContext(od); + }); + }); + + unittest.group("obj-schema-SourceInfo", () { + unittest.test("to-json--from-json", () { + var o = buildSourceInfo(); + var od = new api.SourceInfo.fromJson(o.toJson()); + checkSourceInfo(od); + }); + }); + + unittest.group("obj-schema-Status", () { + unittest.test("to-json--from-json", () { + var o = buildStatus(); + var od = new api.Status.fromJson(o.toJson()); + checkStatus(od); + }); + }); + + unittest.group("obj-schema-Subnetwork", () { + unittest.test("to-json--from-json", () { + var o = buildSubnetwork(); + var od = new api.Subnetwork.fromJson(o.toJson()); + checkSubnetwork(od); + }); + }); + + unittest.group("obj-schema-SystemParameter", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameter(); + var od = new api.SystemParameter.fromJson(o.toJson()); + checkSystemParameter(od); + }); + }); + + unittest.group("obj-schema-SystemParameterRule", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameterRule(); + var od = new api.SystemParameterRule.fromJson(o.toJson()); + checkSystemParameterRule(od); + }); + }); + + unittest.group("obj-schema-SystemParameters", () { + unittest.test("to-json--from-json", () { + var o = buildSystemParameters(); + var od = new api.SystemParameters.fromJson(o.toJson()); + checkSystemParameters(od); + }); + }); + + unittest.group("obj-schema-Type", () { + unittest.test("to-json--from-json", () { + var o = buildType(); + var od = new api.Type.fromJson(o.toJson()); + checkType(od); + }); + }); + + unittest.group("obj-schema-Usage", () { + unittest.test("to-json--from-json", () { + var o = buildUsage(); + var od = new api.Usage.fromJson(o.toJson()); + checkUsage(od); + }); + }); + + unittest.group("obj-schema-UsageRule", () { + unittest.test("to-json--from-json", () { + var o = buildUsageRule(); + var od = new api.UsageRule.fromJson(o.toJson()); + checkUsageRule(od); + }); + }); + + unittest.group("resource-OperationsResourceApi", () { + unittest.test("method--get", () { + var mock = new HttpServerMock(); + api.OperationsResourceApi res = + new api.ServicenetworkingApi(mock).operations; + var arg_name = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .get(arg_name, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ServicesResourceApi", () { + unittest.test("method--addSubnetwork", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildAddSubnetworkRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.AddSubnetworkRequest.fromJson(json); + checkAddSubnetworkRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .addSubnetwork(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--patch", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildConnection(); + var arg_name = "foo"; + var arg_updateMask = "foo"; + var arg_force = true; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Connection.fromJson(json); + checkConnection(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["updateMask"].first, unittest.equals(arg_updateMask)); + unittest.expect(queryMap["force"].first, unittest.equals("$arg_force")); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .patch(arg_request, arg_name, + updateMask: arg_updateMask, + force: arg_force, + $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--searchRange", () { + var mock = new HttpServerMock(); + api.ServicesResourceApi res = new api.ServicenetworkingApi(mock).services; + var arg_request = buildSearchRangeRequest(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.SearchRangeRequest.fromJson(json); + checkSearchRangeRequest(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .searchRange(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + }); + + unittest.group("resource-ServicesConnectionsResourceApi", () { + unittest.test("method--create", () { + var mock = new HttpServerMock(); + api.ServicesConnectionsResourceApi res = + new api.ServicenetworkingApi(mock).services.connections; + var arg_request = buildConnection(); + var arg_parent = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var obj = new api.Connection.fromJson(json); + checkConnection(obj); + + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildOperation()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .create(arg_request, arg_parent, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkOperation(response); + }))); + }); + + unittest.test("method--list", () { + var mock = new HttpServerMock(); + api.ServicesConnectionsResourceApi res = + new api.ServicenetworkingApi(mock).services.connections; + var arg_parent = "foo"; + var arg_network = "foo"; + var arg_$fields = "foo"; + mock.register(unittest.expectAsync2((http.BaseRequest req, json) { + var path = (req.url).path; + var pathOffset = 0; + var index; + var subPart; + unittest.expect( + path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); + pathOffset += 1; + unittest.expect(path.substring(pathOffset, pathOffset + 7), + unittest.equals("v1beta/")); + pathOffset += 7; + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; + + var query = (req.url).query; + var queryOffset = 0; + var queryMap = <core.String, core.List<core.String>>{}; + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); + parseBool(n) { + if (n == "true") return true; + if (n == "false") return false; + if (n == null) return null; + throw new core.ArgumentError("Invalid boolean: $n"); + } + + if (query.length > 0) { + for (var part in query.split("&")) { + var keyvalue = part.split("="); + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), + core.Uri.decodeQueryComponent(keyvalue[1])); + } + } + unittest.expect( + queryMap["network"].first, unittest.equals(arg_network)); + unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); + + var h = { + "content-type": "application/json; charset=utf-8", + }; + var resp = convert.json.encode(buildListConnectionsResponse()); + return new async.Future.value(stringResponse(200, h, resp)); + }), true); + res + .list(arg_parent, network: arg_network, $fields: arg_$fields) + .then(unittest.expectAsync1(((response) { + checkListConnectionsResponse(response); + }))); + }); + }); +}
diff --git a/generated/googleapis_beta/test/speech/v1beta1_test.dart b/generated/googleapis_beta/test/speech/v1beta1_test.dart deleted file mode 100644 index 5aa7d7b..0000000 --- a/generated/googleapis_beta/test/speech/v1beta1_test.dart +++ /dev/null
@@ -1,653 +0,0 @@ -library googleapis_beta.speech.v1beta1.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/speech/v1beta1.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterAsyncRecognizeRequest = 0; -buildAsyncRecognizeRequest() { - var o = new api.AsyncRecognizeRequest(); - buildCounterAsyncRecognizeRequest++; - if (buildCounterAsyncRecognizeRequest < 3) { - o.audio = buildRecognitionAudio(); - o.config = buildRecognitionConfig(); - } - buildCounterAsyncRecognizeRequest--; - return o; -} - -checkAsyncRecognizeRequest(api.AsyncRecognizeRequest o) { - buildCounterAsyncRecognizeRequest++; - if (buildCounterAsyncRecognizeRequest < 3) { - checkRecognitionAudio(o.audio); - checkRecognitionConfig(o.config); - } - buildCounterAsyncRecognizeRequest--; -} - -buildUnnamed5571() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5571(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted1 = (o["x"]) as core.Map; - unittest.expect(casted1, unittest.hasLength(3)); - unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted1["bool"], unittest.equals(true)); - unittest.expect(casted1["string"], unittest.equals('foo')); - var casted2 = (o["y"]) as core.Map; - unittest.expect(casted2, unittest.hasLength(3)); - unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted2["bool"], unittest.equals(true)); - unittest.expect(casted2["string"], unittest.equals('foo')); -} - -buildUnnamed5572() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5572(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted3 = (o["x"]) as core.Map; - unittest.expect(casted3, unittest.hasLength(3)); - unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted3["bool"], unittest.equals(true)); - unittest.expect(casted3["string"], unittest.equals('foo')); - var casted4 = (o["y"]) as core.Map; - unittest.expect(casted4, unittest.hasLength(3)); - unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted4["bool"], unittest.equals(true)); - unittest.expect(casted4["string"], unittest.equals('foo')); -} - -core.int buildCounterOperation = 0; -buildOperation() { - var o = new api.Operation(); - buildCounterOperation++; - if (buildCounterOperation < 3) { - o.done = true; - o.error = buildStatus(); - o.metadata = buildUnnamed5571(); - o.name = "foo"; - o.response = buildUnnamed5572(); - } - buildCounterOperation--; - return o; -} - -checkOperation(api.Operation o) { - buildCounterOperation++; - if (buildCounterOperation < 3) { - unittest.expect(o.done, unittest.isTrue); - checkStatus(o.error); - checkUnnamed5571(o.metadata); - unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5572(o.response); - } - buildCounterOperation--; -} - -core.int buildCounterRecognitionAudio = 0; -buildRecognitionAudio() { - var o = new api.RecognitionAudio(); - buildCounterRecognitionAudio++; - if (buildCounterRecognitionAudio < 3) { - o.content = "foo"; - o.uri = "foo"; - } - buildCounterRecognitionAudio--; - return o; -} - -checkRecognitionAudio(api.RecognitionAudio o) { - buildCounterRecognitionAudio++; - if (buildCounterRecognitionAudio < 3) { - unittest.expect(o.content, unittest.equals('foo')); - unittest.expect(o.uri, unittest.equals('foo')); - } - buildCounterRecognitionAudio--; -} - -core.int buildCounterRecognitionConfig = 0; -buildRecognitionConfig() { - var o = new api.RecognitionConfig(); - buildCounterRecognitionConfig++; - if (buildCounterRecognitionConfig < 3) { - o.encoding = "foo"; - o.languageCode = "foo"; - o.maxAlternatives = 42; - o.profanityFilter = true; - o.sampleRate = 42; - o.speechContext = buildSpeechContext(); - } - buildCounterRecognitionConfig--; - return o; -} - -checkRecognitionConfig(api.RecognitionConfig o) { - buildCounterRecognitionConfig++; - if (buildCounterRecognitionConfig < 3) { - unittest.expect(o.encoding, unittest.equals('foo')); - unittest.expect(o.languageCode, unittest.equals('foo')); - unittest.expect(o.maxAlternatives, unittest.equals(42)); - unittest.expect(o.profanityFilter, unittest.isTrue); - unittest.expect(o.sampleRate, unittest.equals(42)); - checkSpeechContext(o.speechContext); - } - buildCounterRecognitionConfig--; -} - -buildUnnamed5573() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5573(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterSpeechContext = 0; -buildSpeechContext() { - var o = new api.SpeechContext(); - buildCounterSpeechContext++; - if (buildCounterSpeechContext < 3) { - o.phrases = buildUnnamed5573(); - } - buildCounterSpeechContext--; - return o; -} - -checkSpeechContext(api.SpeechContext o) { - buildCounterSpeechContext++; - if (buildCounterSpeechContext < 3) { - checkUnnamed5573(o.phrases); - } - buildCounterSpeechContext--; -} - -core.int buildCounterSpeechRecognitionAlternative = 0; -buildSpeechRecognitionAlternative() { - var o = new api.SpeechRecognitionAlternative(); - buildCounterSpeechRecognitionAlternative++; - if (buildCounterSpeechRecognitionAlternative < 3) { - o.confidence = 42.0; - o.transcript = "foo"; - } - buildCounterSpeechRecognitionAlternative--; - return o; -} - -checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { - buildCounterSpeechRecognitionAlternative++; - if (buildCounterSpeechRecognitionAlternative < 3) { - unittest.expect(o.confidence, unittest.equals(42.0)); - unittest.expect(o.transcript, unittest.equals('foo')); - } - buildCounterSpeechRecognitionAlternative--; -} - -buildUnnamed5574() { - var o = new core.List<api.SpeechRecognitionAlternative>(); - o.add(buildSpeechRecognitionAlternative()); - o.add(buildSpeechRecognitionAlternative()); - return o; -} - -checkUnnamed5574(core.List<api.SpeechRecognitionAlternative> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSpeechRecognitionAlternative(o[0]); - checkSpeechRecognitionAlternative(o[1]); -} - -core.int buildCounterSpeechRecognitionResult = 0; -buildSpeechRecognitionResult() { - var o = new api.SpeechRecognitionResult(); - buildCounterSpeechRecognitionResult++; - if (buildCounterSpeechRecognitionResult < 3) { - o.alternatives = buildUnnamed5574(); - } - buildCounterSpeechRecognitionResult--; - return o; -} - -checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { - buildCounterSpeechRecognitionResult++; - if (buildCounterSpeechRecognitionResult < 3) { - checkUnnamed5574(o.alternatives); - } - buildCounterSpeechRecognitionResult--; -} - -buildUnnamed5575() { - var o = new core.Map<core.String, core.Object>(); - o["x"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - o["y"] = { - 'list': [1, 2, 3], - 'bool': true, - 'string': 'foo' - }; - return o; -} - -checkUnnamed5575(core.Map<core.String, core.Object> o) { - unittest.expect(o, unittest.hasLength(2)); - var casted5 = (o["x"]) as core.Map; - unittest.expect(casted5, unittest.hasLength(3)); - unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted5["bool"], unittest.equals(true)); - unittest.expect(casted5["string"], unittest.equals('foo')); - var casted6 = (o["y"]) as core.Map; - unittest.expect(casted6, unittest.hasLength(3)); - unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); - unittest.expect(casted6["bool"], unittest.equals(true)); - unittest.expect(casted6["string"], unittest.equals('foo')); -} - -buildUnnamed5576() { - var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5575()); - o.add(buildUnnamed5575()); - return o; -} - -checkUnnamed5576(core.List<core.Map<core.String, core.Object>> o) { - unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5575(o[0]); - checkUnnamed5575(o[1]); -} - -core.int buildCounterStatus = 0; -buildStatus() { - var o = new api.Status(); - buildCounterStatus++; - if (buildCounterStatus < 3) { - o.code = 42; - o.details = buildUnnamed5576(); - o.message = "foo"; - } - buildCounterStatus--; - return o; -} - -checkStatus(api.Status o) { - buildCounterStatus++; - if (buildCounterStatus < 3) { - unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5576(o.details); - unittest.expect(o.message, unittest.equals('foo')); - } - buildCounterStatus--; -} - -core.int buildCounterSyncRecognizeRequest = 0; -buildSyncRecognizeRequest() { - var o = new api.SyncRecognizeRequest(); - buildCounterSyncRecognizeRequest++; - if (buildCounterSyncRecognizeRequest < 3) { - o.audio = buildRecognitionAudio(); - o.config = buildRecognitionConfig(); - } - buildCounterSyncRecognizeRequest--; - return o; -} - -checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { - buildCounterSyncRecognizeRequest++; - if (buildCounterSyncRecognizeRequest < 3) { - checkRecognitionAudio(o.audio); - checkRecognitionConfig(o.config); - } - buildCounterSyncRecognizeRequest--; -} - -buildUnnamed5577() { - var o = new core.List<api.SpeechRecognitionResult>(); - o.add(buildSpeechRecognitionResult()); - o.add(buildSpeechRecognitionResult()); - return o; -} - -checkUnnamed5577(core.List<api.SpeechRecognitionResult> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSpeechRecognitionResult(o[0]); - checkSpeechRecognitionResult(o[1]); -} - -core.int buildCounterSyncRecognizeResponse = 0; -buildSyncRecognizeResponse() { - var o = new api.SyncRecognizeResponse(); - buildCounterSyncRecognizeResponse++; - if (buildCounterSyncRecognizeResponse < 3) { - o.results = buildUnnamed5577(); - } - buildCounterSyncRecognizeResponse--; - return o; -} - -checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { - buildCounterSyncRecognizeResponse++; - if (buildCounterSyncRecognizeResponse < 3) { - checkUnnamed5577(o.results); - } - buildCounterSyncRecognizeResponse--; -} - -main() { - unittest.group("obj-schema-AsyncRecognizeRequest", () { - unittest.test("to-json--from-json", () { - var o = buildAsyncRecognizeRequest(); - var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); - checkAsyncRecognizeRequest(od); - }); - }); - - unittest.group("obj-schema-Operation", () { - unittest.test("to-json--from-json", () { - var o = buildOperation(); - var od = new api.Operation.fromJson(o.toJson()); - checkOperation(od); - }); - }); - - unittest.group("obj-schema-RecognitionAudio", () { - unittest.test("to-json--from-json", () { - var o = buildRecognitionAudio(); - var od = new api.RecognitionAudio.fromJson(o.toJson()); - checkRecognitionAudio(od); - }); - }); - - unittest.group("obj-schema-RecognitionConfig", () { - unittest.test("to-json--from-json", () { - var o = buildRecognitionConfig(); - var od = new api.RecognitionConfig.fromJson(o.toJson()); - checkRecognitionConfig(od); - }); - }); - - unittest.group("obj-schema-SpeechContext", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechContext(); - var od = new api.SpeechContext.fromJson(o.toJson()); - checkSpeechContext(od); - }); - }); - - unittest.group("obj-schema-SpeechRecognitionAlternative", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechRecognitionAlternative(); - var od = new api.SpeechRecognitionAlternative.fromJson(o.toJson()); - checkSpeechRecognitionAlternative(od); - }); - }); - - unittest.group("obj-schema-SpeechRecognitionResult", () { - unittest.test("to-json--from-json", () { - var o = buildSpeechRecognitionResult(); - var od = new api.SpeechRecognitionResult.fromJson(o.toJson()); - checkSpeechRecognitionResult(od); - }); - }); - - unittest.group("obj-schema-Status", () { - unittest.test("to-json--from-json", () { - var o = buildStatus(); - var od = new api.Status.fromJson(o.toJson()); - checkStatus(od); - }); - }); - - unittest.group("obj-schema-SyncRecognizeRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSyncRecognizeRequest(); - var od = new api.SyncRecognizeRequest.fromJson(o.toJson()); - checkSyncRecognizeRequest(od); - }); - }); - - unittest.group("obj-schema-SyncRecognizeResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSyncRecognizeResponse(); - var od = new api.SyncRecognizeResponse.fromJson(o.toJson()); - checkSyncRecognizeResponse(od); - }); - }); - - unittest.group("resource-OperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SpeechApi(mock).operations; - var arg_name = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 19), - unittest.equals("v1beta1/operations/")); - pathOffset += 19; - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_name, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - }); - - unittest.group("resource-SpeechResourceApi", () { - unittest.test("method--asyncrecognize", () { - var mock = new HttpServerMock(); - api.SpeechResourceApi res = new api.SpeechApi(mock).speech; - var arg_request = buildAsyncRecognizeRequest(); - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.AsyncRecognizeRequest.fromJson(json); - checkAsyncRecognizeRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 29), - unittest.equals("v1beta1/speech:asyncrecognize")); - pathOffset += 29; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .asyncrecognize(arg_request, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperation(response); - }))); - }); - - unittest.test("method--syncrecognize", () { - var mock = new HttpServerMock(); - api.SpeechResourceApi res = new api.SpeechApi(mock).speech; - var arg_request = buildSyncRecognizeRequest(); - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SyncRecognizeRequest.fromJson(json); - checkSyncRecognizeRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 28), - unittest.equals("v1beta1/speech:syncrecognize")); - pathOffset += 28; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSyncRecognizeResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .syncrecognize(arg_request, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSyncRecognizeResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart b/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart deleted file mode 100644 index dbc0a5b..0000000 --- a/generated/googleapis_beta/test/sqladmin/v1beta3_test.dart +++ /dev/null
@@ -1,3444 +0,0 @@ -library googleapis_beta.sqladmin.v1beta3.test; - -import "dart:core" as core; -import "dart:async" as async; -import "dart:convert" as convert; - -import 'package:http/http.dart' as http; -import 'package:test/test.dart' as unittest; - -import 'package:googleapis_beta/sqladmin/v1beta3.dart' as api; - -class HttpServerMock extends http.BaseClient { - core.Function _callback; - core.bool _expectJson; - - void register(core.Function callback, core.bool expectJson) { - _callback = callback; - _expectJson = expectJson; - } - - async.Future<http.StreamedResponse> send(http.BaseRequest request) { - if (_expectJson) { - return request - .finalize() - .transform(convert.utf8.decoder) - .join('') - .then((core.String jsonString) { - if (jsonString.isEmpty) { - return _callback(request, null); - } else { - return _callback(request, convert.json.decode(jsonString)); - } - }); - } else { - var stream = request.finalize(); - if (stream == null) { - return _callback(request, []); - } else { - return stream.toBytes().then((data) { - return _callback(request, data); - }); - } - } - } -} - -http.StreamedResponse stringResponse(core.int status, - core.Map<core.String, core.String> headers, core.String body) { - var stream = new async.Stream.fromIterable([convert.utf8.encode(body)]); - return new http.StreamedResponse(stream, status, headers: headers); -} - -core.int buildCounterBackupConfiguration = 0; -buildBackupConfiguration() { - var o = new api.BackupConfiguration(); - buildCounterBackupConfiguration++; - if (buildCounterBackupConfiguration < 3) { - o.binaryLogEnabled = true; - o.enabled = true; - o.id = "foo"; - o.kind = "foo"; - o.replicationLogArchivingEnabled = true; - o.startTime = "foo"; - } - buildCounterBackupConfiguration--; - return o; -} - -checkBackupConfiguration(api.BackupConfiguration o) { - buildCounterBackupConfiguration++; - if (buildCounterBackupConfiguration < 3) { - unittest.expect(o.binaryLogEnabled, unittest.isTrue); - unittest.expect(o.enabled, unittest.isTrue); - unittest.expect(o.id, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.replicationLogArchivingEnabled, unittest.isTrue); - unittest.expect(o.startTime, unittest.equals('foo')); - } - buildCounterBackupConfiguration--; -} - -core.int buildCounterBackupRun = 0; -buildBackupRun() { - var o = new api.BackupRun(); - buildCounterBackupRun++; - if (buildCounterBackupRun < 3) { - o.backupConfiguration = "foo"; - o.dueTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.error = buildOperationError(); - o.instance = "foo"; - o.kind = "foo"; - o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.status = "foo"; - } - buildCounterBackupRun--; - return o; -} - -checkBackupRun(api.BackupRun o) { - buildCounterBackupRun++; - if (buildCounterBackupRun < 3) { - unittest.expect(o.backupConfiguration, unittest.equals('foo')); - unittest.expect( - o.dueTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect( - o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.enqueuedTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - checkOperationError(o.error); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.startTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.status, unittest.equals('foo')); - } - buildCounterBackupRun--; -} - -buildUnnamed5591() { - var o = new core.List<api.BackupRun>(); - o.add(buildBackupRun()); - o.add(buildBackupRun()); - return o; -} - -checkUnnamed5591(core.List<api.BackupRun> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBackupRun(o[0]); - checkBackupRun(o[1]); -} - -core.int buildCounterBackupRunsListResponse = 0; -buildBackupRunsListResponse() { - var o = new api.BackupRunsListResponse(); - buildCounterBackupRunsListResponse++; - if (buildCounterBackupRunsListResponse < 3) { - o.items = buildUnnamed5591(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterBackupRunsListResponse--; - return o; -} - -checkBackupRunsListResponse(api.BackupRunsListResponse o) { - buildCounterBackupRunsListResponse++; - if (buildCounterBackupRunsListResponse < 3) { - checkUnnamed5591(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterBackupRunsListResponse--; -} - -core.int buildCounterBinLogCoordinates = 0; -buildBinLogCoordinates() { - var o = new api.BinLogCoordinates(); - buildCounterBinLogCoordinates++; - if (buildCounterBinLogCoordinates < 3) { - o.binLogFileName = "foo"; - o.binLogPosition = "foo"; - o.kind = "foo"; - } - buildCounterBinLogCoordinates--; - return o; -} - -checkBinLogCoordinates(api.BinLogCoordinates o) { - buildCounterBinLogCoordinates++; - if (buildCounterBinLogCoordinates < 3) { - unittest.expect(o.binLogFileName, unittest.equals('foo')); - unittest.expect(o.binLogPosition, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterBinLogCoordinates--; -} - -core.int buildCounterCloneContext = 0; -buildCloneContext() { - var o = new api.CloneContext(); - buildCounterCloneContext++; - if (buildCounterCloneContext < 3) { - o.binLogCoordinates = buildBinLogCoordinates(); - o.destinationInstanceName = "foo"; - o.kind = "foo"; - o.pitrTimestampMs = "foo"; - o.sourceInstanceName = "foo"; - } - buildCounterCloneContext--; - return o; -} - -checkCloneContext(api.CloneContext o) { - buildCounterCloneContext++; - if (buildCounterCloneContext < 3) { - checkBinLogCoordinates(o.binLogCoordinates); - unittest.expect(o.destinationInstanceName, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.pitrTimestampMs, unittest.equals('foo')); - unittest.expect(o.sourceInstanceName, unittest.equals('foo')); - } - buildCounterCloneContext--; -} - -core.int buildCounterDatabaseFlags = 0; -buildDatabaseFlags() { - var o = new api.DatabaseFlags(); - buildCounterDatabaseFlags++; - if (buildCounterDatabaseFlags < 3) { - o.name = "foo"; - o.value = "foo"; - } - buildCounterDatabaseFlags--; - return o; -} - -checkDatabaseFlags(api.DatabaseFlags o) { - buildCounterDatabaseFlags++; - if (buildCounterDatabaseFlags < 3) { - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.value, unittest.equals('foo')); - } - buildCounterDatabaseFlags--; -} - -buildUnnamed5592() { - var o = new core.List<api.IpMapping>(); - o.add(buildIpMapping()); - o.add(buildIpMapping()); - return o; -} - -checkUnnamed5592(core.List<api.IpMapping> o) { - unittest.expect(o, unittest.hasLength(2)); - checkIpMapping(o[0]); - checkIpMapping(o[1]); -} - -buildUnnamed5593() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5593(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterDatabaseInstance = 0; -buildDatabaseInstance() { - var o = new api.DatabaseInstance(); - buildCounterDatabaseInstance++; - if (buildCounterDatabaseInstance < 3) { - o.connectionName = "foo"; - o.currentDiskSize = "foo"; - o.databaseVersion = "foo"; - o.etag = "foo"; - o.instance = "foo"; - o.instanceType = "foo"; - o.ipAddresses = buildUnnamed5592(); - o.ipv6Address = "foo"; - o.kind = "foo"; - o.masterInstanceName = "foo"; - o.maxDiskSize = "foo"; - o.project = "foo"; - o.region = "foo"; - o.replicaNames = buildUnnamed5593(); - o.serverCaCert = buildSslCert(); - o.serviceAccountEmailAddress = "foo"; - o.settings = buildSettings(); - o.state = "foo"; - } - buildCounterDatabaseInstance--; - return o; -} - -checkDatabaseInstance(api.DatabaseInstance o) { - buildCounterDatabaseInstance++; - if (buildCounterDatabaseInstance < 3) { - unittest.expect(o.connectionName, unittest.equals('foo')); - unittest.expect(o.currentDiskSize, unittest.equals('foo')); - unittest.expect(o.databaseVersion, unittest.equals('foo')); - unittest.expect(o.etag, unittest.equals('foo')); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.instanceType, unittest.equals('foo')); - checkUnnamed5592(o.ipAddresses); - unittest.expect(o.ipv6Address, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.masterInstanceName, unittest.equals('foo')); - unittest.expect(o.maxDiskSize, unittest.equals('foo')); - unittest.expect(o.project, unittest.equals('foo')); - unittest.expect(o.region, unittest.equals('foo')); - checkUnnamed5593(o.replicaNames); - checkSslCert(o.serverCaCert); - unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); - checkSettings(o.settings); - unittest.expect(o.state, unittest.equals('foo')); - } - buildCounterDatabaseInstance--; -} - -buildUnnamed5594() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5594(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5595() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5595(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterExportContext = 0; -buildExportContext() { - var o = new api.ExportContext(); - buildCounterExportContext++; - if (buildCounterExportContext < 3) { - o.database = buildUnnamed5594(); - o.kind = "foo"; - o.table = buildUnnamed5595(); - o.uri = "foo"; - } - buildCounterExportContext--; - return o; -} - -checkExportContext(api.ExportContext o) { - buildCounterExportContext++; - if (buildCounterExportContext < 3) { - checkUnnamed5594(o.database); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5595(o.table); - unittest.expect(o.uri, unittest.equals('foo')); - } - buildCounterExportContext--; -} - -buildUnnamed5596() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5596(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5597() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5597(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterFlag = 0; -buildFlag() { - var o = new api.Flag(); - buildCounterFlag++; - if (buildCounterFlag < 3) { - o.allowedStringValues = buildUnnamed5596(); - o.appliesTo = buildUnnamed5597(); - o.kind = "foo"; - o.maxValue = "foo"; - o.minValue = "foo"; - o.name = "foo"; - o.type = "foo"; - } - buildCounterFlag--; - return o; -} - -checkFlag(api.Flag o) { - buildCounterFlag++; - if (buildCounterFlag < 3) { - checkUnnamed5596(o.allowedStringValues); - checkUnnamed5597(o.appliesTo); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.maxValue, unittest.equals('foo')); - unittest.expect(o.minValue, unittest.equals('foo')); - unittest.expect(o.name, unittest.equals('foo')); - unittest.expect(o.type, unittest.equals('foo')); - } - buildCounterFlag--; -} - -buildUnnamed5598() { - var o = new core.List<api.Flag>(); - o.add(buildFlag()); - o.add(buildFlag()); - return o; -} - -checkUnnamed5598(core.List<api.Flag> o) { - unittest.expect(o, unittest.hasLength(2)); - checkFlag(o[0]); - checkFlag(o[1]); -} - -core.int buildCounterFlagsListResponse = 0; -buildFlagsListResponse() { - var o = new api.FlagsListResponse(); - buildCounterFlagsListResponse++; - if (buildCounterFlagsListResponse < 3) { - o.items = buildUnnamed5598(); - o.kind = "foo"; - } - buildCounterFlagsListResponse--; - return o; -} - -checkFlagsListResponse(api.FlagsListResponse o) { - buildCounterFlagsListResponse++; - if (buildCounterFlagsListResponse < 3) { - checkUnnamed5598(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterFlagsListResponse--; -} - -buildUnnamed5599() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5599(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterImportContext = 0; -buildImportContext() { - var o = new api.ImportContext(); - buildCounterImportContext++; - if (buildCounterImportContext < 3) { - o.database = "foo"; - o.kind = "foo"; - o.uri = buildUnnamed5599(); - } - buildCounterImportContext--; - return o; -} - -checkImportContext(api.ImportContext o) { - buildCounterImportContext++; - if (buildCounterImportContext < 3) { - unittest.expect(o.database, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5599(o.uri); - } - buildCounterImportContext--; -} - -buildUnnamed5600() { - var o = new core.List<api.OperationError>(); - o.add(buildOperationError()); - o.add(buildOperationError()); - return o; -} - -checkUnnamed5600(core.List<api.OperationError> o) { - unittest.expect(o, unittest.hasLength(2)); - checkOperationError(o[0]); - checkOperationError(o[1]); -} - -core.int buildCounterInstanceOperation = 0; -buildInstanceOperation() { - var o = new api.InstanceOperation(); - buildCounterInstanceOperation++; - if (buildCounterInstanceOperation < 3) { - o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.error = buildUnnamed5600(); - o.exportContext = buildExportContext(); - o.importContext = buildImportContext(); - o.instance = "foo"; - o.kind = "foo"; - o.operation = "foo"; - o.operationType = "foo"; - o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.state = "foo"; - o.userEmailAddress = "foo"; - } - buildCounterInstanceOperation--; - return o; -} - -checkInstanceOperation(api.InstanceOperation o) { - buildCounterInstanceOperation++; - if (buildCounterInstanceOperation < 3) { - unittest.expect( - o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.enqueuedTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - checkUnnamed5600(o.error); - checkExportContext(o.exportContext); - checkImportContext(o.importContext); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - unittest.expect(o.operationType, unittest.equals('foo')); - unittest.expect(o.startTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.state, unittest.equals('foo')); - unittest.expect(o.userEmailAddress, unittest.equals('foo')); - } - buildCounterInstanceOperation--; -} - -core.int buildCounterInstanceSetRootPasswordRequest = 0; -buildInstanceSetRootPasswordRequest() { - var o = new api.InstanceSetRootPasswordRequest(); - buildCounterInstanceSetRootPasswordRequest++; - if (buildCounterInstanceSetRootPasswordRequest < 3) { - o.setRootPasswordContext = buildSetRootPasswordContext(); - } - buildCounterInstanceSetRootPasswordRequest--; - return o; -} - -checkInstanceSetRootPasswordRequest(api.InstanceSetRootPasswordRequest o) { - buildCounterInstanceSetRootPasswordRequest++; - if (buildCounterInstanceSetRootPasswordRequest < 3) { - checkSetRootPasswordContext(o.setRootPasswordContext); - } - buildCounterInstanceSetRootPasswordRequest--; -} - -core.int buildCounterInstancesCloneRequest = 0; -buildInstancesCloneRequest() { - var o = new api.InstancesCloneRequest(); - buildCounterInstancesCloneRequest++; - if (buildCounterInstancesCloneRequest < 3) { - o.cloneContext = buildCloneContext(); - } - buildCounterInstancesCloneRequest--; - return o; -} - -checkInstancesCloneRequest(api.InstancesCloneRequest o) { - buildCounterInstancesCloneRequest++; - if (buildCounterInstancesCloneRequest < 3) { - checkCloneContext(o.cloneContext); - } - buildCounterInstancesCloneRequest--; -} - -core.int buildCounterInstancesCloneResponse = 0; -buildInstancesCloneResponse() { - var o = new api.InstancesCloneResponse(); - buildCounterInstancesCloneResponse++; - if (buildCounterInstancesCloneResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesCloneResponse--; - return o; -} - -checkInstancesCloneResponse(api.InstancesCloneResponse o) { - buildCounterInstancesCloneResponse++; - if (buildCounterInstancesCloneResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesCloneResponse--; -} - -core.int buildCounterInstancesDeleteResponse = 0; -buildInstancesDeleteResponse() { - var o = new api.InstancesDeleteResponse(); - buildCounterInstancesDeleteResponse++; - if (buildCounterInstancesDeleteResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesDeleteResponse--; - return o; -} - -checkInstancesDeleteResponse(api.InstancesDeleteResponse o) { - buildCounterInstancesDeleteResponse++; - if (buildCounterInstancesDeleteResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesDeleteResponse--; -} - -core.int buildCounterInstancesExportRequest = 0; -buildInstancesExportRequest() { - var o = new api.InstancesExportRequest(); - buildCounterInstancesExportRequest++; - if (buildCounterInstancesExportRequest < 3) { - o.exportContext = buildExportContext(); - } - buildCounterInstancesExportRequest--; - return o; -} - -checkInstancesExportRequest(api.InstancesExportRequest o) { - buildCounterInstancesExportRequest++; - if (buildCounterInstancesExportRequest < 3) { - checkExportContext(o.exportContext); - } - buildCounterInstancesExportRequest--; -} - -core.int buildCounterInstancesExportResponse = 0; -buildInstancesExportResponse() { - var o = new api.InstancesExportResponse(); - buildCounterInstancesExportResponse++; - if (buildCounterInstancesExportResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesExportResponse--; - return o; -} - -checkInstancesExportResponse(api.InstancesExportResponse o) { - buildCounterInstancesExportResponse++; - if (buildCounterInstancesExportResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesExportResponse--; -} - -core.int buildCounterInstancesImportRequest = 0; -buildInstancesImportRequest() { - var o = new api.InstancesImportRequest(); - buildCounterInstancesImportRequest++; - if (buildCounterInstancesImportRequest < 3) { - o.importContext = buildImportContext(); - } - buildCounterInstancesImportRequest--; - return o; -} - -checkInstancesImportRequest(api.InstancesImportRequest o) { - buildCounterInstancesImportRequest++; - if (buildCounterInstancesImportRequest < 3) { - checkImportContext(o.importContext); - } - buildCounterInstancesImportRequest--; -} - -core.int buildCounterInstancesImportResponse = 0; -buildInstancesImportResponse() { - var o = new api.InstancesImportResponse(); - buildCounterInstancesImportResponse++; - if (buildCounterInstancesImportResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesImportResponse--; - return o; -} - -checkInstancesImportResponse(api.InstancesImportResponse o) { - buildCounterInstancesImportResponse++; - if (buildCounterInstancesImportResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesImportResponse--; -} - -core.int buildCounterInstancesInsertResponse = 0; -buildInstancesInsertResponse() { - var o = new api.InstancesInsertResponse(); - buildCounterInstancesInsertResponse++; - if (buildCounterInstancesInsertResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesInsertResponse--; - return o; -} - -checkInstancesInsertResponse(api.InstancesInsertResponse o) { - buildCounterInstancesInsertResponse++; - if (buildCounterInstancesInsertResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesInsertResponse--; -} - -buildUnnamed5601() { - var o = new core.List<api.DatabaseInstance>(); - o.add(buildDatabaseInstance()); - o.add(buildDatabaseInstance()); - return o; -} - -checkUnnamed5601(core.List<api.DatabaseInstance> o) { - unittest.expect(o, unittest.hasLength(2)); - checkDatabaseInstance(o[0]); - checkDatabaseInstance(o[1]); -} - -core.int buildCounterInstancesListResponse = 0; -buildInstancesListResponse() { - var o = new api.InstancesListResponse(); - buildCounterInstancesListResponse++; - if (buildCounterInstancesListResponse < 3) { - o.items = buildUnnamed5601(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterInstancesListResponse--; - return o; -} - -checkInstancesListResponse(api.InstancesListResponse o) { - buildCounterInstancesListResponse++; - if (buildCounterInstancesListResponse < 3) { - checkUnnamed5601(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterInstancesListResponse--; -} - -core.int buildCounterInstancesPromoteReplicaResponse = 0; -buildInstancesPromoteReplicaResponse() { - var o = new api.InstancesPromoteReplicaResponse(); - buildCounterInstancesPromoteReplicaResponse++; - if (buildCounterInstancesPromoteReplicaResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesPromoteReplicaResponse--; - return o; -} - -checkInstancesPromoteReplicaResponse(api.InstancesPromoteReplicaResponse o) { - buildCounterInstancesPromoteReplicaResponse++; - if (buildCounterInstancesPromoteReplicaResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesPromoteReplicaResponse--; -} - -core.int buildCounterInstancesResetSslConfigResponse = 0; -buildInstancesResetSslConfigResponse() { - var o = new api.InstancesResetSslConfigResponse(); - buildCounterInstancesResetSslConfigResponse++; - if (buildCounterInstancesResetSslConfigResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesResetSslConfigResponse--; - return o; -} - -checkInstancesResetSslConfigResponse(api.InstancesResetSslConfigResponse o) { - buildCounterInstancesResetSslConfigResponse++; - if (buildCounterInstancesResetSslConfigResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesResetSslConfigResponse--; -} - -core.int buildCounterInstancesRestartResponse = 0; -buildInstancesRestartResponse() { - var o = new api.InstancesRestartResponse(); - buildCounterInstancesRestartResponse++; - if (buildCounterInstancesRestartResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesRestartResponse--; - return o; -} - -checkInstancesRestartResponse(api.InstancesRestartResponse o) { - buildCounterInstancesRestartResponse++; - if (buildCounterInstancesRestartResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesRestartResponse--; -} - -core.int buildCounterInstancesRestoreBackupResponse = 0; -buildInstancesRestoreBackupResponse() { - var o = new api.InstancesRestoreBackupResponse(); - buildCounterInstancesRestoreBackupResponse++; - if (buildCounterInstancesRestoreBackupResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesRestoreBackupResponse--; - return o; -} - -checkInstancesRestoreBackupResponse(api.InstancesRestoreBackupResponse o) { - buildCounterInstancesRestoreBackupResponse++; - if (buildCounterInstancesRestoreBackupResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesRestoreBackupResponse--; -} - -core.int buildCounterInstancesSetRootPasswordResponse = 0; -buildInstancesSetRootPasswordResponse() { - var o = new api.InstancesSetRootPasswordResponse(); - buildCounterInstancesSetRootPasswordResponse++; - if (buildCounterInstancesSetRootPasswordResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesSetRootPasswordResponse--; - return o; -} - -checkInstancesSetRootPasswordResponse(api.InstancesSetRootPasswordResponse o) { - buildCounterInstancesSetRootPasswordResponse++; - if (buildCounterInstancesSetRootPasswordResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesSetRootPasswordResponse--; -} - -core.int buildCounterInstancesUpdateResponse = 0; -buildInstancesUpdateResponse() { - var o = new api.InstancesUpdateResponse(); - buildCounterInstancesUpdateResponse++; - if (buildCounterInstancesUpdateResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterInstancesUpdateResponse--; - return o; -} - -checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { - buildCounterInstancesUpdateResponse++; - if (buildCounterInstancesUpdateResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterInstancesUpdateResponse--; -} - -buildUnnamed5602() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5602(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterIpConfiguration = 0; -buildIpConfiguration() { - var o = new api.IpConfiguration(); - buildCounterIpConfiguration++; - if (buildCounterIpConfiguration < 3) { - o.authorizedNetworks = buildUnnamed5602(); - o.enabled = true; - o.kind = "foo"; - o.requireSsl = true; - } - buildCounterIpConfiguration--; - return o; -} - -checkIpConfiguration(api.IpConfiguration o) { - buildCounterIpConfiguration++; - if (buildCounterIpConfiguration < 3) { - checkUnnamed5602(o.authorizedNetworks); - unittest.expect(o.enabled, unittest.isTrue); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.requireSsl, unittest.isTrue); - } - buildCounterIpConfiguration--; -} - -core.int buildCounterIpMapping = 0; -buildIpMapping() { - var o = new api.IpMapping(); - buildCounterIpMapping++; - if (buildCounterIpMapping < 3) { - o.ipAddress = "foo"; - o.timeToRetire = core.DateTime.parse("2002-02-27T14:01:02"); - } - buildCounterIpMapping--; - return o; -} - -checkIpMapping(api.IpMapping o) { - buildCounterIpMapping++; - if (buildCounterIpMapping < 3) { - unittest.expect(o.ipAddress, unittest.equals('foo')); - unittest.expect(o.timeToRetire, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - } - buildCounterIpMapping--; -} - -core.int buildCounterLocationPreference = 0; -buildLocationPreference() { - var o = new api.LocationPreference(); - buildCounterLocationPreference++; - if (buildCounterLocationPreference < 3) { - o.followGaeApplication = "foo"; - o.kind = "foo"; - o.zone = "foo"; - } - buildCounterLocationPreference--; - return o; -} - -checkLocationPreference(api.LocationPreference o) { - buildCounterLocationPreference++; - if (buildCounterLocationPreference < 3) { - unittest.expect(o.followGaeApplication, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.zone, unittest.equals('foo')); - } - buildCounterLocationPreference--; -} - -core.int buildCounterOperationError = 0; -buildOperationError() { - var o = new api.OperationError(); - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - o.code = "foo"; - o.kind = "foo"; - } - buildCounterOperationError--; - return o; -} - -checkOperationError(api.OperationError o) { - buildCounterOperationError++; - if (buildCounterOperationError < 3) { - unittest.expect(o.code, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterOperationError--; -} - -buildUnnamed5603() { - var o = new core.List<api.InstanceOperation>(); - o.add(buildInstanceOperation()); - o.add(buildInstanceOperation()); - return o; -} - -checkUnnamed5603(core.List<api.InstanceOperation> o) { - unittest.expect(o, unittest.hasLength(2)); - checkInstanceOperation(o[0]); - checkInstanceOperation(o[1]); -} - -core.int buildCounterOperationsListResponse = 0; -buildOperationsListResponse() { - var o = new api.OperationsListResponse(); - buildCounterOperationsListResponse++; - if (buildCounterOperationsListResponse < 3) { - o.items = buildUnnamed5603(); - o.kind = "foo"; - o.nextPageToken = "foo"; - } - buildCounterOperationsListResponse--; - return o; -} - -checkOperationsListResponse(api.OperationsListResponse o) { - buildCounterOperationsListResponse++; - if (buildCounterOperationsListResponse < 3) { - checkUnnamed5603(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.nextPageToken, unittest.equals('foo')); - } - buildCounterOperationsListResponse--; -} - -core.int buildCounterSetRootPasswordContext = 0; -buildSetRootPasswordContext() { - var o = new api.SetRootPasswordContext(); - buildCounterSetRootPasswordContext++; - if (buildCounterSetRootPasswordContext < 3) { - o.kind = "foo"; - o.password = "foo"; - } - buildCounterSetRootPasswordContext--; - return o; -} - -checkSetRootPasswordContext(api.SetRootPasswordContext o) { - buildCounterSetRootPasswordContext++; - if (buildCounterSetRootPasswordContext < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.password, unittest.equals('foo')); - } - buildCounterSetRootPasswordContext--; -} - -buildUnnamed5604() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5604(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -buildUnnamed5605() { - var o = new core.List<api.BackupConfiguration>(); - o.add(buildBackupConfiguration()); - o.add(buildBackupConfiguration()); - return o; -} - -checkUnnamed5605(core.List<api.BackupConfiguration> o) { - unittest.expect(o, unittest.hasLength(2)); - checkBackupConfiguration(o[0]); - checkBackupConfiguration(o[1]); -} - -buildUnnamed5606() { - var o = new core.List<api.DatabaseFlags>(); - o.add(buildDatabaseFlags()); - o.add(buildDatabaseFlags()); - return o; -} - -checkUnnamed5606(core.List<api.DatabaseFlags> o) { - unittest.expect(o, unittest.hasLength(2)); - checkDatabaseFlags(o[0]); - checkDatabaseFlags(o[1]); -} - -core.int buildCounterSettings = 0; -buildSettings() { - var o = new api.Settings(); - buildCounterSettings++; - if (buildCounterSettings < 3) { - o.activationPolicy = "foo"; - o.authorizedGaeApplications = buildUnnamed5604(); - o.backupConfiguration = buildUnnamed5605(); - o.databaseFlags = buildUnnamed5606(); - o.databaseReplicationEnabled = true; - o.ipConfiguration = buildIpConfiguration(); - o.kind = "foo"; - o.locationPreference = buildLocationPreference(); - o.pricingPlan = "foo"; - o.replicationType = "foo"; - o.settingsVersion = "foo"; - o.tier = "foo"; - } - buildCounterSettings--; - return o; -} - -checkSettings(api.Settings o) { - buildCounterSettings++; - if (buildCounterSettings < 3) { - unittest.expect(o.activationPolicy, unittest.equals('foo')); - checkUnnamed5604(o.authorizedGaeApplications); - checkUnnamed5605(o.backupConfiguration); - checkUnnamed5606(o.databaseFlags); - unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); - checkIpConfiguration(o.ipConfiguration); - unittest.expect(o.kind, unittest.equals('foo')); - checkLocationPreference(o.locationPreference); - unittest.expect(o.pricingPlan, unittest.equals('foo')); - unittest.expect(o.replicationType, unittest.equals('foo')); - unittest.expect(o.settingsVersion, unittest.equals('foo')); - unittest.expect(o.tier, unittest.equals('foo')); - } - buildCounterSettings--; -} - -core.int buildCounterSslCert = 0; -buildSslCert() { - var o = new api.SslCert(); - buildCounterSslCert++; - if (buildCounterSslCert < 3) { - o.cert = "foo"; - o.certSerialNumber = "foo"; - o.commonName = "foo"; - o.createTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); - o.instance = "foo"; - o.kind = "foo"; - o.sha1Fingerprint = "foo"; - } - buildCounterSslCert--; - return o; -} - -checkSslCert(api.SslCert o) { - buildCounterSslCert++; - if (buildCounterSslCert < 3) { - unittest.expect(o.cert, unittest.equals('foo')); - unittest.expect(o.certSerialNumber, unittest.equals('foo')); - unittest.expect(o.commonName, unittest.equals('foo')); - unittest.expect(o.createTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.expirationTime, - unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); - unittest.expect(o.instance, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.sha1Fingerprint, unittest.equals('foo')); - } - buildCounterSslCert--; -} - -core.int buildCounterSslCertDetail = 0; -buildSslCertDetail() { - var o = new api.SslCertDetail(); - buildCounterSslCertDetail++; - if (buildCounterSslCertDetail < 3) { - o.certInfo = buildSslCert(); - o.certPrivateKey = "foo"; - } - buildCounterSslCertDetail--; - return o; -} - -checkSslCertDetail(api.SslCertDetail o) { - buildCounterSslCertDetail++; - if (buildCounterSslCertDetail < 3) { - checkSslCert(o.certInfo); - unittest.expect(o.certPrivateKey, unittest.equals('foo')); - } - buildCounterSslCertDetail--; -} - -core.int buildCounterSslCertsDeleteResponse = 0; -buildSslCertsDeleteResponse() { - var o = new api.SslCertsDeleteResponse(); - buildCounterSslCertsDeleteResponse++; - if (buildCounterSslCertsDeleteResponse < 3) { - o.kind = "foo"; - o.operation = "foo"; - } - buildCounterSslCertsDeleteResponse--; - return o; -} - -checkSslCertsDeleteResponse(api.SslCertsDeleteResponse o) { - buildCounterSslCertsDeleteResponse++; - if (buildCounterSslCertsDeleteResponse < 3) { - unittest.expect(o.kind, unittest.equals('foo')); - unittest.expect(o.operation, unittest.equals('foo')); - } - buildCounterSslCertsDeleteResponse--; -} - -core.int buildCounterSslCertsInsertRequest = 0; -buildSslCertsInsertRequest() { - var o = new api.SslCertsInsertRequest(); - buildCounterSslCertsInsertRequest++; - if (buildCounterSslCertsInsertRequest < 3) { - o.commonName = "foo"; - } - buildCounterSslCertsInsertRequest--; - return o; -} - -checkSslCertsInsertRequest(api.SslCertsInsertRequest o) { - buildCounterSslCertsInsertRequest++; - if (buildCounterSslCertsInsertRequest < 3) { - unittest.expect(o.commonName, unittest.equals('foo')); - } - buildCounterSslCertsInsertRequest--; -} - -core.int buildCounterSslCertsInsertResponse = 0; -buildSslCertsInsertResponse() { - var o = new api.SslCertsInsertResponse(); - buildCounterSslCertsInsertResponse++; - if (buildCounterSslCertsInsertResponse < 3) { - o.clientCert = buildSslCertDetail(); - o.kind = "foo"; - o.serverCaCert = buildSslCert(); - } - buildCounterSslCertsInsertResponse--; - return o; -} - -checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { - buildCounterSslCertsInsertResponse++; - if (buildCounterSslCertsInsertResponse < 3) { - checkSslCertDetail(o.clientCert); - unittest.expect(o.kind, unittest.equals('foo')); - checkSslCert(o.serverCaCert); - } - buildCounterSslCertsInsertResponse--; -} - -buildUnnamed5607() { - var o = new core.List<api.SslCert>(); - o.add(buildSslCert()); - o.add(buildSslCert()); - return o; -} - -checkUnnamed5607(core.List<api.SslCert> o) { - unittest.expect(o, unittest.hasLength(2)); - checkSslCert(o[0]); - checkSslCert(o[1]); -} - -core.int buildCounterSslCertsListResponse = 0; -buildSslCertsListResponse() { - var o = new api.SslCertsListResponse(); - buildCounterSslCertsListResponse++; - if (buildCounterSslCertsListResponse < 3) { - o.items = buildUnnamed5607(); - o.kind = "foo"; - } - buildCounterSslCertsListResponse--; - return o; -} - -checkSslCertsListResponse(api.SslCertsListResponse o) { - buildCounterSslCertsListResponse++; - if (buildCounterSslCertsListResponse < 3) { - checkUnnamed5607(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterSslCertsListResponse--; -} - -buildUnnamed5608() { - var o = new core.List<core.String>(); - o.add("foo"); - o.add("foo"); - return o; -} - -checkUnnamed5608(core.List<core.String> o) { - unittest.expect(o, unittest.hasLength(2)); - unittest.expect(o[0], unittest.equals('foo')); - unittest.expect(o[1], unittest.equals('foo')); -} - -core.int buildCounterTier = 0; -buildTier() { - var o = new api.Tier(); - buildCounterTier++; - if (buildCounterTier < 3) { - o.DiskQuota = "foo"; - o.RAM = "foo"; - o.kind = "foo"; - o.region = buildUnnamed5608(); - o.tier = "foo"; - } - buildCounterTier--; - return o; -} - -checkTier(api.Tier o) { - buildCounterTier++; - if (buildCounterTier < 3) { - unittest.expect(o.DiskQuota, unittest.equals('foo')); - unittest.expect(o.RAM, unittest.equals('foo')); - unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5608(o.region); - unittest.expect(o.tier, unittest.equals('foo')); - } - buildCounterTier--; -} - -buildUnnamed5609() { - var o = new core.List<api.Tier>(); - o.add(buildTier()); - o.add(buildTier()); - return o; -} - -checkUnnamed5609(core.List<api.Tier> o) { - unittest.expect(o, unittest.hasLength(2)); - checkTier(o[0]); - checkTier(o[1]); -} - -core.int buildCounterTiersListResponse = 0; -buildTiersListResponse() { - var o = new api.TiersListResponse(); - buildCounterTiersListResponse++; - if (buildCounterTiersListResponse < 3) { - o.items = buildUnnamed5609(); - o.kind = "foo"; - } - buildCounterTiersListResponse--; - return o; -} - -checkTiersListResponse(api.TiersListResponse o) { - buildCounterTiersListResponse++; - if (buildCounterTiersListResponse < 3) { - checkUnnamed5609(o.items); - unittest.expect(o.kind, unittest.equals('foo')); - } - buildCounterTiersListResponse--; -} - -main() { - unittest.group("obj-schema-BackupConfiguration", () { - unittest.test("to-json--from-json", () { - var o = buildBackupConfiguration(); - var od = new api.BackupConfiguration.fromJson(o.toJson()); - checkBackupConfiguration(od); - }); - }); - - unittest.group("obj-schema-BackupRun", () { - unittest.test("to-json--from-json", () { - var o = buildBackupRun(); - var od = new api.BackupRun.fromJson(o.toJson()); - checkBackupRun(od); - }); - }); - - unittest.group("obj-schema-BackupRunsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildBackupRunsListResponse(); - var od = new api.BackupRunsListResponse.fromJson(o.toJson()); - checkBackupRunsListResponse(od); - }); - }); - - unittest.group("obj-schema-BinLogCoordinates", () { - unittest.test("to-json--from-json", () { - var o = buildBinLogCoordinates(); - var od = new api.BinLogCoordinates.fromJson(o.toJson()); - checkBinLogCoordinates(od); - }); - }); - - unittest.group("obj-schema-CloneContext", () { - unittest.test("to-json--from-json", () { - var o = buildCloneContext(); - var od = new api.CloneContext.fromJson(o.toJson()); - checkCloneContext(od); - }); - }); - - unittest.group("obj-schema-DatabaseFlags", () { - unittest.test("to-json--from-json", () { - var o = buildDatabaseFlags(); - var od = new api.DatabaseFlags.fromJson(o.toJson()); - checkDatabaseFlags(od); - }); - }); - - unittest.group("obj-schema-DatabaseInstance", () { - unittest.test("to-json--from-json", () { - var o = buildDatabaseInstance(); - var od = new api.DatabaseInstance.fromJson(o.toJson()); - checkDatabaseInstance(od); - }); - }); - - unittest.group("obj-schema-ExportContext", () { - unittest.test("to-json--from-json", () { - var o = buildExportContext(); - var od = new api.ExportContext.fromJson(o.toJson()); - checkExportContext(od); - }); - }); - - unittest.group("obj-schema-Flag", () { - unittest.test("to-json--from-json", () { - var o = buildFlag(); - var od = new api.Flag.fromJson(o.toJson()); - checkFlag(od); - }); - }); - - unittest.group("obj-schema-FlagsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildFlagsListResponse(); - var od = new api.FlagsListResponse.fromJson(o.toJson()); - checkFlagsListResponse(od); - }); - }); - - unittest.group("obj-schema-ImportContext", () { - unittest.test("to-json--from-json", () { - var o = buildImportContext(); - var od = new api.ImportContext.fromJson(o.toJson()); - checkImportContext(od); - }); - }); - - unittest.group("obj-schema-InstanceOperation", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceOperation(); - var od = new api.InstanceOperation.fromJson(o.toJson()); - checkInstanceOperation(od); - }); - }); - - unittest.group("obj-schema-InstanceSetRootPasswordRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstanceSetRootPasswordRequest(); - var od = new api.InstanceSetRootPasswordRequest.fromJson(o.toJson()); - checkInstanceSetRootPasswordRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesCloneRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesCloneRequest(); - var od = new api.InstancesCloneRequest.fromJson(o.toJson()); - checkInstancesCloneRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesCloneResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesCloneResponse(); - var od = new api.InstancesCloneResponse.fromJson(o.toJson()); - checkInstancesCloneResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesDeleteResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesDeleteResponse(); - var od = new api.InstancesDeleteResponse.fromJson(o.toJson()); - checkInstancesDeleteResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesExportRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesExportRequest(); - var od = new api.InstancesExportRequest.fromJson(o.toJson()); - checkInstancesExportRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesExportResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesExportResponse(); - var od = new api.InstancesExportResponse.fromJson(o.toJson()); - checkInstancesExportResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesImportRequest", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesImportRequest(); - var od = new api.InstancesImportRequest.fromJson(o.toJson()); - checkInstancesImportRequest(od); - }); - }); - - unittest.group("obj-schema-InstancesImportResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesImportResponse(); - var od = new api.InstancesImportResponse.fromJson(o.toJson()); - checkInstancesImportResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesInsertResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesInsertResponse(); - var od = new api.InstancesInsertResponse.fromJson(o.toJson()); - checkInstancesInsertResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesListResponse(); - var od = new api.InstancesListResponse.fromJson(o.toJson()); - checkInstancesListResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesPromoteReplicaResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesPromoteReplicaResponse(); - var od = new api.InstancesPromoteReplicaResponse.fromJson(o.toJson()); - checkInstancesPromoteReplicaResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesResetSslConfigResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesResetSslConfigResponse(); - var od = new api.InstancesResetSslConfigResponse.fromJson(o.toJson()); - checkInstancesResetSslConfigResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesRestartResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesRestartResponse(); - var od = new api.InstancesRestartResponse.fromJson(o.toJson()); - checkInstancesRestartResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesRestoreBackupResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesRestoreBackupResponse(); - var od = new api.InstancesRestoreBackupResponse.fromJson(o.toJson()); - checkInstancesRestoreBackupResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesSetRootPasswordResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesSetRootPasswordResponse(); - var od = new api.InstancesSetRootPasswordResponse.fromJson(o.toJson()); - checkInstancesSetRootPasswordResponse(od); - }); - }); - - unittest.group("obj-schema-InstancesUpdateResponse", () { - unittest.test("to-json--from-json", () { - var o = buildInstancesUpdateResponse(); - var od = new api.InstancesUpdateResponse.fromJson(o.toJson()); - checkInstancesUpdateResponse(od); - }); - }); - - unittest.group("obj-schema-IpConfiguration", () { - unittest.test("to-json--from-json", () { - var o = buildIpConfiguration(); - var od = new api.IpConfiguration.fromJson(o.toJson()); - checkIpConfiguration(od); - }); - }); - - unittest.group("obj-schema-IpMapping", () { - unittest.test("to-json--from-json", () { - var o = buildIpMapping(); - var od = new api.IpMapping.fromJson(o.toJson()); - checkIpMapping(od); - }); - }); - - unittest.group("obj-schema-LocationPreference", () { - unittest.test("to-json--from-json", () { - var o = buildLocationPreference(); - var od = new api.LocationPreference.fromJson(o.toJson()); - checkLocationPreference(od); - }); - }); - - unittest.group("obj-schema-OperationError", () { - unittest.test("to-json--from-json", () { - var o = buildOperationError(); - var od = new api.OperationError.fromJson(o.toJson()); - checkOperationError(od); - }); - }); - - unittest.group("obj-schema-OperationsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildOperationsListResponse(); - var od = new api.OperationsListResponse.fromJson(o.toJson()); - checkOperationsListResponse(od); - }); - }); - - unittest.group("obj-schema-SetRootPasswordContext", () { - unittest.test("to-json--from-json", () { - var o = buildSetRootPasswordContext(); - var od = new api.SetRootPasswordContext.fromJson(o.toJson()); - checkSetRootPasswordContext(od); - }); - }); - - unittest.group("obj-schema-Settings", () { - unittest.test("to-json--from-json", () { - var o = buildSettings(); - var od = new api.Settings.fromJson(o.toJson()); - checkSettings(od); - }); - }); - - unittest.group("obj-schema-SslCert", () { - unittest.test("to-json--from-json", () { - var o = buildSslCert(); - var od = new api.SslCert.fromJson(o.toJson()); - checkSslCert(od); - }); - }); - - unittest.group("obj-schema-SslCertDetail", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertDetail(); - var od = new api.SslCertDetail.fromJson(o.toJson()); - checkSslCertDetail(od); - }); - }); - - unittest.group("obj-schema-SslCertsDeleteResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsDeleteResponse(); - var od = new api.SslCertsDeleteResponse.fromJson(o.toJson()); - checkSslCertsDeleteResponse(od); - }); - }); - - unittest.group("obj-schema-SslCertsInsertRequest", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsInsertRequest(); - var od = new api.SslCertsInsertRequest.fromJson(o.toJson()); - checkSslCertsInsertRequest(od); - }); - }); - - unittest.group("obj-schema-SslCertsInsertResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsInsertResponse(); - var od = new api.SslCertsInsertResponse.fromJson(o.toJson()); - checkSslCertsInsertResponse(od); - }); - }); - - unittest.group("obj-schema-SslCertsListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildSslCertsListResponse(); - var od = new api.SslCertsListResponse.fromJson(o.toJson()); - checkSslCertsListResponse(od); - }); - }); - - unittest.group("obj-schema-Tier", () { - unittest.test("to-json--from-json", () { - var o = buildTier(); - var od = new api.Tier.fromJson(o.toJson()); - checkTier(od); - }); - }); - - unittest.group("obj-schema-TiersListResponse", () { - unittest.test("to-json--from-json", () { - var o = buildTiersListResponse(); - var od = new api.TiersListResponse.fromJson(o.toJson()); - checkTiersListResponse(od); - }); - }); - - unittest.group("resource-BackupRunsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_dueTime = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/backupRuns/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("/backupRuns/")); - pathOffset += 12; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_backupConfiguration")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect( - queryMap["dueTime"].first, unittest.equals(arg_dueTime)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildBackupRun()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkBackupRun(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/backupRuns", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/backupRuns")); - pathOffset += 11; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["backupConfiguration"].first, - unittest.equals(arg_backupConfiguration)); - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildBackupRunsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, arg_backupConfiguration, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkBackupRunsListResponse(response); - }))); - }); - }); - - unittest.group("resource-FlagsResourceApi", () { - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.FlagsResourceApi res = new api.SqladminApi(mock).flags; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 5), - unittest.equals("flags")); - pathOffset += 5; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildFlagsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res.list($fields: arg_$fields).then(unittest.expectAsync1(((response) { - checkFlagsListResponse(response); - }))); - }); - }); - - unittest.group("resource-InstancesResourceApi", () { - unittest.test("method--clone", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesCloneRequest(); - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesCloneRequest.fromJson(json); - checkInstancesCloneRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/clone", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 16), - unittest.equals("/instances/clone")); - pathOffset += 16; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesCloneResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .clone(arg_request, arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesCloneResponse(response); - }))); - }); - - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesDeleteResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesDeleteResponse(response); - }))); - }); - - unittest.test("method--export", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesExportRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesExportRequest.fromJson(json); - checkInstancesExportRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/export", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 7), - unittest.equals("/export")); - pathOffset += 7; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesExportResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .export(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesExportResponse(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildDatabaseInstance()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkDatabaseInstance(response); - }))); - }); - - unittest.test("method--import", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstancesImportRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstancesImportRequest.fromJson(json); - checkInstancesImportRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/import", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 7), - unittest.equals("/import")); - pathOffset += 7; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesImportResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .import(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesImportResponse(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/instances")); - pathOffset += 10; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesInsertResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesInsertResponse(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/instances")); - pathOffset += 10; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesListResponse(response); - }))); - }); - - unittest.test("method--patch", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesUpdateResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .patch(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesUpdateResponse(response); - }))); - }); - - unittest.test("method--promoteReplica", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/promoteReplica", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 15), - unittest.equals("/promoteReplica")); - pathOffset += 15; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesPromoteReplicaResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .promoteReplica(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesPromoteReplicaResponse(response); - }))); - }); - - unittest.test("method--resetSslConfig", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/resetSslConfig", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 15), - unittest.equals("/resetSslConfig")); - pathOffset += 15; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesResetSslConfigResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .resetSslConfig(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesResetSslConfigResponse(response); - }))); - }); - - unittest.test("method--restart", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/restart", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 8), - unittest.equals("/restart")); - pathOffset += 8; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesRestartResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .restart(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesRestartResponse(response); - }))); - }); - - unittest.test("method--restoreBackup", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_backupConfiguration = "foo"; - var arg_dueTime = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/restoreBackup", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 14), - unittest.equals("/restoreBackup")); - pathOffset += 14; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["backupConfiguration"].first, - unittest.equals(arg_backupConfiguration)); - unittest.expect( - queryMap["dueTime"].first, unittest.equals(arg_dueTime)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesRestoreBackupResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .restoreBackup( - arg_project, arg_instance, arg_backupConfiguration, arg_dueTime, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesRestoreBackupResponse(response); - }))); - }); - - unittest.test("method--setRootPassword", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildInstanceSetRootPasswordRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); - checkInstanceSetRootPasswordRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/setRootPassword", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 16), - unittest.equals("/setRootPassword")); - pathOffset += 16; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesSetRootPasswordResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .setRootPassword(arg_request, arg_project, arg_instance, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesSetRootPasswordResponse(response); - }))); - }); - - unittest.test("method--update", () { - var mock = new HttpServerMock(); - api.InstancesResourceApi res = new api.SqladminApi(mock).instances; - var arg_request = buildDatabaseInstance(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.DatabaseInstance.fromJson(json); - checkDatabaseInstance(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_instance")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstancesUpdateResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .update(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstancesUpdateResponse(response); - }))); - }); - }); - - unittest.group("resource-OperationsResourceApi", () { - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SqladminApi(mock).operations; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_operation = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/operations/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("/operations/")); - pathOffset += 12; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_operation")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildInstanceOperation()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_operation, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkInstanceOperation(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.OperationsResourceApi res = new api.SqladminApi(mock).operations; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_maxResults = 42; - var arg_pageToken = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/operations", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/operations")); - pathOffset += 11; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(core.int.parse(queryMap["maxResults"].first), - unittest.equals(arg_maxResults)); - unittest.expect( - queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildOperationsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, - maxResults: arg_maxResults, - pageToken: arg_pageToken, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkOperationsListResponse(response); - }))); - }); - }); - - unittest.group("resource-SslCertsResourceApi", () { - unittest.test("method--delete", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_sha1Fingerprint = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/sslCerts/")); - pathOffset += 10; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_sha1Fingerprint")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsDeleteResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .delete(arg_project, arg_instance, arg_sha1Fingerprint, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsDeleteResponse(response); - }))); - }); - - unittest.test("method--get", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_sha1Fingerprint = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 10), - unittest.equals("/sslCerts/")); - pathOffset += 10; - subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); - pathOffset = path.length; - unittest.expect(subPart, unittest.equals("$arg_sha1Fingerprint")); - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCert()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .get(arg_project, arg_instance, arg_sha1Fingerprint, - $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCert(response); - }))); - }); - - unittest.test("method--insert", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_request = buildSslCertsInsertRequest(); - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var obj = new api.SslCertsInsertRequest.fromJson(json); - checkSslCertsInsertRequest(obj); - - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("/sslCerts")); - pathOffset += 9; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsInsertResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .insert(arg_request, arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsInsertResponse(response); - }))); - }); - - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; - var arg_project = "foo"; - var arg_instance = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/instances/", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 11), - unittest.equals("/instances/")); - pathOffset += 11; - index = path.indexOf("/sslCerts", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_instance")); - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("/sslCerts")); - pathOffset += 9; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildSslCertsListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, arg_instance, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkSslCertsListResponse(response); - }))); - }); - }); - - unittest.group("resource-TiersResourceApi", () { - unittest.test("method--list", () { - var mock = new HttpServerMock(); - api.TiersResourceApi res = new api.SqladminApi(mock).tiers; - var arg_project = "foo"; - var arg_$fields = "foo"; - mock.register(unittest.expectAsync2((http.BaseRequest req, json) { - var path = (req.url).path; - var pathOffset = 0; - var index; - var subPart; - unittest.expect( - path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); - pathOffset += 1; - unittest.expect(path.substring(pathOffset, pathOffset + 12), - unittest.equals("sql/v1beta3/")); - pathOffset += 12; - unittest.expect(path.substring(pathOffset, pathOffset + 9), - unittest.equals("projects/")); - pathOffset += 9; - index = path.indexOf("/tiers", pathOffset); - unittest.expect(index >= 0, unittest.isTrue); - subPart = - core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); - pathOffset = index; - unittest.expect(subPart, unittest.equals("$arg_project")); - unittest.expect(path.substring(pathOffset, pathOffset + 6), - unittest.equals("/tiers")); - pathOffset += 6; - - var query = (req.url).query; - var queryOffset = 0; - var queryMap = <core.String, core.List<core.String>>{}; - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); - parseBool(n) { - if (n == "true") return true; - if (n == "false") return false; - if (n == null) return null; - throw new core.ArgumentError("Invalid boolean: $n"); - } - - if (query.length > 0) { - for (var part in query.split("&")) { - var keyvalue = part.split("="); - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), - core.Uri.decodeQueryComponent(keyvalue[1])); - } - } - unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); - - var h = { - "content-type": "application/json; charset=utf-8", - }; - var resp = convert.json.encode(buildTiersListResponse()); - return new async.Future.value(stringResponse(200, h, resp)); - }), true); - res - .list(arg_project, $fields: arg_$fields) - .then(unittest.expectAsync1(((response) { - checkTiersListResponse(response); - }))); - }); - }); -}
diff --git a/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart b/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart index 445b9b4..b24dec6 100644 --- a/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart +++ b/generated/googleapis_beta/test/sqladmin/v1beta4_test.dart
@@ -76,6 +76,27 @@ buildCounterAclEntry--; } +core.int buildCounterApiWarning = 0; +buildApiWarning() { + var o = new api.ApiWarning(); + buildCounterApiWarning++; + if (buildCounterApiWarning < 3) { + o.code = "foo"; + o.message = "foo"; + } + buildCounterApiWarning--; + return o; +} + +checkApiWarning(api.ApiWarning o) { + buildCounterApiWarning++; + if (buildCounterApiWarning < 3) { + unittest.expect(o.code, unittest.equals('foo')); + unittest.expect(o.message, unittest.equals('foo')); + } + buildCounterApiWarning--; +} + core.int buildCounterBackupConfiguration = 0; buildBackupConfiguration() { var o = new api.BackupConfiguration(); @@ -148,14 +169,14 @@ buildCounterBackupRun--; } -buildUnnamed5263() { +buildUnnamed5035() { var o = new core.List<api.BackupRun>(); o.add(buildBackupRun()); o.add(buildBackupRun()); return o; } -checkUnnamed5263(core.List<api.BackupRun> o) { +checkUnnamed5035(core.List<api.BackupRun> o) { unittest.expect(o, unittest.hasLength(2)); checkBackupRun(o[0]); checkBackupRun(o[1]); @@ -166,7 +187,7 @@ var o = new api.BackupRunsListResponse(); buildCounterBackupRunsListResponse++; if (buildCounterBackupRunsListResponse < 3) { - o.items = buildUnnamed5263(); + o.items = buildUnnamed5035(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -177,7 +198,7 @@ checkBackupRunsListResponse(api.BackupRunsListResponse o) { buildCounterBackupRunsListResponse++; if (buildCounterBackupRunsListResponse < 3) { - checkUnnamed5263(o.items); + checkUnnamed5035(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -307,40 +328,40 @@ buildCounterDatabaseInstanceFailoverReplica--; } -buildUnnamed5264() { +buildUnnamed5036() { var o = new core.List<api.IpMapping>(); o.add(buildIpMapping()); o.add(buildIpMapping()); return o; } -checkUnnamed5264(core.List<api.IpMapping> o) { +checkUnnamed5036(core.List<api.IpMapping> o) { unittest.expect(o, unittest.hasLength(2)); checkIpMapping(o[0]); checkIpMapping(o[1]); } -buildUnnamed5265() { +buildUnnamed5037() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5265(core.List<core.String> o) { +checkUnnamed5037(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5266() { +buildUnnamed5038() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5266(core.List<core.String> o) { +checkUnnamed5038(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -359,7 +380,7 @@ o.failoverReplica = buildDatabaseInstanceFailoverReplica(); o.gceZone = "foo"; o.instanceType = "foo"; - o.ipAddresses = buildUnnamed5264(); + o.ipAddresses = buildUnnamed5036(); o.ipv6Address = "foo"; o.kind = "foo"; o.masterInstanceName = "foo"; @@ -369,13 +390,13 @@ o.project = "foo"; o.region = "foo"; o.replicaConfiguration = buildReplicaConfiguration(); - o.replicaNames = buildUnnamed5265(); + o.replicaNames = buildUnnamed5037(); o.selfLink = "foo"; o.serverCaCert = buildSslCert(); o.serviceAccountEmailAddress = "foo"; o.settings = buildSettings(); o.state = "foo"; - o.suspensionReason = buildUnnamed5266(); + o.suspensionReason = buildUnnamed5038(); } buildCounterDatabaseInstance--; return o; @@ -392,7 +413,7 @@ checkDatabaseInstanceFailoverReplica(o.failoverReplica); unittest.expect(o.gceZone, unittest.equals('foo')); unittest.expect(o.instanceType, unittest.equals('foo')); - checkUnnamed5264(o.ipAddresses); + checkUnnamed5036(o.ipAddresses); unittest.expect(o.ipv6Address, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.masterInstanceName, unittest.equals('foo')); @@ -402,25 +423,25 @@ unittest.expect(o.project, unittest.equals('foo')); unittest.expect(o.region, unittest.equals('foo')); checkReplicaConfiguration(o.replicaConfiguration); - checkUnnamed5265(o.replicaNames); + checkUnnamed5037(o.replicaNames); unittest.expect(o.selfLink, unittest.equals('foo')); checkSslCert(o.serverCaCert); unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); checkSettings(o.settings); unittest.expect(o.state, unittest.equals('foo')); - checkUnnamed5266(o.suspensionReason); + checkUnnamed5038(o.suspensionReason); } buildCounterDatabaseInstance--; } -buildUnnamed5267() { +buildUnnamed5039() { var o = new core.List<api.Database>(); o.add(buildDatabase()); o.add(buildDatabase()); return o; } -checkUnnamed5267(core.List<api.Database> o) { +checkUnnamed5039(core.List<api.Database> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabase(o[0]); checkDatabase(o[1]); @@ -431,7 +452,7 @@ var o = new api.DatabasesListResponse(); buildCounterDatabasesListResponse++; if (buildCounterDatabasesListResponse < 3) { - o.items = buildUnnamed5267(); + o.items = buildUnnamed5039(); o.kind = "foo"; } buildCounterDatabasesListResponse--; @@ -441,7 +462,7 @@ checkDatabasesListResponse(api.DatabasesListResponse o) { buildCounterDatabasesListResponse++; if (buildCounterDatabasesListResponse < 3) { - checkUnnamed5267(o.items); + checkUnnamed5039(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterDatabasesListResponse--; @@ -542,27 +563,47 @@ buildCounterExportContextCsvExportOptions--; } -buildUnnamed5268() { +buildUnnamed5040() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5268(core.List<core.String> o) { +checkUnnamed5040(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5269() { +core.int buildCounterExportContextSqlExportOptionsMysqlExportOptions = 0; +buildExportContextSqlExportOptionsMysqlExportOptions() { + var o = new api.ExportContextSqlExportOptionsMysqlExportOptions(); + buildCounterExportContextSqlExportOptionsMysqlExportOptions++; + if (buildCounterExportContextSqlExportOptionsMysqlExportOptions < 3) { + o.masterData = 42; + } + buildCounterExportContextSqlExportOptionsMysqlExportOptions--; + return o; +} + +checkExportContextSqlExportOptionsMysqlExportOptions( + api.ExportContextSqlExportOptionsMysqlExportOptions o) { + buildCounterExportContextSqlExportOptionsMysqlExportOptions++; + if (buildCounterExportContextSqlExportOptionsMysqlExportOptions < 3) { + unittest.expect(o.masterData, unittest.equals(42)); + } + buildCounterExportContextSqlExportOptionsMysqlExportOptions--; +} + +buildUnnamed5041() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5269(core.List<core.String> o) { +checkUnnamed5041(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -573,8 +614,10 @@ var o = new api.ExportContextSqlExportOptions(); buildCounterExportContextSqlExportOptions++; if (buildCounterExportContextSqlExportOptions < 3) { + o.mysqlExportOptions = + buildExportContextSqlExportOptionsMysqlExportOptions(); o.schemaOnly = true; - o.tables = buildUnnamed5269(); + o.tables = buildUnnamed5041(); } buildCounterExportContextSqlExportOptions--; return o; @@ -583,8 +626,9 @@ checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { buildCounterExportContextSqlExportOptions++; if (buildCounterExportContextSqlExportOptions < 3) { + checkExportContextSqlExportOptionsMysqlExportOptions(o.mysqlExportOptions); unittest.expect(o.schemaOnly, unittest.isTrue); - checkUnnamed5269(o.tables); + checkUnnamed5041(o.tables); } buildCounterExportContextSqlExportOptions--; } @@ -595,7 +639,7 @@ buildCounterExportContext++; if (buildCounterExportContext < 3) { o.csvExportOptions = buildExportContextCsvExportOptions(); - o.databases = buildUnnamed5268(); + o.databases = buildUnnamed5040(); o.fileType = "foo"; o.kind = "foo"; o.sqlExportOptions = buildExportContextSqlExportOptions(); @@ -609,7 +653,7 @@ buildCounterExportContext++; if (buildCounterExportContext < 3) { checkExportContextCsvExportOptions(o.csvExportOptions); - checkUnnamed5268(o.databases); + checkUnnamed5040(o.databases); unittest.expect(o.fileType, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); checkExportContextSqlExportOptions(o.sqlExportOptions); @@ -639,27 +683,27 @@ buildCounterFailoverContext--; } -buildUnnamed5270() { +buildUnnamed5042() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5270(core.List<core.String> o) { +checkUnnamed5042(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5271() { +buildUnnamed5043() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5271(core.List<core.String> o) { +checkUnnamed5043(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -670,8 +714,8 @@ var o = new api.Flag(); buildCounterFlag++; if (buildCounterFlag < 3) { - o.allowedStringValues = buildUnnamed5270(); - o.appliesTo = buildUnnamed5271(); + o.allowedStringValues = buildUnnamed5042(); + o.appliesTo = buildUnnamed5043(); o.kind = "foo"; o.maxValue = "foo"; o.minValue = "foo"; @@ -686,8 +730,8 @@ checkFlag(api.Flag o) { buildCounterFlag++; if (buildCounterFlag < 3) { - checkUnnamed5270(o.allowedStringValues); - checkUnnamed5271(o.appliesTo); + checkUnnamed5042(o.allowedStringValues); + checkUnnamed5043(o.appliesTo); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.maxValue, unittest.equals('foo')); unittest.expect(o.minValue, unittest.equals('foo')); @@ -698,14 +742,14 @@ buildCounterFlag--; } -buildUnnamed5272() { +buildUnnamed5044() { var o = new core.List<api.Flag>(); o.add(buildFlag()); o.add(buildFlag()); return o; } -checkUnnamed5272(core.List<api.Flag> o) { +checkUnnamed5044(core.List<api.Flag> o) { unittest.expect(o, unittest.hasLength(2)); checkFlag(o[0]); checkFlag(o[1]); @@ -716,7 +760,7 @@ var o = new api.FlagsListResponse(); buildCounterFlagsListResponse++; if (buildCounterFlagsListResponse < 3) { - o.items = buildUnnamed5272(); + o.items = buildUnnamed5044(); o.kind = "foo"; } buildCounterFlagsListResponse--; @@ -726,20 +770,20 @@ checkFlagsListResponse(api.FlagsListResponse o) { buildCounterFlagsListResponse++; if (buildCounterFlagsListResponse < 3) { - checkUnnamed5272(o.items); + checkUnnamed5044(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterFlagsListResponse--; } -buildUnnamed5273() { +buildUnnamed5045() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5273(core.List<core.String> o) { +checkUnnamed5045(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -750,7 +794,7 @@ var o = new api.ImportContextCsvImportOptions(); buildCounterImportContextCsvImportOptions++; if (buildCounterImportContextCsvImportOptions < 3) { - o.columns = buildUnnamed5273(); + o.columns = buildUnnamed5045(); o.table = "foo"; } buildCounterImportContextCsvImportOptions--; @@ -760,7 +804,7 @@ checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { buildCounterImportContextCsvImportOptions++; if (buildCounterImportContextCsvImportOptions < 3) { - checkUnnamed5273(o.columns); + checkUnnamed5045(o.columns); unittest.expect(o.table, unittest.equals('foo')); } buildCounterImportContextCsvImportOptions--; @@ -890,27 +934,41 @@ buildCounterInstancesImportRequest--; } -buildUnnamed5274() { +buildUnnamed5046() { var o = new core.List<api.DatabaseInstance>(); o.add(buildDatabaseInstance()); o.add(buildDatabaseInstance()); return o; } -checkUnnamed5274(core.List<api.DatabaseInstance> o) { +checkUnnamed5046(core.List<api.DatabaseInstance> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabaseInstance(o[0]); checkDatabaseInstance(o[1]); } +buildUnnamed5047() { + var o = new core.List<api.ApiWarning>(); + o.add(buildApiWarning()); + o.add(buildApiWarning()); + return o; +} + +checkUnnamed5047(core.List<api.ApiWarning> o) { + unittest.expect(o, unittest.hasLength(2)); + checkApiWarning(o[0]); + checkApiWarning(o[1]); +} + core.int buildCounterInstancesListResponse = 0; buildInstancesListResponse() { var o = new api.InstancesListResponse(); buildCounterInstancesListResponse++; if (buildCounterInstancesListResponse < 3) { - o.items = buildUnnamed5274(); + o.items = buildUnnamed5046(); o.kind = "foo"; o.nextPageToken = "foo"; + o.warnings = buildUnnamed5047(); } buildCounterInstancesListResponse--; return o; @@ -919,21 +977,22 @@ checkInstancesListResponse(api.InstancesListResponse o) { buildCounterInstancesListResponse++; if (buildCounterInstancesListResponse < 3) { - checkUnnamed5274(o.items); + checkUnnamed5046(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); + checkUnnamed5047(o.warnings); } buildCounterInstancesListResponse--; } -buildUnnamed5275() { +buildUnnamed5048() { var o = new core.List<api.SslCert>(); o.add(buildSslCert()); o.add(buildSslCert()); return o; } -checkUnnamed5275(core.List<api.SslCert> o) { +checkUnnamed5048(core.List<api.SslCert> o) { unittest.expect(o, unittest.hasLength(2)); checkSslCert(o[0]); checkSslCert(o[1]); @@ -945,7 +1004,7 @@ buildCounterInstancesListServerCasResponse++; if (buildCounterInstancesListServerCasResponse < 3) { o.activeVersion = "foo"; - o.certs = buildUnnamed5275(); + o.certs = buildUnnamed5048(); o.kind = "foo"; } buildCounterInstancesListServerCasResponse--; @@ -956,7 +1015,7 @@ buildCounterInstancesListServerCasResponse++; if (buildCounterInstancesListServerCasResponse < 3) { unittest.expect(o.activeVersion, unittest.equals('foo')); - checkUnnamed5275(o.certs); + checkUnnamed5048(o.certs); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterInstancesListServerCasResponse--; @@ -1019,14 +1078,14 @@ buildCounterInstancesTruncateLogRequest--; } -buildUnnamed5276() { +buildUnnamed5049() { var o = new core.List<api.AclEntry>(); o.add(buildAclEntry()); o.add(buildAclEntry()); return o; } -checkUnnamed5276(core.List<api.AclEntry> o) { +checkUnnamed5049(core.List<api.AclEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkAclEntry(o[0]); checkAclEntry(o[1]); @@ -1037,7 +1096,7 @@ var o = new api.IpConfiguration(); buildCounterIpConfiguration++; if (buildCounterIpConfiguration < 3) { - o.authorizedNetworks = buildUnnamed5276(); + o.authorizedNetworks = buildUnnamed5049(); o.ipv4Enabled = true; o.privateNetwork = "foo"; o.requireSsl = true; @@ -1049,7 +1108,7 @@ checkIpConfiguration(api.IpConfiguration o) { buildCounterIpConfiguration++; if (buildCounterIpConfiguration < 3) { - checkUnnamed5276(o.authorizedNetworks); + checkUnnamed5049(o.authorizedNetworks); unittest.expect(o.ipv4Enabled, unittest.isTrue); unittest.expect(o.privateNetwork, unittest.equals('foo')); unittest.expect(o.requireSsl, unittest.isTrue); @@ -1262,14 +1321,14 @@ buildCounterOperationError--; } -buildUnnamed5277() { +buildUnnamed5050() { var o = new core.List<api.OperationError>(); o.add(buildOperationError()); o.add(buildOperationError()); return o; } -checkUnnamed5277(core.List<api.OperationError> o) { +checkUnnamed5050(core.List<api.OperationError> o) { unittest.expect(o, unittest.hasLength(2)); checkOperationError(o[0]); checkOperationError(o[1]); @@ -1280,7 +1339,7 @@ var o = new api.OperationErrors(); buildCounterOperationErrors++; if (buildCounterOperationErrors < 3) { - o.errors = buildUnnamed5277(); + o.errors = buildUnnamed5050(); o.kind = "foo"; } buildCounterOperationErrors--; @@ -1290,20 +1349,20 @@ checkOperationErrors(api.OperationErrors o) { buildCounterOperationErrors++; if (buildCounterOperationErrors < 3) { - checkUnnamed5277(o.errors); + checkUnnamed5050(o.errors); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterOperationErrors--; } -buildUnnamed5278() { +buildUnnamed5051() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5278(core.List<api.Operation> o) { +checkUnnamed5051(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -1314,7 +1373,7 @@ var o = new api.OperationsListResponse(); buildCounterOperationsListResponse++; if (buildCounterOperationsListResponse < 3) { - o.items = buildUnnamed5278(); + o.items = buildUnnamed5051(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -1325,7 +1384,7 @@ checkOperationsListResponse(api.OperationsListResponse o) { buildCounterOperationsListResponse++; if (buildCounterOperationsListResponse < 3) { - checkUnnamed5278(o.items); + checkUnnamed5051(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -1399,40 +1458,40 @@ buildCounterRotateServerCaContext--; } -buildUnnamed5279() { +buildUnnamed5052() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5279(core.List<core.String> o) { +checkUnnamed5052(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5280() { +buildUnnamed5053() { var o = new core.List<api.DatabaseFlags>(); o.add(buildDatabaseFlags()); o.add(buildDatabaseFlags()); return o; } -checkUnnamed5280(core.List<api.DatabaseFlags> o) { +checkUnnamed5053(core.List<api.DatabaseFlags> o) { unittest.expect(o, unittest.hasLength(2)); checkDatabaseFlags(o[0]); checkDatabaseFlags(o[1]); } -buildUnnamed5281() { +buildUnnamed5054() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5281(core.Map<core.String, core.String> o) { +checkUnnamed5054(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); @@ -1444,13 +1503,13 @@ buildCounterSettings++; if (buildCounterSettings < 3) { o.activationPolicy = "foo"; - o.authorizedGaeApplications = buildUnnamed5279(); + o.authorizedGaeApplications = buildUnnamed5052(); o.availabilityType = "foo"; o.backupConfiguration = buildBackupConfiguration(); o.crashSafeReplicationEnabled = true; o.dataDiskSizeGb = "foo"; o.dataDiskType = "foo"; - o.databaseFlags = buildUnnamed5280(); + o.databaseFlags = buildUnnamed5053(); o.databaseReplicationEnabled = true; o.ipConfiguration = buildIpConfiguration(); o.kind = "foo"; @@ -1462,7 +1521,7 @@ o.storageAutoResize = true; o.storageAutoResizeLimit = "foo"; o.tier = "foo"; - o.userLabels = buildUnnamed5281(); + o.userLabels = buildUnnamed5054(); } buildCounterSettings--; return o; @@ -1472,13 +1531,13 @@ buildCounterSettings++; if (buildCounterSettings < 3) { unittest.expect(o.activationPolicy, unittest.equals('foo')); - checkUnnamed5279(o.authorizedGaeApplications); + checkUnnamed5052(o.authorizedGaeApplications); unittest.expect(o.availabilityType, unittest.equals('foo')); checkBackupConfiguration(o.backupConfiguration); unittest.expect(o.crashSafeReplicationEnabled, unittest.isTrue); unittest.expect(o.dataDiskSizeGb, unittest.equals('foo')); unittest.expect(o.dataDiskType, unittest.equals('foo')); - checkUnnamed5280(o.databaseFlags); + checkUnnamed5053(o.databaseFlags); unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); checkIpConfiguration(o.ipConfiguration); unittest.expect(o.kind, unittest.equals('foo')); @@ -1490,7 +1549,7 @@ unittest.expect(o.storageAutoResize, unittest.isTrue); unittest.expect(o.storageAutoResizeLimit, unittest.equals('foo')); unittest.expect(o.tier, unittest.equals('foo')); - checkUnnamed5281(o.userLabels); + checkUnnamed5054(o.userLabels); } buildCounterSettings--; } @@ -1616,14 +1675,14 @@ buildCounterSslCertsInsertResponse--; } -buildUnnamed5282() { +buildUnnamed5055() { var o = new core.List<api.SslCert>(); o.add(buildSslCert()); o.add(buildSslCert()); return o; } -checkUnnamed5282(core.List<api.SslCert> o) { +checkUnnamed5055(core.List<api.SslCert> o) { unittest.expect(o, unittest.hasLength(2)); checkSslCert(o[0]); checkSslCert(o[1]); @@ -1634,7 +1693,7 @@ var o = new api.SslCertsListResponse(); buildCounterSslCertsListResponse++; if (buildCounterSslCertsListResponse < 3) { - o.items = buildUnnamed5282(); + o.items = buildUnnamed5055(); o.kind = "foo"; } buildCounterSslCertsListResponse--; @@ -1644,20 +1703,20 @@ checkSslCertsListResponse(api.SslCertsListResponse o) { buildCounterSslCertsListResponse++; if (buildCounterSslCertsListResponse < 3) { - checkUnnamed5282(o.items); + checkUnnamed5055(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterSslCertsListResponse--; } -buildUnnamed5283() { +buildUnnamed5056() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5283(core.List<core.String> o) { +checkUnnamed5056(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -1671,7 +1730,7 @@ o.DiskQuota = "foo"; o.RAM = "foo"; o.kind = "foo"; - o.region = buildUnnamed5283(); + o.region = buildUnnamed5056(); o.tier = "foo"; } buildCounterTier--; @@ -1684,20 +1743,20 @@ unittest.expect(o.DiskQuota, unittest.equals('foo')); unittest.expect(o.RAM, unittest.equals('foo')); unittest.expect(o.kind, unittest.equals('foo')); - checkUnnamed5283(o.region); + checkUnnamed5056(o.region); unittest.expect(o.tier, unittest.equals('foo')); } buildCounterTier--; } -buildUnnamed5284() { +buildUnnamed5057() { var o = new core.List<api.Tier>(); o.add(buildTier()); o.add(buildTier()); return o; } -checkUnnamed5284(core.List<api.Tier> o) { +checkUnnamed5057(core.List<api.Tier> o) { unittest.expect(o, unittest.hasLength(2)); checkTier(o[0]); checkTier(o[1]); @@ -1708,7 +1767,7 @@ var o = new api.TiersListResponse(); buildCounterTiersListResponse++; if (buildCounterTiersListResponse < 3) { - o.items = buildUnnamed5284(); + o.items = buildUnnamed5057(); o.kind = "foo"; } buildCounterTiersListResponse--; @@ -1718,7 +1777,7 @@ checkTiersListResponse(api.TiersListResponse o) { buildCounterTiersListResponse++; if (buildCounterTiersListResponse < 3) { - checkUnnamed5284(o.items); + checkUnnamed5057(o.items); unittest.expect(o.kind, unittest.equals('foo')); } buildCounterTiersListResponse--; @@ -1776,14 +1835,14 @@ buildCounterUser--; } -buildUnnamed5285() { +buildUnnamed5058() { var o = new core.List<api.User>(); o.add(buildUser()); o.add(buildUser()); return o; } -checkUnnamed5285(core.List<api.User> o) { +checkUnnamed5058(core.List<api.User> o) { unittest.expect(o, unittest.hasLength(2)); checkUser(o[0]); checkUser(o[1]); @@ -1794,7 +1853,7 @@ var o = new api.UsersListResponse(); buildCounterUsersListResponse++; if (buildCounterUsersListResponse < 3) { - o.items = buildUnnamed5285(); + o.items = buildUnnamed5058(); o.kind = "foo"; o.nextPageToken = "foo"; } @@ -1805,7 +1864,7 @@ checkUsersListResponse(api.UsersListResponse o) { buildCounterUsersListResponse++; if (buildCounterUsersListResponse < 3) { - checkUnnamed5285(o.items); + checkUnnamed5058(o.items); unittest.expect(o.kind, unittest.equals('foo')); unittest.expect(o.nextPageToken, unittest.equals('foo')); } @@ -1821,6 +1880,14 @@ }); }); + unittest.group("obj-schema-ApiWarning", () { + unittest.test("to-json--from-json", () { + var o = buildApiWarning(); + var od = new api.ApiWarning.fromJson(o.toJson()); + checkApiWarning(od); + }); + }); + unittest.group("obj-schema-BackupConfiguration", () { unittest.test("to-json--from-json", () { var o = buildBackupConfiguration(); @@ -1934,6 +2001,16 @@ }); }); + unittest.group("obj-schema-ExportContextSqlExportOptionsMysqlExportOptions", + () { + unittest.test("to-json--from-json", () { + var o = buildExportContextSqlExportOptionsMysqlExportOptions(); + var od = new api.ExportContextSqlExportOptionsMysqlExportOptions.fromJson( + o.toJson()); + checkExportContextSqlExportOptionsMysqlExportOptions(od); + }); + }); + unittest.group("obj-schema-ExportContextSqlExportOptions", () { unittest.test("to-json--from-json", () { var o = buildExportContextSqlExportOptions(); @@ -5452,8 +5529,8 @@ var arg_request = buildUser(); var arg_project = "foo"; var arg_instance = "foo"; - var arg_host = "foo"; var arg_name = "foo"; + var arg_host = "foo"; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var obj = new api.User.fromJson(json); @@ -5509,8 +5586,8 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); + unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -5520,8 +5597,8 @@ return new async.Future.value(stringResponse(200, h, resp)); }), true); res - .update(arg_request, arg_project, arg_instance, arg_host, arg_name, - $fields: arg_$fields) + .update(arg_request, arg_project, arg_instance, arg_name, + host: arg_host, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkOperation(response); })));
diff --git a/generated/googleapis_beta/test/toolresults/v1beta3_test.dart b/generated/googleapis_beta/test/toolresults/v1beta3_test.dart index 596a830..80d1b9c 100644 --- a/generated/googleapis_beta/test/toolresults/v1beta3_test.dart +++ b/generated/googleapis_beta/test/toolresults/v1beta3_test.dart
@@ -75,14 +75,14 @@ buildCounterAndroidAppInfo--; } -buildUnnamed5069() { +buildUnnamed4293() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5069(core.List<core.String> o) { +checkUnnamed4293(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -95,7 +95,7 @@ if (buildCounterAndroidInstrumentationTest < 3) { o.testPackageId = "foo"; o.testRunnerClass = "foo"; - o.testTargets = buildUnnamed5069(); + o.testTargets = buildUnnamed4293(); o.useOrchestrator = true; } buildCounterAndroidInstrumentationTest--; @@ -107,7 +107,7 @@ if (buildCounterAndroidInstrumentationTest < 3) { unittest.expect(o.testPackageId, unittest.equals('foo')); unittest.expect(o.testRunnerClass, unittest.equals('foo')); - checkUnnamed5069(o.testTargets); + checkUnnamed4293(o.testTargets); unittest.expect(o.useOrchestrator, unittest.isTrue); } buildCounterAndroidInstrumentationTest--; @@ -230,14 +230,14 @@ buildCounterBasicPerfSampleSeries--; } -buildUnnamed5070() { +buildUnnamed4294() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5070(core.List<api.PerfSample> o) { +checkUnnamed4294(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -248,7 +248,7 @@ var o = new api.BatchCreatePerfSamplesRequest(); buildCounterBatchCreatePerfSamplesRequest++; if (buildCounterBatchCreatePerfSamplesRequest < 3) { - o.perfSamples = buildUnnamed5070(); + o.perfSamples = buildUnnamed4294(); } buildCounterBatchCreatePerfSamplesRequest--; return o; @@ -257,19 +257,19 @@ checkBatchCreatePerfSamplesRequest(api.BatchCreatePerfSamplesRequest o) { buildCounterBatchCreatePerfSamplesRequest++; if (buildCounterBatchCreatePerfSamplesRequest < 3) { - checkUnnamed5070(o.perfSamples); + checkUnnamed4294(o.perfSamples); } buildCounterBatchCreatePerfSamplesRequest--; } -buildUnnamed5071() { +buildUnnamed4295() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5071(core.List<api.PerfSample> o) { +checkUnnamed4295(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -280,7 +280,7 @@ var o = new api.BatchCreatePerfSamplesResponse(); buildCounterBatchCreatePerfSamplesResponse++; if (buildCounterBatchCreatePerfSamplesResponse < 3) { - o.perfSamples = buildUnnamed5071(); + o.perfSamples = buildUnnamed4295(); } buildCounterBatchCreatePerfSamplesResponse--; return o; @@ -289,7 +289,7 @@ checkBatchCreatePerfSamplesResponse(api.BatchCreatePerfSamplesResponse o) { buildCounterBatchCreatePerfSamplesResponse++; if (buildCounterBatchCreatePerfSamplesResponse < 3) { - checkUnnamed5071(o.perfSamples); + checkUnnamed4295(o.perfSamples); } buildCounterBatchCreatePerfSamplesResponse--; } @@ -415,14 +415,14 @@ buildCounterFileReference--; } -buildUnnamed5072() { +buildUnnamed4296() { var o = new core.List<api.GraphicsStatsBucket>(); o.add(buildGraphicsStatsBucket()); o.add(buildGraphicsStatsBucket()); return o; } -checkUnnamed5072(core.List<api.GraphicsStatsBucket> o) { +checkUnnamed4296(core.List<api.GraphicsStatsBucket> o) { unittest.expect(o, unittest.hasLength(2)); checkGraphicsStatsBucket(o[0]); checkGraphicsStatsBucket(o[1]); @@ -433,7 +433,7 @@ var o = new api.GraphicsStats(); buildCounterGraphicsStats++; if (buildCounterGraphicsStats < 3) { - o.buckets = buildUnnamed5072(); + o.buckets = buildUnnamed4296(); o.highInputLatencyCount = "foo"; o.jankyFrames = "foo"; o.missedVsyncCount = "foo"; @@ -453,7 +453,7 @@ checkGraphicsStats(api.GraphicsStats o) { buildCounterGraphicsStats++; if (buildCounterGraphicsStats < 3) { - checkUnnamed5072(o.buckets); + checkUnnamed4296(o.buckets); unittest.expect(o.highInputLatencyCount, unittest.equals('foo')); unittest.expect(o.jankyFrames, unittest.equals('foo')); unittest.expect(o.missedVsyncCount, unittest.equals('foo')); @@ -559,14 +559,14 @@ buildCounterInconclusiveDetail--; } -buildUnnamed5073() { +buildUnnamed4297() { var o = new core.List<api.Execution>(); o.add(buildExecution()); o.add(buildExecution()); return o; } -checkUnnamed5073(core.List<api.Execution> o) { +checkUnnamed4297(core.List<api.Execution> o) { unittest.expect(o, unittest.hasLength(2)); checkExecution(o[0]); checkExecution(o[1]); @@ -577,7 +577,7 @@ var o = new api.ListExecutionsResponse(); buildCounterListExecutionsResponse++; if (buildCounterListExecutionsResponse < 3) { - o.executions = buildUnnamed5073(); + o.executions = buildUnnamed4297(); o.nextPageToken = "foo"; } buildCounterListExecutionsResponse--; @@ -587,20 +587,20 @@ checkListExecutionsResponse(api.ListExecutionsResponse o) { buildCounterListExecutionsResponse++; if (buildCounterListExecutionsResponse < 3) { - checkUnnamed5073(o.executions); + checkUnnamed4297(o.executions); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListExecutionsResponse--; } -buildUnnamed5074() { +buildUnnamed4298() { var o = new core.List<api.History>(); o.add(buildHistory()); o.add(buildHistory()); return o; } -checkUnnamed5074(core.List<api.History> o) { +checkUnnamed4298(core.List<api.History> o) { unittest.expect(o, unittest.hasLength(2)); checkHistory(o[0]); checkHistory(o[1]); @@ -611,7 +611,7 @@ var o = new api.ListHistoriesResponse(); buildCounterListHistoriesResponse++; if (buildCounterListHistoriesResponse < 3) { - o.histories = buildUnnamed5074(); + o.histories = buildUnnamed4298(); o.nextPageToken = "foo"; } buildCounterListHistoriesResponse--; @@ -621,20 +621,20 @@ checkListHistoriesResponse(api.ListHistoriesResponse o) { buildCounterListHistoriesResponse++; if (buildCounterListHistoriesResponse < 3) { - checkUnnamed5074(o.histories); + checkUnnamed4298(o.histories); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListHistoriesResponse--; } -buildUnnamed5075() { +buildUnnamed4299() { var o = new core.List<api.PerfSampleSeries>(); o.add(buildPerfSampleSeries()); o.add(buildPerfSampleSeries()); return o; } -checkUnnamed5075(core.List<api.PerfSampleSeries> o) { +checkUnnamed4299(core.List<api.PerfSampleSeries> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSampleSeries(o[0]); checkPerfSampleSeries(o[1]); @@ -645,7 +645,7 @@ var o = new api.ListPerfSampleSeriesResponse(); buildCounterListPerfSampleSeriesResponse++; if (buildCounterListPerfSampleSeriesResponse < 3) { - o.perfSampleSeries = buildUnnamed5075(); + o.perfSampleSeries = buildUnnamed4299(); } buildCounterListPerfSampleSeriesResponse--; return o; @@ -654,19 +654,19 @@ checkListPerfSampleSeriesResponse(api.ListPerfSampleSeriesResponse o) { buildCounterListPerfSampleSeriesResponse++; if (buildCounterListPerfSampleSeriesResponse < 3) { - checkUnnamed5075(o.perfSampleSeries); + checkUnnamed4299(o.perfSampleSeries); } buildCounterListPerfSampleSeriesResponse--; } -buildUnnamed5076() { +buildUnnamed4300() { var o = new core.List<api.PerfSample>(); o.add(buildPerfSample()); o.add(buildPerfSample()); return o; } -checkUnnamed5076(core.List<api.PerfSample> o) { +checkUnnamed4300(core.List<api.PerfSample> o) { unittest.expect(o, unittest.hasLength(2)); checkPerfSample(o[0]); checkPerfSample(o[1]); @@ -678,7 +678,7 @@ buildCounterListPerfSamplesResponse++; if (buildCounterListPerfSamplesResponse < 3) { o.nextPageToken = "foo"; - o.perfSamples = buildUnnamed5076(); + o.perfSamples = buildUnnamed4300(); } buildCounterListPerfSamplesResponse--; return o; @@ -688,19 +688,19 @@ buildCounterListPerfSamplesResponse++; if (buildCounterListPerfSamplesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5076(o.perfSamples); + checkUnnamed4300(o.perfSamples); } buildCounterListPerfSamplesResponse--; } -buildUnnamed5077() { +buildUnnamed4301() { var o = new core.List<api.ScreenshotCluster>(); o.add(buildScreenshotCluster()); o.add(buildScreenshotCluster()); return o; } -checkUnnamed5077(core.List<api.ScreenshotCluster> o) { +checkUnnamed4301(core.List<api.ScreenshotCluster> o) { unittest.expect(o, unittest.hasLength(2)); checkScreenshotCluster(o[0]); checkScreenshotCluster(o[1]); @@ -711,7 +711,7 @@ var o = new api.ListScreenshotClustersResponse(); buildCounterListScreenshotClustersResponse++; if (buildCounterListScreenshotClustersResponse < 3) { - o.clusters = buildUnnamed5077(); + o.clusters = buildUnnamed4301(); } buildCounterListScreenshotClustersResponse--; return o; @@ -720,19 +720,19 @@ checkListScreenshotClustersResponse(api.ListScreenshotClustersResponse o) { buildCounterListScreenshotClustersResponse++; if (buildCounterListScreenshotClustersResponse < 3) { - checkUnnamed5077(o.clusters); + checkUnnamed4301(o.clusters); } buildCounterListScreenshotClustersResponse--; } -buildUnnamed5078() { +buildUnnamed4302() { var o = new core.List<api.Image>(); o.add(buildImage()); o.add(buildImage()); return o; } -checkUnnamed5078(core.List<api.Image> o) { +checkUnnamed4302(core.List<api.Image> o) { unittest.expect(o, unittest.hasLength(2)); checkImage(o[0]); checkImage(o[1]); @@ -744,7 +744,7 @@ buildCounterListStepThumbnailsResponse++; if (buildCounterListStepThumbnailsResponse < 3) { o.nextPageToken = "foo"; - o.thumbnails = buildUnnamed5078(); + o.thumbnails = buildUnnamed4302(); } buildCounterListStepThumbnailsResponse--; return o; @@ -754,19 +754,19 @@ buildCounterListStepThumbnailsResponse++; if (buildCounterListStepThumbnailsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5078(o.thumbnails); + checkUnnamed4302(o.thumbnails); } buildCounterListStepThumbnailsResponse--; } -buildUnnamed5079() { +buildUnnamed4303() { var o = new core.List<api.Step>(); o.add(buildStep()); o.add(buildStep()); return o; } -checkUnnamed5079(core.List<api.Step> o) { +checkUnnamed4303(core.List<api.Step> o) { unittest.expect(o, unittest.hasLength(2)); checkStep(o[0]); checkStep(o[1]); @@ -778,7 +778,7 @@ buildCounterListStepsResponse++; if (buildCounterListStepsResponse < 3) { o.nextPageToken = "foo"; - o.steps = buildUnnamed5079(); + o.steps = buildUnnamed4303(); } buildCounterListStepsResponse--; return o; @@ -788,7 +788,7 @@ buildCounterListStepsResponse++; if (buildCounterListStepsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5079(o.steps); + checkUnnamed4303(o.steps); } buildCounterListStepsResponse--; } @@ -862,14 +862,14 @@ buildCounterPerfEnvironment--; } -buildUnnamed5080() { +buildUnnamed4304() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5080(core.List<core.String> o) { +checkUnnamed4304(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -885,7 +885,7 @@ o.graphicsStats = buildGraphicsStats(); o.historyId = "foo"; o.perfEnvironment = buildPerfEnvironment(); - o.perfMetrics = buildUnnamed5080(); + o.perfMetrics = buildUnnamed4304(); o.projectId = "foo"; o.stepId = "foo"; } @@ -901,7 +901,7 @@ checkGraphicsStats(o.graphicsStats); unittest.expect(o.historyId, unittest.equals('foo')); checkPerfEnvironment(o.perfEnvironment); - checkUnnamed5080(o.perfMetrics); + checkUnnamed4304(o.perfMetrics); unittest.expect(o.projectId, unittest.equals('foo')); unittest.expect(o.stepId, unittest.equals('foo')); } @@ -979,14 +979,14 @@ buildCounterProjectSettings--; } -buildUnnamed5081() { +buildUnnamed4305() { var o = new core.List<api.FileReference>(); o.add(buildFileReference()); o.add(buildFileReference()); return o; } -checkUnnamed5081(core.List<api.FileReference> o) { +checkUnnamed4305(core.List<api.FileReference> o) { unittest.expect(o, unittest.hasLength(2)); checkFileReference(o[0]); checkFileReference(o[1]); @@ -997,7 +997,7 @@ var o = new api.PublishXunitXmlFilesRequest(); buildCounterPublishXunitXmlFilesRequest++; if (buildCounterPublishXunitXmlFilesRequest < 3) { - o.xunitXmlFiles = buildUnnamed5081(); + o.xunitXmlFiles = buildUnnamed4305(); } buildCounterPublishXunitXmlFilesRequest--; return o; @@ -1006,7 +1006,7 @@ checkPublishXunitXmlFilesRequest(api.PublishXunitXmlFilesRequest o) { buildCounterPublishXunitXmlFilesRequest++; if (buildCounterPublishXunitXmlFilesRequest < 3) { - checkUnnamed5081(o.xunitXmlFiles); + checkUnnamed4305(o.xunitXmlFiles); } buildCounterPublishXunitXmlFilesRequest--; } @@ -1036,14 +1036,14 @@ buildCounterScreen--; } -buildUnnamed5082() { +buildUnnamed4306() { var o = new core.List<api.Screen>(); o.add(buildScreen()); o.add(buildScreen()); return o; } -checkUnnamed5082(core.List<api.Screen> o) { +checkUnnamed4306(core.List<api.Screen> o) { unittest.expect(o, unittest.hasLength(2)); checkScreen(o[0]); checkScreen(o[1]); @@ -1057,7 +1057,7 @@ o.activity = "foo"; o.clusterId = "foo"; o.keyScreen = buildScreen(); - o.screens = buildUnnamed5082(); + o.screens = buildUnnamed4306(); } buildCounterScreenshotCluster--; return o; @@ -1069,7 +1069,7 @@ unittest.expect(o.activity, unittest.equals('foo')); unittest.expect(o.clusterId, unittest.equals('foo')); checkScreen(o.keyScreen); - checkUnnamed5082(o.screens); + checkUnnamed4306(o.screens); } buildCounterScreenshotCluster--; } @@ -1135,14 +1135,14 @@ buildCounterStackTrace--; } -buildUnnamed5083() { +buildUnnamed4307() { var o = new core.List<api.Any>(); o.add(buildAny()); o.add(buildAny()); return o; } -checkUnnamed5083(core.List<api.Any> o) { +checkUnnamed4307(core.List<api.Any> o) { unittest.expect(o, unittest.hasLength(2)); checkAny(o[0]); checkAny(o[1]); @@ -1154,7 +1154,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5083(); + o.details = buildUnnamed4307(); o.message = "foo"; } buildCounterStatus--; @@ -1165,33 +1165,33 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5083(o.details); + checkUnnamed4307(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; } -buildUnnamed5084() { +buildUnnamed4308() { var o = new core.List<api.StepDimensionValueEntry>(); o.add(buildStepDimensionValueEntry()); o.add(buildStepDimensionValueEntry()); return o; } -checkUnnamed5084(core.List<api.StepDimensionValueEntry> o) { +checkUnnamed4308(core.List<api.StepDimensionValueEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkStepDimensionValueEntry(o[0]); checkStepDimensionValueEntry(o[1]); } -buildUnnamed5085() { +buildUnnamed4309() { var o = new core.List<api.StepLabelsEntry>(); o.add(buildStepLabelsEntry()); o.add(buildStepLabelsEntry()); return o; } -checkUnnamed5085(core.List<api.StepLabelsEntry> o) { +checkUnnamed4309(core.List<api.StepLabelsEntry> o) { unittest.expect(o, unittest.hasLength(2)); checkStepLabelsEntry(o[0]); checkStepLabelsEntry(o[1]); @@ -1206,9 +1206,9 @@ o.creationTime = buildTimestamp(); o.description = "foo"; o.deviceUsageDuration = buildDuration(); - o.dimensionValue = buildUnnamed5084(); + o.dimensionValue = buildUnnamed4308(); o.hasImages = true; - o.labels = buildUnnamed5085(); + o.labels = buildUnnamed4309(); o.name = "foo"; o.outcome = buildOutcome(); o.runDuration = buildDuration(); @@ -1228,9 +1228,9 @@ checkTimestamp(o.creationTime); unittest.expect(o.description, unittest.equals('foo')); checkDuration(o.deviceUsageDuration); - checkUnnamed5084(o.dimensionValue); + checkUnnamed4308(o.dimensionValue); unittest.expect(o.hasImages, unittest.isTrue); - checkUnnamed5085(o.labels); + checkUnnamed4309(o.labels); unittest.expect(o.name, unittest.equals('foo')); checkOutcome(o.outcome); checkDuration(o.runDuration); @@ -1326,27 +1326,27 @@ buildCounterTestCaseReference--; } -buildUnnamed5086() { +buildUnnamed4310() { var o = new core.List<api.TestIssue>(); o.add(buildTestIssue()); o.add(buildTestIssue()); return o; } -checkUnnamed5086(core.List<api.TestIssue> o) { +checkUnnamed4310(core.List<api.TestIssue> o) { unittest.expect(o, unittest.hasLength(2)); checkTestIssue(o[0]); checkTestIssue(o[1]); } -buildUnnamed5087() { +buildUnnamed4311() { var o = new core.List<api.TestSuiteOverview>(); o.add(buildTestSuiteOverview()); o.add(buildTestSuiteOverview()); return o; } -checkUnnamed5087(core.List<api.TestSuiteOverview> o) { +checkUnnamed4311(core.List<api.TestSuiteOverview> o) { unittest.expect(o, unittest.hasLength(2)); checkTestSuiteOverview(o[0]); checkTestSuiteOverview(o[1]); @@ -1357,8 +1357,8 @@ var o = new api.TestExecutionStep(); buildCounterTestExecutionStep++; if (buildCounterTestExecutionStep < 3) { - o.testIssues = buildUnnamed5086(); - o.testSuiteOverviews = buildUnnamed5087(); + o.testIssues = buildUnnamed4310(); + o.testSuiteOverviews = buildUnnamed4311(); o.testTiming = buildTestTiming(); o.toolExecution = buildToolExecution(); } @@ -1369,8 +1369,8 @@ checkTestExecutionStep(api.TestExecutionStep o) { buildCounterTestExecutionStep++; if (buildCounterTestExecutionStep < 3) { - checkUnnamed5086(o.testIssues); - checkUnnamed5087(o.testSuiteOverviews); + checkUnnamed4310(o.testIssues); + checkUnnamed4311(o.testSuiteOverviews); checkTestTiming(o.testTiming); checkToolExecution(o.toolExecution); } @@ -1500,40 +1500,40 @@ buildCounterTimestamp--; } -buildUnnamed5088() { +buildUnnamed4312() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5088(core.List<core.String> o) { +checkUnnamed4312(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5089() { +buildUnnamed4313() { var o = new core.List<api.FileReference>(); o.add(buildFileReference()); o.add(buildFileReference()); return o; } -checkUnnamed5089(core.List<api.FileReference> o) { +checkUnnamed4313(core.List<api.FileReference> o) { unittest.expect(o, unittest.hasLength(2)); checkFileReference(o[0]); checkFileReference(o[1]); } -buildUnnamed5090() { +buildUnnamed4314() { var o = new core.List<api.ToolOutputReference>(); o.add(buildToolOutputReference()); o.add(buildToolOutputReference()); return o; } -checkUnnamed5090(core.List<api.ToolOutputReference> o) { +checkUnnamed4314(core.List<api.ToolOutputReference> o) { unittest.expect(o, unittest.hasLength(2)); checkToolOutputReference(o[0]); checkToolOutputReference(o[1]); @@ -1544,10 +1544,10 @@ var o = new api.ToolExecution(); buildCounterToolExecution++; if (buildCounterToolExecution < 3) { - o.commandLineArguments = buildUnnamed5088(); + o.commandLineArguments = buildUnnamed4312(); o.exitCode = buildToolExitCode(); - o.toolLogs = buildUnnamed5089(); - o.toolOutputs = buildUnnamed5090(); + o.toolLogs = buildUnnamed4313(); + o.toolOutputs = buildUnnamed4314(); } buildCounterToolExecution--; return o; @@ -1556,10 +1556,10 @@ checkToolExecution(api.ToolExecution o) { buildCounterToolExecution++; if (buildCounterToolExecution < 3) { - checkUnnamed5088(o.commandLineArguments); + checkUnnamed4312(o.commandLineArguments); checkToolExitCode(o.exitCode); - checkUnnamed5089(o.toolLogs); - checkUnnamed5090(o.toolOutputs); + checkUnnamed4313(o.toolLogs); + checkUnnamed4314(o.toolOutputs); } buildCounterToolExecution--; } @@ -1625,14 +1625,14 @@ buildCounterToolOutputReference--; } -buildUnnamed5091() { +buildUnnamed4315() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5091(core.List<core.String> o) { +checkUnnamed4315(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -3218,7 +3218,7 @@ var arg_historyId = "foo"; var arg_executionId = "foo"; var arg_stepId = "foo"; - var arg_filter = buildUnnamed5091(); + var arg_filter = buildUnnamed4315(); var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path;
diff --git a/generated/googleapis_beta/test/tpu/v1alpha1_test.dart b/generated/googleapis_beta/test/tpu/v1alpha1_test.dart index d9b4287..adbd3b9 100644 --- a/generated/googleapis_beta/test/tpu/v1alpha1_test.dart +++ b/generated/googleapis_beta/test/tpu/v1alpha1_test.dart
@@ -86,14 +86,14 @@ buildCounterEmpty--; } -buildUnnamed5250() { +buildUnnamed4330() { var o = new core.List<api.AcceleratorType>(); o.add(buildAcceleratorType()); o.add(buildAcceleratorType()); return o; } -checkUnnamed5250(core.List<api.AcceleratorType> o) { +checkUnnamed4330(core.List<api.AcceleratorType> o) { unittest.expect(o, unittest.hasLength(2)); checkAcceleratorType(o[0]); checkAcceleratorType(o[1]); @@ -104,7 +104,7 @@ var o = new api.ListAcceleratorTypesResponse(); buildCounterListAcceleratorTypesResponse++; if (buildCounterListAcceleratorTypesResponse < 3) { - o.acceleratorTypes = buildUnnamed5250(); + o.acceleratorTypes = buildUnnamed4330(); o.nextPageToken = "foo"; } buildCounterListAcceleratorTypesResponse--; @@ -114,20 +114,20 @@ checkListAcceleratorTypesResponse(api.ListAcceleratorTypesResponse o) { buildCounterListAcceleratorTypesResponse++; if (buildCounterListAcceleratorTypesResponse < 3) { - checkUnnamed5250(o.acceleratorTypes); + checkUnnamed4330(o.acceleratorTypes); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListAcceleratorTypesResponse--; } -buildUnnamed5251() { +buildUnnamed4331() { var o = new core.List<api.Location>(); o.add(buildLocation()); o.add(buildLocation()); return o; } -checkUnnamed5251(core.List<api.Location> o) { +checkUnnamed4331(core.List<api.Location> o) { unittest.expect(o, unittest.hasLength(2)); checkLocation(o[0]); checkLocation(o[1]); @@ -138,7 +138,7 @@ var o = new api.ListLocationsResponse(); buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - o.locations = buildUnnamed5251(); + o.locations = buildUnnamed4331(); o.nextPageToken = "foo"; } buildCounterListLocationsResponse--; @@ -148,32 +148,46 @@ checkListLocationsResponse(api.ListLocationsResponse o) { buildCounterListLocationsResponse++; if (buildCounterListLocationsResponse < 3) { - checkUnnamed5251(o.locations); + checkUnnamed4331(o.locations); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListLocationsResponse--; } -buildUnnamed5252() { +buildUnnamed4332() { var o = new core.List<api.Node>(); o.add(buildNode()); o.add(buildNode()); return o; } -checkUnnamed5252(core.List<api.Node> o) { +checkUnnamed4332(core.List<api.Node> o) { unittest.expect(o, unittest.hasLength(2)); checkNode(o[0]); checkNode(o[1]); } +buildUnnamed4333() { + var o = new core.List<core.String>(); + o.add("foo"); + o.add("foo"); + return o; +} + +checkUnnamed4333(core.List<core.String> o) { + unittest.expect(o, unittest.hasLength(2)); + unittest.expect(o[0], unittest.equals('foo')); + unittest.expect(o[1], unittest.equals('foo')); +} + core.int buildCounterListNodesResponse = 0; buildListNodesResponse() { var o = new api.ListNodesResponse(); buildCounterListNodesResponse++; if (buildCounterListNodesResponse < 3) { o.nextPageToken = "foo"; - o.nodes = buildUnnamed5252(); + o.nodes = buildUnnamed4332(); + o.unreachable = buildUnnamed4333(); } buildCounterListNodesResponse--; return o; @@ -183,19 +197,20 @@ buildCounterListNodesResponse++; if (buildCounterListNodesResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5252(o.nodes); + checkUnnamed4332(o.nodes); + checkUnnamed4333(o.unreachable); } buildCounterListNodesResponse--; } -buildUnnamed5253() { +buildUnnamed4334() { var o = new core.List<api.Operation>(); o.add(buildOperation()); o.add(buildOperation()); return o; } -checkUnnamed5253(core.List<api.Operation> o) { +checkUnnamed4334(core.List<api.Operation> o) { unittest.expect(o, unittest.hasLength(2)); checkOperation(o[0]); checkOperation(o[1]); @@ -207,7 +222,7 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { o.nextPageToken = "foo"; - o.operations = buildUnnamed5253(); + o.operations = buildUnnamed4334(); } buildCounterListOperationsResponse--; return o; @@ -217,19 +232,19 @@ buildCounterListOperationsResponse++; if (buildCounterListOperationsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5253(o.operations); + checkUnnamed4334(o.operations); } buildCounterListOperationsResponse--; } -buildUnnamed5254() { +buildUnnamed4335() { var o = new core.List<api.TensorFlowVersion>(); o.add(buildTensorFlowVersion()); o.add(buildTensorFlowVersion()); return o; } -checkUnnamed5254(core.List<api.TensorFlowVersion> o) { +checkUnnamed4335(core.List<api.TensorFlowVersion> o) { unittest.expect(o, unittest.hasLength(2)); checkTensorFlowVersion(o[0]); checkTensorFlowVersion(o[1]); @@ -241,7 +256,7 @@ buildCounterListTensorFlowVersionsResponse++; if (buildCounterListTensorFlowVersionsResponse < 3) { o.nextPageToken = "foo"; - o.tensorflowVersions = buildUnnamed5254(); + o.tensorflowVersions = buildUnnamed4335(); } buildCounterListTensorFlowVersionsResponse--; return o; @@ -251,25 +266,25 @@ buildCounterListTensorFlowVersionsResponse++; if (buildCounterListTensorFlowVersionsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5254(o.tensorflowVersions); + checkUnnamed4335(o.tensorflowVersions); } buildCounterListTensorFlowVersionsResponse--; } -buildUnnamed5255() { +buildUnnamed4336() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5255(core.Map<core.String, core.String> o) { +checkUnnamed4336(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5256() { +buildUnnamed4337() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -284,7 +299,7 @@ return o; } -checkUnnamed5256(core.Map<core.String, core.Object> o) { +checkUnnamed4337(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); @@ -304,9 +319,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { o.displayName = "foo"; - o.labels = buildUnnamed5255(); + o.labels = buildUnnamed4336(); o.locationId = "foo"; - o.metadata = buildUnnamed5256(); + o.metadata = buildUnnamed4337(); o.name = "foo"; } buildCounterLocation--; @@ -317,9 +332,9 @@ buildCounterLocation++; if (buildCounterLocation < 3) { unittest.expect(o.displayName, unittest.equals('foo')); - checkUnnamed5255(o.labels); + checkUnnamed4336(o.labels); unittest.expect(o.locationId, unittest.equals('foo')); - checkUnnamed5256(o.metadata); + checkUnnamed4337(o.metadata); unittest.expect(o.name, unittest.equals('foo')); } buildCounterLocation--; @@ -346,27 +361,27 @@ buildCounterNetworkEndpoint--; } -buildUnnamed5257() { +buildUnnamed4338() { var o = new core.Map<core.String, core.String>(); o["x"] = "foo"; o["y"] = "foo"; return o; } -checkUnnamed5257(core.Map<core.String, core.String> o) { +checkUnnamed4338(core.Map<core.String, core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o["x"], unittest.equals('foo')); unittest.expect(o["y"], unittest.equals('foo')); } -buildUnnamed5258() { +buildUnnamed4339() { var o = new core.List<api.NetworkEndpoint>(); o.add(buildNetworkEndpoint()); o.add(buildNetworkEndpoint()); return o; } -checkUnnamed5258(core.List<api.NetworkEndpoint> o) { +checkUnnamed4339(core.List<api.NetworkEndpoint> o) { unittest.expect(o, unittest.hasLength(2)); checkNetworkEndpoint(o[0]); checkNetworkEndpoint(o[1]); @@ -384,10 +399,10 @@ o.health = "foo"; o.healthDescription = "foo"; o.ipAddress = "foo"; - o.labels = buildUnnamed5257(); + o.labels = buildUnnamed4338(); o.name = "foo"; o.network = "foo"; - o.networkEndpoints = buildUnnamed5258(); + o.networkEndpoints = buildUnnamed4339(); o.port = "foo"; o.schedulingConfig = buildSchedulingConfig(); o.serviceAccount = "foo"; @@ -408,10 +423,10 @@ unittest.expect(o.health, unittest.equals('foo')); unittest.expect(o.healthDescription, unittest.equals('foo')); unittest.expect(o.ipAddress, unittest.equals('foo')); - checkUnnamed5257(o.labels); + checkUnnamed4338(o.labels); unittest.expect(o.name, unittest.equals('foo')); unittest.expect(o.network, unittest.equals('foo')); - checkUnnamed5258(o.networkEndpoints); + checkUnnamed4339(o.networkEndpoints); unittest.expect(o.port, unittest.equals('foo')); checkSchedulingConfig(o.schedulingConfig); unittest.expect(o.serviceAccount, unittest.equals('foo')); @@ -421,7 +436,7 @@ buildCounterNode--; } -buildUnnamed5259() { +buildUnnamed4340() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -436,7 +451,7 @@ return o; } -checkUnnamed5259(core.Map<core.String, core.Object> o) { +checkUnnamed4340(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLength(3)); @@ -450,7 +465,7 @@ unittest.expect(casted4["string"], unittest.equals('foo')); } -buildUnnamed5260() { +buildUnnamed4341() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -465,7 +480,7 @@ return o; } -checkUnnamed5260(core.Map<core.String, core.Object> o) { +checkUnnamed4341(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); @@ -486,9 +501,9 @@ if (buildCounterOperation < 3) { o.done = true; o.error = buildStatus(); - o.metadata = buildUnnamed5259(); + o.metadata = buildUnnamed4340(); o.name = "foo"; - o.response = buildUnnamed5260(); + o.response = buildUnnamed4341(); } buildCounterOperation--; return o; @@ -499,9 +514,9 @@ if (buildCounterOperation < 3) { unittest.expect(o.done, unittest.isTrue); checkStatus(o.error); - checkUnnamed5259(o.metadata); + checkUnnamed4340(o.metadata); unittest.expect(o.name, unittest.equals('foo')); - checkUnnamed5260(o.response); + checkUnnamed4341(o.response); } buildCounterOperation--; } @@ -590,7 +605,7 @@ buildCounterStartNodeRequest--; } -buildUnnamed5261() { +buildUnnamed4342() { var o = new core.Map<core.String, core.Object>(); o["x"] = { 'list': [1, 2, 3], @@ -605,7 +620,7 @@ return o; } -checkUnnamed5261(core.Map<core.String, core.Object> o) { +checkUnnamed4342(core.Map<core.String, core.Object> o) { unittest.expect(o, unittest.hasLength(2)); var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); @@ -619,17 +634,17 @@ unittest.expect(casted8["string"], unittest.equals('foo')); } -buildUnnamed5262() { +buildUnnamed4343() { var o = new core.List<core.Map<core.String, core.Object>>(); - o.add(buildUnnamed5261()); - o.add(buildUnnamed5261()); + o.add(buildUnnamed4342()); + o.add(buildUnnamed4342()); return o; } -checkUnnamed5262(core.List<core.Map<core.String, core.Object>> o) { +checkUnnamed4343(core.List<core.Map<core.String, core.Object>> o) { unittest.expect(o, unittest.hasLength(2)); - checkUnnamed5261(o[0]); - checkUnnamed5261(o[1]); + checkUnnamed4342(o[0]); + checkUnnamed4342(o[1]); } core.int buildCounterStatus = 0; @@ -638,7 +653,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { o.code = 42; - o.details = buildUnnamed5262(); + o.details = buildUnnamed4343(); o.message = "foo"; } buildCounterStatus--; @@ -649,7 +664,7 @@ buildCounterStatus++; if (buildCounterStatus < 3) { unittest.expect(o.code, unittest.equals(42)); - checkUnnamed5262(o.details); + checkUnnamed4343(o.details); unittest.expect(o.message, unittest.equals('foo')); } buildCounterStatus--; @@ -894,9 +909,9 @@ api.ProjectsLocationsResourceApi res = new api.TpuApi(mock).projects.locations; var arg_name = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -929,11 +944,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -944,9 +959,9 @@ }), true); res .list(arg_name, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListLocationsResponse(response); @@ -1012,10 +1027,10 @@ api.ProjectsLocationsAcceleratorTypesResourceApi res = new api.TpuApi(mock).projects.locations.acceleratorTypes; var arg_parent = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_orderBy = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1048,13 +1063,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["orderBy"].first, unittest.equals(arg_orderBy)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1065,10 +1080,10 @@ }), true); res .list(arg_parent, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, orderBy: arg_orderBy, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListAcceleratorTypesResponse(response); @@ -1632,9 +1647,9 @@ api.ProjectsLocationsOperationsResourceApi res = new api.TpuApi(mock).projects.locations.operations; var arg_name = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1667,11 +1682,11 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1682,9 +1697,9 @@ }), true); res .list(arg_name, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListOperationsResponse(response); @@ -1750,10 +1765,10 @@ api.ProjectsLocationsTensorflowVersionsResourceApi res = new api.TpuApi(mock).projects.locations.tensorflowVersions; var arg_parent = "foo"; + var arg_pageSize = 42; var arg_filter = "foo"; var arg_pageToken = "foo"; var arg_orderBy = "foo"; - var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1786,13 +1801,13 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); unittest.expect( queryMap["orderBy"].first, unittest.equals(arg_orderBy)); - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1803,10 +1818,10 @@ }), true); res .list(arg_parent, + pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken, orderBy: arg_orderBy, - pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListTensorFlowVersionsResponse(response);
diff --git a/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart b/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart index e260ee6..fbb2f7d 100644 --- a/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart +++ b/generated/googleapis_beta/test/websecurityscanner/v1alpha_test.dart
@@ -242,14 +242,14 @@ buildCounterHeader--; } -buildUnnamed5371() { +buildUnnamed4748() { var o = new core.List<api.CrawledUrl>(); o.add(buildCrawledUrl()); o.add(buildCrawledUrl()); return o; } -checkUnnamed5371(core.List<api.CrawledUrl> o) { +checkUnnamed4748(core.List<api.CrawledUrl> o) { unittest.expect(o, unittest.hasLength(2)); checkCrawledUrl(o[0]); checkCrawledUrl(o[1]); @@ -260,7 +260,7 @@ var o = new api.ListCrawledUrlsResponse(); buildCounterListCrawledUrlsResponse++; if (buildCounterListCrawledUrlsResponse < 3) { - o.crawledUrls = buildUnnamed5371(); + o.crawledUrls = buildUnnamed4748(); o.nextPageToken = "foo"; } buildCounterListCrawledUrlsResponse--; @@ -270,20 +270,20 @@ checkListCrawledUrlsResponse(api.ListCrawledUrlsResponse o) { buildCounterListCrawledUrlsResponse++; if (buildCounterListCrawledUrlsResponse < 3) { - checkUnnamed5371(o.crawledUrls); + checkUnnamed4748(o.crawledUrls); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListCrawledUrlsResponse--; } -buildUnnamed5372() { +buildUnnamed4749() { var o = new core.List<api.FindingTypeStats>(); o.add(buildFindingTypeStats()); o.add(buildFindingTypeStats()); return o; } -checkUnnamed5372(core.List<api.FindingTypeStats> o) { +checkUnnamed4749(core.List<api.FindingTypeStats> o) { unittest.expect(o, unittest.hasLength(2)); checkFindingTypeStats(o[0]); checkFindingTypeStats(o[1]); @@ -294,7 +294,7 @@ var o = new api.ListFindingTypeStatsResponse(); buildCounterListFindingTypeStatsResponse++; if (buildCounterListFindingTypeStatsResponse < 3) { - o.findingTypeStats = buildUnnamed5372(); + o.findingTypeStats = buildUnnamed4749(); } buildCounterListFindingTypeStatsResponse--; return o; @@ -303,19 +303,19 @@ checkListFindingTypeStatsResponse(api.ListFindingTypeStatsResponse o) { buildCounterListFindingTypeStatsResponse++; if (buildCounterListFindingTypeStatsResponse < 3) { - checkUnnamed5372(o.findingTypeStats); + checkUnnamed4749(o.findingTypeStats); } buildCounterListFindingTypeStatsResponse--; } -buildUnnamed5373() { +buildUnnamed4750() { var o = new core.List<api.Finding>(); o.add(buildFinding()); o.add(buildFinding()); return o; } -checkUnnamed5373(core.List<api.Finding> o) { +checkUnnamed4750(core.List<api.Finding> o) { unittest.expect(o, unittest.hasLength(2)); checkFinding(o[0]); checkFinding(o[1]); @@ -326,7 +326,7 @@ var o = new api.ListFindingsResponse(); buildCounterListFindingsResponse++; if (buildCounterListFindingsResponse < 3) { - o.findings = buildUnnamed5373(); + o.findings = buildUnnamed4750(); o.nextPageToken = "foo"; } buildCounterListFindingsResponse--; @@ -336,20 +336,20 @@ checkListFindingsResponse(api.ListFindingsResponse o) { buildCounterListFindingsResponse++; if (buildCounterListFindingsResponse < 3) { - checkUnnamed5373(o.findings); + checkUnnamed4750(o.findings); unittest.expect(o.nextPageToken, unittest.equals('foo')); } buildCounterListFindingsResponse--; } -buildUnnamed5374() { +buildUnnamed4751() { var o = new core.List<api.ScanConfig>(); o.add(buildScanConfig()); o.add(buildScanConfig()); return o; } -checkUnnamed5374(core.List<api.ScanConfig> o) { +checkUnnamed4751(core.List<api.ScanConfig> o) { unittest.expect(o, unittest.hasLength(2)); checkScanConfig(o[0]); checkScanConfig(o[1]); @@ -361,7 +361,7 @@ buildCounterListScanConfigsResponse++; if (buildCounterListScanConfigsResponse < 3) { o.nextPageToken = "foo"; - o.scanConfigs = buildUnnamed5374(); + o.scanConfigs = buildUnnamed4751(); } buildCounterListScanConfigsResponse--; return o; @@ -371,19 +371,19 @@ buildCounterListScanConfigsResponse++; if (buildCounterListScanConfigsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5374(o.scanConfigs); + checkUnnamed4751(o.scanConfigs); } buildCounterListScanConfigsResponse--; } -buildUnnamed5375() { +buildUnnamed4752() { var o = new core.List<api.ScanRun>(); o.add(buildScanRun()); o.add(buildScanRun()); return o; } -checkUnnamed5375(core.List<api.ScanRun> o) { +checkUnnamed4752(core.List<api.ScanRun> o) { unittest.expect(o, unittest.hasLength(2)); checkScanRun(o[0]); checkScanRun(o[1]); @@ -395,7 +395,7 @@ buildCounterListScanRunsResponse++; if (buildCounterListScanRunsResponse < 3) { o.nextPageToken = "foo"; - o.scanRuns = buildUnnamed5375(); + o.scanRuns = buildUnnamed4752(); } buildCounterListScanRunsResponse--; return o; @@ -405,19 +405,19 @@ buildCounterListScanRunsResponse++; if (buildCounterListScanRunsResponse < 3) { unittest.expect(o.nextPageToken, unittest.equals('foo')); - checkUnnamed5375(o.scanRuns); + checkUnnamed4752(o.scanRuns); } buildCounterListScanRunsResponse--; } -buildUnnamed5376() { +buildUnnamed4753() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5376(core.List<core.String> o) { +checkUnnamed4753(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -428,7 +428,7 @@ var o = new api.OutdatedLibrary(); buildCounterOutdatedLibrary++; if (buildCounterOutdatedLibrary < 3) { - o.learnMoreUrls = buildUnnamed5376(); + o.learnMoreUrls = buildUnnamed4753(); o.libraryName = "foo"; o.version = "foo"; } @@ -439,47 +439,47 @@ checkOutdatedLibrary(api.OutdatedLibrary o) { buildCounterOutdatedLibrary++; if (buildCounterOutdatedLibrary < 3) { - checkUnnamed5376(o.learnMoreUrls); + checkUnnamed4753(o.learnMoreUrls); unittest.expect(o.libraryName, unittest.equals('foo')); unittest.expect(o.version, unittest.equals('foo')); } buildCounterOutdatedLibrary--; } -buildUnnamed5377() { +buildUnnamed4754() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5377(core.List<core.String> o) { +checkUnnamed4754(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5378() { +buildUnnamed4755() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5378(core.List<core.String> o) { +checkUnnamed4755(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); } -buildUnnamed5379() { +buildUnnamed4756() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5379(core.List<core.String> o) { +checkUnnamed4756(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -491,13 +491,14 @@ buildCounterScanConfig++; if (buildCounterScanConfig < 3) { o.authentication = buildAuthentication(); - o.blacklistPatterns = buildUnnamed5377(); + o.blacklistPatterns = buildUnnamed4754(); o.displayName = "foo"; + o.latestRun = buildScanRun(); o.maxQps = 42; o.name = "foo"; o.schedule = buildSchedule(); - o.startingUrls = buildUnnamed5378(); - o.targetPlatforms = buildUnnamed5379(); + o.startingUrls = buildUnnamed4755(); + o.targetPlatforms = buildUnnamed4756(); o.userAgent = "foo"; } buildCounterScanConfig--; @@ -508,13 +509,14 @@ buildCounterScanConfig++; if (buildCounterScanConfig < 3) { checkAuthentication(o.authentication); - checkUnnamed5377(o.blacklistPatterns); + checkUnnamed4754(o.blacklistPatterns); unittest.expect(o.displayName, unittest.equals('foo')); + checkScanRun(o.latestRun); unittest.expect(o.maxQps, unittest.equals(42)); unittest.expect(o.name, unittest.equals('foo')); checkSchedule(o.schedule); - checkUnnamed5378(o.startingUrls); - checkUnnamed5379(o.targetPlatforms); + checkUnnamed4755(o.startingUrls); + checkUnnamed4756(o.targetPlatforms); unittest.expect(o.userAgent, unittest.equals('foo')); } buildCounterScanConfig--; @@ -627,27 +629,27 @@ buildCounterViolatingResource--; } -buildUnnamed5380() { +buildUnnamed4757() { var o = new core.List<api.Header>(); o.add(buildHeader()); o.add(buildHeader()); return o; } -checkUnnamed5380(core.List<api.Header> o) { +checkUnnamed4757(core.List<api.Header> o) { unittest.expect(o, unittest.hasLength(2)); checkHeader(o[0]); checkHeader(o[1]); } -buildUnnamed5381() { +buildUnnamed4758() { var o = new core.List<api.Header>(); o.add(buildHeader()); o.add(buildHeader()); return o; } -checkUnnamed5381(core.List<api.Header> o) { +checkUnnamed4758(core.List<api.Header> o) { unittest.expect(o, unittest.hasLength(2)); checkHeader(o[0]); checkHeader(o[1]); @@ -658,8 +660,8 @@ var o = new api.VulnerableHeaders(); buildCounterVulnerableHeaders++; if (buildCounterVulnerableHeaders < 3) { - o.headers = buildUnnamed5380(); - o.missingHeaders = buildUnnamed5381(); + o.headers = buildUnnamed4757(); + o.missingHeaders = buildUnnamed4758(); } buildCounterVulnerableHeaders--; return o; @@ -668,20 +670,20 @@ checkVulnerableHeaders(api.VulnerableHeaders o) { buildCounterVulnerableHeaders++; if (buildCounterVulnerableHeaders < 3) { - checkUnnamed5380(o.headers); - checkUnnamed5381(o.missingHeaders); + checkUnnamed4757(o.headers); + checkUnnamed4758(o.missingHeaders); } buildCounterVulnerableHeaders--; } -buildUnnamed5382() { +buildUnnamed4759() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5382(core.List<core.String> o) { +checkUnnamed4759(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -692,7 +694,7 @@ var o = new api.VulnerableParameters(); buildCounterVulnerableParameters++; if (buildCounterVulnerableParameters < 3) { - o.parameterNames = buildUnnamed5382(); + o.parameterNames = buildUnnamed4759(); } buildCounterVulnerableParameters--; return o; @@ -701,19 +703,19 @@ checkVulnerableParameters(api.VulnerableParameters o) { buildCounterVulnerableParameters++; if (buildCounterVulnerableParameters < 3) { - checkUnnamed5382(o.parameterNames); + checkUnnamed4759(o.parameterNames); } buildCounterVulnerableParameters--; } -buildUnnamed5383() { +buildUnnamed4760() { var o = new core.List<core.String>(); o.add("foo"); o.add("foo"); return o; } -checkUnnamed5383(core.List<core.String> o) { +checkUnnamed4760(core.List<core.String> o) { unittest.expect(o, unittest.hasLength(2)); unittest.expect(o[0], unittest.equals('foo')); unittest.expect(o[1], unittest.equals('foo')); @@ -725,7 +727,7 @@ buildCounterXss++; if (buildCounterXss < 3) { o.errorMessage = "foo"; - o.stackTraces = buildUnnamed5383(); + o.stackTraces = buildUnnamed4760(); } buildCounterXss--; return o; @@ -735,7 +737,7 @@ buildCounterXss++; if (buildCounterXss < 3) { unittest.expect(o.errorMessage, unittest.equals('foo')); - checkUnnamed5383(o.stackTraces); + checkUnnamed4760(o.stackTraces); } buildCounterXss--; } @@ -1322,8 +1324,8 @@ api.ProjectsScanConfigsScanRunsResourceApi res = new api.WebsecurityscannerApi(mock).projects.scanConfigs.scanRuns; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1356,10 +1358,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1370,8 +1372,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListScanRunsResponse(response); @@ -1446,8 +1448,8 @@ .scanRuns .crawledUrls; var arg_parent = "foo"; - var arg_pageSize = 42; var arg_pageToken = "foo"; + var arg_pageSize = 42; var arg_$fields = "foo"; mock.register(unittest.expectAsync2((http.BaseRequest req, json) { var path = (req.url).path; @@ -1480,10 +1482,10 @@ core.Uri.decodeQueryComponent(keyvalue[1])); } } - unittest.expect(core.int.parse(queryMap["pageSize"].first), - unittest.equals(arg_pageSize)); unittest.expect( queryMap["pageToken"].first, unittest.equals(arg_pageToken)); + unittest.expect(core.int.parse(queryMap["pageSize"].first), + unittest.equals(arg_pageSize)); unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); var h = { @@ -1494,8 +1496,8 @@ }), true); res .list(arg_parent, - pageSize: arg_pageSize, pageToken: arg_pageToken, + pageSize: arg_pageSize, $fields: arg_$fields) .then(unittest.expectAsync1(((response) { checkListCrawledUrlsResponse(response);