blob: e326a2bdf8c49b93a6eb1b8e1abe92e427090100 [file] [log] [blame]
library googleapis.compute.v1.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/compute/v1.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 buildCounterAcceleratorConfig = 0;
buildAcceleratorConfig() {
var o = new api.AcceleratorConfig();
buildCounterAcceleratorConfig++;
if (buildCounterAcceleratorConfig < 3) {
o.acceleratorCount = 42;
o.acceleratorType = "foo";
}
buildCounterAcceleratorConfig--;
return o;
}
checkAcceleratorConfig(api.AcceleratorConfig o) {
buildCounterAcceleratorConfig++;
if (buildCounterAcceleratorConfig < 3) {
unittest.expect(o.acceleratorCount, unittest.equals(42));
unittest.expect(o.acceleratorType, unittest.equals('foo'));
}
buildCounterAcceleratorConfig--;
}
core.int buildCounterAcceleratorType = 0;
buildAcceleratorType() {
var o = new api.AcceleratorType();
buildCounterAcceleratorType++;
if (buildCounterAcceleratorType < 3) {
o.creationTimestamp = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.maximumCardsPerInstance = 42;
o.name = "foo";
o.selfLink = "foo";
o.zone = "foo";
}
buildCounterAcceleratorType--;
return o;
}
checkAcceleratorType(api.AcceleratorType o) {
buildCounterAcceleratorType++;
if (buildCounterAcceleratorType < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.maximumCardsPerInstance, unittest.equals(42));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterAcceleratorType--;
}
buildUnnamed2292() {
var o = new core.Map<core.String, api.AcceleratorTypesScopedList>();
o["x"] = buildAcceleratorTypesScopedList();
o["y"] = buildAcceleratorTypesScopedList();
return o;
}
checkUnnamed2292(core.Map<core.String, api.AcceleratorTypesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorTypesScopedList(o["x"]);
checkAcceleratorTypesScopedList(o["y"]);
}
core.int buildCounterAcceleratorTypeAggregatedListWarningData = 0;
buildAcceleratorTypeAggregatedListWarningData() {
var o = new api.AcceleratorTypeAggregatedListWarningData();
buildCounterAcceleratorTypeAggregatedListWarningData++;
if (buildCounterAcceleratorTypeAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAcceleratorTypeAggregatedListWarningData--;
return o;
}
checkAcceleratorTypeAggregatedListWarningData(
api.AcceleratorTypeAggregatedListWarningData o) {
buildCounterAcceleratorTypeAggregatedListWarningData++;
if (buildCounterAcceleratorTypeAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAcceleratorTypeAggregatedListWarningData--;
}
buildUnnamed2293() {
var o = new core.List<api.AcceleratorTypeAggregatedListWarningData>();
o.add(buildAcceleratorTypeAggregatedListWarningData());
o.add(buildAcceleratorTypeAggregatedListWarningData());
return o;
}
checkUnnamed2293(core.List<api.AcceleratorTypeAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorTypeAggregatedListWarningData(o[0]);
checkAcceleratorTypeAggregatedListWarningData(o[1]);
}
core.int buildCounterAcceleratorTypeAggregatedListWarning = 0;
buildAcceleratorTypeAggregatedListWarning() {
var o = new api.AcceleratorTypeAggregatedListWarning();
buildCounterAcceleratorTypeAggregatedListWarning++;
if (buildCounterAcceleratorTypeAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2293();
o.message = "foo";
}
buildCounterAcceleratorTypeAggregatedListWarning--;
return o;
}
checkAcceleratorTypeAggregatedListWarning(
api.AcceleratorTypeAggregatedListWarning o) {
buildCounterAcceleratorTypeAggregatedListWarning++;
if (buildCounterAcceleratorTypeAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2293(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAcceleratorTypeAggregatedListWarning--;
}
core.int buildCounterAcceleratorTypeAggregatedList = 0;
buildAcceleratorTypeAggregatedList() {
var o = new api.AcceleratorTypeAggregatedList();
buildCounterAcceleratorTypeAggregatedList++;
if (buildCounterAcceleratorTypeAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2292();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAcceleratorTypeAggregatedListWarning();
}
buildCounterAcceleratorTypeAggregatedList--;
return o;
}
checkAcceleratorTypeAggregatedList(api.AcceleratorTypeAggregatedList o) {
buildCounterAcceleratorTypeAggregatedList++;
if (buildCounterAcceleratorTypeAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2292(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAcceleratorTypeAggregatedListWarning(o.warning);
}
buildCounterAcceleratorTypeAggregatedList--;
}
buildUnnamed2294() {
var o = new core.List<api.AcceleratorType>();
o.add(buildAcceleratorType());
o.add(buildAcceleratorType());
return o;
}
checkUnnamed2294(core.List<api.AcceleratorType> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorType(o[0]);
checkAcceleratorType(o[1]);
}
core.int buildCounterAcceleratorTypeListWarningData = 0;
buildAcceleratorTypeListWarningData() {
var o = new api.AcceleratorTypeListWarningData();
buildCounterAcceleratorTypeListWarningData++;
if (buildCounterAcceleratorTypeListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAcceleratorTypeListWarningData--;
return o;
}
checkAcceleratorTypeListWarningData(api.AcceleratorTypeListWarningData o) {
buildCounterAcceleratorTypeListWarningData++;
if (buildCounterAcceleratorTypeListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAcceleratorTypeListWarningData--;
}
buildUnnamed2295() {
var o = new core.List<api.AcceleratorTypeListWarningData>();
o.add(buildAcceleratorTypeListWarningData());
o.add(buildAcceleratorTypeListWarningData());
return o;
}
checkUnnamed2295(core.List<api.AcceleratorTypeListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorTypeListWarningData(o[0]);
checkAcceleratorTypeListWarningData(o[1]);
}
core.int buildCounterAcceleratorTypeListWarning = 0;
buildAcceleratorTypeListWarning() {
var o = new api.AcceleratorTypeListWarning();
buildCounterAcceleratorTypeListWarning++;
if (buildCounterAcceleratorTypeListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2295();
o.message = "foo";
}
buildCounterAcceleratorTypeListWarning--;
return o;
}
checkAcceleratorTypeListWarning(api.AcceleratorTypeListWarning o) {
buildCounterAcceleratorTypeListWarning++;
if (buildCounterAcceleratorTypeListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2295(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAcceleratorTypeListWarning--;
}
core.int buildCounterAcceleratorTypeList = 0;
buildAcceleratorTypeList() {
var o = new api.AcceleratorTypeList();
buildCounterAcceleratorTypeList++;
if (buildCounterAcceleratorTypeList < 3) {
o.id = "foo";
o.items = buildUnnamed2294();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAcceleratorTypeListWarning();
}
buildCounterAcceleratorTypeList--;
return o;
}
checkAcceleratorTypeList(api.AcceleratorTypeList o) {
buildCounterAcceleratorTypeList++;
if (buildCounterAcceleratorTypeList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2294(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAcceleratorTypeListWarning(o.warning);
}
buildCounterAcceleratorTypeList--;
}
buildUnnamed2296() {
var o = new core.List<api.AcceleratorType>();
o.add(buildAcceleratorType());
o.add(buildAcceleratorType());
return o;
}
checkUnnamed2296(core.List<api.AcceleratorType> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorType(o[0]);
checkAcceleratorType(o[1]);
}
core.int buildCounterAcceleratorTypesScopedListWarningData = 0;
buildAcceleratorTypesScopedListWarningData() {
var o = new api.AcceleratorTypesScopedListWarningData();
buildCounterAcceleratorTypesScopedListWarningData++;
if (buildCounterAcceleratorTypesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAcceleratorTypesScopedListWarningData--;
return o;
}
checkAcceleratorTypesScopedListWarningData(
api.AcceleratorTypesScopedListWarningData o) {
buildCounterAcceleratorTypesScopedListWarningData++;
if (buildCounterAcceleratorTypesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAcceleratorTypesScopedListWarningData--;
}
buildUnnamed2297() {
var o = new core.List<api.AcceleratorTypesScopedListWarningData>();
o.add(buildAcceleratorTypesScopedListWarningData());
o.add(buildAcceleratorTypesScopedListWarningData());
return o;
}
checkUnnamed2297(core.List<api.AcceleratorTypesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorTypesScopedListWarningData(o[0]);
checkAcceleratorTypesScopedListWarningData(o[1]);
}
core.int buildCounterAcceleratorTypesScopedListWarning = 0;
buildAcceleratorTypesScopedListWarning() {
var o = new api.AcceleratorTypesScopedListWarning();
buildCounterAcceleratorTypesScopedListWarning++;
if (buildCounterAcceleratorTypesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2297();
o.message = "foo";
}
buildCounterAcceleratorTypesScopedListWarning--;
return o;
}
checkAcceleratorTypesScopedListWarning(
api.AcceleratorTypesScopedListWarning o) {
buildCounterAcceleratorTypesScopedListWarning++;
if (buildCounterAcceleratorTypesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2297(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAcceleratorTypesScopedListWarning--;
}
core.int buildCounterAcceleratorTypesScopedList = 0;
buildAcceleratorTypesScopedList() {
var o = new api.AcceleratorTypesScopedList();
buildCounterAcceleratorTypesScopedList++;
if (buildCounterAcceleratorTypesScopedList < 3) {
o.acceleratorTypes = buildUnnamed2296();
o.warning = buildAcceleratorTypesScopedListWarning();
}
buildCounterAcceleratorTypesScopedList--;
return o;
}
checkAcceleratorTypesScopedList(api.AcceleratorTypesScopedList o) {
buildCounterAcceleratorTypesScopedList++;
if (buildCounterAcceleratorTypesScopedList < 3) {
checkUnnamed2296(o.acceleratorTypes);
checkAcceleratorTypesScopedListWarning(o.warning);
}
buildCounterAcceleratorTypesScopedList--;
}
core.int buildCounterAccessConfig = 0;
buildAccessConfig() {
var o = new api.AccessConfig();
buildCounterAccessConfig++;
if (buildCounterAccessConfig < 3) {
o.kind = "foo";
o.name = "foo";
o.natIP = "foo";
o.type = "foo";
}
buildCounterAccessConfig--;
return o;
}
checkAccessConfig(api.AccessConfig o) {
buildCounterAccessConfig++;
if (buildCounterAccessConfig < 3) {
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.natIP, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterAccessConfig--;
}
buildUnnamed2298() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2298(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 buildCounterAddress = 0;
buildAddress() {
var o = new api.Address();
buildCounterAddress++;
if (buildCounterAddress < 3) {
o.address = "foo";
o.addressType = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.ipVersion = "foo";
o.kind = "foo";
o.name = "foo";
o.region = "foo";
o.selfLink = "foo";
o.status = "foo";
o.subnetwork = "foo";
o.users = buildUnnamed2298();
}
buildCounterAddress--;
return o;
}
checkAddress(api.Address o) {
buildCounterAddress++;
if (buildCounterAddress < 3) {
unittest.expect(o.address, unittest.equals('foo'));
unittest.expect(o.addressType, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.ipVersion, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.subnetwork, unittest.equals('foo'));
checkUnnamed2298(o.users);
}
buildCounterAddress--;
}
buildUnnamed2299() {
var o = new core.Map<core.String, api.AddressesScopedList>();
o["x"] = buildAddressesScopedList();
o["y"] = buildAddressesScopedList();
return o;
}
checkUnnamed2299(core.Map<core.String, api.AddressesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddressesScopedList(o["x"]);
checkAddressesScopedList(o["y"]);
}
core.int buildCounterAddressAggregatedListWarningData = 0;
buildAddressAggregatedListWarningData() {
var o = new api.AddressAggregatedListWarningData();
buildCounterAddressAggregatedListWarningData++;
if (buildCounterAddressAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAddressAggregatedListWarningData--;
return o;
}
checkAddressAggregatedListWarningData(api.AddressAggregatedListWarningData o) {
buildCounterAddressAggregatedListWarningData++;
if (buildCounterAddressAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAddressAggregatedListWarningData--;
}
buildUnnamed2300() {
var o = new core.List<api.AddressAggregatedListWarningData>();
o.add(buildAddressAggregatedListWarningData());
o.add(buildAddressAggregatedListWarningData());
return o;
}
checkUnnamed2300(core.List<api.AddressAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddressAggregatedListWarningData(o[0]);
checkAddressAggregatedListWarningData(o[1]);
}
core.int buildCounterAddressAggregatedListWarning = 0;
buildAddressAggregatedListWarning() {
var o = new api.AddressAggregatedListWarning();
buildCounterAddressAggregatedListWarning++;
if (buildCounterAddressAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2300();
o.message = "foo";
}
buildCounterAddressAggregatedListWarning--;
return o;
}
checkAddressAggregatedListWarning(api.AddressAggregatedListWarning o) {
buildCounterAddressAggregatedListWarning++;
if (buildCounterAddressAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2300(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAddressAggregatedListWarning--;
}
core.int buildCounterAddressAggregatedList = 0;
buildAddressAggregatedList() {
var o = new api.AddressAggregatedList();
buildCounterAddressAggregatedList++;
if (buildCounterAddressAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2299();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAddressAggregatedListWarning();
}
buildCounterAddressAggregatedList--;
return o;
}
checkAddressAggregatedList(api.AddressAggregatedList o) {
buildCounterAddressAggregatedList++;
if (buildCounterAddressAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2299(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAddressAggregatedListWarning(o.warning);
}
buildCounterAddressAggregatedList--;
}
buildUnnamed2301() {
var o = new core.List<api.Address>();
o.add(buildAddress());
o.add(buildAddress());
return o;
}
checkUnnamed2301(core.List<api.Address> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddress(o[0]);
checkAddress(o[1]);
}
core.int buildCounterAddressListWarningData = 0;
buildAddressListWarningData() {
var o = new api.AddressListWarningData();
buildCounterAddressListWarningData++;
if (buildCounterAddressListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAddressListWarningData--;
return o;
}
checkAddressListWarningData(api.AddressListWarningData o) {
buildCounterAddressListWarningData++;
if (buildCounterAddressListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAddressListWarningData--;
}
buildUnnamed2302() {
var o = new core.List<api.AddressListWarningData>();
o.add(buildAddressListWarningData());
o.add(buildAddressListWarningData());
return o;
}
checkUnnamed2302(core.List<api.AddressListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddressListWarningData(o[0]);
checkAddressListWarningData(o[1]);
}
core.int buildCounterAddressListWarning = 0;
buildAddressListWarning() {
var o = new api.AddressListWarning();
buildCounterAddressListWarning++;
if (buildCounterAddressListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2302();
o.message = "foo";
}
buildCounterAddressListWarning--;
return o;
}
checkAddressListWarning(api.AddressListWarning o) {
buildCounterAddressListWarning++;
if (buildCounterAddressListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2302(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAddressListWarning--;
}
core.int buildCounterAddressList = 0;
buildAddressList() {
var o = new api.AddressList();
buildCounterAddressList++;
if (buildCounterAddressList < 3) {
o.id = "foo";
o.items = buildUnnamed2301();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAddressListWarning();
}
buildCounterAddressList--;
return o;
}
checkAddressList(api.AddressList o) {
buildCounterAddressList++;
if (buildCounterAddressList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2301(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAddressListWarning(o.warning);
}
buildCounterAddressList--;
}
buildUnnamed2303() {
var o = new core.List<api.Address>();
o.add(buildAddress());
o.add(buildAddress());
return o;
}
checkUnnamed2303(core.List<api.Address> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddress(o[0]);
checkAddress(o[1]);
}
core.int buildCounterAddressesScopedListWarningData = 0;
buildAddressesScopedListWarningData() {
var o = new api.AddressesScopedListWarningData();
buildCounterAddressesScopedListWarningData++;
if (buildCounterAddressesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAddressesScopedListWarningData--;
return o;
}
checkAddressesScopedListWarningData(api.AddressesScopedListWarningData o) {
buildCounterAddressesScopedListWarningData++;
if (buildCounterAddressesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAddressesScopedListWarningData--;
}
buildUnnamed2304() {
var o = new core.List<api.AddressesScopedListWarningData>();
o.add(buildAddressesScopedListWarningData());
o.add(buildAddressesScopedListWarningData());
return o;
}
checkUnnamed2304(core.List<api.AddressesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAddressesScopedListWarningData(o[0]);
checkAddressesScopedListWarningData(o[1]);
}
core.int buildCounterAddressesScopedListWarning = 0;
buildAddressesScopedListWarning() {
var o = new api.AddressesScopedListWarning();
buildCounterAddressesScopedListWarning++;
if (buildCounterAddressesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2304();
o.message = "foo";
}
buildCounterAddressesScopedListWarning--;
return o;
}
checkAddressesScopedListWarning(api.AddressesScopedListWarning o) {
buildCounterAddressesScopedListWarning++;
if (buildCounterAddressesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2304(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAddressesScopedListWarning--;
}
core.int buildCounterAddressesScopedList = 0;
buildAddressesScopedList() {
var o = new api.AddressesScopedList();
buildCounterAddressesScopedList++;
if (buildCounterAddressesScopedList < 3) {
o.addresses = buildUnnamed2303();
o.warning = buildAddressesScopedListWarning();
}
buildCounterAddressesScopedList--;
return o;
}
checkAddressesScopedList(api.AddressesScopedList o) {
buildCounterAddressesScopedList++;
if (buildCounterAddressesScopedList < 3) {
checkUnnamed2303(o.addresses);
checkAddressesScopedListWarning(o.warning);
}
buildCounterAddressesScopedList--;
}
core.int buildCounterAliasIpRange = 0;
buildAliasIpRange() {
var o = new api.AliasIpRange();
buildCounterAliasIpRange++;
if (buildCounterAliasIpRange < 3) {
o.ipCidrRange = "foo";
o.subnetworkRangeName = "foo";
}
buildCounterAliasIpRange--;
return o;
}
checkAliasIpRange(api.AliasIpRange o) {
buildCounterAliasIpRange++;
if (buildCounterAliasIpRange < 3) {
unittest.expect(o.ipCidrRange, unittest.equals('foo'));
unittest.expect(o.subnetworkRangeName, unittest.equals('foo'));
}
buildCounterAliasIpRange--;
}
buildUnnamed2305() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2305(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 buildCounterAttachedDisk = 0;
buildAttachedDisk() {
var o = new api.AttachedDisk();
buildCounterAttachedDisk++;
if (buildCounterAttachedDisk < 3) {
o.autoDelete = true;
o.boot = true;
o.deviceName = "foo";
o.diskEncryptionKey = buildCustomerEncryptionKey();
o.index = 42;
o.initializeParams = buildAttachedDiskInitializeParams();
o.interface = "foo";
o.kind = "foo";
o.licenses = buildUnnamed2305();
o.mode = "foo";
o.source = "foo";
o.type = "foo";
}
buildCounterAttachedDisk--;
return o;
}
checkAttachedDisk(api.AttachedDisk o) {
buildCounterAttachedDisk++;
if (buildCounterAttachedDisk < 3) {
unittest.expect(o.autoDelete, unittest.isTrue);
unittest.expect(o.boot, unittest.isTrue);
unittest.expect(o.deviceName, unittest.equals('foo'));
checkCustomerEncryptionKey(o.diskEncryptionKey);
unittest.expect(o.index, unittest.equals(42));
checkAttachedDiskInitializeParams(o.initializeParams);
unittest.expect(o.interface, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
checkUnnamed2305(o.licenses);
unittest.expect(o.mode, unittest.equals('foo'));
unittest.expect(o.source, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterAttachedDisk--;
}
core.int buildCounterAttachedDiskInitializeParams = 0;
buildAttachedDiskInitializeParams() {
var o = new api.AttachedDiskInitializeParams();
buildCounterAttachedDiskInitializeParams++;
if (buildCounterAttachedDiskInitializeParams < 3) {
o.diskName = "foo";
o.diskSizeGb = "foo";
o.diskType = "foo";
o.sourceImage = "foo";
o.sourceImageEncryptionKey = buildCustomerEncryptionKey();
}
buildCounterAttachedDiskInitializeParams--;
return o;
}
checkAttachedDiskInitializeParams(api.AttachedDiskInitializeParams o) {
buildCounterAttachedDiskInitializeParams++;
if (buildCounterAttachedDiskInitializeParams < 3) {
unittest.expect(o.diskName, unittest.equals('foo'));
unittest.expect(o.diskSizeGb, unittest.equals('foo'));
unittest.expect(o.diskType, unittest.equals('foo'));
unittest.expect(o.sourceImage, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceImageEncryptionKey);
}
buildCounterAttachedDiskInitializeParams--;
}
buildUnnamed2306() {
var o = new core.List<api.AutoscalerStatusDetails>();
o.add(buildAutoscalerStatusDetails());
o.add(buildAutoscalerStatusDetails());
return o;
}
checkUnnamed2306(core.List<api.AutoscalerStatusDetails> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalerStatusDetails(o[0]);
checkAutoscalerStatusDetails(o[1]);
}
core.int buildCounterAutoscaler = 0;
buildAutoscaler() {
var o = new api.Autoscaler();
buildCounterAutoscaler++;
if (buildCounterAutoscaler < 3) {
o.autoscalingPolicy = buildAutoscalingPolicy();
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.region = "foo";
o.selfLink = "foo";
o.status = "foo";
o.statusDetails = buildUnnamed2306();
o.target = "foo";
o.zone = "foo";
}
buildCounterAutoscaler--;
return o;
}
checkAutoscaler(api.Autoscaler o) {
buildCounterAutoscaler++;
if (buildCounterAutoscaler < 3) {
checkAutoscalingPolicy(o.autoscalingPolicy);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
checkUnnamed2306(o.statusDetails);
unittest.expect(o.target, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterAutoscaler--;
}
buildUnnamed2307() {
var o = new core.Map<core.String, api.AutoscalersScopedList>();
o["x"] = buildAutoscalersScopedList();
o["y"] = buildAutoscalersScopedList();
return o;
}
checkUnnamed2307(core.Map<core.String, api.AutoscalersScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalersScopedList(o["x"]);
checkAutoscalersScopedList(o["y"]);
}
core.int buildCounterAutoscalerAggregatedListWarningData = 0;
buildAutoscalerAggregatedListWarningData() {
var o = new api.AutoscalerAggregatedListWarningData();
buildCounterAutoscalerAggregatedListWarningData++;
if (buildCounterAutoscalerAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAutoscalerAggregatedListWarningData--;
return o;
}
checkAutoscalerAggregatedListWarningData(
api.AutoscalerAggregatedListWarningData o) {
buildCounterAutoscalerAggregatedListWarningData++;
if (buildCounterAutoscalerAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAutoscalerAggregatedListWarningData--;
}
buildUnnamed2308() {
var o = new core.List<api.AutoscalerAggregatedListWarningData>();
o.add(buildAutoscalerAggregatedListWarningData());
o.add(buildAutoscalerAggregatedListWarningData());
return o;
}
checkUnnamed2308(core.List<api.AutoscalerAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalerAggregatedListWarningData(o[0]);
checkAutoscalerAggregatedListWarningData(o[1]);
}
core.int buildCounterAutoscalerAggregatedListWarning = 0;
buildAutoscalerAggregatedListWarning() {
var o = new api.AutoscalerAggregatedListWarning();
buildCounterAutoscalerAggregatedListWarning++;
if (buildCounterAutoscalerAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2308();
o.message = "foo";
}
buildCounterAutoscalerAggregatedListWarning--;
return o;
}
checkAutoscalerAggregatedListWarning(api.AutoscalerAggregatedListWarning o) {
buildCounterAutoscalerAggregatedListWarning++;
if (buildCounterAutoscalerAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2308(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAutoscalerAggregatedListWarning--;
}
core.int buildCounterAutoscalerAggregatedList = 0;
buildAutoscalerAggregatedList() {
var o = new api.AutoscalerAggregatedList();
buildCounterAutoscalerAggregatedList++;
if (buildCounterAutoscalerAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2307();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAutoscalerAggregatedListWarning();
}
buildCounterAutoscalerAggregatedList--;
return o;
}
checkAutoscalerAggregatedList(api.AutoscalerAggregatedList o) {
buildCounterAutoscalerAggregatedList++;
if (buildCounterAutoscalerAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2307(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAutoscalerAggregatedListWarning(o.warning);
}
buildCounterAutoscalerAggregatedList--;
}
buildUnnamed2309() {
var o = new core.List<api.Autoscaler>();
o.add(buildAutoscaler());
o.add(buildAutoscaler());
return o;
}
checkUnnamed2309(core.List<api.Autoscaler> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscaler(o[0]);
checkAutoscaler(o[1]);
}
core.int buildCounterAutoscalerListWarningData = 0;
buildAutoscalerListWarningData() {
var o = new api.AutoscalerListWarningData();
buildCounterAutoscalerListWarningData++;
if (buildCounterAutoscalerListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAutoscalerListWarningData--;
return o;
}
checkAutoscalerListWarningData(api.AutoscalerListWarningData o) {
buildCounterAutoscalerListWarningData++;
if (buildCounterAutoscalerListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAutoscalerListWarningData--;
}
buildUnnamed2310() {
var o = new core.List<api.AutoscalerListWarningData>();
o.add(buildAutoscalerListWarningData());
o.add(buildAutoscalerListWarningData());
return o;
}
checkUnnamed2310(core.List<api.AutoscalerListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalerListWarningData(o[0]);
checkAutoscalerListWarningData(o[1]);
}
core.int buildCounterAutoscalerListWarning = 0;
buildAutoscalerListWarning() {
var o = new api.AutoscalerListWarning();
buildCounterAutoscalerListWarning++;
if (buildCounterAutoscalerListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2310();
o.message = "foo";
}
buildCounterAutoscalerListWarning--;
return o;
}
checkAutoscalerListWarning(api.AutoscalerListWarning o) {
buildCounterAutoscalerListWarning++;
if (buildCounterAutoscalerListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2310(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAutoscalerListWarning--;
}
core.int buildCounterAutoscalerList = 0;
buildAutoscalerList() {
var o = new api.AutoscalerList();
buildCounterAutoscalerList++;
if (buildCounterAutoscalerList < 3) {
o.id = "foo";
o.items = buildUnnamed2309();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildAutoscalerListWarning();
}
buildCounterAutoscalerList--;
return o;
}
checkAutoscalerList(api.AutoscalerList o) {
buildCounterAutoscalerList++;
if (buildCounterAutoscalerList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2309(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkAutoscalerListWarning(o.warning);
}
buildCounterAutoscalerList--;
}
core.int buildCounterAutoscalerStatusDetails = 0;
buildAutoscalerStatusDetails() {
var o = new api.AutoscalerStatusDetails();
buildCounterAutoscalerStatusDetails++;
if (buildCounterAutoscalerStatusDetails < 3) {
o.message = "foo";
o.type = "foo";
}
buildCounterAutoscalerStatusDetails--;
return o;
}
checkAutoscalerStatusDetails(api.AutoscalerStatusDetails o) {
buildCounterAutoscalerStatusDetails++;
if (buildCounterAutoscalerStatusDetails < 3) {
unittest.expect(o.message, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterAutoscalerStatusDetails--;
}
buildUnnamed2311() {
var o = new core.List<api.Autoscaler>();
o.add(buildAutoscaler());
o.add(buildAutoscaler());
return o;
}
checkUnnamed2311(core.List<api.Autoscaler> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscaler(o[0]);
checkAutoscaler(o[1]);
}
core.int buildCounterAutoscalersScopedListWarningData = 0;
buildAutoscalersScopedListWarningData() {
var o = new api.AutoscalersScopedListWarningData();
buildCounterAutoscalersScopedListWarningData++;
if (buildCounterAutoscalersScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterAutoscalersScopedListWarningData--;
return o;
}
checkAutoscalersScopedListWarningData(api.AutoscalersScopedListWarningData o) {
buildCounterAutoscalersScopedListWarningData++;
if (buildCounterAutoscalersScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterAutoscalersScopedListWarningData--;
}
buildUnnamed2312() {
var o = new core.List<api.AutoscalersScopedListWarningData>();
o.add(buildAutoscalersScopedListWarningData());
o.add(buildAutoscalersScopedListWarningData());
return o;
}
checkUnnamed2312(core.List<api.AutoscalersScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalersScopedListWarningData(o[0]);
checkAutoscalersScopedListWarningData(o[1]);
}
core.int buildCounterAutoscalersScopedListWarning = 0;
buildAutoscalersScopedListWarning() {
var o = new api.AutoscalersScopedListWarning();
buildCounterAutoscalersScopedListWarning++;
if (buildCounterAutoscalersScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2312();
o.message = "foo";
}
buildCounterAutoscalersScopedListWarning--;
return o;
}
checkAutoscalersScopedListWarning(api.AutoscalersScopedListWarning o) {
buildCounterAutoscalersScopedListWarning++;
if (buildCounterAutoscalersScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2312(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterAutoscalersScopedListWarning--;
}
core.int buildCounterAutoscalersScopedList = 0;
buildAutoscalersScopedList() {
var o = new api.AutoscalersScopedList();
buildCounterAutoscalersScopedList++;
if (buildCounterAutoscalersScopedList < 3) {
o.autoscalers = buildUnnamed2311();
o.warning = buildAutoscalersScopedListWarning();
}
buildCounterAutoscalersScopedList--;
return o;
}
checkAutoscalersScopedList(api.AutoscalersScopedList o) {
buildCounterAutoscalersScopedList++;
if (buildCounterAutoscalersScopedList < 3) {
checkUnnamed2311(o.autoscalers);
checkAutoscalersScopedListWarning(o.warning);
}
buildCounterAutoscalersScopedList--;
}
buildUnnamed2313() {
var o = new core.List<api.AutoscalingPolicyCustomMetricUtilization>();
o.add(buildAutoscalingPolicyCustomMetricUtilization());
o.add(buildAutoscalingPolicyCustomMetricUtilization());
return o;
}
checkUnnamed2313(core.List<api.AutoscalingPolicyCustomMetricUtilization> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscalingPolicyCustomMetricUtilization(o[0]);
checkAutoscalingPolicyCustomMetricUtilization(o[1]);
}
core.int buildCounterAutoscalingPolicy = 0;
buildAutoscalingPolicy() {
var o = new api.AutoscalingPolicy();
buildCounterAutoscalingPolicy++;
if (buildCounterAutoscalingPolicy < 3) {
o.coolDownPeriodSec = 42;
o.cpuUtilization = buildAutoscalingPolicyCpuUtilization();
o.customMetricUtilizations = buildUnnamed2313();
o.loadBalancingUtilization =
buildAutoscalingPolicyLoadBalancingUtilization();
o.maxNumReplicas = 42;
o.minNumReplicas = 42;
}
buildCounterAutoscalingPolicy--;
return o;
}
checkAutoscalingPolicy(api.AutoscalingPolicy o) {
buildCounterAutoscalingPolicy++;
if (buildCounterAutoscalingPolicy < 3) {
unittest.expect(o.coolDownPeriodSec, unittest.equals(42));
checkAutoscalingPolicyCpuUtilization(o.cpuUtilization);
checkUnnamed2313(o.customMetricUtilizations);
checkAutoscalingPolicyLoadBalancingUtilization(o.loadBalancingUtilization);
unittest.expect(o.maxNumReplicas, unittest.equals(42));
unittest.expect(o.minNumReplicas, unittest.equals(42));
}
buildCounterAutoscalingPolicy--;
}
core.int buildCounterAutoscalingPolicyCpuUtilization = 0;
buildAutoscalingPolicyCpuUtilization() {
var o = new api.AutoscalingPolicyCpuUtilization();
buildCounterAutoscalingPolicyCpuUtilization++;
if (buildCounterAutoscalingPolicyCpuUtilization < 3) {
o.utilizationTarget = 42.0;
}
buildCounterAutoscalingPolicyCpuUtilization--;
return o;
}
checkAutoscalingPolicyCpuUtilization(api.AutoscalingPolicyCpuUtilization o) {
buildCounterAutoscalingPolicyCpuUtilization++;
if (buildCounterAutoscalingPolicyCpuUtilization < 3) {
unittest.expect(o.utilizationTarget, unittest.equals(42.0));
}
buildCounterAutoscalingPolicyCpuUtilization--;
}
core.int buildCounterAutoscalingPolicyCustomMetricUtilization = 0;
buildAutoscalingPolicyCustomMetricUtilization() {
var o = new api.AutoscalingPolicyCustomMetricUtilization();
buildCounterAutoscalingPolicyCustomMetricUtilization++;
if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) {
o.metric = "foo";
o.utilizationTarget = 42.0;
o.utilizationTargetType = "foo";
}
buildCounterAutoscalingPolicyCustomMetricUtilization--;
return o;
}
checkAutoscalingPolicyCustomMetricUtilization(
api.AutoscalingPolicyCustomMetricUtilization o) {
buildCounterAutoscalingPolicyCustomMetricUtilization++;
if (buildCounterAutoscalingPolicyCustomMetricUtilization < 3) {
unittest.expect(o.metric, unittest.equals('foo'));
unittest.expect(o.utilizationTarget, unittest.equals(42.0));
unittest.expect(o.utilizationTargetType, unittest.equals('foo'));
}
buildCounterAutoscalingPolicyCustomMetricUtilization--;
}
core.int buildCounterAutoscalingPolicyLoadBalancingUtilization = 0;
buildAutoscalingPolicyLoadBalancingUtilization() {
var o = new api.AutoscalingPolicyLoadBalancingUtilization();
buildCounterAutoscalingPolicyLoadBalancingUtilization++;
if (buildCounterAutoscalingPolicyLoadBalancingUtilization < 3) {
o.utilizationTarget = 42.0;
}
buildCounterAutoscalingPolicyLoadBalancingUtilization--;
return o;
}
checkAutoscalingPolicyLoadBalancingUtilization(
api.AutoscalingPolicyLoadBalancingUtilization o) {
buildCounterAutoscalingPolicyLoadBalancingUtilization++;
if (buildCounterAutoscalingPolicyLoadBalancingUtilization < 3) {
unittest.expect(o.utilizationTarget, unittest.equals(42.0));
}
buildCounterAutoscalingPolicyLoadBalancingUtilization--;
}
core.int buildCounterBackend = 0;
buildBackend() {
var o = new api.Backend();
buildCounterBackend++;
if (buildCounterBackend < 3) {
o.balancingMode = "foo";
o.capacityScaler = 42.0;
o.description = "foo";
o.group = "foo";
o.maxConnections = 42;
o.maxConnectionsPerInstance = 42;
o.maxRate = 42;
o.maxRatePerInstance = 42.0;
o.maxUtilization = 42.0;
}
buildCounterBackend--;
return o;
}
checkBackend(api.Backend o) {
buildCounterBackend++;
if (buildCounterBackend < 3) {
unittest.expect(o.balancingMode, unittest.equals('foo'));
unittest.expect(o.capacityScaler, unittest.equals(42.0));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.group, unittest.equals('foo'));
unittest.expect(o.maxConnections, unittest.equals(42));
unittest.expect(o.maxConnectionsPerInstance, unittest.equals(42));
unittest.expect(o.maxRate, unittest.equals(42));
unittest.expect(o.maxRatePerInstance, unittest.equals(42.0));
unittest.expect(o.maxUtilization, unittest.equals(42.0));
}
buildCounterBackend--;
}
core.int buildCounterBackendBucket = 0;
buildBackendBucket() {
var o = new api.BackendBucket();
buildCounterBackendBucket++;
if (buildCounterBackendBucket < 3) {
o.bucketName = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.enableCdn = true;
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
}
buildCounterBackendBucket--;
return o;
}
checkBackendBucket(api.BackendBucket o) {
buildCounterBackendBucket++;
if (buildCounterBackendBucket < 3) {
unittest.expect(o.bucketName, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.enableCdn, unittest.isTrue);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterBackendBucket--;
}
buildUnnamed2314() {
var o = new core.List<api.BackendBucket>();
o.add(buildBackendBucket());
o.add(buildBackendBucket());
return o;
}
checkUnnamed2314(core.List<api.BackendBucket> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendBucket(o[0]);
checkBackendBucket(o[1]);
}
core.int buildCounterBackendBucketListWarningData = 0;
buildBackendBucketListWarningData() {
var o = new api.BackendBucketListWarningData();
buildCounterBackendBucketListWarningData++;
if (buildCounterBackendBucketListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterBackendBucketListWarningData--;
return o;
}
checkBackendBucketListWarningData(api.BackendBucketListWarningData o) {
buildCounterBackendBucketListWarningData++;
if (buildCounterBackendBucketListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterBackendBucketListWarningData--;
}
buildUnnamed2315() {
var o = new core.List<api.BackendBucketListWarningData>();
o.add(buildBackendBucketListWarningData());
o.add(buildBackendBucketListWarningData());
return o;
}
checkUnnamed2315(core.List<api.BackendBucketListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendBucketListWarningData(o[0]);
checkBackendBucketListWarningData(o[1]);
}
core.int buildCounterBackendBucketListWarning = 0;
buildBackendBucketListWarning() {
var o = new api.BackendBucketListWarning();
buildCounterBackendBucketListWarning++;
if (buildCounterBackendBucketListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2315();
o.message = "foo";
}
buildCounterBackendBucketListWarning--;
return o;
}
checkBackendBucketListWarning(api.BackendBucketListWarning o) {
buildCounterBackendBucketListWarning++;
if (buildCounterBackendBucketListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2315(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterBackendBucketListWarning--;
}
core.int buildCounterBackendBucketList = 0;
buildBackendBucketList() {
var o = new api.BackendBucketList();
buildCounterBackendBucketList++;
if (buildCounterBackendBucketList < 3) {
o.id = "foo";
o.items = buildUnnamed2314();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildBackendBucketListWarning();
}
buildCounterBackendBucketList--;
return o;
}
checkBackendBucketList(api.BackendBucketList o) {
buildCounterBackendBucketList++;
if (buildCounterBackendBucketList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2314(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkBackendBucketListWarning(o.warning);
}
buildCounterBackendBucketList--;
}
buildUnnamed2316() {
var o = new core.List<api.Backend>();
o.add(buildBackend());
o.add(buildBackend());
return o;
}
checkUnnamed2316(core.List<api.Backend> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackend(o[0]);
checkBackend(o[1]);
}
buildUnnamed2317() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2317(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 buildCounterBackendService = 0;
buildBackendService() {
var o = new api.BackendService();
buildCounterBackendService++;
if (buildCounterBackendService < 3) {
o.affinityCookieTtlSec = 42;
o.backends = buildUnnamed2316();
o.cdnPolicy = buildBackendServiceCdnPolicy();
o.connectionDraining = buildConnectionDraining();
o.creationTimestamp = "foo";
o.description = "foo";
o.enableCDN = true;
o.fingerprint = "foo";
o.healthChecks = buildUnnamed2317();
o.iap = buildBackendServiceIAP();
o.id = "foo";
o.kind = "foo";
o.loadBalancingScheme = "foo";
o.name = "foo";
o.port = 42;
o.portName = "foo";
o.protocol = "foo";
o.region = "foo";
o.selfLink = "foo";
o.sessionAffinity = "foo";
o.timeoutSec = 42;
}
buildCounterBackendService--;
return o;
}
checkBackendService(api.BackendService o) {
buildCounterBackendService++;
if (buildCounterBackendService < 3) {
unittest.expect(o.affinityCookieTtlSec, unittest.equals(42));
checkUnnamed2316(o.backends);
checkBackendServiceCdnPolicy(o.cdnPolicy);
checkConnectionDraining(o.connectionDraining);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.enableCDN, unittest.isTrue);
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2317(o.healthChecks);
checkBackendServiceIAP(o.iap);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.loadBalancingScheme, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.portName, unittest.equals('foo'));
unittest.expect(o.protocol, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.sessionAffinity, unittest.equals('foo'));
unittest.expect(o.timeoutSec, unittest.equals(42));
}
buildCounterBackendService--;
}
buildUnnamed2318() {
var o = new core.Map<core.String, api.BackendServicesScopedList>();
o["x"] = buildBackendServicesScopedList();
o["y"] = buildBackendServicesScopedList();
return o;
}
checkUnnamed2318(core.Map<core.String, api.BackendServicesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendServicesScopedList(o["x"]);
checkBackendServicesScopedList(o["y"]);
}
core.int buildCounterBackendServiceAggregatedListWarningData = 0;
buildBackendServiceAggregatedListWarningData() {
var o = new api.BackendServiceAggregatedListWarningData();
buildCounterBackendServiceAggregatedListWarningData++;
if (buildCounterBackendServiceAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterBackendServiceAggregatedListWarningData--;
return o;
}
checkBackendServiceAggregatedListWarningData(
api.BackendServiceAggregatedListWarningData o) {
buildCounterBackendServiceAggregatedListWarningData++;
if (buildCounterBackendServiceAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterBackendServiceAggregatedListWarningData--;
}
buildUnnamed2319() {
var o = new core.List<api.BackendServiceAggregatedListWarningData>();
o.add(buildBackendServiceAggregatedListWarningData());
o.add(buildBackendServiceAggregatedListWarningData());
return o;
}
checkUnnamed2319(core.List<api.BackendServiceAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendServiceAggregatedListWarningData(o[0]);
checkBackendServiceAggregatedListWarningData(o[1]);
}
core.int buildCounterBackendServiceAggregatedListWarning = 0;
buildBackendServiceAggregatedListWarning() {
var o = new api.BackendServiceAggregatedListWarning();
buildCounterBackendServiceAggregatedListWarning++;
if (buildCounterBackendServiceAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2319();
o.message = "foo";
}
buildCounterBackendServiceAggregatedListWarning--;
return o;
}
checkBackendServiceAggregatedListWarning(
api.BackendServiceAggregatedListWarning o) {
buildCounterBackendServiceAggregatedListWarning++;
if (buildCounterBackendServiceAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2319(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterBackendServiceAggregatedListWarning--;
}
core.int buildCounterBackendServiceAggregatedList = 0;
buildBackendServiceAggregatedList() {
var o = new api.BackendServiceAggregatedList();
buildCounterBackendServiceAggregatedList++;
if (buildCounterBackendServiceAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2318();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildBackendServiceAggregatedListWarning();
}
buildCounterBackendServiceAggregatedList--;
return o;
}
checkBackendServiceAggregatedList(api.BackendServiceAggregatedList o) {
buildCounterBackendServiceAggregatedList++;
if (buildCounterBackendServiceAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2318(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkBackendServiceAggregatedListWarning(o.warning);
}
buildCounterBackendServiceAggregatedList--;
}
core.int buildCounterBackendServiceCdnPolicy = 0;
buildBackendServiceCdnPolicy() {
var o = new api.BackendServiceCdnPolicy();
buildCounterBackendServiceCdnPolicy++;
if (buildCounterBackendServiceCdnPolicy < 3) {
o.cacheKeyPolicy = buildCacheKeyPolicy();
}
buildCounterBackendServiceCdnPolicy--;
return o;
}
checkBackendServiceCdnPolicy(api.BackendServiceCdnPolicy o) {
buildCounterBackendServiceCdnPolicy++;
if (buildCounterBackendServiceCdnPolicy < 3) {
checkCacheKeyPolicy(o.cacheKeyPolicy);
}
buildCounterBackendServiceCdnPolicy--;
}
buildUnnamed2320() {
var o = new core.List<api.HealthStatus>();
o.add(buildHealthStatus());
o.add(buildHealthStatus());
return o;
}
checkUnnamed2320(core.List<api.HealthStatus> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthStatus(o[0]);
checkHealthStatus(o[1]);
}
core.int buildCounterBackendServiceGroupHealth = 0;
buildBackendServiceGroupHealth() {
var o = new api.BackendServiceGroupHealth();
buildCounterBackendServiceGroupHealth++;
if (buildCounterBackendServiceGroupHealth < 3) {
o.healthStatus = buildUnnamed2320();
o.kind = "foo";
}
buildCounterBackendServiceGroupHealth--;
return o;
}
checkBackendServiceGroupHealth(api.BackendServiceGroupHealth o) {
buildCounterBackendServiceGroupHealth++;
if (buildCounterBackendServiceGroupHealth < 3) {
checkUnnamed2320(o.healthStatus);
unittest.expect(o.kind, unittest.equals('foo'));
}
buildCounterBackendServiceGroupHealth--;
}
core.int buildCounterBackendServiceIAP = 0;
buildBackendServiceIAP() {
var o = new api.BackendServiceIAP();
buildCounterBackendServiceIAP++;
if (buildCounterBackendServiceIAP < 3) {
o.enabled = true;
o.oauth2ClientId = "foo";
o.oauth2ClientSecret = "foo";
o.oauth2ClientSecretSha256 = "foo";
}
buildCounterBackendServiceIAP--;
return o;
}
checkBackendServiceIAP(api.BackendServiceIAP o) {
buildCounterBackendServiceIAP++;
if (buildCounterBackendServiceIAP < 3) {
unittest.expect(o.enabled, unittest.isTrue);
unittest.expect(o.oauth2ClientId, unittest.equals('foo'));
unittest.expect(o.oauth2ClientSecret, unittest.equals('foo'));
unittest.expect(o.oauth2ClientSecretSha256, unittest.equals('foo'));
}
buildCounterBackendServiceIAP--;
}
buildUnnamed2321() {
var o = new core.List<api.BackendService>();
o.add(buildBackendService());
o.add(buildBackendService());
return o;
}
checkUnnamed2321(core.List<api.BackendService> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendService(o[0]);
checkBackendService(o[1]);
}
core.int buildCounterBackendServiceListWarningData = 0;
buildBackendServiceListWarningData() {
var o = new api.BackendServiceListWarningData();
buildCounterBackendServiceListWarningData++;
if (buildCounterBackendServiceListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterBackendServiceListWarningData--;
return o;
}
checkBackendServiceListWarningData(api.BackendServiceListWarningData o) {
buildCounterBackendServiceListWarningData++;
if (buildCounterBackendServiceListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterBackendServiceListWarningData--;
}
buildUnnamed2322() {
var o = new core.List<api.BackendServiceListWarningData>();
o.add(buildBackendServiceListWarningData());
o.add(buildBackendServiceListWarningData());
return o;
}
checkUnnamed2322(core.List<api.BackendServiceListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendServiceListWarningData(o[0]);
checkBackendServiceListWarningData(o[1]);
}
core.int buildCounterBackendServiceListWarning = 0;
buildBackendServiceListWarning() {
var o = new api.BackendServiceListWarning();
buildCounterBackendServiceListWarning++;
if (buildCounterBackendServiceListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2322();
o.message = "foo";
}
buildCounterBackendServiceListWarning--;
return o;
}
checkBackendServiceListWarning(api.BackendServiceListWarning o) {
buildCounterBackendServiceListWarning++;
if (buildCounterBackendServiceListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2322(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterBackendServiceListWarning--;
}
core.int buildCounterBackendServiceList = 0;
buildBackendServiceList() {
var o = new api.BackendServiceList();
buildCounterBackendServiceList++;
if (buildCounterBackendServiceList < 3) {
o.id = "foo";
o.items = buildUnnamed2321();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildBackendServiceListWarning();
}
buildCounterBackendServiceList--;
return o;
}
checkBackendServiceList(api.BackendServiceList o) {
buildCounterBackendServiceList++;
if (buildCounterBackendServiceList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2321(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkBackendServiceListWarning(o.warning);
}
buildCounterBackendServiceList--;
}
buildUnnamed2323() {
var o = new core.List<api.BackendService>();
o.add(buildBackendService());
o.add(buildBackendService());
return o;
}
checkUnnamed2323(core.List<api.BackendService> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendService(o[0]);
checkBackendService(o[1]);
}
core.int buildCounterBackendServicesScopedListWarningData = 0;
buildBackendServicesScopedListWarningData() {
var o = new api.BackendServicesScopedListWarningData();
buildCounterBackendServicesScopedListWarningData++;
if (buildCounterBackendServicesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterBackendServicesScopedListWarningData--;
return o;
}
checkBackendServicesScopedListWarningData(
api.BackendServicesScopedListWarningData o) {
buildCounterBackendServicesScopedListWarningData++;
if (buildCounterBackendServicesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterBackendServicesScopedListWarningData--;
}
buildUnnamed2324() {
var o = new core.List<api.BackendServicesScopedListWarningData>();
o.add(buildBackendServicesScopedListWarningData());
o.add(buildBackendServicesScopedListWarningData());
return o;
}
checkUnnamed2324(core.List<api.BackendServicesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkBackendServicesScopedListWarningData(o[0]);
checkBackendServicesScopedListWarningData(o[1]);
}
core.int buildCounterBackendServicesScopedListWarning = 0;
buildBackendServicesScopedListWarning() {
var o = new api.BackendServicesScopedListWarning();
buildCounterBackendServicesScopedListWarning++;
if (buildCounterBackendServicesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2324();
o.message = "foo";
}
buildCounterBackendServicesScopedListWarning--;
return o;
}
checkBackendServicesScopedListWarning(api.BackendServicesScopedListWarning o) {
buildCounterBackendServicesScopedListWarning++;
if (buildCounterBackendServicesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2324(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterBackendServicesScopedListWarning--;
}
core.int buildCounterBackendServicesScopedList = 0;
buildBackendServicesScopedList() {
var o = new api.BackendServicesScopedList();
buildCounterBackendServicesScopedList++;
if (buildCounterBackendServicesScopedList < 3) {
o.backendServices = buildUnnamed2323();
o.warning = buildBackendServicesScopedListWarning();
}
buildCounterBackendServicesScopedList--;
return o;
}
checkBackendServicesScopedList(api.BackendServicesScopedList o) {
buildCounterBackendServicesScopedList++;
if (buildCounterBackendServicesScopedList < 3) {
checkUnnamed2323(o.backendServices);
checkBackendServicesScopedListWarning(o.warning);
}
buildCounterBackendServicesScopedList--;
}
core.int buildCounterCacheInvalidationRule = 0;
buildCacheInvalidationRule() {
var o = new api.CacheInvalidationRule();
buildCounterCacheInvalidationRule++;
if (buildCounterCacheInvalidationRule < 3) {
o.host = "foo";
o.path = "foo";
}
buildCounterCacheInvalidationRule--;
return o;
}
checkCacheInvalidationRule(api.CacheInvalidationRule o) {
buildCounterCacheInvalidationRule++;
if (buildCounterCacheInvalidationRule < 3) {
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.path, unittest.equals('foo'));
}
buildCounterCacheInvalidationRule--;
}
buildUnnamed2325() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2325(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'));
}
buildUnnamed2326() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2326(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 buildCounterCacheKeyPolicy = 0;
buildCacheKeyPolicy() {
var o = new api.CacheKeyPolicy();
buildCounterCacheKeyPolicy++;
if (buildCounterCacheKeyPolicy < 3) {
o.includeHost = true;
o.includeProtocol = true;
o.includeQueryString = true;
o.queryStringBlacklist = buildUnnamed2325();
o.queryStringWhitelist = buildUnnamed2326();
}
buildCounterCacheKeyPolicy--;
return o;
}
checkCacheKeyPolicy(api.CacheKeyPolicy o) {
buildCounterCacheKeyPolicy++;
if (buildCounterCacheKeyPolicy < 3) {
unittest.expect(o.includeHost, unittest.isTrue);
unittest.expect(o.includeProtocol, unittest.isTrue);
unittest.expect(o.includeQueryString, unittest.isTrue);
checkUnnamed2325(o.queryStringBlacklist);
checkUnnamed2326(o.queryStringWhitelist);
}
buildCounterCacheKeyPolicy--;
}
buildUnnamed2327() {
var o = new core.List<api.ResourceCommitment>();
o.add(buildResourceCommitment());
o.add(buildResourceCommitment());
return o;
}
checkUnnamed2327(core.List<api.ResourceCommitment> o) {
unittest.expect(o, unittest.hasLength(2));
checkResourceCommitment(o[0]);
checkResourceCommitment(o[1]);
}
core.int buildCounterCommitment = 0;
buildCommitment() {
var o = new api.Commitment();
buildCounterCommitment++;
if (buildCounterCommitment < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.endTimestamp = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.plan = "foo";
o.region = "foo";
o.resources = buildUnnamed2327();
o.selfLink = "foo";
o.startTimestamp = "foo";
o.status = "foo";
o.statusMessage = "foo";
}
buildCounterCommitment--;
return o;
}
checkCommitment(api.Commitment o) {
buildCounterCommitment++;
if (buildCounterCommitment < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.endTimestamp, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.plan, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
checkUnnamed2327(o.resources);
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.startTimestamp, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.statusMessage, unittest.equals('foo'));
}
buildCounterCommitment--;
}
buildUnnamed2328() {
var o = new core.Map<core.String, api.CommitmentsScopedList>();
o["x"] = buildCommitmentsScopedList();
o["y"] = buildCommitmentsScopedList();
return o;
}
checkUnnamed2328(core.Map<core.String, api.CommitmentsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitmentsScopedList(o["x"]);
checkCommitmentsScopedList(o["y"]);
}
core.int buildCounterCommitmentAggregatedListWarningData = 0;
buildCommitmentAggregatedListWarningData() {
var o = new api.CommitmentAggregatedListWarningData();
buildCounterCommitmentAggregatedListWarningData++;
if (buildCounterCommitmentAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterCommitmentAggregatedListWarningData--;
return o;
}
checkCommitmentAggregatedListWarningData(
api.CommitmentAggregatedListWarningData o) {
buildCounterCommitmentAggregatedListWarningData++;
if (buildCounterCommitmentAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterCommitmentAggregatedListWarningData--;
}
buildUnnamed2329() {
var o = new core.List<api.CommitmentAggregatedListWarningData>();
o.add(buildCommitmentAggregatedListWarningData());
o.add(buildCommitmentAggregatedListWarningData());
return o;
}
checkUnnamed2329(core.List<api.CommitmentAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitmentAggregatedListWarningData(o[0]);
checkCommitmentAggregatedListWarningData(o[1]);
}
core.int buildCounterCommitmentAggregatedListWarning = 0;
buildCommitmentAggregatedListWarning() {
var o = new api.CommitmentAggregatedListWarning();
buildCounterCommitmentAggregatedListWarning++;
if (buildCounterCommitmentAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2329();
o.message = "foo";
}
buildCounterCommitmentAggregatedListWarning--;
return o;
}
checkCommitmentAggregatedListWarning(api.CommitmentAggregatedListWarning o) {
buildCounterCommitmentAggregatedListWarning++;
if (buildCounterCommitmentAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2329(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterCommitmentAggregatedListWarning--;
}
core.int buildCounterCommitmentAggregatedList = 0;
buildCommitmentAggregatedList() {
var o = new api.CommitmentAggregatedList();
buildCounterCommitmentAggregatedList++;
if (buildCounterCommitmentAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2328();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildCommitmentAggregatedListWarning();
}
buildCounterCommitmentAggregatedList--;
return o;
}
checkCommitmentAggregatedList(api.CommitmentAggregatedList o) {
buildCounterCommitmentAggregatedList++;
if (buildCounterCommitmentAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2328(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkCommitmentAggregatedListWarning(o.warning);
}
buildCounterCommitmentAggregatedList--;
}
buildUnnamed2330() {
var o = new core.List<api.Commitment>();
o.add(buildCommitment());
o.add(buildCommitment());
return o;
}
checkUnnamed2330(core.List<api.Commitment> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitment(o[0]);
checkCommitment(o[1]);
}
core.int buildCounterCommitmentListWarningData = 0;
buildCommitmentListWarningData() {
var o = new api.CommitmentListWarningData();
buildCounterCommitmentListWarningData++;
if (buildCounterCommitmentListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterCommitmentListWarningData--;
return o;
}
checkCommitmentListWarningData(api.CommitmentListWarningData o) {
buildCounterCommitmentListWarningData++;
if (buildCounterCommitmentListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterCommitmentListWarningData--;
}
buildUnnamed2331() {
var o = new core.List<api.CommitmentListWarningData>();
o.add(buildCommitmentListWarningData());
o.add(buildCommitmentListWarningData());
return o;
}
checkUnnamed2331(core.List<api.CommitmentListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitmentListWarningData(o[0]);
checkCommitmentListWarningData(o[1]);
}
core.int buildCounterCommitmentListWarning = 0;
buildCommitmentListWarning() {
var o = new api.CommitmentListWarning();
buildCounterCommitmentListWarning++;
if (buildCounterCommitmentListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2331();
o.message = "foo";
}
buildCounterCommitmentListWarning--;
return o;
}
checkCommitmentListWarning(api.CommitmentListWarning o) {
buildCounterCommitmentListWarning++;
if (buildCounterCommitmentListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2331(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterCommitmentListWarning--;
}
core.int buildCounterCommitmentList = 0;
buildCommitmentList() {
var o = new api.CommitmentList();
buildCounterCommitmentList++;
if (buildCounterCommitmentList < 3) {
o.id = "foo";
o.items = buildUnnamed2330();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildCommitmentListWarning();
}
buildCounterCommitmentList--;
return o;
}
checkCommitmentList(api.CommitmentList o) {
buildCounterCommitmentList++;
if (buildCounterCommitmentList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2330(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkCommitmentListWarning(o.warning);
}
buildCounterCommitmentList--;
}
buildUnnamed2332() {
var o = new core.List<api.Commitment>();
o.add(buildCommitment());
o.add(buildCommitment());
return o;
}
checkUnnamed2332(core.List<api.Commitment> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitment(o[0]);
checkCommitment(o[1]);
}
core.int buildCounterCommitmentsScopedListWarningData = 0;
buildCommitmentsScopedListWarningData() {
var o = new api.CommitmentsScopedListWarningData();
buildCounterCommitmentsScopedListWarningData++;
if (buildCounterCommitmentsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterCommitmentsScopedListWarningData--;
return o;
}
checkCommitmentsScopedListWarningData(api.CommitmentsScopedListWarningData o) {
buildCounterCommitmentsScopedListWarningData++;
if (buildCounterCommitmentsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterCommitmentsScopedListWarningData--;
}
buildUnnamed2333() {
var o = new core.List<api.CommitmentsScopedListWarningData>();
o.add(buildCommitmentsScopedListWarningData());
o.add(buildCommitmentsScopedListWarningData());
return o;
}
checkUnnamed2333(core.List<api.CommitmentsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkCommitmentsScopedListWarningData(o[0]);
checkCommitmentsScopedListWarningData(o[1]);
}
core.int buildCounterCommitmentsScopedListWarning = 0;
buildCommitmentsScopedListWarning() {
var o = new api.CommitmentsScopedListWarning();
buildCounterCommitmentsScopedListWarning++;
if (buildCounterCommitmentsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2333();
o.message = "foo";
}
buildCounterCommitmentsScopedListWarning--;
return o;
}
checkCommitmentsScopedListWarning(api.CommitmentsScopedListWarning o) {
buildCounterCommitmentsScopedListWarning++;
if (buildCounterCommitmentsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2333(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterCommitmentsScopedListWarning--;
}
core.int buildCounterCommitmentsScopedList = 0;
buildCommitmentsScopedList() {
var o = new api.CommitmentsScopedList();
buildCounterCommitmentsScopedList++;
if (buildCounterCommitmentsScopedList < 3) {
o.commitments = buildUnnamed2332();
o.warning = buildCommitmentsScopedListWarning();
}
buildCounterCommitmentsScopedList--;
return o;
}
checkCommitmentsScopedList(api.CommitmentsScopedList o) {
buildCounterCommitmentsScopedList++;
if (buildCounterCommitmentsScopedList < 3) {
checkUnnamed2332(o.commitments);
checkCommitmentsScopedListWarning(o.warning);
}
buildCounterCommitmentsScopedList--;
}
core.int buildCounterConnectionDraining = 0;
buildConnectionDraining() {
var o = new api.ConnectionDraining();
buildCounterConnectionDraining++;
if (buildCounterConnectionDraining < 3) {
o.drainingTimeoutSec = 42;
}
buildCounterConnectionDraining--;
return o;
}
checkConnectionDraining(api.ConnectionDraining o) {
buildCounterConnectionDraining++;
if (buildCounterConnectionDraining < 3) {
unittest.expect(o.drainingTimeoutSec, unittest.equals(42));
}
buildCounterConnectionDraining--;
}
core.int buildCounterCustomerEncryptionKey = 0;
buildCustomerEncryptionKey() {
var o = new api.CustomerEncryptionKey();
buildCounterCustomerEncryptionKey++;
if (buildCounterCustomerEncryptionKey < 3) {
o.rawKey = "foo";
o.sha256 = "foo";
}
buildCounterCustomerEncryptionKey--;
return o;
}
checkCustomerEncryptionKey(api.CustomerEncryptionKey o) {
buildCounterCustomerEncryptionKey++;
if (buildCounterCustomerEncryptionKey < 3) {
unittest.expect(o.rawKey, unittest.equals('foo'));
unittest.expect(o.sha256, unittest.equals('foo'));
}
buildCounterCustomerEncryptionKey--;
}
core.int buildCounterCustomerEncryptionKeyProtectedDisk = 0;
buildCustomerEncryptionKeyProtectedDisk() {
var o = new api.CustomerEncryptionKeyProtectedDisk();
buildCounterCustomerEncryptionKeyProtectedDisk++;
if (buildCounterCustomerEncryptionKeyProtectedDisk < 3) {
o.diskEncryptionKey = buildCustomerEncryptionKey();
o.source = "foo";
}
buildCounterCustomerEncryptionKeyProtectedDisk--;
return o;
}
checkCustomerEncryptionKeyProtectedDisk(
api.CustomerEncryptionKeyProtectedDisk o) {
buildCounterCustomerEncryptionKeyProtectedDisk++;
if (buildCounterCustomerEncryptionKeyProtectedDisk < 3) {
checkCustomerEncryptionKey(o.diskEncryptionKey);
unittest.expect(o.source, unittest.equals('foo'));
}
buildCounterCustomerEncryptionKeyProtectedDisk--;
}
core.int buildCounterDeprecationStatus = 0;
buildDeprecationStatus() {
var o = new api.DeprecationStatus();
buildCounterDeprecationStatus++;
if (buildCounterDeprecationStatus < 3) {
o.deleted = "foo";
o.deprecated = "foo";
o.obsolete = "foo";
o.replacement = "foo";
o.state = "foo";
}
buildCounterDeprecationStatus--;
return o;
}
checkDeprecationStatus(api.DeprecationStatus o) {
buildCounterDeprecationStatus++;
if (buildCounterDeprecationStatus < 3) {
unittest.expect(o.deleted, unittest.equals('foo'));
unittest.expect(o.deprecated, unittest.equals('foo'));
unittest.expect(o.obsolete, unittest.equals('foo'));
unittest.expect(o.replacement, unittest.equals('foo'));
unittest.expect(o.state, unittest.equals('foo'));
}
buildCounterDeprecationStatus--;
}
buildUnnamed2334() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2334(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'));
}
buildUnnamed2335() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2335(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'));
}
buildUnnamed2336() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2336(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 buildCounterDisk = 0;
buildDisk() {
var o = new api.Disk();
buildCounterDisk++;
if (buildCounterDisk < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.diskEncryptionKey = buildCustomerEncryptionKey();
o.id = "foo";
o.kind = "foo";
o.labelFingerprint = "foo";
o.labels = buildUnnamed2334();
o.lastAttachTimestamp = "foo";
o.lastDetachTimestamp = "foo";
o.licenses = buildUnnamed2335();
o.name = "foo";
o.options = "foo";
o.selfLink = "foo";
o.sizeGb = "foo";
o.sourceImage = "foo";
o.sourceImageEncryptionKey = buildCustomerEncryptionKey();
o.sourceImageId = "foo";
o.sourceSnapshot = "foo";
o.sourceSnapshotEncryptionKey = buildCustomerEncryptionKey();
o.sourceSnapshotId = "foo";
o.status = "foo";
o.type = "foo";
o.users = buildUnnamed2336();
o.zone = "foo";
}
buildCounterDisk--;
return o;
}
checkDisk(api.Disk o) {
buildCounterDisk++;
if (buildCounterDisk < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
checkCustomerEncryptionKey(o.diskEncryptionKey);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2334(o.labels);
unittest.expect(o.lastAttachTimestamp, unittest.equals('foo'));
unittest.expect(o.lastDetachTimestamp, unittest.equals('foo'));
checkUnnamed2335(o.licenses);
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.options, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.sizeGb, unittest.equals('foo'));
unittest.expect(o.sourceImage, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceImageEncryptionKey);
unittest.expect(o.sourceImageId, unittest.equals('foo'));
unittest.expect(o.sourceSnapshot, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceSnapshotEncryptionKey);
unittest.expect(o.sourceSnapshotId, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
checkUnnamed2336(o.users);
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterDisk--;
}
buildUnnamed2337() {
var o = new core.Map<core.String, api.DisksScopedList>();
o["x"] = buildDisksScopedList();
o["y"] = buildDisksScopedList();
return o;
}
checkUnnamed2337(core.Map<core.String, api.DisksScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisksScopedList(o["x"]);
checkDisksScopedList(o["y"]);
}
core.int buildCounterDiskAggregatedListWarningData = 0;
buildDiskAggregatedListWarningData() {
var o = new api.DiskAggregatedListWarningData();
buildCounterDiskAggregatedListWarningData++;
if (buildCounterDiskAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDiskAggregatedListWarningData--;
return o;
}
checkDiskAggregatedListWarningData(api.DiskAggregatedListWarningData o) {
buildCounterDiskAggregatedListWarningData++;
if (buildCounterDiskAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDiskAggregatedListWarningData--;
}
buildUnnamed2338() {
var o = new core.List<api.DiskAggregatedListWarningData>();
o.add(buildDiskAggregatedListWarningData());
o.add(buildDiskAggregatedListWarningData());
return o;
}
checkUnnamed2338(core.List<api.DiskAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskAggregatedListWarningData(o[0]);
checkDiskAggregatedListWarningData(o[1]);
}
core.int buildCounterDiskAggregatedListWarning = 0;
buildDiskAggregatedListWarning() {
var o = new api.DiskAggregatedListWarning();
buildCounterDiskAggregatedListWarning++;
if (buildCounterDiskAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2338();
o.message = "foo";
}
buildCounterDiskAggregatedListWarning--;
return o;
}
checkDiskAggregatedListWarning(api.DiskAggregatedListWarning o) {
buildCounterDiskAggregatedListWarning++;
if (buildCounterDiskAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2338(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDiskAggregatedListWarning--;
}
core.int buildCounterDiskAggregatedList = 0;
buildDiskAggregatedList() {
var o = new api.DiskAggregatedList();
buildCounterDiskAggregatedList++;
if (buildCounterDiskAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2337();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildDiskAggregatedListWarning();
}
buildCounterDiskAggregatedList--;
return o;
}
checkDiskAggregatedList(api.DiskAggregatedList o) {
buildCounterDiskAggregatedList++;
if (buildCounterDiskAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2337(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkDiskAggregatedListWarning(o.warning);
}
buildCounterDiskAggregatedList--;
}
buildUnnamed2339() {
var o = new core.List<api.Disk>();
o.add(buildDisk());
o.add(buildDisk());
return o;
}
checkUnnamed2339(core.List<api.Disk> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisk(o[0]);
checkDisk(o[1]);
}
core.int buildCounterDiskListWarningData = 0;
buildDiskListWarningData() {
var o = new api.DiskListWarningData();
buildCounterDiskListWarningData++;
if (buildCounterDiskListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDiskListWarningData--;
return o;
}
checkDiskListWarningData(api.DiskListWarningData o) {
buildCounterDiskListWarningData++;
if (buildCounterDiskListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDiskListWarningData--;
}
buildUnnamed2340() {
var o = new core.List<api.DiskListWarningData>();
o.add(buildDiskListWarningData());
o.add(buildDiskListWarningData());
return o;
}
checkUnnamed2340(core.List<api.DiskListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskListWarningData(o[0]);
checkDiskListWarningData(o[1]);
}
core.int buildCounterDiskListWarning = 0;
buildDiskListWarning() {
var o = new api.DiskListWarning();
buildCounterDiskListWarning++;
if (buildCounterDiskListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2340();
o.message = "foo";
}
buildCounterDiskListWarning--;
return o;
}
checkDiskListWarning(api.DiskListWarning o) {
buildCounterDiskListWarning++;
if (buildCounterDiskListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2340(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDiskListWarning--;
}
core.int buildCounterDiskList = 0;
buildDiskList() {
var o = new api.DiskList();
buildCounterDiskList++;
if (buildCounterDiskList < 3) {
o.id = "foo";
o.items = buildUnnamed2339();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildDiskListWarning();
}
buildCounterDiskList--;
return o;
}
checkDiskList(api.DiskList o) {
buildCounterDiskList++;
if (buildCounterDiskList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2339(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkDiskListWarning(o.warning);
}
buildCounterDiskList--;
}
core.int buildCounterDiskMoveRequest = 0;
buildDiskMoveRequest() {
var o = new api.DiskMoveRequest();
buildCounterDiskMoveRequest++;
if (buildCounterDiskMoveRequest < 3) {
o.destinationZone = "foo";
o.targetDisk = "foo";
}
buildCounterDiskMoveRequest--;
return o;
}
checkDiskMoveRequest(api.DiskMoveRequest o) {
buildCounterDiskMoveRequest++;
if (buildCounterDiskMoveRequest < 3) {
unittest.expect(o.destinationZone, unittest.equals('foo'));
unittest.expect(o.targetDisk, unittest.equals('foo'));
}
buildCounterDiskMoveRequest--;
}
core.int buildCounterDiskType = 0;
buildDiskType() {
var o = new api.DiskType();
buildCounterDiskType++;
if (buildCounterDiskType < 3) {
o.creationTimestamp = "foo";
o.defaultDiskSizeGb = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
o.validDiskSize = "foo";
o.zone = "foo";
}
buildCounterDiskType--;
return o;
}
checkDiskType(api.DiskType o) {
buildCounterDiskType++;
if (buildCounterDiskType < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.defaultDiskSizeGb, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.validDiskSize, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterDiskType--;
}
buildUnnamed2341() {
var o = new core.Map<core.String, api.DiskTypesScopedList>();
o["x"] = buildDiskTypesScopedList();
o["y"] = buildDiskTypesScopedList();
return o;
}
checkUnnamed2341(core.Map<core.String, api.DiskTypesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskTypesScopedList(o["x"]);
checkDiskTypesScopedList(o["y"]);
}
core.int buildCounterDiskTypeAggregatedListWarningData = 0;
buildDiskTypeAggregatedListWarningData() {
var o = new api.DiskTypeAggregatedListWarningData();
buildCounterDiskTypeAggregatedListWarningData++;
if (buildCounterDiskTypeAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDiskTypeAggregatedListWarningData--;
return o;
}
checkDiskTypeAggregatedListWarningData(
api.DiskTypeAggregatedListWarningData o) {
buildCounterDiskTypeAggregatedListWarningData++;
if (buildCounterDiskTypeAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDiskTypeAggregatedListWarningData--;
}
buildUnnamed2342() {
var o = new core.List<api.DiskTypeAggregatedListWarningData>();
o.add(buildDiskTypeAggregatedListWarningData());
o.add(buildDiskTypeAggregatedListWarningData());
return o;
}
checkUnnamed2342(core.List<api.DiskTypeAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskTypeAggregatedListWarningData(o[0]);
checkDiskTypeAggregatedListWarningData(o[1]);
}
core.int buildCounterDiskTypeAggregatedListWarning = 0;
buildDiskTypeAggregatedListWarning() {
var o = new api.DiskTypeAggregatedListWarning();
buildCounterDiskTypeAggregatedListWarning++;
if (buildCounterDiskTypeAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2342();
o.message = "foo";
}
buildCounterDiskTypeAggregatedListWarning--;
return o;
}
checkDiskTypeAggregatedListWarning(api.DiskTypeAggregatedListWarning o) {
buildCounterDiskTypeAggregatedListWarning++;
if (buildCounterDiskTypeAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2342(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDiskTypeAggregatedListWarning--;
}
core.int buildCounterDiskTypeAggregatedList = 0;
buildDiskTypeAggregatedList() {
var o = new api.DiskTypeAggregatedList();
buildCounterDiskTypeAggregatedList++;
if (buildCounterDiskTypeAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2341();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildDiskTypeAggregatedListWarning();
}
buildCounterDiskTypeAggregatedList--;
return o;
}
checkDiskTypeAggregatedList(api.DiskTypeAggregatedList o) {
buildCounterDiskTypeAggregatedList++;
if (buildCounterDiskTypeAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2341(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkDiskTypeAggregatedListWarning(o.warning);
}
buildCounterDiskTypeAggregatedList--;
}
buildUnnamed2343() {
var o = new core.List<api.DiskType>();
o.add(buildDiskType());
o.add(buildDiskType());
return o;
}
checkUnnamed2343(core.List<api.DiskType> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskType(o[0]);
checkDiskType(o[1]);
}
core.int buildCounterDiskTypeListWarningData = 0;
buildDiskTypeListWarningData() {
var o = new api.DiskTypeListWarningData();
buildCounterDiskTypeListWarningData++;
if (buildCounterDiskTypeListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDiskTypeListWarningData--;
return o;
}
checkDiskTypeListWarningData(api.DiskTypeListWarningData o) {
buildCounterDiskTypeListWarningData++;
if (buildCounterDiskTypeListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDiskTypeListWarningData--;
}
buildUnnamed2344() {
var o = new core.List<api.DiskTypeListWarningData>();
o.add(buildDiskTypeListWarningData());
o.add(buildDiskTypeListWarningData());
return o;
}
checkUnnamed2344(core.List<api.DiskTypeListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskTypeListWarningData(o[0]);
checkDiskTypeListWarningData(o[1]);
}
core.int buildCounterDiskTypeListWarning = 0;
buildDiskTypeListWarning() {
var o = new api.DiskTypeListWarning();
buildCounterDiskTypeListWarning++;
if (buildCounterDiskTypeListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2344();
o.message = "foo";
}
buildCounterDiskTypeListWarning--;
return o;
}
checkDiskTypeListWarning(api.DiskTypeListWarning o) {
buildCounterDiskTypeListWarning++;
if (buildCounterDiskTypeListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2344(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDiskTypeListWarning--;
}
core.int buildCounterDiskTypeList = 0;
buildDiskTypeList() {
var o = new api.DiskTypeList();
buildCounterDiskTypeList++;
if (buildCounterDiskTypeList < 3) {
o.id = "foo";
o.items = buildUnnamed2343();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildDiskTypeListWarning();
}
buildCounterDiskTypeList--;
return o;
}
checkDiskTypeList(api.DiskTypeList o) {
buildCounterDiskTypeList++;
if (buildCounterDiskTypeList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2343(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkDiskTypeListWarning(o.warning);
}
buildCounterDiskTypeList--;
}
buildUnnamed2345() {
var o = new core.List<api.DiskType>();
o.add(buildDiskType());
o.add(buildDiskType());
return o;
}
checkUnnamed2345(core.List<api.DiskType> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskType(o[0]);
checkDiskType(o[1]);
}
core.int buildCounterDiskTypesScopedListWarningData = 0;
buildDiskTypesScopedListWarningData() {
var o = new api.DiskTypesScopedListWarningData();
buildCounterDiskTypesScopedListWarningData++;
if (buildCounterDiskTypesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDiskTypesScopedListWarningData--;
return o;
}
checkDiskTypesScopedListWarningData(api.DiskTypesScopedListWarningData o) {
buildCounterDiskTypesScopedListWarningData++;
if (buildCounterDiskTypesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDiskTypesScopedListWarningData--;
}
buildUnnamed2346() {
var o = new core.List<api.DiskTypesScopedListWarningData>();
o.add(buildDiskTypesScopedListWarningData());
o.add(buildDiskTypesScopedListWarningData());
return o;
}
checkUnnamed2346(core.List<api.DiskTypesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDiskTypesScopedListWarningData(o[0]);
checkDiskTypesScopedListWarningData(o[1]);
}
core.int buildCounterDiskTypesScopedListWarning = 0;
buildDiskTypesScopedListWarning() {
var o = new api.DiskTypesScopedListWarning();
buildCounterDiskTypesScopedListWarning++;
if (buildCounterDiskTypesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2346();
o.message = "foo";
}
buildCounterDiskTypesScopedListWarning--;
return o;
}
checkDiskTypesScopedListWarning(api.DiskTypesScopedListWarning o) {
buildCounterDiskTypesScopedListWarning++;
if (buildCounterDiskTypesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2346(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDiskTypesScopedListWarning--;
}
core.int buildCounterDiskTypesScopedList = 0;
buildDiskTypesScopedList() {
var o = new api.DiskTypesScopedList();
buildCounterDiskTypesScopedList++;
if (buildCounterDiskTypesScopedList < 3) {
o.diskTypes = buildUnnamed2345();
o.warning = buildDiskTypesScopedListWarning();
}
buildCounterDiskTypesScopedList--;
return o;
}
checkDiskTypesScopedList(api.DiskTypesScopedList o) {
buildCounterDiskTypesScopedList++;
if (buildCounterDiskTypesScopedList < 3) {
checkUnnamed2345(o.diskTypes);
checkDiskTypesScopedListWarning(o.warning);
}
buildCounterDiskTypesScopedList--;
}
core.int buildCounterDisksResizeRequest = 0;
buildDisksResizeRequest() {
var o = new api.DisksResizeRequest();
buildCounterDisksResizeRequest++;
if (buildCounterDisksResizeRequest < 3) {
o.sizeGb = "foo";
}
buildCounterDisksResizeRequest--;
return o;
}
checkDisksResizeRequest(api.DisksResizeRequest o) {
buildCounterDisksResizeRequest++;
if (buildCounterDisksResizeRequest < 3) {
unittest.expect(o.sizeGb, unittest.equals('foo'));
}
buildCounterDisksResizeRequest--;
}
buildUnnamed2347() {
var o = new core.List<api.Disk>();
o.add(buildDisk());
o.add(buildDisk());
return o;
}
checkUnnamed2347(core.List<api.Disk> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisk(o[0]);
checkDisk(o[1]);
}
core.int buildCounterDisksScopedListWarningData = 0;
buildDisksScopedListWarningData() {
var o = new api.DisksScopedListWarningData();
buildCounterDisksScopedListWarningData++;
if (buildCounterDisksScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterDisksScopedListWarningData--;
return o;
}
checkDisksScopedListWarningData(api.DisksScopedListWarningData o) {
buildCounterDisksScopedListWarningData++;
if (buildCounterDisksScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterDisksScopedListWarningData--;
}
buildUnnamed2348() {
var o = new core.List<api.DisksScopedListWarningData>();
o.add(buildDisksScopedListWarningData());
o.add(buildDisksScopedListWarningData());
return o;
}
checkUnnamed2348(core.List<api.DisksScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkDisksScopedListWarningData(o[0]);
checkDisksScopedListWarningData(o[1]);
}
core.int buildCounterDisksScopedListWarning = 0;
buildDisksScopedListWarning() {
var o = new api.DisksScopedListWarning();
buildCounterDisksScopedListWarning++;
if (buildCounterDisksScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2348();
o.message = "foo";
}
buildCounterDisksScopedListWarning--;
return o;
}
checkDisksScopedListWarning(api.DisksScopedListWarning o) {
buildCounterDisksScopedListWarning++;
if (buildCounterDisksScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2348(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterDisksScopedListWarning--;
}
core.int buildCounterDisksScopedList = 0;
buildDisksScopedList() {
var o = new api.DisksScopedList();
buildCounterDisksScopedList++;
if (buildCounterDisksScopedList < 3) {
o.disks = buildUnnamed2347();
o.warning = buildDisksScopedListWarning();
}
buildCounterDisksScopedList--;
return o;
}
checkDisksScopedList(api.DisksScopedList o) {
buildCounterDisksScopedList++;
if (buildCounterDisksScopedList < 3) {
checkUnnamed2347(o.disks);
checkDisksScopedListWarning(o.warning);
}
buildCounterDisksScopedList--;
}
buildUnnamed2349() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2349(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 buildCounterFirewallAllowed = 0;
buildFirewallAllowed() {
var o = new api.FirewallAllowed();
buildCounterFirewallAllowed++;
if (buildCounterFirewallAllowed < 3) {
o.IPProtocol = "foo";
o.ports = buildUnnamed2349();
}
buildCounterFirewallAllowed--;
return o;
}
checkFirewallAllowed(api.FirewallAllowed o) {
buildCounterFirewallAllowed++;
if (buildCounterFirewallAllowed < 3) {
unittest.expect(o.IPProtocol, unittest.equals('foo'));
checkUnnamed2349(o.ports);
}
buildCounterFirewallAllowed--;
}
buildUnnamed2350() {
var o = new core.List<api.FirewallAllowed>();
o.add(buildFirewallAllowed());
o.add(buildFirewallAllowed());
return o;
}
checkUnnamed2350(core.List<api.FirewallAllowed> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallAllowed(o[0]);
checkFirewallAllowed(o[1]);
}
buildUnnamed2351() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2351(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 buildCounterFirewallDenied = 0;
buildFirewallDenied() {
var o = new api.FirewallDenied();
buildCounterFirewallDenied++;
if (buildCounterFirewallDenied < 3) {
o.IPProtocol = "foo";
o.ports = buildUnnamed2351();
}
buildCounterFirewallDenied--;
return o;
}
checkFirewallDenied(api.FirewallDenied o) {
buildCounterFirewallDenied++;
if (buildCounterFirewallDenied < 3) {
unittest.expect(o.IPProtocol, unittest.equals('foo'));
checkUnnamed2351(o.ports);
}
buildCounterFirewallDenied--;
}
buildUnnamed2352() {
var o = new core.List<api.FirewallDenied>();
o.add(buildFirewallDenied());
o.add(buildFirewallDenied());
return o;
}
checkUnnamed2352(core.List<api.FirewallDenied> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallDenied(o[0]);
checkFirewallDenied(o[1]);
}
buildUnnamed2353() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2353(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'));
}
buildUnnamed2354() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2354(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'));
}
buildUnnamed2355() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2355(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'));
}
buildUnnamed2356() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2356(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'));
}
buildUnnamed2357() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2357(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'));
}
buildUnnamed2358() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2358(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 buildCounterFirewall = 0;
buildFirewall() {
var o = new api.Firewall();
buildCounterFirewall++;
if (buildCounterFirewall < 3) {
o.allowed = buildUnnamed2350();
o.creationTimestamp = "foo";
o.denied = buildUnnamed2352();
o.description = "foo";
o.destinationRanges = buildUnnamed2353();
o.direction = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.priority = 42;
o.selfLink = "foo";
o.sourceRanges = buildUnnamed2354();
o.sourceServiceAccounts = buildUnnamed2355();
o.sourceTags = buildUnnamed2356();
o.targetServiceAccounts = buildUnnamed2357();
o.targetTags = buildUnnamed2358();
}
buildCounterFirewall--;
return o;
}
checkFirewall(api.Firewall o) {
buildCounterFirewall++;
if (buildCounterFirewall < 3) {
checkUnnamed2350(o.allowed);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkUnnamed2352(o.denied);
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2353(o.destinationRanges);
unittest.expect(o.direction, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.priority, unittest.equals(42));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2354(o.sourceRanges);
checkUnnamed2355(o.sourceServiceAccounts);
checkUnnamed2356(o.sourceTags);
checkUnnamed2357(o.targetServiceAccounts);
checkUnnamed2358(o.targetTags);
}
buildCounterFirewall--;
}
buildUnnamed2359() {
var o = new core.List<api.Firewall>();
o.add(buildFirewall());
o.add(buildFirewall());
return o;
}
checkUnnamed2359(core.List<api.Firewall> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewall(o[0]);
checkFirewall(o[1]);
}
core.int buildCounterFirewallListWarningData = 0;
buildFirewallListWarningData() {
var o = new api.FirewallListWarningData();
buildCounterFirewallListWarningData++;
if (buildCounterFirewallListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterFirewallListWarningData--;
return o;
}
checkFirewallListWarningData(api.FirewallListWarningData o) {
buildCounterFirewallListWarningData++;
if (buildCounterFirewallListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterFirewallListWarningData--;
}
buildUnnamed2360() {
var o = new core.List<api.FirewallListWarningData>();
o.add(buildFirewallListWarningData());
o.add(buildFirewallListWarningData());
return o;
}
checkUnnamed2360(core.List<api.FirewallListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkFirewallListWarningData(o[0]);
checkFirewallListWarningData(o[1]);
}
core.int buildCounterFirewallListWarning = 0;
buildFirewallListWarning() {
var o = new api.FirewallListWarning();
buildCounterFirewallListWarning++;
if (buildCounterFirewallListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2360();
o.message = "foo";
}
buildCounterFirewallListWarning--;
return o;
}
checkFirewallListWarning(api.FirewallListWarning o) {
buildCounterFirewallListWarning++;
if (buildCounterFirewallListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2360(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterFirewallListWarning--;
}
core.int buildCounterFirewallList = 0;
buildFirewallList() {
var o = new api.FirewallList();
buildCounterFirewallList++;
if (buildCounterFirewallList < 3) {
o.id = "foo";
o.items = buildUnnamed2359();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildFirewallListWarning();
}
buildCounterFirewallList--;
return o;
}
checkFirewallList(api.FirewallList o) {
buildCounterFirewallList++;
if (buildCounterFirewallList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2359(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkFirewallListWarning(o.warning);
}
buildCounterFirewallList--;
}
buildUnnamed2361() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2361(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 buildCounterForwardingRule = 0;
buildForwardingRule() {
var o = new api.ForwardingRule();
buildCounterForwardingRule++;
if (buildCounterForwardingRule < 3) {
o.IPAddress = "foo";
o.IPProtocol = "foo";
o.backendService = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.ipVersion = "foo";
o.kind = "foo";
o.loadBalancingScheme = "foo";
o.name = "foo";
o.network = "foo";
o.portRange = "foo";
o.ports = buildUnnamed2361();
o.region = "foo";
o.selfLink = "foo";
o.subnetwork = "foo";
o.target = "foo";
}
buildCounterForwardingRule--;
return o;
}
checkForwardingRule(api.ForwardingRule o) {
buildCounterForwardingRule++;
if (buildCounterForwardingRule < 3) {
unittest.expect(o.IPAddress, unittest.equals('foo'));
unittest.expect(o.IPProtocol, unittest.equals('foo'));
unittest.expect(o.backendService, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.ipVersion, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.loadBalancingScheme, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.portRange, unittest.equals('foo'));
checkUnnamed2361(o.ports);
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.subnetwork, unittest.equals('foo'));
unittest.expect(o.target, unittest.equals('foo'));
}
buildCounterForwardingRule--;
}
buildUnnamed2362() {
var o = new core.Map<core.String, api.ForwardingRulesScopedList>();
o["x"] = buildForwardingRulesScopedList();
o["y"] = buildForwardingRulesScopedList();
return o;
}
checkUnnamed2362(core.Map<core.String, api.ForwardingRulesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRulesScopedList(o["x"]);
checkForwardingRulesScopedList(o["y"]);
}
core.int buildCounterForwardingRuleAggregatedListWarningData = 0;
buildForwardingRuleAggregatedListWarningData() {
var o = new api.ForwardingRuleAggregatedListWarningData();
buildCounterForwardingRuleAggregatedListWarningData++;
if (buildCounterForwardingRuleAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterForwardingRuleAggregatedListWarningData--;
return o;
}
checkForwardingRuleAggregatedListWarningData(
api.ForwardingRuleAggregatedListWarningData o) {
buildCounterForwardingRuleAggregatedListWarningData++;
if (buildCounterForwardingRuleAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterForwardingRuleAggregatedListWarningData--;
}
buildUnnamed2363() {
var o = new core.List<api.ForwardingRuleAggregatedListWarningData>();
o.add(buildForwardingRuleAggregatedListWarningData());
o.add(buildForwardingRuleAggregatedListWarningData());
return o;
}
checkUnnamed2363(core.List<api.ForwardingRuleAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRuleAggregatedListWarningData(o[0]);
checkForwardingRuleAggregatedListWarningData(o[1]);
}
core.int buildCounterForwardingRuleAggregatedListWarning = 0;
buildForwardingRuleAggregatedListWarning() {
var o = new api.ForwardingRuleAggregatedListWarning();
buildCounterForwardingRuleAggregatedListWarning++;
if (buildCounterForwardingRuleAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2363();
o.message = "foo";
}
buildCounterForwardingRuleAggregatedListWarning--;
return o;
}
checkForwardingRuleAggregatedListWarning(
api.ForwardingRuleAggregatedListWarning o) {
buildCounterForwardingRuleAggregatedListWarning++;
if (buildCounterForwardingRuleAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2363(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterForwardingRuleAggregatedListWarning--;
}
core.int buildCounterForwardingRuleAggregatedList = 0;
buildForwardingRuleAggregatedList() {
var o = new api.ForwardingRuleAggregatedList();
buildCounterForwardingRuleAggregatedList++;
if (buildCounterForwardingRuleAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2362();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildForwardingRuleAggregatedListWarning();
}
buildCounterForwardingRuleAggregatedList--;
return o;
}
checkForwardingRuleAggregatedList(api.ForwardingRuleAggregatedList o) {
buildCounterForwardingRuleAggregatedList++;
if (buildCounterForwardingRuleAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2362(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkForwardingRuleAggregatedListWarning(o.warning);
}
buildCounterForwardingRuleAggregatedList--;
}
buildUnnamed2364() {
var o = new core.List<api.ForwardingRule>();
o.add(buildForwardingRule());
o.add(buildForwardingRule());
return o;
}
checkUnnamed2364(core.List<api.ForwardingRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRule(o[0]);
checkForwardingRule(o[1]);
}
core.int buildCounterForwardingRuleListWarningData = 0;
buildForwardingRuleListWarningData() {
var o = new api.ForwardingRuleListWarningData();
buildCounterForwardingRuleListWarningData++;
if (buildCounterForwardingRuleListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterForwardingRuleListWarningData--;
return o;
}
checkForwardingRuleListWarningData(api.ForwardingRuleListWarningData o) {
buildCounterForwardingRuleListWarningData++;
if (buildCounterForwardingRuleListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterForwardingRuleListWarningData--;
}
buildUnnamed2365() {
var o = new core.List<api.ForwardingRuleListWarningData>();
o.add(buildForwardingRuleListWarningData());
o.add(buildForwardingRuleListWarningData());
return o;
}
checkUnnamed2365(core.List<api.ForwardingRuleListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRuleListWarningData(o[0]);
checkForwardingRuleListWarningData(o[1]);
}
core.int buildCounterForwardingRuleListWarning = 0;
buildForwardingRuleListWarning() {
var o = new api.ForwardingRuleListWarning();
buildCounterForwardingRuleListWarning++;
if (buildCounterForwardingRuleListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2365();
o.message = "foo";
}
buildCounterForwardingRuleListWarning--;
return o;
}
checkForwardingRuleListWarning(api.ForwardingRuleListWarning o) {
buildCounterForwardingRuleListWarning++;
if (buildCounterForwardingRuleListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2365(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterForwardingRuleListWarning--;
}
core.int buildCounterForwardingRuleList = 0;
buildForwardingRuleList() {
var o = new api.ForwardingRuleList();
buildCounterForwardingRuleList++;
if (buildCounterForwardingRuleList < 3) {
o.id = "foo";
o.items = buildUnnamed2364();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildForwardingRuleListWarning();
}
buildCounterForwardingRuleList--;
return o;
}
checkForwardingRuleList(api.ForwardingRuleList o) {
buildCounterForwardingRuleList++;
if (buildCounterForwardingRuleList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2364(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkForwardingRuleListWarning(o.warning);
}
buildCounterForwardingRuleList--;
}
buildUnnamed2366() {
var o = new core.List<api.ForwardingRule>();
o.add(buildForwardingRule());
o.add(buildForwardingRule());
return o;
}
checkUnnamed2366(core.List<api.ForwardingRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRule(o[0]);
checkForwardingRule(o[1]);
}
core.int buildCounterForwardingRulesScopedListWarningData = 0;
buildForwardingRulesScopedListWarningData() {
var o = new api.ForwardingRulesScopedListWarningData();
buildCounterForwardingRulesScopedListWarningData++;
if (buildCounterForwardingRulesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterForwardingRulesScopedListWarningData--;
return o;
}
checkForwardingRulesScopedListWarningData(
api.ForwardingRulesScopedListWarningData o) {
buildCounterForwardingRulesScopedListWarningData++;
if (buildCounterForwardingRulesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterForwardingRulesScopedListWarningData--;
}
buildUnnamed2367() {
var o = new core.List<api.ForwardingRulesScopedListWarningData>();
o.add(buildForwardingRulesScopedListWarningData());
o.add(buildForwardingRulesScopedListWarningData());
return o;
}
checkUnnamed2367(core.List<api.ForwardingRulesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkForwardingRulesScopedListWarningData(o[0]);
checkForwardingRulesScopedListWarningData(o[1]);
}
core.int buildCounterForwardingRulesScopedListWarning = 0;
buildForwardingRulesScopedListWarning() {
var o = new api.ForwardingRulesScopedListWarning();
buildCounterForwardingRulesScopedListWarning++;
if (buildCounterForwardingRulesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2367();
o.message = "foo";
}
buildCounterForwardingRulesScopedListWarning--;
return o;
}
checkForwardingRulesScopedListWarning(api.ForwardingRulesScopedListWarning o) {
buildCounterForwardingRulesScopedListWarning++;
if (buildCounterForwardingRulesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2367(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterForwardingRulesScopedListWarning--;
}
core.int buildCounterForwardingRulesScopedList = 0;
buildForwardingRulesScopedList() {
var o = new api.ForwardingRulesScopedList();
buildCounterForwardingRulesScopedList++;
if (buildCounterForwardingRulesScopedList < 3) {
o.forwardingRules = buildUnnamed2366();
o.warning = buildForwardingRulesScopedListWarning();
}
buildCounterForwardingRulesScopedList--;
return o;
}
checkForwardingRulesScopedList(api.ForwardingRulesScopedList o) {
buildCounterForwardingRulesScopedList++;
if (buildCounterForwardingRulesScopedList < 3) {
checkUnnamed2366(o.forwardingRules);
checkForwardingRulesScopedListWarning(o.warning);
}
buildCounterForwardingRulesScopedList--;
}
buildUnnamed2368() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2368(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 buildCounterGlobalSetLabelsRequest = 0;
buildGlobalSetLabelsRequest() {
var o = new api.GlobalSetLabelsRequest();
buildCounterGlobalSetLabelsRequest++;
if (buildCounterGlobalSetLabelsRequest < 3) {
o.labelFingerprint = "foo";
o.labels = buildUnnamed2368();
}
buildCounterGlobalSetLabelsRequest--;
return o;
}
checkGlobalSetLabelsRequest(api.GlobalSetLabelsRequest o) {
buildCounterGlobalSetLabelsRequest++;
if (buildCounterGlobalSetLabelsRequest < 3) {
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2368(o.labels);
}
buildCounterGlobalSetLabelsRequest--;
}
core.int buildCounterGuestOsFeature = 0;
buildGuestOsFeature() {
var o = new api.GuestOsFeature();
buildCounterGuestOsFeature++;
if (buildCounterGuestOsFeature < 3) {
o.type = "foo";
}
buildCounterGuestOsFeature--;
return o;
}
checkGuestOsFeature(api.GuestOsFeature o) {
buildCounterGuestOsFeature++;
if (buildCounterGuestOsFeature < 3) {
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterGuestOsFeature--;
}
core.int buildCounterHTTPHealthCheck = 0;
buildHTTPHealthCheck() {
var o = new api.HTTPHealthCheck();
buildCounterHTTPHealthCheck++;
if (buildCounterHTTPHealthCheck < 3) {
o.host = "foo";
o.port = 42;
o.portName = "foo";
o.proxyHeader = "foo";
o.requestPath = "foo";
}
buildCounterHTTPHealthCheck--;
return o;
}
checkHTTPHealthCheck(api.HTTPHealthCheck o) {
buildCounterHTTPHealthCheck++;
if (buildCounterHTTPHealthCheck < 3) {
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.portName, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.requestPath, unittest.equals('foo'));
}
buildCounterHTTPHealthCheck--;
}
core.int buildCounterHTTPSHealthCheck = 0;
buildHTTPSHealthCheck() {
var o = new api.HTTPSHealthCheck();
buildCounterHTTPSHealthCheck++;
if (buildCounterHTTPSHealthCheck < 3) {
o.host = "foo";
o.port = 42;
o.portName = "foo";
o.proxyHeader = "foo";
o.requestPath = "foo";
}
buildCounterHTTPSHealthCheck--;
return o;
}
checkHTTPSHealthCheck(api.HTTPSHealthCheck o) {
buildCounterHTTPSHealthCheck++;
if (buildCounterHTTPSHealthCheck < 3) {
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.portName, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.requestPath, unittest.equals('foo'));
}
buildCounterHTTPSHealthCheck--;
}
core.int buildCounterHealthCheck = 0;
buildHealthCheck() {
var o = new api.HealthCheck();
buildCounterHealthCheck++;
if (buildCounterHealthCheck < 3) {
o.checkIntervalSec = 42;
o.creationTimestamp = "foo";
o.description = "foo";
o.healthyThreshold = 42;
o.httpHealthCheck = buildHTTPHealthCheck();
o.httpsHealthCheck = buildHTTPSHealthCheck();
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
o.sslHealthCheck = buildSSLHealthCheck();
o.tcpHealthCheck = buildTCPHealthCheck();
o.timeoutSec = 42;
o.type = "foo";
o.unhealthyThreshold = 42;
}
buildCounterHealthCheck--;
return o;
}
checkHealthCheck(api.HealthCheck o) {
buildCounterHealthCheck++;
if (buildCounterHealthCheck < 3) {
unittest.expect(o.checkIntervalSec, unittest.equals(42));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.healthyThreshold, unittest.equals(42));
checkHTTPHealthCheck(o.httpHealthCheck);
checkHTTPSHealthCheck(o.httpsHealthCheck);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkSSLHealthCheck(o.sslHealthCheck);
checkTCPHealthCheck(o.tcpHealthCheck);
unittest.expect(o.timeoutSec, unittest.equals(42));
unittest.expect(o.type, unittest.equals('foo'));
unittest.expect(o.unhealthyThreshold, unittest.equals(42));
}
buildCounterHealthCheck--;
}
buildUnnamed2369() {
var o = new core.List<api.HealthCheck>();
o.add(buildHealthCheck());
o.add(buildHealthCheck());
return o;
}
checkUnnamed2369(core.List<api.HealthCheck> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthCheck(o[0]);
checkHealthCheck(o[1]);
}
core.int buildCounterHealthCheckListWarningData = 0;
buildHealthCheckListWarningData() {
var o = new api.HealthCheckListWarningData();
buildCounterHealthCheckListWarningData++;
if (buildCounterHealthCheckListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterHealthCheckListWarningData--;
return o;
}
checkHealthCheckListWarningData(api.HealthCheckListWarningData o) {
buildCounterHealthCheckListWarningData++;
if (buildCounterHealthCheckListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterHealthCheckListWarningData--;
}
buildUnnamed2370() {
var o = new core.List<api.HealthCheckListWarningData>();
o.add(buildHealthCheckListWarningData());
o.add(buildHealthCheckListWarningData());
return o;
}
checkUnnamed2370(core.List<api.HealthCheckListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthCheckListWarningData(o[0]);
checkHealthCheckListWarningData(o[1]);
}
core.int buildCounterHealthCheckListWarning = 0;
buildHealthCheckListWarning() {
var o = new api.HealthCheckListWarning();
buildCounterHealthCheckListWarning++;
if (buildCounterHealthCheckListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2370();
o.message = "foo";
}
buildCounterHealthCheckListWarning--;
return o;
}
checkHealthCheckListWarning(api.HealthCheckListWarning o) {
buildCounterHealthCheckListWarning++;
if (buildCounterHealthCheckListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2370(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterHealthCheckListWarning--;
}
core.int buildCounterHealthCheckList = 0;
buildHealthCheckList() {
var o = new api.HealthCheckList();
buildCounterHealthCheckList++;
if (buildCounterHealthCheckList < 3) {
o.id = "foo";
o.items = buildUnnamed2369();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildHealthCheckListWarning();
}
buildCounterHealthCheckList--;
return o;
}
checkHealthCheckList(api.HealthCheckList o) {
buildCounterHealthCheckList++;
if (buildCounterHealthCheckList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2369(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkHealthCheckListWarning(o.warning);
}
buildCounterHealthCheckList--;
}
core.int buildCounterHealthCheckReference = 0;
buildHealthCheckReference() {
var o = new api.HealthCheckReference();
buildCounterHealthCheckReference++;
if (buildCounterHealthCheckReference < 3) {
o.healthCheck = "foo";
}
buildCounterHealthCheckReference--;
return o;
}
checkHealthCheckReference(api.HealthCheckReference o) {
buildCounterHealthCheckReference++;
if (buildCounterHealthCheckReference < 3) {
unittest.expect(o.healthCheck, unittest.equals('foo'));
}
buildCounterHealthCheckReference--;
}
core.int buildCounterHealthStatus = 0;
buildHealthStatus() {
var o = new api.HealthStatus();
buildCounterHealthStatus++;
if (buildCounterHealthStatus < 3) {
o.healthState = "foo";
o.instance = "foo";
o.ipAddress = "foo";
o.port = 42;
}
buildCounterHealthStatus--;
return o;
}
checkHealthStatus(api.HealthStatus o) {
buildCounterHealthStatus++;
if (buildCounterHealthStatus < 3) {
unittest.expect(o.healthState, unittest.equals('foo'));
unittest.expect(o.instance, unittest.equals('foo'));
unittest.expect(o.ipAddress, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
}
buildCounterHealthStatus--;
}
buildUnnamed2371() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2371(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 buildCounterHostRule = 0;
buildHostRule() {
var o = new api.HostRule();
buildCounterHostRule++;
if (buildCounterHostRule < 3) {
o.description = "foo";
o.hosts = buildUnnamed2371();
o.pathMatcher = "foo";
}
buildCounterHostRule--;
return o;
}
checkHostRule(api.HostRule o) {
buildCounterHostRule++;
if (buildCounterHostRule < 3) {
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2371(o.hosts);
unittest.expect(o.pathMatcher, unittest.equals('foo'));
}
buildCounterHostRule--;
}
core.int buildCounterHttpHealthCheck = 0;
buildHttpHealthCheck() {
var o = new api.HttpHealthCheck();
buildCounterHttpHealthCheck++;
if (buildCounterHttpHealthCheck < 3) {
o.checkIntervalSec = 42;
o.creationTimestamp = "foo";
o.description = "foo";
o.healthyThreshold = 42;
o.host = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.port = 42;
o.requestPath = "foo";
o.selfLink = "foo";
o.timeoutSec = 42;
o.unhealthyThreshold = 42;
}
buildCounterHttpHealthCheck--;
return o;
}
checkHttpHealthCheck(api.HttpHealthCheck o) {
buildCounterHttpHealthCheck++;
if (buildCounterHttpHealthCheck < 3) {
unittest.expect(o.checkIntervalSec, unittest.equals(42));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.healthyThreshold, unittest.equals(42));
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.requestPath, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.timeoutSec, unittest.equals(42));
unittest.expect(o.unhealthyThreshold, unittest.equals(42));
}
buildCounterHttpHealthCheck--;
}
buildUnnamed2372() {
var o = new core.List<api.HttpHealthCheck>();
o.add(buildHttpHealthCheck());
o.add(buildHttpHealthCheck());
return o;
}
checkUnnamed2372(core.List<api.HttpHealthCheck> o) {
unittest.expect(o, unittest.hasLength(2));
checkHttpHealthCheck(o[0]);
checkHttpHealthCheck(o[1]);
}
core.int buildCounterHttpHealthCheckListWarningData = 0;
buildHttpHealthCheckListWarningData() {
var o = new api.HttpHealthCheckListWarningData();
buildCounterHttpHealthCheckListWarningData++;
if (buildCounterHttpHealthCheckListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterHttpHealthCheckListWarningData--;
return o;
}
checkHttpHealthCheckListWarningData(api.HttpHealthCheckListWarningData o) {
buildCounterHttpHealthCheckListWarningData++;
if (buildCounterHttpHealthCheckListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterHttpHealthCheckListWarningData--;
}
buildUnnamed2373() {
var o = new core.List<api.HttpHealthCheckListWarningData>();
o.add(buildHttpHealthCheckListWarningData());
o.add(buildHttpHealthCheckListWarningData());
return o;
}
checkUnnamed2373(core.List<api.HttpHealthCheckListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkHttpHealthCheckListWarningData(o[0]);
checkHttpHealthCheckListWarningData(o[1]);
}
core.int buildCounterHttpHealthCheckListWarning = 0;
buildHttpHealthCheckListWarning() {
var o = new api.HttpHealthCheckListWarning();
buildCounterHttpHealthCheckListWarning++;
if (buildCounterHttpHealthCheckListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2373();
o.message = "foo";
}
buildCounterHttpHealthCheckListWarning--;
return o;
}
checkHttpHealthCheckListWarning(api.HttpHealthCheckListWarning o) {
buildCounterHttpHealthCheckListWarning++;
if (buildCounterHttpHealthCheckListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2373(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterHttpHealthCheckListWarning--;
}
core.int buildCounterHttpHealthCheckList = 0;
buildHttpHealthCheckList() {
var o = new api.HttpHealthCheckList();
buildCounterHttpHealthCheckList++;
if (buildCounterHttpHealthCheckList < 3) {
o.id = "foo";
o.items = buildUnnamed2372();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildHttpHealthCheckListWarning();
}
buildCounterHttpHealthCheckList--;
return o;
}
checkHttpHealthCheckList(api.HttpHealthCheckList o) {
buildCounterHttpHealthCheckList++;
if (buildCounterHttpHealthCheckList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2372(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkHttpHealthCheckListWarning(o.warning);
}
buildCounterHttpHealthCheckList--;
}
core.int buildCounterHttpsHealthCheck = 0;
buildHttpsHealthCheck() {
var o = new api.HttpsHealthCheck();
buildCounterHttpsHealthCheck++;
if (buildCounterHttpsHealthCheck < 3) {
o.checkIntervalSec = 42;
o.creationTimestamp = "foo";
o.description = "foo";
o.healthyThreshold = 42;
o.host = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.port = 42;
o.requestPath = "foo";
o.selfLink = "foo";
o.timeoutSec = 42;
o.unhealthyThreshold = 42;
}
buildCounterHttpsHealthCheck--;
return o;
}
checkHttpsHealthCheck(api.HttpsHealthCheck o) {
buildCounterHttpsHealthCheck++;
if (buildCounterHttpsHealthCheck < 3) {
unittest.expect(o.checkIntervalSec, unittest.equals(42));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.healthyThreshold, unittest.equals(42));
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.requestPath, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.timeoutSec, unittest.equals(42));
unittest.expect(o.unhealthyThreshold, unittest.equals(42));
}
buildCounterHttpsHealthCheck--;
}
buildUnnamed2374() {
var o = new core.List<api.HttpsHealthCheck>();
o.add(buildHttpsHealthCheck());
o.add(buildHttpsHealthCheck());
return o;
}
checkUnnamed2374(core.List<api.HttpsHealthCheck> o) {
unittest.expect(o, unittest.hasLength(2));
checkHttpsHealthCheck(o[0]);
checkHttpsHealthCheck(o[1]);
}
core.int buildCounterHttpsHealthCheckListWarningData = 0;
buildHttpsHealthCheckListWarningData() {
var o = new api.HttpsHealthCheckListWarningData();
buildCounterHttpsHealthCheckListWarningData++;
if (buildCounterHttpsHealthCheckListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterHttpsHealthCheckListWarningData--;
return o;
}
checkHttpsHealthCheckListWarningData(api.HttpsHealthCheckListWarningData o) {
buildCounterHttpsHealthCheckListWarningData++;
if (buildCounterHttpsHealthCheckListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterHttpsHealthCheckListWarningData--;
}
buildUnnamed2375() {
var o = new core.List<api.HttpsHealthCheckListWarningData>();
o.add(buildHttpsHealthCheckListWarningData());
o.add(buildHttpsHealthCheckListWarningData());
return o;
}
checkUnnamed2375(core.List<api.HttpsHealthCheckListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkHttpsHealthCheckListWarningData(o[0]);
checkHttpsHealthCheckListWarningData(o[1]);
}
core.int buildCounterHttpsHealthCheckListWarning = 0;
buildHttpsHealthCheckListWarning() {
var o = new api.HttpsHealthCheckListWarning();
buildCounterHttpsHealthCheckListWarning++;
if (buildCounterHttpsHealthCheckListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2375();
o.message = "foo";
}
buildCounterHttpsHealthCheckListWarning--;
return o;
}
checkHttpsHealthCheckListWarning(api.HttpsHealthCheckListWarning o) {
buildCounterHttpsHealthCheckListWarning++;
if (buildCounterHttpsHealthCheckListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2375(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterHttpsHealthCheckListWarning--;
}
core.int buildCounterHttpsHealthCheckList = 0;
buildHttpsHealthCheckList() {
var o = new api.HttpsHealthCheckList();
buildCounterHttpsHealthCheckList++;
if (buildCounterHttpsHealthCheckList < 3) {
o.id = "foo";
o.items = buildUnnamed2374();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildHttpsHealthCheckListWarning();
}
buildCounterHttpsHealthCheckList--;
return o;
}
checkHttpsHealthCheckList(api.HttpsHealthCheckList o) {
buildCounterHttpsHealthCheckList++;
if (buildCounterHttpsHealthCheckList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2374(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkHttpsHealthCheckListWarning(o.warning);
}
buildCounterHttpsHealthCheckList--;
}
buildUnnamed2376() {
var o = new core.List<api.GuestOsFeature>();
o.add(buildGuestOsFeature());
o.add(buildGuestOsFeature());
return o;
}
checkUnnamed2376(core.List<api.GuestOsFeature> o) {
unittest.expect(o, unittest.hasLength(2));
checkGuestOsFeature(o[0]);
checkGuestOsFeature(o[1]);
}
buildUnnamed2377() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2377(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'));
}
buildUnnamed2378() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2378(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 buildCounterImageRawDisk = 0;
buildImageRawDisk() {
var o = new api.ImageRawDisk();
buildCounterImageRawDisk++;
if (buildCounterImageRawDisk < 3) {
o.containerType = "foo";
o.sha1Checksum = "foo";
o.source = "foo";
}
buildCounterImageRawDisk--;
return o;
}
checkImageRawDisk(api.ImageRawDisk o) {
buildCounterImageRawDisk++;
if (buildCounterImageRawDisk < 3) {
unittest.expect(o.containerType, unittest.equals('foo'));
unittest.expect(o.sha1Checksum, unittest.equals('foo'));
unittest.expect(o.source, unittest.equals('foo'));
}
buildCounterImageRawDisk--;
}
core.int buildCounterImage = 0;
buildImage() {
var o = new api.Image();
buildCounterImage++;
if (buildCounterImage < 3) {
o.archiveSizeBytes = "foo";
o.creationTimestamp = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.diskSizeGb = "foo";
o.family = "foo";
o.guestOsFeatures = buildUnnamed2376();
o.id = "foo";
o.imageEncryptionKey = buildCustomerEncryptionKey();
o.kind = "foo";
o.labelFingerprint = "foo";
o.labels = buildUnnamed2377();
o.licenses = buildUnnamed2378();
o.name = "foo";
o.rawDisk = buildImageRawDisk();
o.selfLink = "foo";
o.sourceDisk = "foo";
o.sourceDiskEncryptionKey = buildCustomerEncryptionKey();
o.sourceDiskId = "foo";
o.sourceImage = "foo";
o.sourceImageEncryptionKey = buildCustomerEncryptionKey();
o.sourceImageId = "foo";
o.sourceType = "foo";
o.status = "foo";
}
buildCounterImage--;
return o;
}
checkImage(api.Image o) {
buildCounterImage++;
if (buildCounterImage < 3) {
unittest.expect(o.archiveSizeBytes, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.diskSizeGb, unittest.equals('foo'));
unittest.expect(o.family, unittest.equals('foo'));
checkUnnamed2376(o.guestOsFeatures);
unittest.expect(o.id, unittest.equals('foo'));
checkCustomerEncryptionKey(o.imageEncryptionKey);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2377(o.labels);
checkUnnamed2378(o.licenses);
unittest.expect(o.name, unittest.equals('foo'));
checkImageRawDisk(o.rawDisk);
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.sourceDisk, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceDiskEncryptionKey);
unittest.expect(o.sourceDiskId, unittest.equals('foo'));
unittest.expect(o.sourceImage, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceImageEncryptionKey);
unittest.expect(o.sourceImageId, unittest.equals('foo'));
unittest.expect(o.sourceType, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
}
buildCounterImage--;
}
buildUnnamed2379() {
var o = new core.List<api.Image>();
o.add(buildImage());
o.add(buildImage());
return o;
}
checkUnnamed2379(core.List<api.Image> o) {
unittest.expect(o, unittest.hasLength(2));
checkImage(o[0]);
checkImage(o[1]);
}
core.int buildCounterImageListWarningData = 0;
buildImageListWarningData() {
var o = new api.ImageListWarningData();
buildCounterImageListWarningData++;
if (buildCounterImageListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterImageListWarningData--;
return o;
}
checkImageListWarningData(api.ImageListWarningData o) {
buildCounterImageListWarningData++;
if (buildCounterImageListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterImageListWarningData--;
}
buildUnnamed2380() {
var o = new core.List<api.ImageListWarningData>();
o.add(buildImageListWarningData());
o.add(buildImageListWarningData());
return o;
}
checkUnnamed2380(core.List<api.ImageListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkImageListWarningData(o[0]);
checkImageListWarningData(o[1]);
}
core.int buildCounterImageListWarning = 0;
buildImageListWarning() {
var o = new api.ImageListWarning();
buildCounterImageListWarning++;
if (buildCounterImageListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2380();
o.message = "foo";
}
buildCounterImageListWarning--;
return o;
}
checkImageListWarning(api.ImageListWarning o) {
buildCounterImageListWarning++;
if (buildCounterImageListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2380(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterImageListWarning--;
}
core.int buildCounterImageList = 0;
buildImageList() {
var o = new api.ImageList();
buildCounterImageList++;
if (buildCounterImageList < 3) {
o.id = "foo";
o.items = buildUnnamed2379();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildImageListWarning();
}
buildCounterImageList--;
return o;
}
checkImageList(api.ImageList o) {
buildCounterImageList++;
if (buildCounterImageList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2379(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkImageListWarning(o.warning);
}
buildCounterImageList--;
}
buildUnnamed2381() {
var o = new core.List<api.AttachedDisk>();
o.add(buildAttachedDisk());
o.add(buildAttachedDisk());
return o;
}
checkUnnamed2381(core.List<api.AttachedDisk> o) {
unittest.expect(o, unittest.hasLength(2));
checkAttachedDisk(o[0]);
checkAttachedDisk(o[1]);
}
buildUnnamed2382() {
var o = new core.List<api.AcceleratorConfig>();
o.add(buildAcceleratorConfig());
o.add(buildAcceleratorConfig());
return o;
}
checkUnnamed2382(core.List<api.AcceleratorConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorConfig(o[0]);
checkAcceleratorConfig(o[1]);
}
buildUnnamed2383() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2383(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'));
}
buildUnnamed2384() {
var o = new core.List<api.NetworkInterface>();
o.add(buildNetworkInterface());
o.add(buildNetworkInterface());
return o;
}
checkUnnamed2384(core.List<api.NetworkInterface> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkInterface(o[0]);
checkNetworkInterface(o[1]);
}
buildUnnamed2385() {
var o = new core.List<api.ServiceAccount>();
o.add(buildServiceAccount());
o.add(buildServiceAccount());
return o;
}
checkUnnamed2385(core.List<api.ServiceAccount> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceAccount(o[0]);
checkServiceAccount(o[1]);
}
core.int buildCounterInstance = 0;
buildInstance() {
var o = new api.Instance();
buildCounterInstance++;
if (buildCounterInstance < 3) {
o.canIpForward = true;
o.cpuPlatform = "foo";
o.creationTimestamp = "foo";
o.deletionProtection = true;
o.description = "foo";
o.disks = buildUnnamed2381();
o.guestAccelerators = buildUnnamed2382();
o.id = "foo";
o.kind = "foo";
o.labelFingerprint = "foo";
o.labels = buildUnnamed2383();
o.machineType = "foo";
o.metadata = buildMetadata();
o.minCpuPlatform = "foo";
o.name = "foo";
o.networkInterfaces = buildUnnamed2384();
o.scheduling = buildScheduling();
o.selfLink = "foo";
o.serviceAccounts = buildUnnamed2385();
o.startRestricted = true;
o.status = "foo";
o.statusMessage = "foo";
o.tags = buildTags();
o.zone = "foo";
}
buildCounterInstance--;
return o;
}
checkInstance(api.Instance o) {
buildCounterInstance++;
if (buildCounterInstance < 3) {
unittest.expect(o.canIpForward, unittest.isTrue);
unittest.expect(o.cpuPlatform, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.deletionProtection, unittest.isTrue);
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2381(o.disks);
checkUnnamed2382(o.guestAccelerators);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2383(o.labels);
unittest.expect(o.machineType, unittest.equals('foo'));
checkMetadata(o.metadata);
unittest.expect(o.minCpuPlatform, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2384(o.networkInterfaces);
checkScheduling(o.scheduling);
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2385(o.serviceAccounts);
unittest.expect(o.startRestricted, unittest.isTrue);
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.statusMessage, unittest.equals('foo'));
checkTags(o.tags);
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterInstance--;
}
buildUnnamed2386() {
var o = new core.Map<core.String, api.InstancesScopedList>();
o["x"] = buildInstancesScopedList();
o["y"] = buildInstancesScopedList();
return o;
}
checkUnnamed2386(core.Map<core.String, api.InstancesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstancesScopedList(o["x"]);
checkInstancesScopedList(o["y"]);
}
core.int buildCounterInstanceAggregatedListWarningData = 0;
buildInstanceAggregatedListWarningData() {
var o = new api.InstanceAggregatedListWarningData();
buildCounterInstanceAggregatedListWarningData++;
if (buildCounterInstanceAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceAggregatedListWarningData--;
return o;
}
checkInstanceAggregatedListWarningData(
api.InstanceAggregatedListWarningData o) {
buildCounterInstanceAggregatedListWarningData++;
if (buildCounterInstanceAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceAggregatedListWarningData--;
}
buildUnnamed2387() {
var o = new core.List<api.InstanceAggregatedListWarningData>();
o.add(buildInstanceAggregatedListWarningData());
o.add(buildInstanceAggregatedListWarningData());
return o;
}
checkUnnamed2387(core.List<api.InstanceAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceAggregatedListWarningData(o[0]);
checkInstanceAggregatedListWarningData(o[1]);
}
core.int buildCounterInstanceAggregatedListWarning = 0;
buildInstanceAggregatedListWarning() {
var o = new api.InstanceAggregatedListWarning();
buildCounterInstanceAggregatedListWarning++;
if (buildCounterInstanceAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2387();
o.message = "foo";
}
buildCounterInstanceAggregatedListWarning--;
return o;
}
checkInstanceAggregatedListWarning(api.InstanceAggregatedListWarning o) {
buildCounterInstanceAggregatedListWarning++;
if (buildCounterInstanceAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2387(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceAggregatedListWarning--;
}
core.int buildCounterInstanceAggregatedList = 0;
buildInstanceAggregatedList() {
var o = new api.InstanceAggregatedList();
buildCounterInstanceAggregatedList++;
if (buildCounterInstanceAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2386();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceAggregatedListWarning();
}
buildCounterInstanceAggregatedList--;
return o;
}
checkInstanceAggregatedList(api.InstanceAggregatedList o) {
buildCounterInstanceAggregatedList++;
if (buildCounterInstanceAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2386(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceAggregatedListWarning(o.warning);
}
buildCounterInstanceAggregatedList--;
}
buildUnnamed2388() {
var o = new core.List<api.NamedPort>();
o.add(buildNamedPort());
o.add(buildNamedPort());
return o;
}
checkUnnamed2388(core.List<api.NamedPort> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedPort(o[0]);
checkNamedPort(o[1]);
}
core.int buildCounterInstanceGroup = 0;
buildInstanceGroup() {
var o = new api.InstanceGroup();
buildCounterInstanceGroup++;
if (buildCounterInstanceGroup < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.fingerprint = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.namedPorts = buildUnnamed2388();
o.network = "foo";
o.region = "foo";
o.selfLink = "foo";
o.size = 42;
o.subnetwork = "foo";
o.zone = "foo";
}
buildCounterInstanceGroup--;
return o;
}
checkInstanceGroup(api.InstanceGroup o) {
buildCounterInstanceGroup++;
if (buildCounterInstanceGroup < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.fingerprint, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2388(o.namedPorts);
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.size, unittest.equals(42));
unittest.expect(o.subnetwork, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterInstanceGroup--;
}
buildUnnamed2389() {
var o = new core.Map<core.String, api.InstanceGroupsScopedList>();
o["x"] = buildInstanceGroupsScopedList();
o["y"] = buildInstanceGroupsScopedList();
return o;
}
checkUnnamed2389(core.Map<core.String, api.InstanceGroupsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupsScopedList(o["x"]);
checkInstanceGroupsScopedList(o["y"]);
}
core.int buildCounterInstanceGroupAggregatedListWarningData = 0;
buildInstanceGroupAggregatedListWarningData() {
var o = new api.InstanceGroupAggregatedListWarningData();
buildCounterInstanceGroupAggregatedListWarningData++;
if (buildCounterInstanceGroupAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupAggregatedListWarningData--;
return o;
}
checkInstanceGroupAggregatedListWarningData(
api.InstanceGroupAggregatedListWarningData o) {
buildCounterInstanceGroupAggregatedListWarningData++;
if (buildCounterInstanceGroupAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupAggregatedListWarningData--;
}
buildUnnamed2390() {
var o = new core.List<api.InstanceGroupAggregatedListWarningData>();
o.add(buildInstanceGroupAggregatedListWarningData());
o.add(buildInstanceGroupAggregatedListWarningData());
return o;
}
checkUnnamed2390(core.List<api.InstanceGroupAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupAggregatedListWarningData(o[0]);
checkInstanceGroupAggregatedListWarningData(o[1]);
}
core.int buildCounterInstanceGroupAggregatedListWarning = 0;
buildInstanceGroupAggregatedListWarning() {
var o = new api.InstanceGroupAggregatedListWarning();
buildCounterInstanceGroupAggregatedListWarning++;
if (buildCounterInstanceGroupAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2390();
o.message = "foo";
}
buildCounterInstanceGroupAggregatedListWarning--;
return o;
}
checkInstanceGroupAggregatedListWarning(
api.InstanceGroupAggregatedListWarning o) {
buildCounterInstanceGroupAggregatedListWarning++;
if (buildCounterInstanceGroupAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2390(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupAggregatedListWarning--;
}
core.int buildCounterInstanceGroupAggregatedList = 0;
buildInstanceGroupAggregatedList() {
var o = new api.InstanceGroupAggregatedList();
buildCounterInstanceGroupAggregatedList++;
if (buildCounterInstanceGroupAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2389();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceGroupAggregatedListWarning();
}
buildCounterInstanceGroupAggregatedList--;
return o;
}
checkInstanceGroupAggregatedList(api.InstanceGroupAggregatedList o) {
buildCounterInstanceGroupAggregatedList++;
if (buildCounterInstanceGroupAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2389(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceGroupAggregatedListWarning(o.warning);
}
buildCounterInstanceGroupAggregatedList--;
}
buildUnnamed2391() {
var o = new core.List<api.InstanceGroup>();
o.add(buildInstanceGroup());
o.add(buildInstanceGroup());
return o;
}
checkUnnamed2391(core.List<api.InstanceGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroup(o[0]);
checkInstanceGroup(o[1]);
}
core.int buildCounterInstanceGroupListWarningData = 0;
buildInstanceGroupListWarningData() {
var o = new api.InstanceGroupListWarningData();
buildCounterInstanceGroupListWarningData++;
if (buildCounterInstanceGroupListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupListWarningData--;
return o;
}
checkInstanceGroupListWarningData(api.InstanceGroupListWarningData o) {
buildCounterInstanceGroupListWarningData++;
if (buildCounterInstanceGroupListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupListWarningData--;
}
buildUnnamed2392() {
var o = new core.List<api.InstanceGroupListWarningData>();
o.add(buildInstanceGroupListWarningData());
o.add(buildInstanceGroupListWarningData());
return o;
}
checkUnnamed2392(core.List<api.InstanceGroupListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupListWarningData(o[0]);
checkInstanceGroupListWarningData(o[1]);
}
core.int buildCounterInstanceGroupListWarning = 0;
buildInstanceGroupListWarning() {
var o = new api.InstanceGroupListWarning();
buildCounterInstanceGroupListWarning++;
if (buildCounterInstanceGroupListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2392();
o.message = "foo";
}
buildCounterInstanceGroupListWarning--;
return o;
}
checkInstanceGroupListWarning(api.InstanceGroupListWarning o) {
buildCounterInstanceGroupListWarning++;
if (buildCounterInstanceGroupListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2392(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupListWarning--;
}
core.int buildCounterInstanceGroupList = 0;
buildInstanceGroupList() {
var o = new api.InstanceGroupList();
buildCounterInstanceGroupList++;
if (buildCounterInstanceGroupList < 3) {
o.id = "foo";
o.items = buildUnnamed2391();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceGroupListWarning();
}
buildCounterInstanceGroupList--;
return o;
}
checkInstanceGroupList(api.InstanceGroupList o) {
buildCounterInstanceGroupList++;
if (buildCounterInstanceGroupList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2391(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceGroupListWarning(o.warning);
}
buildCounterInstanceGroupList--;
}
buildUnnamed2393() {
var o = new core.List<api.NamedPort>();
o.add(buildNamedPort());
o.add(buildNamedPort());
return o;
}
checkUnnamed2393(core.List<api.NamedPort> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedPort(o[0]);
checkNamedPort(o[1]);
}
buildUnnamed2394() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2394(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 buildCounterInstanceGroupManager = 0;
buildInstanceGroupManager() {
var o = new api.InstanceGroupManager();
buildCounterInstanceGroupManager++;
if (buildCounterInstanceGroupManager < 3) {
o.baseInstanceName = "foo";
o.creationTimestamp = "foo";
o.currentActions = buildInstanceGroupManagerActionsSummary();
o.description = "foo";
o.fingerprint = "foo";
o.id = "foo";
o.instanceGroup = "foo";
o.instanceTemplate = "foo";
o.kind = "foo";
o.name = "foo";
o.namedPorts = buildUnnamed2393();
o.region = "foo";
o.selfLink = "foo";
o.targetPools = buildUnnamed2394();
o.targetSize = 42;
o.zone = "foo";
}
buildCounterInstanceGroupManager--;
return o;
}
checkInstanceGroupManager(api.InstanceGroupManager o) {
buildCounterInstanceGroupManager++;
if (buildCounterInstanceGroupManager < 3) {
unittest.expect(o.baseInstanceName, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkInstanceGroupManagerActionsSummary(o.currentActions);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.fingerprint, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.instanceGroup, unittest.equals('foo'));
unittest.expect(o.instanceTemplate, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2393(o.namedPorts);
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2394(o.targetPools);
unittest.expect(o.targetSize, unittest.equals(42));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterInstanceGroupManager--;
}
core.int buildCounterInstanceGroupManagerActionsSummary = 0;
buildInstanceGroupManagerActionsSummary() {
var o = new api.InstanceGroupManagerActionsSummary();
buildCounterInstanceGroupManagerActionsSummary++;
if (buildCounterInstanceGroupManagerActionsSummary < 3) {
o.abandoning = 42;
o.creating = 42;
o.creatingWithoutRetries = 42;
o.deleting = 42;
o.none = 42;
o.recreating = 42;
o.refreshing = 42;
o.restarting = 42;
}
buildCounterInstanceGroupManagerActionsSummary--;
return o;
}
checkInstanceGroupManagerActionsSummary(
api.InstanceGroupManagerActionsSummary o) {
buildCounterInstanceGroupManagerActionsSummary++;
if (buildCounterInstanceGroupManagerActionsSummary < 3) {
unittest.expect(o.abandoning, unittest.equals(42));
unittest.expect(o.creating, unittest.equals(42));
unittest.expect(o.creatingWithoutRetries, unittest.equals(42));
unittest.expect(o.deleting, unittest.equals(42));
unittest.expect(o.none, unittest.equals(42));
unittest.expect(o.recreating, unittest.equals(42));
unittest.expect(o.refreshing, unittest.equals(42));
unittest.expect(o.restarting, unittest.equals(42));
}
buildCounterInstanceGroupManagerActionsSummary--;
}
buildUnnamed2395() {
var o = new core.Map<core.String, api.InstanceGroupManagersScopedList>();
o["x"] = buildInstanceGroupManagersScopedList();
o["y"] = buildInstanceGroupManagersScopedList();
return o;
}
checkUnnamed2395(core.Map<core.String, api.InstanceGroupManagersScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManagersScopedList(o["x"]);
checkInstanceGroupManagersScopedList(o["y"]);
}
core.int buildCounterInstanceGroupManagerAggregatedListWarningData = 0;
buildInstanceGroupManagerAggregatedListWarningData() {
var o = new api.InstanceGroupManagerAggregatedListWarningData();
buildCounterInstanceGroupManagerAggregatedListWarningData++;
if (buildCounterInstanceGroupManagerAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupManagerAggregatedListWarningData--;
return o;
}
checkInstanceGroupManagerAggregatedListWarningData(
api.InstanceGroupManagerAggregatedListWarningData o) {
buildCounterInstanceGroupManagerAggregatedListWarningData++;
if (buildCounterInstanceGroupManagerAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupManagerAggregatedListWarningData--;
}
buildUnnamed2396() {
var o = new core.List<api.InstanceGroupManagerAggregatedListWarningData>();
o.add(buildInstanceGroupManagerAggregatedListWarningData());
o.add(buildInstanceGroupManagerAggregatedListWarningData());
return o;
}
checkUnnamed2396(
core.List<api.InstanceGroupManagerAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManagerAggregatedListWarningData(o[0]);
checkInstanceGroupManagerAggregatedListWarningData(o[1]);
}
core.int buildCounterInstanceGroupManagerAggregatedListWarning = 0;
buildInstanceGroupManagerAggregatedListWarning() {
var o = new api.InstanceGroupManagerAggregatedListWarning();
buildCounterInstanceGroupManagerAggregatedListWarning++;
if (buildCounterInstanceGroupManagerAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2396();
o.message = "foo";
}
buildCounterInstanceGroupManagerAggregatedListWarning--;
return o;
}
checkInstanceGroupManagerAggregatedListWarning(
api.InstanceGroupManagerAggregatedListWarning o) {
buildCounterInstanceGroupManagerAggregatedListWarning++;
if (buildCounterInstanceGroupManagerAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2396(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupManagerAggregatedListWarning--;
}
core.int buildCounterInstanceGroupManagerAggregatedList = 0;
buildInstanceGroupManagerAggregatedList() {
var o = new api.InstanceGroupManagerAggregatedList();
buildCounterInstanceGroupManagerAggregatedList++;
if (buildCounterInstanceGroupManagerAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2395();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceGroupManagerAggregatedListWarning();
}
buildCounterInstanceGroupManagerAggregatedList--;
return o;
}
checkInstanceGroupManagerAggregatedList(
api.InstanceGroupManagerAggregatedList o) {
buildCounterInstanceGroupManagerAggregatedList++;
if (buildCounterInstanceGroupManagerAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2395(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceGroupManagerAggregatedListWarning(o.warning);
}
buildCounterInstanceGroupManagerAggregatedList--;
}
buildUnnamed2397() {
var o = new core.List<api.InstanceGroupManager>();
o.add(buildInstanceGroupManager());
o.add(buildInstanceGroupManager());
return o;
}
checkUnnamed2397(core.List<api.InstanceGroupManager> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManager(o[0]);
checkInstanceGroupManager(o[1]);
}
core.int buildCounterInstanceGroupManagerListWarningData = 0;
buildInstanceGroupManagerListWarningData() {
var o = new api.InstanceGroupManagerListWarningData();
buildCounterInstanceGroupManagerListWarningData++;
if (buildCounterInstanceGroupManagerListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupManagerListWarningData--;
return o;
}
checkInstanceGroupManagerListWarningData(
api.InstanceGroupManagerListWarningData o) {
buildCounterInstanceGroupManagerListWarningData++;
if (buildCounterInstanceGroupManagerListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupManagerListWarningData--;
}
buildUnnamed2398() {
var o = new core.List<api.InstanceGroupManagerListWarningData>();
o.add(buildInstanceGroupManagerListWarningData());
o.add(buildInstanceGroupManagerListWarningData());
return o;
}
checkUnnamed2398(core.List<api.InstanceGroupManagerListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManagerListWarningData(o[0]);
checkInstanceGroupManagerListWarningData(o[1]);
}
core.int buildCounterInstanceGroupManagerListWarning = 0;
buildInstanceGroupManagerListWarning() {
var o = new api.InstanceGroupManagerListWarning();
buildCounterInstanceGroupManagerListWarning++;
if (buildCounterInstanceGroupManagerListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2398();
o.message = "foo";
}
buildCounterInstanceGroupManagerListWarning--;
return o;
}
checkInstanceGroupManagerListWarning(api.InstanceGroupManagerListWarning o) {
buildCounterInstanceGroupManagerListWarning++;
if (buildCounterInstanceGroupManagerListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2398(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupManagerListWarning--;
}
core.int buildCounterInstanceGroupManagerList = 0;
buildInstanceGroupManagerList() {
var o = new api.InstanceGroupManagerList();
buildCounterInstanceGroupManagerList++;
if (buildCounterInstanceGroupManagerList < 3) {
o.id = "foo";
o.items = buildUnnamed2397();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceGroupManagerListWarning();
}
buildCounterInstanceGroupManagerList--;
return o;
}
checkInstanceGroupManagerList(api.InstanceGroupManagerList o) {
buildCounterInstanceGroupManagerList++;
if (buildCounterInstanceGroupManagerList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2397(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceGroupManagerListWarning(o.warning);
}
buildCounterInstanceGroupManagerList--;
}
buildUnnamed2399() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2399(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 buildCounterInstanceGroupManagersAbandonInstancesRequest = 0;
buildInstanceGroupManagersAbandonInstancesRequest() {
var o = new api.InstanceGroupManagersAbandonInstancesRequest();
buildCounterInstanceGroupManagersAbandonInstancesRequest++;
if (buildCounterInstanceGroupManagersAbandonInstancesRequest < 3) {
o.instances = buildUnnamed2399();
}
buildCounterInstanceGroupManagersAbandonInstancesRequest--;
return o;
}
checkInstanceGroupManagersAbandonInstancesRequest(
api.InstanceGroupManagersAbandonInstancesRequest o) {
buildCounterInstanceGroupManagersAbandonInstancesRequest++;
if (buildCounterInstanceGroupManagersAbandonInstancesRequest < 3) {
checkUnnamed2399(o.instances);
}
buildCounterInstanceGroupManagersAbandonInstancesRequest--;
}
buildUnnamed2400() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2400(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 buildCounterInstanceGroupManagersDeleteInstancesRequest = 0;
buildInstanceGroupManagersDeleteInstancesRequest() {
var o = new api.InstanceGroupManagersDeleteInstancesRequest();
buildCounterInstanceGroupManagersDeleteInstancesRequest++;
if (buildCounterInstanceGroupManagersDeleteInstancesRequest < 3) {
o.instances = buildUnnamed2400();
}
buildCounterInstanceGroupManagersDeleteInstancesRequest--;
return o;
}
checkInstanceGroupManagersDeleteInstancesRequest(
api.InstanceGroupManagersDeleteInstancesRequest o) {
buildCounterInstanceGroupManagersDeleteInstancesRequest++;
if (buildCounterInstanceGroupManagersDeleteInstancesRequest < 3) {
checkUnnamed2400(o.instances);
}
buildCounterInstanceGroupManagersDeleteInstancesRequest--;
}
buildUnnamed2401() {
var o = new core.List<api.ManagedInstance>();
o.add(buildManagedInstance());
o.add(buildManagedInstance());
return o;
}
checkUnnamed2401(core.List<api.ManagedInstance> o) {
unittest.expect(o, unittest.hasLength(2));
checkManagedInstance(o[0]);
checkManagedInstance(o[1]);
}
core.int buildCounterInstanceGroupManagersListManagedInstancesResponse = 0;
buildInstanceGroupManagersListManagedInstancesResponse() {
var o = new api.InstanceGroupManagersListManagedInstancesResponse();
buildCounterInstanceGroupManagersListManagedInstancesResponse++;
if (buildCounterInstanceGroupManagersListManagedInstancesResponse < 3) {
o.managedInstances = buildUnnamed2401();
}
buildCounterInstanceGroupManagersListManagedInstancesResponse--;
return o;
}
checkInstanceGroupManagersListManagedInstancesResponse(
api.InstanceGroupManagersListManagedInstancesResponse o) {
buildCounterInstanceGroupManagersListManagedInstancesResponse++;
if (buildCounterInstanceGroupManagersListManagedInstancesResponse < 3) {
checkUnnamed2401(o.managedInstances);
}
buildCounterInstanceGroupManagersListManagedInstancesResponse--;
}
buildUnnamed2402() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2402(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 buildCounterInstanceGroupManagersRecreateInstancesRequest = 0;
buildInstanceGroupManagersRecreateInstancesRequest() {
var o = new api.InstanceGroupManagersRecreateInstancesRequest();
buildCounterInstanceGroupManagersRecreateInstancesRequest++;
if (buildCounterInstanceGroupManagersRecreateInstancesRequest < 3) {
o.instances = buildUnnamed2402();
}
buildCounterInstanceGroupManagersRecreateInstancesRequest--;
return o;
}
checkInstanceGroupManagersRecreateInstancesRequest(
api.InstanceGroupManagersRecreateInstancesRequest o) {
buildCounterInstanceGroupManagersRecreateInstancesRequest++;
if (buildCounterInstanceGroupManagersRecreateInstancesRequest < 3) {
checkUnnamed2402(o.instances);
}
buildCounterInstanceGroupManagersRecreateInstancesRequest--;
}
buildUnnamed2403() {
var o = new core.List<api.InstanceGroupManager>();
o.add(buildInstanceGroupManager());
o.add(buildInstanceGroupManager());
return o;
}
checkUnnamed2403(core.List<api.InstanceGroupManager> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManager(o[0]);
checkInstanceGroupManager(o[1]);
}
core.int buildCounterInstanceGroupManagersScopedListWarningData = 0;
buildInstanceGroupManagersScopedListWarningData() {
var o = new api.InstanceGroupManagersScopedListWarningData();
buildCounterInstanceGroupManagersScopedListWarningData++;
if (buildCounterInstanceGroupManagersScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupManagersScopedListWarningData--;
return o;
}
checkInstanceGroupManagersScopedListWarningData(
api.InstanceGroupManagersScopedListWarningData o) {
buildCounterInstanceGroupManagersScopedListWarningData++;
if (buildCounterInstanceGroupManagersScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupManagersScopedListWarningData--;
}
buildUnnamed2404() {
var o = new core.List<api.InstanceGroupManagersScopedListWarningData>();
o.add(buildInstanceGroupManagersScopedListWarningData());
o.add(buildInstanceGroupManagersScopedListWarningData());
return o;
}
checkUnnamed2404(core.List<api.InstanceGroupManagersScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManagersScopedListWarningData(o[0]);
checkInstanceGroupManagersScopedListWarningData(o[1]);
}
core.int buildCounterInstanceGroupManagersScopedListWarning = 0;
buildInstanceGroupManagersScopedListWarning() {
var o = new api.InstanceGroupManagersScopedListWarning();
buildCounterInstanceGroupManagersScopedListWarning++;
if (buildCounterInstanceGroupManagersScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2404();
o.message = "foo";
}
buildCounterInstanceGroupManagersScopedListWarning--;
return o;
}
checkInstanceGroupManagersScopedListWarning(
api.InstanceGroupManagersScopedListWarning o) {
buildCounterInstanceGroupManagersScopedListWarning++;
if (buildCounterInstanceGroupManagersScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2404(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupManagersScopedListWarning--;
}
core.int buildCounterInstanceGroupManagersScopedList = 0;
buildInstanceGroupManagersScopedList() {
var o = new api.InstanceGroupManagersScopedList();
buildCounterInstanceGroupManagersScopedList++;
if (buildCounterInstanceGroupManagersScopedList < 3) {
o.instanceGroupManagers = buildUnnamed2403();
o.warning = buildInstanceGroupManagersScopedListWarning();
}
buildCounterInstanceGroupManagersScopedList--;
return o;
}
checkInstanceGroupManagersScopedList(api.InstanceGroupManagersScopedList o) {
buildCounterInstanceGroupManagersScopedList++;
if (buildCounterInstanceGroupManagersScopedList < 3) {
checkUnnamed2403(o.instanceGroupManagers);
checkInstanceGroupManagersScopedListWarning(o.warning);
}
buildCounterInstanceGroupManagersScopedList--;
}
core.int buildCounterInstanceGroupManagersSetInstanceTemplateRequest = 0;
buildInstanceGroupManagersSetInstanceTemplateRequest() {
var o = new api.InstanceGroupManagersSetInstanceTemplateRequest();
buildCounterInstanceGroupManagersSetInstanceTemplateRequest++;
if (buildCounterInstanceGroupManagersSetInstanceTemplateRequest < 3) {
o.instanceTemplate = "foo";
}
buildCounterInstanceGroupManagersSetInstanceTemplateRequest--;
return o;
}
checkInstanceGroupManagersSetInstanceTemplateRequest(
api.InstanceGroupManagersSetInstanceTemplateRequest o) {
buildCounterInstanceGroupManagersSetInstanceTemplateRequest++;
if (buildCounterInstanceGroupManagersSetInstanceTemplateRequest < 3) {
unittest.expect(o.instanceTemplate, unittest.equals('foo'));
}
buildCounterInstanceGroupManagersSetInstanceTemplateRequest--;
}
buildUnnamed2405() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2405(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 buildCounterInstanceGroupManagersSetTargetPoolsRequest = 0;
buildInstanceGroupManagersSetTargetPoolsRequest() {
var o = new api.InstanceGroupManagersSetTargetPoolsRequest();
buildCounterInstanceGroupManagersSetTargetPoolsRequest++;
if (buildCounterInstanceGroupManagersSetTargetPoolsRequest < 3) {
o.fingerprint = "foo";
o.targetPools = buildUnnamed2405();
}
buildCounterInstanceGroupManagersSetTargetPoolsRequest--;
return o;
}
checkInstanceGroupManagersSetTargetPoolsRequest(
api.InstanceGroupManagersSetTargetPoolsRequest o) {
buildCounterInstanceGroupManagersSetTargetPoolsRequest++;
if (buildCounterInstanceGroupManagersSetTargetPoolsRequest < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2405(o.targetPools);
}
buildCounterInstanceGroupManagersSetTargetPoolsRequest--;
}
buildUnnamed2406() {
var o = new core.List<api.InstanceReference>();
o.add(buildInstanceReference());
o.add(buildInstanceReference());
return o;
}
checkUnnamed2406(core.List<api.InstanceReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceReference(o[0]);
checkInstanceReference(o[1]);
}
core.int buildCounterInstanceGroupsAddInstancesRequest = 0;
buildInstanceGroupsAddInstancesRequest() {
var o = new api.InstanceGroupsAddInstancesRequest();
buildCounterInstanceGroupsAddInstancesRequest++;
if (buildCounterInstanceGroupsAddInstancesRequest < 3) {
o.instances = buildUnnamed2406();
}
buildCounterInstanceGroupsAddInstancesRequest--;
return o;
}
checkInstanceGroupsAddInstancesRequest(
api.InstanceGroupsAddInstancesRequest o) {
buildCounterInstanceGroupsAddInstancesRequest++;
if (buildCounterInstanceGroupsAddInstancesRequest < 3) {
checkUnnamed2406(o.instances);
}
buildCounterInstanceGroupsAddInstancesRequest--;
}
buildUnnamed2407() {
var o = new core.List<api.InstanceWithNamedPorts>();
o.add(buildInstanceWithNamedPorts());
o.add(buildInstanceWithNamedPorts());
return o;
}
checkUnnamed2407(core.List<api.InstanceWithNamedPorts> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceWithNamedPorts(o[0]);
checkInstanceWithNamedPorts(o[1]);
}
core.int buildCounterInstanceGroupsListInstancesWarningData = 0;
buildInstanceGroupsListInstancesWarningData() {
var o = new api.InstanceGroupsListInstancesWarningData();
buildCounterInstanceGroupsListInstancesWarningData++;
if (buildCounterInstanceGroupsListInstancesWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupsListInstancesWarningData--;
return o;
}
checkInstanceGroupsListInstancesWarningData(
api.InstanceGroupsListInstancesWarningData o) {
buildCounterInstanceGroupsListInstancesWarningData++;
if (buildCounterInstanceGroupsListInstancesWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupsListInstancesWarningData--;
}
buildUnnamed2408() {
var o = new core.List<api.InstanceGroupsListInstancesWarningData>();
o.add(buildInstanceGroupsListInstancesWarningData());
o.add(buildInstanceGroupsListInstancesWarningData());
return o;
}
checkUnnamed2408(core.List<api.InstanceGroupsListInstancesWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupsListInstancesWarningData(o[0]);
checkInstanceGroupsListInstancesWarningData(o[1]);
}
core.int buildCounterInstanceGroupsListInstancesWarning = 0;
buildInstanceGroupsListInstancesWarning() {
var o = new api.InstanceGroupsListInstancesWarning();
buildCounterInstanceGroupsListInstancesWarning++;
if (buildCounterInstanceGroupsListInstancesWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2408();
o.message = "foo";
}
buildCounterInstanceGroupsListInstancesWarning--;
return o;
}
checkInstanceGroupsListInstancesWarning(
api.InstanceGroupsListInstancesWarning o) {
buildCounterInstanceGroupsListInstancesWarning++;
if (buildCounterInstanceGroupsListInstancesWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2408(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupsListInstancesWarning--;
}
core.int buildCounterInstanceGroupsListInstances = 0;
buildInstanceGroupsListInstances() {
var o = new api.InstanceGroupsListInstances();
buildCounterInstanceGroupsListInstances++;
if (buildCounterInstanceGroupsListInstances < 3) {
o.id = "foo";
o.items = buildUnnamed2407();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceGroupsListInstancesWarning();
}
buildCounterInstanceGroupsListInstances--;
return o;
}
checkInstanceGroupsListInstances(api.InstanceGroupsListInstances o) {
buildCounterInstanceGroupsListInstances++;
if (buildCounterInstanceGroupsListInstances < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2407(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceGroupsListInstancesWarning(o.warning);
}
buildCounterInstanceGroupsListInstances--;
}
core.int buildCounterInstanceGroupsListInstancesRequest = 0;
buildInstanceGroupsListInstancesRequest() {
var o = new api.InstanceGroupsListInstancesRequest();
buildCounterInstanceGroupsListInstancesRequest++;
if (buildCounterInstanceGroupsListInstancesRequest < 3) {
o.instanceState = "foo";
}
buildCounterInstanceGroupsListInstancesRequest--;
return o;
}
checkInstanceGroupsListInstancesRequest(
api.InstanceGroupsListInstancesRequest o) {
buildCounterInstanceGroupsListInstancesRequest++;
if (buildCounterInstanceGroupsListInstancesRequest < 3) {
unittest.expect(o.instanceState, unittest.equals('foo'));
}
buildCounterInstanceGroupsListInstancesRequest--;
}
buildUnnamed2409() {
var o = new core.List<api.InstanceReference>();
o.add(buildInstanceReference());
o.add(buildInstanceReference());
return o;
}
checkUnnamed2409(core.List<api.InstanceReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceReference(o[0]);
checkInstanceReference(o[1]);
}
core.int buildCounterInstanceGroupsRemoveInstancesRequest = 0;
buildInstanceGroupsRemoveInstancesRequest() {
var o = new api.InstanceGroupsRemoveInstancesRequest();
buildCounterInstanceGroupsRemoveInstancesRequest++;
if (buildCounterInstanceGroupsRemoveInstancesRequest < 3) {
o.instances = buildUnnamed2409();
}
buildCounterInstanceGroupsRemoveInstancesRequest--;
return o;
}
checkInstanceGroupsRemoveInstancesRequest(
api.InstanceGroupsRemoveInstancesRequest o) {
buildCounterInstanceGroupsRemoveInstancesRequest++;
if (buildCounterInstanceGroupsRemoveInstancesRequest < 3) {
checkUnnamed2409(o.instances);
}
buildCounterInstanceGroupsRemoveInstancesRequest--;
}
buildUnnamed2410() {
var o = new core.List<api.InstanceGroup>();
o.add(buildInstanceGroup());
o.add(buildInstanceGroup());
return o;
}
checkUnnamed2410(core.List<api.InstanceGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroup(o[0]);
checkInstanceGroup(o[1]);
}
core.int buildCounterInstanceGroupsScopedListWarningData = 0;
buildInstanceGroupsScopedListWarningData() {
var o = new api.InstanceGroupsScopedListWarningData();
buildCounterInstanceGroupsScopedListWarningData++;
if (buildCounterInstanceGroupsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceGroupsScopedListWarningData--;
return o;
}
checkInstanceGroupsScopedListWarningData(
api.InstanceGroupsScopedListWarningData o) {
buildCounterInstanceGroupsScopedListWarningData++;
if (buildCounterInstanceGroupsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceGroupsScopedListWarningData--;
}
buildUnnamed2411() {
var o = new core.List<api.InstanceGroupsScopedListWarningData>();
o.add(buildInstanceGroupsScopedListWarningData());
o.add(buildInstanceGroupsScopedListWarningData());
return o;
}
checkUnnamed2411(core.List<api.InstanceGroupsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupsScopedListWarningData(o[0]);
checkInstanceGroupsScopedListWarningData(o[1]);
}
core.int buildCounterInstanceGroupsScopedListWarning = 0;
buildInstanceGroupsScopedListWarning() {
var o = new api.InstanceGroupsScopedListWarning();
buildCounterInstanceGroupsScopedListWarning++;
if (buildCounterInstanceGroupsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2411();
o.message = "foo";
}
buildCounterInstanceGroupsScopedListWarning--;
return o;
}
checkInstanceGroupsScopedListWarning(api.InstanceGroupsScopedListWarning o) {
buildCounterInstanceGroupsScopedListWarning++;
if (buildCounterInstanceGroupsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2411(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceGroupsScopedListWarning--;
}
core.int buildCounterInstanceGroupsScopedList = 0;
buildInstanceGroupsScopedList() {
var o = new api.InstanceGroupsScopedList();
buildCounterInstanceGroupsScopedList++;
if (buildCounterInstanceGroupsScopedList < 3) {
o.instanceGroups = buildUnnamed2410();
o.warning = buildInstanceGroupsScopedListWarning();
}
buildCounterInstanceGroupsScopedList--;
return o;
}
checkInstanceGroupsScopedList(api.InstanceGroupsScopedList o) {
buildCounterInstanceGroupsScopedList++;
if (buildCounterInstanceGroupsScopedList < 3) {
checkUnnamed2410(o.instanceGroups);
checkInstanceGroupsScopedListWarning(o.warning);
}
buildCounterInstanceGroupsScopedList--;
}
buildUnnamed2412() {
var o = new core.List<api.NamedPort>();
o.add(buildNamedPort());
o.add(buildNamedPort());
return o;
}
checkUnnamed2412(core.List<api.NamedPort> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedPort(o[0]);
checkNamedPort(o[1]);
}
core.int buildCounterInstanceGroupsSetNamedPortsRequest = 0;
buildInstanceGroupsSetNamedPortsRequest() {
var o = new api.InstanceGroupsSetNamedPortsRequest();
buildCounterInstanceGroupsSetNamedPortsRequest++;
if (buildCounterInstanceGroupsSetNamedPortsRequest < 3) {
o.fingerprint = "foo";
o.namedPorts = buildUnnamed2412();
}
buildCounterInstanceGroupsSetNamedPortsRequest--;
return o;
}
checkInstanceGroupsSetNamedPortsRequest(
api.InstanceGroupsSetNamedPortsRequest o) {
buildCounterInstanceGroupsSetNamedPortsRequest++;
if (buildCounterInstanceGroupsSetNamedPortsRequest < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2412(o.namedPorts);
}
buildCounterInstanceGroupsSetNamedPortsRequest--;
}
buildUnnamed2413() {
var o = new core.List<api.Instance>();
o.add(buildInstance());
o.add(buildInstance());
return o;
}
checkUnnamed2413(core.List<api.Instance> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstance(o[0]);
checkInstance(o[1]);
}
core.int buildCounterInstanceListWarningData = 0;
buildInstanceListWarningData() {
var o = new api.InstanceListWarningData();
buildCounterInstanceListWarningData++;
if (buildCounterInstanceListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceListWarningData--;
return o;
}
checkInstanceListWarningData(api.InstanceListWarningData o) {
buildCounterInstanceListWarningData++;
if (buildCounterInstanceListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceListWarningData--;
}
buildUnnamed2414() {
var o = new core.List<api.InstanceListWarningData>();
o.add(buildInstanceListWarningData());
o.add(buildInstanceListWarningData());
return o;
}
checkUnnamed2414(core.List<api.InstanceListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceListWarningData(o[0]);
checkInstanceListWarningData(o[1]);
}
core.int buildCounterInstanceListWarning = 0;
buildInstanceListWarning() {
var o = new api.InstanceListWarning();
buildCounterInstanceListWarning++;
if (buildCounterInstanceListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2414();
o.message = "foo";
}
buildCounterInstanceListWarning--;
return o;
}
checkInstanceListWarning(api.InstanceListWarning o) {
buildCounterInstanceListWarning++;
if (buildCounterInstanceListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2414(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceListWarning--;
}
core.int buildCounterInstanceList = 0;
buildInstanceList() {
var o = new api.InstanceList();
buildCounterInstanceList++;
if (buildCounterInstanceList < 3) {
o.id = "foo";
o.items = buildUnnamed2413();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceListWarning();
}
buildCounterInstanceList--;
return o;
}
checkInstanceList(api.InstanceList o) {
buildCounterInstanceList++;
if (buildCounterInstanceList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2413(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceListWarning(o.warning);
}
buildCounterInstanceList--;
}
core.int buildCounterInstanceMoveRequest = 0;
buildInstanceMoveRequest() {
var o = new api.InstanceMoveRequest();
buildCounterInstanceMoveRequest++;
if (buildCounterInstanceMoveRequest < 3) {
o.destinationZone = "foo";
o.targetInstance = "foo";
}
buildCounterInstanceMoveRequest--;
return o;
}
checkInstanceMoveRequest(api.InstanceMoveRequest o) {
buildCounterInstanceMoveRequest++;
if (buildCounterInstanceMoveRequest < 3) {
unittest.expect(o.destinationZone, unittest.equals('foo'));
unittest.expect(o.targetInstance, unittest.equals('foo'));
}
buildCounterInstanceMoveRequest--;
}
buildUnnamed2415() {
var o = new core.List<api.AttachedDisk>();
o.add(buildAttachedDisk());
o.add(buildAttachedDisk());
return o;
}
checkUnnamed2415(core.List<api.AttachedDisk> o) {
unittest.expect(o, unittest.hasLength(2));
checkAttachedDisk(o[0]);
checkAttachedDisk(o[1]);
}
buildUnnamed2416() {
var o = new core.List<api.AcceleratorConfig>();
o.add(buildAcceleratorConfig());
o.add(buildAcceleratorConfig());
return o;
}
checkUnnamed2416(core.List<api.AcceleratorConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorConfig(o[0]);
checkAcceleratorConfig(o[1]);
}
buildUnnamed2417() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2417(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'));
}
buildUnnamed2418() {
var o = new core.List<api.NetworkInterface>();
o.add(buildNetworkInterface());
o.add(buildNetworkInterface());
return o;
}
checkUnnamed2418(core.List<api.NetworkInterface> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkInterface(o[0]);
checkNetworkInterface(o[1]);
}
buildUnnamed2419() {
var o = new core.List<api.ServiceAccount>();
o.add(buildServiceAccount());
o.add(buildServiceAccount());
return o;
}
checkUnnamed2419(core.List<api.ServiceAccount> o) {
unittest.expect(o, unittest.hasLength(2));
checkServiceAccount(o[0]);
checkServiceAccount(o[1]);
}
core.int buildCounterInstanceProperties = 0;
buildInstanceProperties() {
var o = new api.InstanceProperties();
buildCounterInstanceProperties++;
if (buildCounterInstanceProperties < 3) {
o.canIpForward = true;
o.description = "foo";
o.disks = buildUnnamed2415();
o.guestAccelerators = buildUnnamed2416();
o.labels = buildUnnamed2417();
o.machineType = "foo";
o.metadata = buildMetadata();
o.minCpuPlatform = "foo";
o.networkInterfaces = buildUnnamed2418();
o.scheduling = buildScheduling();
o.serviceAccounts = buildUnnamed2419();
o.tags = buildTags();
}
buildCounterInstanceProperties--;
return o;
}
checkInstanceProperties(api.InstanceProperties o) {
buildCounterInstanceProperties++;
if (buildCounterInstanceProperties < 3) {
unittest.expect(o.canIpForward, unittest.isTrue);
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2415(o.disks);
checkUnnamed2416(o.guestAccelerators);
checkUnnamed2417(o.labels);
unittest.expect(o.machineType, unittest.equals('foo'));
checkMetadata(o.metadata);
unittest.expect(o.minCpuPlatform, unittest.equals('foo'));
checkUnnamed2418(o.networkInterfaces);
checkScheduling(o.scheduling);
checkUnnamed2419(o.serviceAccounts);
checkTags(o.tags);
}
buildCounterInstanceProperties--;
}
core.int buildCounterInstanceReference = 0;
buildInstanceReference() {
var o = new api.InstanceReference();
buildCounterInstanceReference++;
if (buildCounterInstanceReference < 3) {
o.instance = "foo";
}
buildCounterInstanceReference--;
return o;
}
checkInstanceReference(api.InstanceReference o) {
buildCounterInstanceReference++;
if (buildCounterInstanceReference < 3) {
unittest.expect(o.instance, unittest.equals('foo'));
}
buildCounterInstanceReference--;
}
core.int buildCounterInstanceTemplate = 0;
buildInstanceTemplate() {
var o = new api.InstanceTemplate();
buildCounterInstanceTemplate++;
if (buildCounterInstanceTemplate < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.properties = buildInstanceProperties();
o.selfLink = "foo";
}
buildCounterInstanceTemplate--;
return o;
}
checkInstanceTemplate(api.InstanceTemplate o) {
buildCounterInstanceTemplate++;
if (buildCounterInstanceTemplate < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkInstanceProperties(o.properties);
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterInstanceTemplate--;
}
buildUnnamed2420() {
var o = new core.List<api.InstanceTemplate>();
o.add(buildInstanceTemplate());
o.add(buildInstanceTemplate());
return o;
}
checkUnnamed2420(core.List<api.InstanceTemplate> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceTemplate(o[0]);
checkInstanceTemplate(o[1]);
}
core.int buildCounterInstanceTemplateListWarningData = 0;
buildInstanceTemplateListWarningData() {
var o = new api.InstanceTemplateListWarningData();
buildCounterInstanceTemplateListWarningData++;
if (buildCounterInstanceTemplateListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstanceTemplateListWarningData--;
return o;
}
checkInstanceTemplateListWarningData(api.InstanceTemplateListWarningData o) {
buildCounterInstanceTemplateListWarningData++;
if (buildCounterInstanceTemplateListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstanceTemplateListWarningData--;
}
buildUnnamed2421() {
var o = new core.List<api.InstanceTemplateListWarningData>();
o.add(buildInstanceTemplateListWarningData());
o.add(buildInstanceTemplateListWarningData());
return o;
}
checkUnnamed2421(core.List<api.InstanceTemplateListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceTemplateListWarningData(o[0]);
checkInstanceTemplateListWarningData(o[1]);
}
core.int buildCounterInstanceTemplateListWarning = 0;
buildInstanceTemplateListWarning() {
var o = new api.InstanceTemplateListWarning();
buildCounterInstanceTemplateListWarning++;
if (buildCounterInstanceTemplateListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2421();
o.message = "foo";
}
buildCounterInstanceTemplateListWarning--;
return o;
}
checkInstanceTemplateListWarning(api.InstanceTemplateListWarning o) {
buildCounterInstanceTemplateListWarning++;
if (buildCounterInstanceTemplateListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2421(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstanceTemplateListWarning--;
}
core.int buildCounterInstanceTemplateList = 0;
buildInstanceTemplateList() {
var o = new api.InstanceTemplateList();
buildCounterInstanceTemplateList++;
if (buildCounterInstanceTemplateList < 3) {
o.id = "foo";
o.items = buildUnnamed2420();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInstanceTemplateListWarning();
}
buildCounterInstanceTemplateList--;
return o;
}
checkInstanceTemplateList(api.InstanceTemplateList o) {
buildCounterInstanceTemplateList++;
if (buildCounterInstanceTemplateList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2420(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInstanceTemplateListWarning(o.warning);
}
buildCounterInstanceTemplateList--;
}
buildUnnamed2422() {
var o = new core.List<api.NamedPort>();
o.add(buildNamedPort());
o.add(buildNamedPort());
return o;
}
checkUnnamed2422(core.List<api.NamedPort> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedPort(o[0]);
checkNamedPort(o[1]);
}
core.int buildCounterInstanceWithNamedPorts = 0;
buildInstanceWithNamedPorts() {
var o = new api.InstanceWithNamedPorts();
buildCounterInstanceWithNamedPorts++;
if (buildCounterInstanceWithNamedPorts < 3) {
o.instance = "foo";
o.namedPorts = buildUnnamed2422();
o.status = "foo";
}
buildCounterInstanceWithNamedPorts--;
return o;
}
checkInstanceWithNamedPorts(api.InstanceWithNamedPorts o) {
buildCounterInstanceWithNamedPorts++;
if (buildCounterInstanceWithNamedPorts < 3) {
unittest.expect(o.instance, unittest.equals('foo'));
checkUnnamed2422(o.namedPorts);
unittest.expect(o.status, unittest.equals('foo'));
}
buildCounterInstanceWithNamedPorts--;
}
buildUnnamed2423() {
var o = new core.List<api.Instance>();
o.add(buildInstance());
o.add(buildInstance());
return o;
}
checkUnnamed2423(core.List<api.Instance> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstance(o[0]);
checkInstance(o[1]);
}
core.int buildCounterInstancesScopedListWarningData = 0;
buildInstancesScopedListWarningData() {
var o = new api.InstancesScopedListWarningData();
buildCounterInstancesScopedListWarningData++;
if (buildCounterInstancesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInstancesScopedListWarningData--;
return o;
}
checkInstancesScopedListWarningData(api.InstancesScopedListWarningData o) {
buildCounterInstancesScopedListWarningData++;
if (buildCounterInstancesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInstancesScopedListWarningData--;
}
buildUnnamed2424() {
var o = new core.List<api.InstancesScopedListWarningData>();
o.add(buildInstancesScopedListWarningData());
o.add(buildInstancesScopedListWarningData());
return o;
}
checkUnnamed2424(core.List<api.InstancesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstancesScopedListWarningData(o[0]);
checkInstancesScopedListWarningData(o[1]);
}
core.int buildCounterInstancesScopedListWarning = 0;
buildInstancesScopedListWarning() {
var o = new api.InstancesScopedListWarning();
buildCounterInstancesScopedListWarning++;
if (buildCounterInstancesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2424();
o.message = "foo";
}
buildCounterInstancesScopedListWarning--;
return o;
}
checkInstancesScopedListWarning(api.InstancesScopedListWarning o) {
buildCounterInstancesScopedListWarning++;
if (buildCounterInstancesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2424(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInstancesScopedListWarning--;
}
core.int buildCounterInstancesScopedList = 0;
buildInstancesScopedList() {
var o = new api.InstancesScopedList();
buildCounterInstancesScopedList++;
if (buildCounterInstancesScopedList < 3) {
o.instances = buildUnnamed2423();
o.warning = buildInstancesScopedListWarning();
}
buildCounterInstancesScopedList--;
return o;
}
checkInstancesScopedList(api.InstancesScopedList o) {
buildCounterInstancesScopedList++;
if (buildCounterInstancesScopedList < 3) {
checkUnnamed2423(o.instances);
checkInstancesScopedListWarning(o.warning);
}
buildCounterInstancesScopedList--;
}
buildUnnamed2425() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2425(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 buildCounterInstancesSetLabelsRequest = 0;
buildInstancesSetLabelsRequest() {
var o = new api.InstancesSetLabelsRequest();
buildCounterInstancesSetLabelsRequest++;
if (buildCounterInstancesSetLabelsRequest < 3) {
o.labelFingerprint = "foo";
o.labels = buildUnnamed2425();
}
buildCounterInstancesSetLabelsRequest--;
return o;
}
checkInstancesSetLabelsRequest(api.InstancesSetLabelsRequest o) {
buildCounterInstancesSetLabelsRequest++;
if (buildCounterInstancesSetLabelsRequest < 3) {
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2425(o.labels);
}
buildCounterInstancesSetLabelsRequest--;
}
buildUnnamed2426() {
var o = new core.List<api.AcceleratorConfig>();
o.add(buildAcceleratorConfig());
o.add(buildAcceleratorConfig());
return o;
}
checkUnnamed2426(core.List<api.AcceleratorConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAcceleratorConfig(o[0]);
checkAcceleratorConfig(o[1]);
}
core.int buildCounterInstancesSetMachineResourcesRequest = 0;
buildInstancesSetMachineResourcesRequest() {
var o = new api.InstancesSetMachineResourcesRequest();
buildCounterInstancesSetMachineResourcesRequest++;
if (buildCounterInstancesSetMachineResourcesRequest < 3) {
o.guestAccelerators = buildUnnamed2426();
}
buildCounterInstancesSetMachineResourcesRequest--;
return o;
}
checkInstancesSetMachineResourcesRequest(
api.InstancesSetMachineResourcesRequest o) {
buildCounterInstancesSetMachineResourcesRequest++;
if (buildCounterInstancesSetMachineResourcesRequest < 3) {
checkUnnamed2426(o.guestAccelerators);
}
buildCounterInstancesSetMachineResourcesRequest--;
}
core.int buildCounterInstancesSetMachineTypeRequest = 0;
buildInstancesSetMachineTypeRequest() {
var o = new api.InstancesSetMachineTypeRequest();
buildCounterInstancesSetMachineTypeRequest++;
if (buildCounterInstancesSetMachineTypeRequest < 3) {
o.machineType = "foo";
}
buildCounterInstancesSetMachineTypeRequest--;
return o;
}
checkInstancesSetMachineTypeRequest(api.InstancesSetMachineTypeRequest o) {
buildCounterInstancesSetMachineTypeRequest++;
if (buildCounterInstancesSetMachineTypeRequest < 3) {
unittest.expect(o.machineType, unittest.equals('foo'));
}
buildCounterInstancesSetMachineTypeRequest--;
}
core.int buildCounterInstancesSetMinCpuPlatformRequest = 0;
buildInstancesSetMinCpuPlatformRequest() {
var o = new api.InstancesSetMinCpuPlatformRequest();
buildCounterInstancesSetMinCpuPlatformRequest++;
if (buildCounterInstancesSetMinCpuPlatformRequest < 3) {
o.minCpuPlatform = "foo";
}
buildCounterInstancesSetMinCpuPlatformRequest--;
return o;
}
checkInstancesSetMinCpuPlatformRequest(
api.InstancesSetMinCpuPlatformRequest o) {
buildCounterInstancesSetMinCpuPlatformRequest++;
if (buildCounterInstancesSetMinCpuPlatformRequest < 3) {
unittest.expect(o.minCpuPlatform, unittest.equals('foo'));
}
buildCounterInstancesSetMinCpuPlatformRequest--;
}
buildUnnamed2427() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2427(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 buildCounterInstancesSetServiceAccountRequest = 0;
buildInstancesSetServiceAccountRequest() {
var o = new api.InstancesSetServiceAccountRequest();
buildCounterInstancesSetServiceAccountRequest++;
if (buildCounterInstancesSetServiceAccountRequest < 3) {
o.email = "foo";
o.scopes = buildUnnamed2427();
}
buildCounterInstancesSetServiceAccountRequest--;
return o;
}
checkInstancesSetServiceAccountRequest(
api.InstancesSetServiceAccountRequest o) {
buildCounterInstancesSetServiceAccountRequest++;
if (buildCounterInstancesSetServiceAccountRequest < 3) {
unittest.expect(o.email, unittest.equals('foo'));
checkUnnamed2427(o.scopes);
}
buildCounterInstancesSetServiceAccountRequest--;
}
buildUnnamed2428() {
var o = new core.List<api.CustomerEncryptionKeyProtectedDisk>();
o.add(buildCustomerEncryptionKeyProtectedDisk());
o.add(buildCustomerEncryptionKeyProtectedDisk());
return o;
}
checkUnnamed2428(core.List<api.CustomerEncryptionKeyProtectedDisk> o) {
unittest.expect(o, unittest.hasLength(2));
checkCustomerEncryptionKeyProtectedDisk(o[0]);
checkCustomerEncryptionKeyProtectedDisk(o[1]);
}
core.int buildCounterInstancesStartWithEncryptionKeyRequest = 0;
buildInstancesStartWithEncryptionKeyRequest() {
var o = new api.InstancesStartWithEncryptionKeyRequest();
buildCounterInstancesStartWithEncryptionKeyRequest++;
if (buildCounterInstancesStartWithEncryptionKeyRequest < 3) {
o.disks = buildUnnamed2428();
}
buildCounterInstancesStartWithEncryptionKeyRequest--;
return o;
}
checkInstancesStartWithEncryptionKeyRequest(
api.InstancesStartWithEncryptionKeyRequest o) {
buildCounterInstancesStartWithEncryptionKeyRequest++;
if (buildCounterInstancesStartWithEncryptionKeyRequest < 3) {
checkUnnamed2428(o.disks);
}
buildCounterInstancesStartWithEncryptionKeyRequest--;
}
buildUnnamed2429() {
var o = new core.List<api.InterconnectCircuitInfo>();
o.add(buildInterconnectCircuitInfo());
o.add(buildInterconnectCircuitInfo());
return o;
}
checkUnnamed2429(core.List<api.InterconnectCircuitInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectCircuitInfo(o[0]);
checkInterconnectCircuitInfo(o[1]);
}
buildUnnamed2430() {
var o = new core.List<api.InterconnectOutageNotification>();
o.add(buildInterconnectOutageNotification());
o.add(buildInterconnectOutageNotification());
return o;
}
checkUnnamed2430(core.List<api.InterconnectOutageNotification> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectOutageNotification(o[0]);
checkInterconnectOutageNotification(o[1]);
}
buildUnnamed2431() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2431(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 buildCounterInterconnect = 0;
buildInterconnect() {
var o = new api.Interconnect();
buildCounterInterconnect++;
if (buildCounterInterconnect < 3) {
o.adminEnabled = true;
o.circuitInfos = buildUnnamed2429();
o.creationTimestamp = "foo";
o.customerName = "foo";
o.description = "foo";
o.expectedOutages = buildUnnamed2430();
o.googleIpAddress = "foo";
o.googleReferenceId = "foo";
o.id = "foo";
o.interconnectAttachments = buildUnnamed2431();
o.interconnectType = "foo";
o.kind = "foo";
o.linkType = "foo";
o.location = "foo";
o.name = "foo";
o.nocContactEmail = "foo";
o.operationalStatus = "foo";
o.peerIpAddress = "foo";
o.provisionedLinkCount = 42;
o.requestedLinkCount = 42;
o.selfLink = "foo";
}
buildCounterInterconnect--;
return o;
}
checkInterconnect(api.Interconnect o) {
buildCounterInterconnect++;
if (buildCounterInterconnect < 3) {
unittest.expect(o.adminEnabled, unittest.isTrue);
checkUnnamed2429(o.circuitInfos);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.customerName, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2430(o.expectedOutages);
unittest.expect(o.googleIpAddress, unittest.equals('foo'));
unittest.expect(o.googleReferenceId, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2431(o.interconnectAttachments);
unittest.expect(o.interconnectType, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.linkType, unittest.equals('foo'));
unittest.expect(o.location, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.nocContactEmail, unittest.equals('foo'));
unittest.expect(o.operationalStatus, unittest.equals('foo'));
unittest.expect(o.peerIpAddress, unittest.equals('foo'));
unittest.expect(o.provisionedLinkCount, unittest.equals(42));
unittest.expect(o.requestedLinkCount, unittest.equals(42));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterInterconnect--;
}
core.int buildCounterInterconnectAttachment = 0;
buildInterconnectAttachment() {
var o = new api.InterconnectAttachment();
buildCounterInterconnectAttachment++;
if (buildCounterInterconnectAttachment < 3) {
o.cloudRouterIpAddress = "foo";
o.creationTimestamp = "foo";
o.customerRouterIpAddress = "foo";
o.description = "foo";
o.googleReferenceId = "foo";
o.id = "foo";
o.interconnect = "foo";
o.kind = "foo";
o.name = "foo";
o.operationalStatus = "foo";
o.privateInterconnectInfo = buildInterconnectAttachmentPrivateInfo();
o.region = "foo";
o.router = "foo";
o.selfLink = "foo";
}
buildCounterInterconnectAttachment--;
return o;
}
checkInterconnectAttachment(api.InterconnectAttachment o) {
buildCounterInterconnectAttachment++;
if (buildCounterInterconnectAttachment < 3) {
unittest.expect(o.cloudRouterIpAddress, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.customerRouterIpAddress, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.googleReferenceId, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.interconnect, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.operationalStatus, unittest.equals('foo'));
checkInterconnectAttachmentPrivateInfo(o.privateInterconnectInfo);
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.router, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterInterconnectAttachment--;
}
buildUnnamed2432() {
var o = new core.Map<core.String, api.InterconnectAttachmentsScopedList>();
o["x"] = buildInterconnectAttachmentsScopedList();
o["y"] = buildInterconnectAttachmentsScopedList();
return o;
}
checkUnnamed2432(
core.Map<core.String, api.InterconnectAttachmentsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachmentsScopedList(o["x"]);
checkInterconnectAttachmentsScopedList(o["y"]);
}
core.int buildCounterInterconnectAttachmentAggregatedListWarningData = 0;
buildInterconnectAttachmentAggregatedListWarningData() {
var o = new api.InterconnectAttachmentAggregatedListWarningData();
buildCounterInterconnectAttachmentAggregatedListWarningData++;
if (buildCounterInterconnectAttachmentAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInterconnectAttachmentAggregatedListWarningData--;
return o;
}
checkInterconnectAttachmentAggregatedListWarningData(
api.InterconnectAttachmentAggregatedListWarningData o) {
buildCounterInterconnectAttachmentAggregatedListWarningData++;
if (buildCounterInterconnectAttachmentAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentAggregatedListWarningData--;
}
buildUnnamed2433() {
var o = new core.List<api.InterconnectAttachmentAggregatedListWarningData>();
o.add(buildInterconnectAttachmentAggregatedListWarningData());
o.add(buildInterconnectAttachmentAggregatedListWarningData());
return o;
}
checkUnnamed2433(
core.List<api.InterconnectAttachmentAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachmentAggregatedListWarningData(o[0]);
checkInterconnectAttachmentAggregatedListWarningData(o[1]);
}
core.int buildCounterInterconnectAttachmentAggregatedListWarning = 0;
buildInterconnectAttachmentAggregatedListWarning() {
var o = new api.InterconnectAttachmentAggregatedListWarning();
buildCounterInterconnectAttachmentAggregatedListWarning++;
if (buildCounterInterconnectAttachmentAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2433();
o.message = "foo";
}
buildCounterInterconnectAttachmentAggregatedListWarning--;
return o;
}
checkInterconnectAttachmentAggregatedListWarning(
api.InterconnectAttachmentAggregatedListWarning o) {
buildCounterInterconnectAttachmentAggregatedListWarning++;
if (buildCounterInterconnectAttachmentAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2433(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentAggregatedListWarning--;
}
core.int buildCounterInterconnectAttachmentAggregatedList = 0;
buildInterconnectAttachmentAggregatedList() {
var o = new api.InterconnectAttachmentAggregatedList();
buildCounterInterconnectAttachmentAggregatedList++;
if (buildCounterInterconnectAttachmentAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2432();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInterconnectAttachmentAggregatedListWarning();
}
buildCounterInterconnectAttachmentAggregatedList--;
return o;
}
checkInterconnectAttachmentAggregatedList(
api.InterconnectAttachmentAggregatedList o) {
buildCounterInterconnectAttachmentAggregatedList++;
if (buildCounterInterconnectAttachmentAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2432(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInterconnectAttachmentAggregatedListWarning(o.warning);
}
buildCounterInterconnectAttachmentAggregatedList--;
}
buildUnnamed2434() {
var o = new core.List<api.InterconnectAttachment>();
o.add(buildInterconnectAttachment());
o.add(buildInterconnectAttachment());
return o;
}
checkUnnamed2434(core.List<api.InterconnectAttachment> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachment(o[0]);
checkInterconnectAttachment(o[1]);
}
core.int buildCounterInterconnectAttachmentListWarningData = 0;
buildInterconnectAttachmentListWarningData() {
var o = new api.InterconnectAttachmentListWarningData();
buildCounterInterconnectAttachmentListWarningData++;
if (buildCounterInterconnectAttachmentListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInterconnectAttachmentListWarningData--;
return o;
}
checkInterconnectAttachmentListWarningData(
api.InterconnectAttachmentListWarningData o) {
buildCounterInterconnectAttachmentListWarningData++;
if (buildCounterInterconnectAttachmentListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentListWarningData--;
}
buildUnnamed2435() {
var o = new core.List<api.InterconnectAttachmentListWarningData>();
o.add(buildInterconnectAttachmentListWarningData());
o.add(buildInterconnectAttachmentListWarningData());
return o;
}
checkUnnamed2435(core.List<api.InterconnectAttachmentListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachmentListWarningData(o[0]);
checkInterconnectAttachmentListWarningData(o[1]);
}
core.int buildCounterInterconnectAttachmentListWarning = 0;
buildInterconnectAttachmentListWarning() {
var o = new api.InterconnectAttachmentListWarning();
buildCounterInterconnectAttachmentListWarning++;
if (buildCounterInterconnectAttachmentListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2435();
o.message = "foo";
}
buildCounterInterconnectAttachmentListWarning--;
return o;
}
checkInterconnectAttachmentListWarning(
api.InterconnectAttachmentListWarning o) {
buildCounterInterconnectAttachmentListWarning++;
if (buildCounterInterconnectAttachmentListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2435(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentListWarning--;
}
core.int buildCounterInterconnectAttachmentList = 0;
buildInterconnectAttachmentList() {
var o = new api.InterconnectAttachmentList();
buildCounterInterconnectAttachmentList++;
if (buildCounterInterconnectAttachmentList < 3) {
o.id = "foo";
o.items = buildUnnamed2434();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInterconnectAttachmentListWarning();
}
buildCounterInterconnectAttachmentList--;
return o;
}
checkInterconnectAttachmentList(api.InterconnectAttachmentList o) {
buildCounterInterconnectAttachmentList++;
if (buildCounterInterconnectAttachmentList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2434(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInterconnectAttachmentListWarning(o.warning);
}
buildCounterInterconnectAttachmentList--;
}
core.int buildCounterInterconnectAttachmentPrivateInfo = 0;
buildInterconnectAttachmentPrivateInfo() {
var o = new api.InterconnectAttachmentPrivateInfo();
buildCounterInterconnectAttachmentPrivateInfo++;
if (buildCounterInterconnectAttachmentPrivateInfo < 3) {
o.tag8021q = 42;
}
buildCounterInterconnectAttachmentPrivateInfo--;
return o;
}
checkInterconnectAttachmentPrivateInfo(
api.InterconnectAttachmentPrivateInfo o) {
buildCounterInterconnectAttachmentPrivateInfo++;
if (buildCounterInterconnectAttachmentPrivateInfo < 3) {
unittest.expect(o.tag8021q, unittest.equals(42));
}
buildCounterInterconnectAttachmentPrivateInfo--;
}
buildUnnamed2436() {
var o = new core.List<api.InterconnectAttachment>();
o.add(buildInterconnectAttachment());
o.add(buildInterconnectAttachment());
return o;
}
checkUnnamed2436(core.List<api.InterconnectAttachment> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachment(o[0]);
checkInterconnectAttachment(o[1]);
}
core.int buildCounterInterconnectAttachmentsScopedListWarningData = 0;
buildInterconnectAttachmentsScopedListWarningData() {
var o = new api.InterconnectAttachmentsScopedListWarningData();
buildCounterInterconnectAttachmentsScopedListWarningData++;
if (buildCounterInterconnectAttachmentsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInterconnectAttachmentsScopedListWarningData--;
return o;
}
checkInterconnectAttachmentsScopedListWarningData(
api.InterconnectAttachmentsScopedListWarningData o) {
buildCounterInterconnectAttachmentsScopedListWarningData++;
if (buildCounterInterconnectAttachmentsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentsScopedListWarningData--;
}
buildUnnamed2437() {
var o = new core.List<api.InterconnectAttachmentsScopedListWarningData>();
o.add(buildInterconnectAttachmentsScopedListWarningData());
o.add(buildInterconnectAttachmentsScopedListWarningData());
return o;
}
checkUnnamed2437(
core.List<api.InterconnectAttachmentsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectAttachmentsScopedListWarningData(o[0]);
checkInterconnectAttachmentsScopedListWarningData(o[1]);
}
core.int buildCounterInterconnectAttachmentsScopedListWarning = 0;
buildInterconnectAttachmentsScopedListWarning() {
var o = new api.InterconnectAttachmentsScopedListWarning();
buildCounterInterconnectAttachmentsScopedListWarning++;
if (buildCounterInterconnectAttachmentsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2437();
o.message = "foo";
}
buildCounterInterconnectAttachmentsScopedListWarning--;
return o;
}
checkInterconnectAttachmentsScopedListWarning(
api.InterconnectAttachmentsScopedListWarning o) {
buildCounterInterconnectAttachmentsScopedListWarning++;
if (buildCounterInterconnectAttachmentsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2437(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInterconnectAttachmentsScopedListWarning--;
}
core.int buildCounterInterconnectAttachmentsScopedList = 0;
buildInterconnectAttachmentsScopedList() {
var o = new api.InterconnectAttachmentsScopedList();
buildCounterInterconnectAttachmentsScopedList++;
if (buildCounterInterconnectAttachmentsScopedList < 3) {
o.interconnectAttachments = buildUnnamed2436();
o.warning = buildInterconnectAttachmentsScopedListWarning();
}
buildCounterInterconnectAttachmentsScopedList--;
return o;
}
checkInterconnectAttachmentsScopedList(
api.InterconnectAttachmentsScopedList o) {
buildCounterInterconnectAttachmentsScopedList++;
if (buildCounterInterconnectAttachmentsScopedList < 3) {
checkUnnamed2436(o.interconnectAttachments);
checkInterconnectAttachmentsScopedListWarning(o.warning);
}
buildCounterInterconnectAttachmentsScopedList--;
}
core.int buildCounterInterconnectCircuitInfo = 0;
buildInterconnectCircuitInfo() {
var o = new api.InterconnectCircuitInfo();
buildCounterInterconnectCircuitInfo++;
if (buildCounterInterconnectCircuitInfo < 3) {
o.customerDemarcId = "foo";
o.googleCircuitId = "foo";
o.googleDemarcId = "foo";
}
buildCounterInterconnectCircuitInfo--;
return o;
}
checkInterconnectCircuitInfo(api.InterconnectCircuitInfo o) {
buildCounterInterconnectCircuitInfo++;
if (buildCounterInterconnectCircuitInfo < 3) {
unittest.expect(o.customerDemarcId, unittest.equals('foo'));
unittest.expect(o.googleCircuitId, unittest.equals('foo'));
unittest.expect(o.googleDemarcId, unittest.equals('foo'));
}
buildCounterInterconnectCircuitInfo--;
}
buildUnnamed2438() {
var o = new core.List<api.Interconnect>();
o.add(buildInterconnect());
o.add(buildInterconnect());
return o;
}
checkUnnamed2438(core.List<api.Interconnect> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnect(o[0]);
checkInterconnect(o[1]);
}
core.int buildCounterInterconnectListWarningData = 0;
buildInterconnectListWarningData() {
var o = new api.InterconnectListWarningData();
buildCounterInterconnectListWarningData++;
if (buildCounterInterconnectListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInterconnectListWarningData--;
return o;
}
checkInterconnectListWarningData(api.InterconnectListWarningData o) {
buildCounterInterconnectListWarningData++;
if (buildCounterInterconnectListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInterconnectListWarningData--;
}
buildUnnamed2439() {
var o = new core.List<api.InterconnectListWarningData>();
o.add(buildInterconnectListWarningData());
o.add(buildInterconnectListWarningData());
return o;
}
checkUnnamed2439(core.List<api.InterconnectListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectListWarningData(o[0]);
checkInterconnectListWarningData(o[1]);
}
core.int buildCounterInterconnectListWarning = 0;
buildInterconnectListWarning() {
var o = new api.InterconnectListWarning();
buildCounterInterconnectListWarning++;
if (buildCounterInterconnectListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2439();
o.message = "foo";
}
buildCounterInterconnectListWarning--;
return o;
}
checkInterconnectListWarning(api.InterconnectListWarning o) {
buildCounterInterconnectListWarning++;
if (buildCounterInterconnectListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2439(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInterconnectListWarning--;
}
core.int buildCounterInterconnectList = 0;
buildInterconnectList() {
var o = new api.InterconnectList();
buildCounterInterconnectList++;
if (buildCounterInterconnectList < 3) {
o.id = "foo";
o.items = buildUnnamed2438();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInterconnectListWarning();
}
buildCounterInterconnectList--;
return o;
}
checkInterconnectList(api.InterconnectList o) {
buildCounterInterconnectList++;
if (buildCounterInterconnectList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2438(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInterconnectListWarning(o.warning);
}
buildCounterInterconnectList--;
}
buildUnnamed2440() {
var o = new core.List<api.InterconnectLocationRegionInfo>();
o.add(buildInterconnectLocationRegionInfo());
o.add(buildInterconnectLocationRegionInfo());
return o;
}
checkUnnamed2440(core.List<api.InterconnectLocationRegionInfo> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectLocationRegionInfo(o[0]);
checkInterconnectLocationRegionInfo(o[1]);
}
core.int buildCounterInterconnectLocation = 0;
buildInterconnectLocation() {
var o = new api.InterconnectLocation();
buildCounterInterconnectLocation++;
if (buildCounterInterconnectLocation < 3) {
o.address = "foo";
o.availabilityZone = "foo";
o.city = "foo";
o.continent = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.facilityProvider = "foo";
o.facilityProviderFacilityId = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.peeringdbFacilityId = "foo";
o.regionInfos = buildUnnamed2440();
o.selfLink = "foo";
}
buildCounterInterconnectLocation--;
return o;
}
checkInterconnectLocation(api.InterconnectLocation o) {
buildCounterInterconnectLocation++;
if (buildCounterInterconnectLocation < 3) {
unittest.expect(o.address, unittest.equals('foo'));
unittest.expect(o.availabilityZone, unittest.equals('foo'));
unittest.expect(o.city, unittest.equals('foo'));
unittest.expect(o.continent, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.facilityProvider, unittest.equals('foo'));
unittest.expect(o.facilityProviderFacilityId, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.peeringdbFacilityId, unittest.equals('foo'));
checkUnnamed2440(o.regionInfos);
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterInterconnectLocation--;
}
buildUnnamed2441() {
var o = new core.List<api.InterconnectLocation>();
o.add(buildInterconnectLocation());
o.add(buildInterconnectLocation());
return o;
}
checkUnnamed2441(core.List<api.InterconnectLocation> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectLocation(o[0]);
checkInterconnectLocation(o[1]);
}
core.int buildCounterInterconnectLocationListWarningData = 0;
buildInterconnectLocationListWarningData() {
var o = new api.InterconnectLocationListWarningData();
buildCounterInterconnectLocationListWarningData++;
if (buildCounterInterconnectLocationListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterInterconnectLocationListWarningData--;
return o;
}
checkInterconnectLocationListWarningData(
api.InterconnectLocationListWarningData o) {
buildCounterInterconnectLocationListWarningData++;
if (buildCounterInterconnectLocationListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterInterconnectLocationListWarningData--;
}
buildUnnamed2442() {
var o = new core.List<api.InterconnectLocationListWarningData>();
o.add(buildInterconnectLocationListWarningData());
o.add(buildInterconnectLocationListWarningData());
return o;
}
checkUnnamed2442(core.List<api.InterconnectLocationListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkInterconnectLocationListWarningData(o[0]);
checkInterconnectLocationListWarningData(o[1]);
}
core.int buildCounterInterconnectLocationListWarning = 0;
buildInterconnectLocationListWarning() {
var o = new api.InterconnectLocationListWarning();
buildCounterInterconnectLocationListWarning++;
if (buildCounterInterconnectLocationListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2442();
o.message = "foo";
}
buildCounterInterconnectLocationListWarning--;
return o;
}
checkInterconnectLocationListWarning(api.InterconnectLocationListWarning o) {
buildCounterInterconnectLocationListWarning++;
if (buildCounterInterconnectLocationListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2442(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterInterconnectLocationListWarning--;
}
core.int buildCounterInterconnectLocationList = 0;
buildInterconnectLocationList() {
var o = new api.InterconnectLocationList();
buildCounterInterconnectLocationList++;
if (buildCounterInterconnectLocationList < 3) {
o.id = "foo";
o.items = buildUnnamed2441();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildInterconnectLocationListWarning();
}
buildCounterInterconnectLocationList--;
return o;
}
checkInterconnectLocationList(api.InterconnectLocationList o) {
buildCounterInterconnectLocationList++;
if (buildCounterInterconnectLocationList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2441(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkInterconnectLocationListWarning(o.warning);
}
buildCounterInterconnectLocationList--;
}
core.int buildCounterInterconnectLocationRegionInfo = 0;
buildInterconnectLocationRegionInfo() {
var o = new api.InterconnectLocationRegionInfo();
buildCounterInterconnectLocationRegionInfo++;
if (buildCounterInterconnectLocationRegionInfo < 3) {
o.expectedRttMs = "foo";
o.locationPresence = "foo";
o.region = "foo";
}
buildCounterInterconnectLocationRegionInfo--;
return o;
}
checkInterconnectLocationRegionInfo(api.InterconnectLocationRegionInfo o) {
buildCounterInterconnectLocationRegionInfo++;
if (buildCounterInterconnectLocationRegionInfo < 3) {
unittest.expect(o.expectedRttMs, unittest.equals('foo'));
unittest.expect(o.locationPresence, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
}
buildCounterInterconnectLocationRegionInfo--;
}
buildUnnamed2443() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2443(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 buildCounterInterconnectOutageNotification = 0;
buildInterconnectOutageNotification() {
var o = new api.InterconnectOutageNotification();
buildCounterInterconnectOutageNotification++;
if (buildCounterInterconnectOutageNotification < 3) {
o.affectedCircuits = buildUnnamed2443();
o.description = "foo";
o.endTime = "foo";
o.issueType = "foo";
o.name = "foo";
o.source = "foo";
o.startTime = "foo";
o.state = "foo";
}
buildCounterInterconnectOutageNotification--;
return o;
}
checkInterconnectOutageNotification(api.InterconnectOutageNotification o) {
buildCounterInterconnectOutageNotification++;
if (buildCounterInterconnectOutageNotification < 3) {
checkUnnamed2443(o.affectedCircuits);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.endTime, unittest.equals('foo'));
unittest.expect(o.issueType, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.source, unittest.equals('foo'));
unittest.expect(o.startTime, unittest.equals('foo'));
unittest.expect(o.state, unittest.equals('foo'));
}
buildCounterInterconnectOutageNotification--;
}
core.int buildCounterLicense = 0;
buildLicense() {
var o = new api.License();
buildCounterLicense++;
if (buildCounterLicense < 3) {
o.chargesUseFee = true;
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
}
buildCounterLicense--;
return o;
}
checkLicense(api.License o) {
buildCounterLicense++;
if (buildCounterLicense < 3) {
unittest.expect(o.chargesUseFee, unittest.isTrue);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterLicense--;
}
core.int buildCounterMachineTypeScratchDisks = 0;
buildMachineTypeScratchDisks() {
var o = new api.MachineTypeScratchDisks();
buildCounterMachineTypeScratchDisks++;
if (buildCounterMachineTypeScratchDisks < 3) {
o.diskGb = 42;
}
buildCounterMachineTypeScratchDisks--;
return o;
}
checkMachineTypeScratchDisks(api.MachineTypeScratchDisks o) {
buildCounterMachineTypeScratchDisks++;
if (buildCounterMachineTypeScratchDisks < 3) {
unittest.expect(o.diskGb, unittest.equals(42));
}
buildCounterMachineTypeScratchDisks--;
}
buildUnnamed2444() {
var o = new core.List<api.MachineTypeScratchDisks>();
o.add(buildMachineTypeScratchDisks());
o.add(buildMachineTypeScratchDisks());
return o;
}
checkUnnamed2444(core.List<api.MachineTypeScratchDisks> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineTypeScratchDisks(o[0]);
checkMachineTypeScratchDisks(o[1]);
}
core.int buildCounterMachineType = 0;
buildMachineType() {
var o = new api.MachineType();
buildCounterMachineType++;
if (buildCounterMachineType < 3) {
o.creationTimestamp = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.guestCpus = 42;
o.id = "foo";
o.imageSpaceGb = 42;
o.isSharedCpu = true;
o.kind = "foo";
o.maximumPersistentDisks = 42;
o.maximumPersistentDisksSizeGb = "foo";
o.memoryMb = 42;
o.name = "foo";
o.scratchDisks = buildUnnamed2444();
o.selfLink = "foo";
o.zone = "foo";
}
buildCounterMachineType--;
return o;
}
checkMachineType(api.MachineType o) {
buildCounterMachineType++;
if (buildCounterMachineType < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.guestCpus, unittest.equals(42));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.imageSpaceGb, unittest.equals(42));
unittest.expect(o.isSharedCpu, unittest.isTrue);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.maximumPersistentDisks, unittest.equals(42));
unittest.expect(o.maximumPersistentDisksSizeGb, unittest.equals('foo'));
unittest.expect(o.memoryMb, unittest.equals(42));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2444(o.scratchDisks);
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterMachineType--;
}
buildUnnamed2445() {
var o = new core.Map<core.String, api.MachineTypesScopedList>();
o["x"] = buildMachineTypesScopedList();
o["y"] = buildMachineTypesScopedList();
return o;
}
checkUnnamed2445(core.Map<core.String, api.MachineTypesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineTypesScopedList(o["x"]);
checkMachineTypesScopedList(o["y"]);
}
core.int buildCounterMachineTypeAggregatedListWarningData = 0;
buildMachineTypeAggregatedListWarningData() {
var o = new api.MachineTypeAggregatedListWarningData();
buildCounterMachineTypeAggregatedListWarningData++;
if (buildCounterMachineTypeAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterMachineTypeAggregatedListWarningData--;
return o;
}
checkMachineTypeAggregatedListWarningData(
api.MachineTypeAggregatedListWarningData o) {
buildCounterMachineTypeAggregatedListWarningData++;
if (buildCounterMachineTypeAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterMachineTypeAggregatedListWarningData--;
}
buildUnnamed2446() {
var o = new core.List<api.MachineTypeAggregatedListWarningData>();
o.add(buildMachineTypeAggregatedListWarningData());
o.add(buildMachineTypeAggregatedListWarningData());
return o;
}
checkUnnamed2446(core.List<api.MachineTypeAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineTypeAggregatedListWarningData(o[0]);
checkMachineTypeAggregatedListWarningData(o[1]);
}
core.int buildCounterMachineTypeAggregatedListWarning = 0;
buildMachineTypeAggregatedListWarning() {
var o = new api.MachineTypeAggregatedListWarning();
buildCounterMachineTypeAggregatedListWarning++;
if (buildCounterMachineTypeAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2446();
o.message = "foo";
}
buildCounterMachineTypeAggregatedListWarning--;
return o;
}
checkMachineTypeAggregatedListWarning(api.MachineTypeAggregatedListWarning o) {
buildCounterMachineTypeAggregatedListWarning++;
if (buildCounterMachineTypeAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2446(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterMachineTypeAggregatedListWarning--;
}
core.int buildCounterMachineTypeAggregatedList = 0;
buildMachineTypeAggregatedList() {
var o = new api.MachineTypeAggregatedList();
buildCounterMachineTypeAggregatedList++;
if (buildCounterMachineTypeAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2445();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildMachineTypeAggregatedListWarning();
}
buildCounterMachineTypeAggregatedList--;
return o;
}
checkMachineTypeAggregatedList(api.MachineTypeAggregatedList o) {
buildCounterMachineTypeAggregatedList++;
if (buildCounterMachineTypeAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2445(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkMachineTypeAggregatedListWarning(o.warning);
}
buildCounterMachineTypeAggregatedList--;
}
buildUnnamed2447() {
var o = new core.List<api.MachineType>();
o.add(buildMachineType());
o.add(buildMachineType());
return o;
}
checkUnnamed2447(core.List<api.MachineType> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineType(o[0]);
checkMachineType(o[1]);
}
core.int buildCounterMachineTypeListWarningData = 0;
buildMachineTypeListWarningData() {
var o = new api.MachineTypeListWarningData();
buildCounterMachineTypeListWarningData++;
if (buildCounterMachineTypeListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterMachineTypeListWarningData--;
return o;
}
checkMachineTypeListWarningData(api.MachineTypeListWarningData o) {
buildCounterMachineTypeListWarningData++;
if (buildCounterMachineTypeListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterMachineTypeListWarningData--;
}
buildUnnamed2448() {
var o = new core.List<api.MachineTypeListWarningData>();
o.add(buildMachineTypeListWarningData());
o.add(buildMachineTypeListWarningData());
return o;
}
checkUnnamed2448(core.List<api.MachineTypeListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineTypeListWarningData(o[0]);
checkMachineTypeListWarningData(o[1]);
}
core.int buildCounterMachineTypeListWarning = 0;
buildMachineTypeListWarning() {
var o = new api.MachineTypeListWarning();
buildCounterMachineTypeListWarning++;
if (buildCounterMachineTypeListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2448();
o.message = "foo";
}
buildCounterMachineTypeListWarning--;
return o;
}
checkMachineTypeListWarning(api.MachineTypeListWarning o) {
buildCounterMachineTypeListWarning++;
if (buildCounterMachineTypeListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2448(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterMachineTypeListWarning--;
}
core.int buildCounterMachineTypeList = 0;
buildMachineTypeList() {
var o = new api.MachineTypeList();
buildCounterMachineTypeList++;
if (buildCounterMachineTypeList < 3) {
o.id = "foo";
o.items = buildUnnamed2447();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildMachineTypeListWarning();
}
buildCounterMachineTypeList--;
return o;
}
checkMachineTypeList(api.MachineTypeList o) {
buildCounterMachineTypeList++;
if (buildCounterMachineTypeList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2447(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkMachineTypeListWarning(o.warning);
}
buildCounterMachineTypeList--;
}
buildUnnamed2449() {
var o = new core.List<api.MachineType>();
o.add(buildMachineType());
o.add(buildMachineType());
return o;
}
checkUnnamed2449(core.List<api.MachineType> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineType(o[0]);
checkMachineType(o[1]);
}
core.int buildCounterMachineTypesScopedListWarningData = 0;
buildMachineTypesScopedListWarningData() {
var o = new api.MachineTypesScopedListWarningData();
buildCounterMachineTypesScopedListWarningData++;
if (buildCounterMachineTypesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterMachineTypesScopedListWarningData--;
return o;
}
checkMachineTypesScopedListWarningData(
api.MachineTypesScopedListWarningData o) {
buildCounterMachineTypesScopedListWarningData++;
if (buildCounterMachineTypesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterMachineTypesScopedListWarningData--;
}
buildUnnamed2450() {
var o = new core.List<api.MachineTypesScopedListWarningData>();
o.add(buildMachineTypesScopedListWarningData());
o.add(buildMachineTypesScopedListWarningData());
return o;
}
checkUnnamed2450(core.List<api.MachineTypesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkMachineTypesScopedListWarningData(o[0]);
checkMachineTypesScopedListWarningData(o[1]);
}
core.int buildCounterMachineTypesScopedListWarning = 0;
buildMachineTypesScopedListWarning() {
var o = new api.MachineTypesScopedListWarning();
buildCounterMachineTypesScopedListWarning++;
if (buildCounterMachineTypesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2450();
o.message = "foo";
}
buildCounterMachineTypesScopedListWarning--;
return o;
}
checkMachineTypesScopedListWarning(api.MachineTypesScopedListWarning o) {
buildCounterMachineTypesScopedListWarning++;
if (buildCounterMachineTypesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2450(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterMachineTypesScopedListWarning--;
}
core.int buildCounterMachineTypesScopedList = 0;
buildMachineTypesScopedList() {
var o = new api.MachineTypesScopedList();
buildCounterMachineTypesScopedList++;
if (buildCounterMachineTypesScopedList < 3) {
o.machineTypes = buildUnnamed2449();
o.warning = buildMachineTypesScopedListWarning();
}
buildCounterMachineTypesScopedList--;
return o;
}
checkMachineTypesScopedList(api.MachineTypesScopedList o) {
buildCounterMachineTypesScopedList++;
if (buildCounterMachineTypesScopedList < 3) {
checkUnnamed2449(o.machineTypes);
checkMachineTypesScopedListWarning(o.warning);
}
buildCounterMachineTypesScopedList--;
}
core.int buildCounterManagedInstance = 0;
buildManagedInstance() {
var o = new api.ManagedInstance();
buildCounterManagedInstance++;
if (buildCounterManagedInstance < 3) {
o.currentAction = "foo";
o.id = "foo";
o.instance = "foo";
o.instanceStatus = "foo";
o.lastAttempt = buildManagedInstanceLastAttempt();
}
buildCounterManagedInstance--;
return o;
}
checkManagedInstance(api.ManagedInstance o) {
buildCounterManagedInstance++;
if (buildCounterManagedInstance < 3) {
unittest.expect(o.currentAction, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.instance, unittest.equals('foo'));
unittest.expect(o.instanceStatus, unittest.equals('foo'));
checkManagedInstanceLastAttempt(o.lastAttempt);
}
buildCounterManagedInstance--;
}
core.int buildCounterManagedInstanceLastAttemptErrorsErrors = 0;
buildManagedInstanceLastAttemptErrorsErrors() {
var o = new api.ManagedInstanceLastAttemptErrorsErrors();
buildCounterManagedInstanceLastAttemptErrorsErrors++;
if (buildCounterManagedInstanceLastAttemptErrorsErrors < 3) {
o.code = "foo";
o.location = "foo";
o.message = "foo";
}
buildCounterManagedInstanceLastAttemptErrorsErrors--;
return o;
}
checkManagedInstanceLastAttemptErrorsErrors(
api.ManagedInstanceLastAttemptErrorsErrors o) {
buildCounterManagedInstanceLastAttemptErrorsErrors++;
if (buildCounterManagedInstanceLastAttemptErrorsErrors < 3) {
unittest.expect(o.code, unittest.equals('foo'));
unittest.expect(o.location, unittest.equals('foo'));
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterManagedInstanceLastAttemptErrorsErrors--;
}
buildUnnamed2451() {
var o = new core.List<api.ManagedInstanceLastAttemptErrorsErrors>();
o.add(buildManagedInstanceLastAttemptErrorsErrors());
o.add(buildManagedInstanceLastAttemptErrorsErrors());
return o;
}
checkUnnamed2451(core.List<api.ManagedInstanceLastAttemptErrorsErrors> o) {
unittest.expect(o, unittest.hasLength(2));
checkManagedInstanceLastAttemptErrorsErrors(o[0]);
checkManagedInstanceLastAttemptErrorsErrors(o[1]);
}
core.int buildCounterManagedInstanceLastAttemptErrors = 0;
buildManagedInstanceLastAttemptErrors() {
var o = new api.ManagedInstanceLastAttemptErrors();
buildCounterManagedInstanceLastAttemptErrors++;
if (buildCounterManagedInstanceLastAttemptErrors < 3) {
o.errors = buildUnnamed2451();
}
buildCounterManagedInstanceLastAttemptErrors--;
return o;
}
checkManagedInstanceLastAttemptErrors(api.ManagedInstanceLastAttemptErrors o) {
buildCounterManagedInstanceLastAttemptErrors++;
if (buildCounterManagedInstanceLastAttemptErrors < 3) {
checkUnnamed2451(o.errors);
}
buildCounterManagedInstanceLastAttemptErrors--;
}
core.int buildCounterManagedInstanceLastAttempt = 0;
buildManagedInstanceLastAttempt() {
var o = new api.ManagedInstanceLastAttempt();
buildCounterManagedInstanceLastAttempt++;
if (buildCounterManagedInstanceLastAttempt < 3) {
o.errors = buildManagedInstanceLastAttemptErrors();
}
buildCounterManagedInstanceLastAttempt--;
return o;
}
checkManagedInstanceLastAttempt(api.ManagedInstanceLastAttempt o) {
buildCounterManagedInstanceLastAttempt++;
if (buildCounterManagedInstanceLastAttempt < 3) {
checkManagedInstanceLastAttemptErrors(o.errors);
}
buildCounterManagedInstanceLastAttempt--;
}
core.int buildCounterMetadataItems = 0;
buildMetadataItems() {
var o = new api.MetadataItems();
buildCounterMetadataItems++;
if (buildCounterMetadataItems < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterMetadataItems--;
return o;
}
checkMetadataItems(api.MetadataItems o) {
buildCounterMetadataItems++;
if (buildCounterMetadataItems < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterMetadataItems--;
}
buildUnnamed2452() {
var o = new core.List<api.MetadataItems>();
o.add(buildMetadataItems());
o.add(buildMetadataItems());
return o;
}
checkUnnamed2452(core.List<api.MetadataItems> o) {
unittest.expect(o, unittest.hasLength(2));
checkMetadataItems(o[0]);
checkMetadataItems(o[1]);
}
core.int buildCounterMetadata = 0;
buildMetadata() {
var o = new api.Metadata();
buildCounterMetadata++;
if (buildCounterMetadata < 3) {
o.fingerprint = "foo";
o.items = buildUnnamed2452();
o.kind = "foo";
}
buildCounterMetadata--;
return o;
}
checkMetadata(api.Metadata o) {
buildCounterMetadata++;
if (buildCounterMetadata < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2452(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
}
buildCounterMetadata--;
}
core.int buildCounterNamedPort = 0;
buildNamedPort() {
var o = new api.NamedPort();
buildCounterNamedPort++;
if (buildCounterNamedPort < 3) {
o.name = "foo";
o.port = 42;
}
buildCounterNamedPort--;
return o;
}
checkNamedPort(api.NamedPort o) {
buildCounterNamedPort++;
if (buildCounterNamedPort < 3) {
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.port, unittest.equals(42));
}
buildCounterNamedPort--;
}
buildUnnamed2453() {
var o = new core.List<api.NetworkPeering>();
o.add(buildNetworkPeering());
o.add(buildNetworkPeering());
return o;
}
checkUnnamed2453(core.List<api.NetworkPeering> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkPeering(o[0]);
checkNetworkPeering(o[1]);
}
buildUnnamed2454() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2454(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 buildCounterNetwork = 0;
buildNetwork() {
var o = new api.Network();
buildCounterNetwork++;
if (buildCounterNetwork < 3) {
o.IPv4Range = "foo";
o.autoCreateSubnetworks = true;
o.creationTimestamp = "foo";
o.description = "foo";
o.gatewayIPv4 = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.peerings = buildUnnamed2453();
o.routingConfig = buildNetworkRoutingConfig();
o.selfLink = "foo";
o.subnetworks = buildUnnamed2454();
}
buildCounterNetwork--;
return o;
}
checkNetwork(api.Network o) {
buildCounterNetwork++;
if (buildCounterNetwork < 3) {
unittest.expect(o.IPv4Range, unittest.equals('foo'));
unittest.expect(o.autoCreateSubnetworks, unittest.isTrue);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.gatewayIPv4, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2453(o.peerings);
checkNetworkRoutingConfig(o.routingConfig);
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2454(o.subnetworks);
}
buildCounterNetwork--;
}
buildUnnamed2455() {
var o = new core.List<api.AccessConfig>();
o.add(buildAccessConfig());
o.add(buildAccessConfig());
return o;
}
checkUnnamed2455(core.List<api.AccessConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAccessConfig(o[0]);
checkAccessConfig(o[1]);
}
buildUnnamed2456() {
var o = new core.List<api.AliasIpRange>();
o.add(buildAliasIpRange());
o.add(buildAliasIpRange());
return o;
}
checkUnnamed2456(core.List<api.AliasIpRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkAliasIpRange(o[0]);
checkAliasIpRange(o[1]);
}
core.int buildCounterNetworkInterface = 0;
buildNetworkInterface() {
var o = new api.NetworkInterface();
buildCounterNetworkInterface++;
if (buildCounterNetworkInterface < 3) {
o.accessConfigs = buildUnnamed2455();
o.aliasIpRanges = buildUnnamed2456();
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.networkIP = "foo";
o.subnetwork = "foo";
}
buildCounterNetworkInterface--;
return o;
}
checkNetworkInterface(api.NetworkInterface o) {
buildCounterNetworkInterface++;
if (buildCounterNetworkInterface < 3) {
checkUnnamed2455(o.accessConfigs);
checkUnnamed2456(o.aliasIpRanges);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.networkIP, unittest.equals('foo'));
unittest.expect(o.subnetwork, unittest.equals('foo'));
}
buildCounterNetworkInterface--;
}
buildUnnamed2457() {
var o = new core.List<api.Network>();
o.add(buildNetwork());
o.add(buildNetwork());
return o;
}
checkUnnamed2457(core.List<api.Network> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetwork(o[0]);
checkNetwork(o[1]);
}
core.int buildCounterNetworkListWarningData = 0;
buildNetworkListWarningData() {
var o = new api.NetworkListWarningData();
buildCounterNetworkListWarningData++;
if (buildCounterNetworkListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterNetworkListWarningData--;
return o;
}
checkNetworkListWarningData(api.NetworkListWarningData o) {
buildCounterNetworkListWarningData++;
if (buildCounterNetworkListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterNetworkListWarningData--;
}
buildUnnamed2458() {
var o = new core.List<api.NetworkListWarningData>();
o.add(buildNetworkListWarningData());
o.add(buildNetworkListWarningData());
return o;
}
checkUnnamed2458(core.List<api.NetworkListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkNetworkListWarningData(o[0]);
checkNetworkListWarningData(o[1]);
}
core.int buildCounterNetworkListWarning = 0;
buildNetworkListWarning() {
var o = new api.NetworkListWarning();
buildCounterNetworkListWarning++;
if (buildCounterNetworkListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2458();
o.message = "foo";
}
buildCounterNetworkListWarning--;
return o;
}
checkNetworkListWarning(api.NetworkListWarning o) {
buildCounterNetworkListWarning++;
if (buildCounterNetworkListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2458(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterNetworkListWarning--;
}
core.int buildCounterNetworkList = 0;
buildNetworkList() {
var o = new api.NetworkList();
buildCounterNetworkList++;
if (buildCounterNetworkList < 3) {
o.id = "foo";
o.items = buildUnnamed2457();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildNetworkListWarning();
}
buildCounterNetworkList--;
return o;
}
checkNetworkList(api.NetworkList o) {
buildCounterNetworkList++;
if (buildCounterNetworkList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2457(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkNetworkListWarning(o.warning);
}
buildCounterNetworkList--;
}
core.int buildCounterNetworkPeering = 0;
buildNetworkPeering() {
var o = new api.NetworkPeering();
buildCounterNetworkPeering++;
if (buildCounterNetworkPeering < 3) {
o.autoCreateRoutes = true;
o.name = "foo";
o.network = "foo";
o.state = "foo";
o.stateDetails = "foo";
}
buildCounterNetworkPeering--;
return o;
}
checkNetworkPeering(api.NetworkPeering o) {
buildCounterNetworkPeering++;
if (buildCounterNetworkPeering < 3) {
unittest.expect(o.autoCreateRoutes, unittest.isTrue);
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.state, unittest.equals('foo'));
unittest.expect(o.stateDetails, unittest.equals('foo'));
}
buildCounterNetworkPeering--;
}
core.int buildCounterNetworkRoutingConfig = 0;
buildNetworkRoutingConfig() {
var o = new api.NetworkRoutingConfig();
buildCounterNetworkRoutingConfig++;
if (buildCounterNetworkRoutingConfig < 3) {
o.routingMode = "foo";
}
buildCounterNetworkRoutingConfig--;
return o;
}
checkNetworkRoutingConfig(api.NetworkRoutingConfig o) {
buildCounterNetworkRoutingConfig++;
if (buildCounterNetworkRoutingConfig < 3) {
unittest.expect(o.routingMode, unittest.equals('foo'));
}
buildCounterNetworkRoutingConfig--;
}
core.int buildCounterNetworksAddPeeringRequest = 0;
buildNetworksAddPeeringRequest() {
var o = new api.NetworksAddPeeringRequest();
buildCounterNetworksAddPeeringRequest++;
if (buildCounterNetworksAddPeeringRequest < 3) {
o.autoCreateRoutes = true;
o.name = "foo";
o.peerNetwork = "foo";
}
buildCounterNetworksAddPeeringRequest--;
return o;
}
checkNetworksAddPeeringRequest(api.NetworksAddPeeringRequest o) {
buildCounterNetworksAddPeeringRequest++;
if (buildCounterNetworksAddPeeringRequest < 3) {
unittest.expect(o.autoCreateRoutes, unittest.isTrue);
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.peerNetwork, unittest.equals('foo'));
}
buildCounterNetworksAddPeeringRequest--;
}
core.int buildCounterNetworksRemovePeeringRequest = 0;
buildNetworksRemovePeeringRequest() {
var o = new api.NetworksRemovePeeringRequest();
buildCounterNetworksRemovePeeringRequest++;
if (buildCounterNetworksRemovePeeringRequest < 3) {
o.name = "foo";
}
buildCounterNetworksRemovePeeringRequest--;
return o;
}
checkNetworksRemovePeeringRequest(api.NetworksRemovePeeringRequest o) {
buildCounterNetworksRemovePeeringRequest++;
if (buildCounterNetworksRemovePeeringRequest < 3) {
unittest.expect(o.name, unittest.equals('foo'));
}
buildCounterNetworksRemovePeeringRequest--;
}
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--;
}
buildUnnamed2459() {
var o = new core.List<api.OperationErrorErrors>();
o.add(buildOperationErrorErrors());
o.add(buildOperationErrorErrors());
return o;
}
checkUnnamed2459(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 = buildUnnamed2459();
}
buildCounterOperationError--;
return o;
}
checkOperationError(api.OperationError o) {
buildCounterOperationError++;
if (buildCounterOperationError < 3) {
checkUnnamed2459(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--;
}
buildUnnamed2460() {
var o = new core.List<api.OperationWarningsData>();
o.add(buildOperationWarningsData());
o.add(buildOperationWarningsData());
return o;
}
checkUnnamed2460(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 = buildUnnamed2460();
o.message = "foo";
}
buildCounterOperationWarnings--;
return o;
}
checkOperationWarnings(api.OperationWarnings o) {
buildCounterOperationWarnings++;
if (buildCounterOperationWarnings < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2460(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterOperationWarnings--;
}
buildUnnamed2461() {
var o = new core.List<api.OperationWarnings>();
o.add(buildOperationWarnings());
o.add(buildOperationWarnings());
return o;
}
checkUnnamed2461(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.description = "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 = buildUnnamed2461();
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.description, 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'));
checkUnnamed2461(o.warnings);
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterOperation--;
}
buildUnnamed2462() {
var o = new core.Map<core.String, api.OperationsScopedList>();
o["x"] = buildOperationsScopedList();
o["y"] = buildOperationsScopedList();
return o;
}
checkUnnamed2462(core.Map<core.String, api.OperationsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperationsScopedList(o["x"]);
checkOperationsScopedList(o["y"]);
}
core.int buildCounterOperationAggregatedListWarningData = 0;
buildOperationAggregatedListWarningData() {
var o = new api.OperationAggregatedListWarningData();
buildCounterOperationAggregatedListWarningData++;
if (buildCounterOperationAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterOperationAggregatedListWarningData--;
return o;
}
checkOperationAggregatedListWarningData(
api.OperationAggregatedListWarningData o) {
buildCounterOperationAggregatedListWarningData++;
if (buildCounterOperationAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterOperationAggregatedListWarningData--;
}
buildUnnamed2463() {
var o = new core.List<api.OperationAggregatedListWarningData>();
o.add(buildOperationAggregatedListWarningData());
o.add(buildOperationAggregatedListWarningData());
return o;
}
checkUnnamed2463(core.List<api.OperationAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperationAggregatedListWarningData(o[0]);
checkOperationAggregatedListWarningData(o[1]);
}
core.int buildCounterOperationAggregatedListWarning = 0;
buildOperationAggregatedListWarning() {
var o = new api.OperationAggregatedListWarning();
buildCounterOperationAggregatedListWarning++;
if (buildCounterOperationAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2463();
o.message = "foo";
}
buildCounterOperationAggregatedListWarning--;
return o;
}
checkOperationAggregatedListWarning(api.OperationAggregatedListWarning o) {
buildCounterOperationAggregatedListWarning++;
if (buildCounterOperationAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2463(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterOperationAggregatedListWarning--;
}
core.int buildCounterOperationAggregatedList = 0;
buildOperationAggregatedList() {
var o = new api.OperationAggregatedList();
buildCounterOperationAggregatedList++;
if (buildCounterOperationAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2462();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildOperationAggregatedListWarning();
}
buildCounterOperationAggregatedList--;
return o;
}
checkOperationAggregatedList(api.OperationAggregatedList o) {
buildCounterOperationAggregatedList++;
if (buildCounterOperationAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2462(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkOperationAggregatedListWarning(o.warning);
}
buildCounterOperationAggregatedList--;
}
buildUnnamed2464() {
var o = new core.List<api.Operation>();
o.add(buildOperation());
o.add(buildOperation());
return o;
}
checkUnnamed2464(core.List<api.Operation> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperation(o[0]);
checkOperation(o[1]);
}
core.int buildCounterOperationListWarningData = 0;
buildOperationListWarningData() {
var o = new api.OperationListWarningData();
buildCounterOperationListWarningData++;
if (buildCounterOperationListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterOperationListWarningData--;
return o;
}
checkOperationListWarningData(api.OperationListWarningData o) {
buildCounterOperationListWarningData++;
if (buildCounterOperationListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterOperationListWarningData--;
}
buildUnnamed2465() {
var o = new core.List<api.OperationListWarningData>();
o.add(buildOperationListWarningData());
o.add(buildOperationListWarningData());
return o;
}
checkUnnamed2465(core.List<api.OperationListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperationListWarningData(o[0]);
checkOperationListWarningData(o[1]);
}
core.int buildCounterOperationListWarning = 0;
buildOperationListWarning() {
var o = new api.OperationListWarning();
buildCounterOperationListWarning++;
if (buildCounterOperationListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2465();
o.message = "foo";
}
buildCounterOperationListWarning--;
return o;
}
checkOperationListWarning(api.OperationListWarning o) {
buildCounterOperationListWarning++;
if (buildCounterOperationListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2465(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterOperationListWarning--;
}
core.int buildCounterOperationList = 0;
buildOperationList() {
var o = new api.OperationList();
buildCounterOperationList++;
if (buildCounterOperationList < 3) {
o.id = "foo";
o.items = buildUnnamed2464();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildOperationListWarning();
}
buildCounterOperationList--;
return o;
}
checkOperationList(api.OperationList o) {
buildCounterOperationList++;
if (buildCounterOperationList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2464(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkOperationListWarning(o.warning);
}
buildCounterOperationList--;
}
buildUnnamed2466() {
var o = new core.List<api.Operation>();
o.add(buildOperation());
o.add(buildOperation());
return o;
}
checkUnnamed2466(core.List<api.Operation> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperation(o[0]);
checkOperation(o[1]);
}
core.int buildCounterOperationsScopedListWarningData = 0;
buildOperationsScopedListWarningData() {
var o = new api.OperationsScopedListWarningData();
buildCounterOperationsScopedListWarningData++;
if (buildCounterOperationsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterOperationsScopedListWarningData--;
return o;
}
checkOperationsScopedListWarningData(api.OperationsScopedListWarningData o) {
buildCounterOperationsScopedListWarningData++;
if (buildCounterOperationsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterOperationsScopedListWarningData--;
}
buildUnnamed2467() {
var o = new core.List<api.OperationsScopedListWarningData>();
o.add(buildOperationsScopedListWarningData());
o.add(buildOperationsScopedListWarningData());
return o;
}
checkUnnamed2467(core.List<api.OperationsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkOperationsScopedListWarningData(o[0]);
checkOperationsScopedListWarningData(o[1]);
}
core.int buildCounterOperationsScopedListWarning = 0;
buildOperationsScopedListWarning() {
var o = new api.OperationsScopedListWarning();
buildCounterOperationsScopedListWarning++;
if (buildCounterOperationsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2467();
o.message = "foo";
}
buildCounterOperationsScopedListWarning--;
return o;
}
checkOperationsScopedListWarning(api.OperationsScopedListWarning o) {
buildCounterOperationsScopedListWarning++;
if (buildCounterOperationsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2467(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterOperationsScopedListWarning--;
}
core.int buildCounterOperationsScopedList = 0;
buildOperationsScopedList() {
var o = new api.OperationsScopedList();
buildCounterOperationsScopedList++;
if (buildCounterOperationsScopedList < 3) {
o.operations = buildUnnamed2466();
o.warning = buildOperationsScopedListWarning();
}
buildCounterOperationsScopedList--;
return o;
}
checkOperationsScopedList(api.OperationsScopedList o) {
buildCounterOperationsScopedList++;
if (buildCounterOperationsScopedList < 3) {
checkUnnamed2466(o.operations);
checkOperationsScopedListWarning(o.warning);
}
buildCounterOperationsScopedList--;
}
buildUnnamed2468() {
var o = new core.List<api.PathRule>();
o.add(buildPathRule());
o.add(buildPathRule());
return o;
}
checkUnnamed2468(core.List<api.PathRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkPathRule(o[0]);
checkPathRule(o[1]);
}
core.int buildCounterPathMatcher = 0;
buildPathMatcher() {
var o = new api.PathMatcher();
buildCounterPathMatcher++;
if (buildCounterPathMatcher < 3) {
o.defaultService = "foo";
o.description = "foo";
o.name = "foo";
o.pathRules = buildUnnamed2468();
}
buildCounterPathMatcher--;
return o;
}
checkPathMatcher(api.PathMatcher o) {
buildCounterPathMatcher++;
if (buildCounterPathMatcher < 3) {
unittest.expect(o.defaultService, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2468(o.pathRules);
}
buildCounterPathMatcher--;
}
buildUnnamed2469() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2469(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 buildCounterPathRule = 0;
buildPathRule() {
var o = new api.PathRule();
buildCounterPathRule++;
if (buildCounterPathRule < 3) {
o.paths = buildUnnamed2469();
o.service = "foo";
}
buildCounterPathRule--;
return o;
}
checkPathRule(api.PathRule o) {
buildCounterPathRule++;
if (buildCounterPathRule < 3) {
checkUnnamed2469(o.paths);
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterPathRule--;
}
buildUnnamed2470() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2470(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'));
}
buildUnnamed2471() {
var o = new core.List<api.Quota>();
o.add(buildQuota());
o.add(buildQuota());
return o;
}
checkUnnamed2471(core.List<api.Quota> o) {
unittest.expect(o, unittest.hasLength(2));
checkQuota(o[0]);
checkQuota(o[1]);
}
core.int buildCounterProject = 0;
buildProject() {
var o = new api.Project();
buildCounterProject++;
if (buildCounterProject < 3) {
o.commonInstanceMetadata = buildMetadata();
o.creationTimestamp = "foo";
o.defaultServiceAccount = "foo";
o.description = "foo";
o.enabledFeatures = buildUnnamed2470();
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.quotas = buildUnnamed2471();
o.selfLink = "foo";
o.usageExportLocation = buildUsageExportLocation();
o.xpnProjectStatus = "foo";
}
buildCounterProject--;
return o;
}
checkProject(api.Project o) {
buildCounterProject++;
if (buildCounterProject < 3) {
checkMetadata(o.commonInstanceMetadata);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.defaultServiceAccount, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2470(o.enabledFeatures);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2471(o.quotas);
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUsageExportLocation(o.usageExportLocation);
unittest.expect(o.xpnProjectStatus, unittest.equals('foo'));
}
buildCounterProject--;
}
core.int buildCounterProjectsDisableXpnResourceRequest = 0;
buildProjectsDisableXpnResourceRequest() {
var o = new api.ProjectsDisableXpnResourceRequest();
buildCounterProjectsDisableXpnResourceRequest++;
if (buildCounterProjectsDisableXpnResourceRequest < 3) {
o.xpnResource = buildXpnResourceId();
}
buildCounterProjectsDisableXpnResourceRequest--;
return o;
}
checkProjectsDisableXpnResourceRequest(
api.ProjectsDisableXpnResourceRequest o) {
buildCounterProjectsDisableXpnResourceRequest++;
if (buildCounterProjectsDisableXpnResourceRequest < 3) {
checkXpnResourceId(o.xpnResource);
}
buildCounterProjectsDisableXpnResourceRequest--;
}
core.int buildCounterProjectsEnableXpnResourceRequest = 0;
buildProjectsEnableXpnResourceRequest() {
var o = new api.ProjectsEnableXpnResourceRequest();
buildCounterProjectsEnableXpnResourceRequest++;
if (buildCounterProjectsEnableXpnResourceRequest < 3) {
o.xpnResource = buildXpnResourceId();
}
buildCounterProjectsEnableXpnResourceRequest--;
return o;
}
checkProjectsEnableXpnResourceRequest(api.ProjectsEnableXpnResourceRequest o) {
buildCounterProjectsEnableXpnResourceRequest++;
if (buildCounterProjectsEnableXpnResourceRequest < 3) {
checkXpnResourceId(o.xpnResource);
}
buildCounterProjectsEnableXpnResourceRequest--;
}
buildUnnamed2472() {
var o = new core.List<api.XpnResourceId>();
o.add(buildXpnResourceId());
o.add(buildXpnResourceId());
return o;
}
checkUnnamed2472(core.List<api.XpnResourceId> o) {
unittest.expect(o, unittest.hasLength(2));
checkXpnResourceId(o[0]);
checkXpnResourceId(o[1]);
}
core.int buildCounterProjectsGetXpnResources = 0;
buildProjectsGetXpnResources() {
var o = new api.ProjectsGetXpnResources();
buildCounterProjectsGetXpnResources++;
if (buildCounterProjectsGetXpnResources < 3) {
o.kind = "foo";
o.nextPageToken = "foo";
o.resources = buildUnnamed2472();
}
buildCounterProjectsGetXpnResources--;
return o;
}
checkProjectsGetXpnResources(api.ProjectsGetXpnResources o) {
buildCounterProjectsGetXpnResources++;
if (buildCounterProjectsGetXpnResources < 3) {
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
checkUnnamed2472(o.resources);
}
buildCounterProjectsGetXpnResources--;
}
core.int buildCounterProjectsListXpnHostsRequest = 0;
buildProjectsListXpnHostsRequest() {
var o = new api.ProjectsListXpnHostsRequest();
buildCounterProjectsListXpnHostsRequest++;
if (buildCounterProjectsListXpnHostsRequest < 3) {
o.organization = "foo";
}
buildCounterProjectsListXpnHostsRequest--;
return o;
}
checkProjectsListXpnHostsRequest(api.ProjectsListXpnHostsRequest o) {
buildCounterProjectsListXpnHostsRequest++;
if (buildCounterProjectsListXpnHostsRequest < 3) {
unittest.expect(o.organization, unittest.equals('foo'));
}
buildCounterProjectsListXpnHostsRequest--;
}
core.int buildCounterQuota = 0;
buildQuota() {
var o = new api.Quota();
buildCounterQuota++;
if (buildCounterQuota < 3) {
o.limit = 42.0;
o.metric = "foo";
o.usage = 42.0;
}
buildCounterQuota--;
return o;
}
checkQuota(api.Quota o) {
buildCounterQuota++;
if (buildCounterQuota < 3) {
unittest.expect(o.limit, unittest.equals(42.0));
unittest.expect(o.metric, unittest.equals('foo'));
unittest.expect(o.usage, unittest.equals(42.0));
}
buildCounterQuota--;
}
buildUnnamed2473() {
var o = new core.List<api.Quota>();
o.add(buildQuota());
o.add(buildQuota());
return o;
}
checkUnnamed2473(core.List<api.Quota> o) {
unittest.expect(o, unittest.hasLength(2));
checkQuota(o[0]);
checkQuota(o[1]);
}
buildUnnamed2474() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2474(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 buildCounterRegion = 0;
buildRegion() {
var o = new api.Region();
buildCounterRegion++;
if (buildCounterRegion < 3) {
o.creationTimestamp = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.quotas = buildUnnamed2473();
o.selfLink = "foo";
o.status = "foo";
o.zones = buildUnnamed2474();
}
buildCounterRegion--;
return o;
}
checkRegion(api.Region o) {
buildCounterRegion++;
if (buildCounterRegion < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2473(o.quotas);
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
checkUnnamed2474(o.zones);
}
buildCounterRegion--;
}
buildUnnamed2475() {
var o = new core.List<api.Autoscaler>();
o.add(buildAutoscaler());
o.add(buildAutoscaler());
return o;
}
checkUnnamed2475(core.List<api.Autoscaler> o) {
unittest.expect(o, unittest.hasLength(2));
checkAutoscaler(o[0]);
checkAutoscaler(o[1]);
}
core.int buildCounterRegionAutoscalerListWarningData = 0;
buildRegionAutoscalerListWarningData() {
var o = new api.RegionAutoscalerListWarningData();
buildCounterRegionAutoscalerListWarningData++;
if (buildCounterRegionAutoscalerListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRegionAutoscalerListWarningData--;
return o;
}
checkRegionAutoscalerListWarningData(api.RegionAutoscalerListWarningData o) {
buildCounterRegionAutoscalerListWarningData++;
if (buildCounterRegionAutoscalerListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRegionAutoscalerListWarningData--;
}
buildUnnamed2476() {
var o = new core.List<api.RegionAutoscalerListWarningData>();
o.add(buildRegionAutoscalerListWarningData());
o.add(buildRegionAutoscalerListWarningData());
return o;
}
checkUnnamed2476(core.List<api.RegionAutoscalerListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegionAutoscalerListWarningData(o[0]);
checkRegionAutoscalerListWarningData(o[1]);
}
core.int buildCounterRegionAutoscalerListWarning = 0;
buildRegionAutoscalerListWarning() {
var o = new api.RegionAutoscalerListWarning();
buildCounterRegionAutoscalerListWarning++;
if (buildCounterRegionAutoscalerListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2476();
o.message = "foo";
}
buildCounterRegionAutoscalerListWarning--;
return o;
}
checkRegionAutoscalerListWarning(api.RegionAutoscalerListWarning o) {
buildCounterRegionAutoscalerListWarning++;
if (buildCounterRegionAutoscalerListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2476(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRegionAutoscalerListWarning--;
}
core.int buildCounterRegionAutoscalerList = 0;
buildRegionAutoscalerList() {
var o = new api.RegionAutoscalerList();
buildCounterRegionAutoscalerList++;
if (buildCounterRegionAutoscalerList < 3) {
o.id = "foo";
o.items = buildUnnamed2475();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRegionAutoscalerListWarning();
}
buildCounterRegionAutoscalerList--;
return o;
}
checkRegionAutoscalerList(api.RegionAutoscalerList o) {
buildCounterRegionAutoscalerList++;
if (buildCounterRegionAutoscalerList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2475(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRegionAutoscalerListWarning(o.warning);
}
buildCounterRegionAutoscalerList--;
}
buildUnnamed2477() {
var o = new core.List<api.InstanceGroup>();
o.add(buildInstanceGroup());
o.add(buildInstanceGroup());
return o;
}
checkUnnamed2477(core.List<api.InstanceGroup> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroup(o[0]);
checkInstanceGroup(o[1]);
}
core.int buildCounterRegionInstanceGroupListWarningData = 0;
buildRegionInstanceGroupListWarningData() {
var o = new api.RegionInstanceGroupListWarningData();
buildCounterRegionInstanceGroupListWarningData++;
if (buildCounterRegionInstanceGroupListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRegionInstanceGroupListWarningData--;
return o;
}
checkRegionInstanceGroupListWarningData(
api.RegionInstanceGroupListWarningData o) {
buildCounterRegionInstanceGroupListWarningData++;
if (buildCounterRegionInstanceGroupListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupListWarningData--;
}
buildUnnamed2478() {
var o = new core.List<api.RegionInstanceGroupListWarningData>();
o.add(buildRegionInstanceGroupListWarningData());
o.add(buildRegionInstanceGroupListWarningData());
return o;
}
checkUnnamed2478(core.List<api.RegionInstanceGroupListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegionInstanceGroupListWarningData(o[0]);
checkRegionInstanceGroupListWarningData(o[1]);
}
core.int buildCounterRegionInstanceGroupListWarning = 0;
buildRegionInstanceGroupListWarning() {
var o = new api.RegionInstanceGroupListWarning();
buildCounterRegionInstanceGroupListWarning++;
if (buildCounterRegionInstanceGroupListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2478();
o.message = "foo";
}
buildCounterRegionInstanceGroupListWarning--;
return o;
}
checkRegionInstanceGroupListWarning(api.RegionInstanceGroupListWarning o) {
buildCounterRegionInstanceGroupListWarning++;
if (buildCounterRegionInstanceGroupListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2478(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupListWarning--;
}
core.int buildCounterRegionInstanceGroupList = 0;
buildRegionInstanceGroupList() {
var o = new api.RegionInstanceGroupList();
buildCounterRegionInstanceGroupList++;
if (buildCounterRegionInstanceGroupList < 3) {
o.id = "foo";
o.items = buildUnnamed2477();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRegionInstanceGroupListWarning();
}
buildCounterRegionInstanceGroupList--;
return o;
}
checkRegionInstanceGroupList(api.RegionInstanceGroupList o) {
buildCounterRegionInstanceGroupList++;
if (buildCounterRegionInstanceGroupList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2477(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRegionInstanceGroupListWarning(o.warning);
}
buildCounterRegionInstanceGroupList--;
}
buildUnnamed2479() {
var o = new core.List<api.InstanceGroupManager>();
o.add(buildInstanceGroupManager());
o.add(buildInstanceGroupManager());
return o;
}
checkUnnamed2479(core.List<api.InstanceGroupManager> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceGroupManager(o[0]);
checkInstanceGroupManager(o[1]);
}
core.int buildCounterRegionInstanceGroupManagerListWarningData = 0;
buildRegionInstanceGroupManagerListWarningData() {
var o = new api.RegionInstanceGroupManagerListWarningData();
buildCounterRegionInstanceGroupManagerListWarningData++;
if (buildCounterRegionInstanceGroupManagerListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRegionInstanceGroupManagerListWarningData--;
return o;
}
checkRegionInstanceGroupManagerListWarningData(
api.RegionInstanceGroupManagerListWarningData o) {
buildCounterRegionInstanceGroupManagerListWarningData++;
if (buildCounterRegionInstanceGroupManagerListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupManagerListWarningData--;
}
buildUnnamed2480() {
var o = new core.List<api.RegionInstanceGroupManagerListWarningData>();
o.add(buildRegionInstanceGroupManagerListWarningData());
o.add(buildRegionInstanceGroupManagerListWarningData());
return o;
}
checkUnnamed2480(core.List<api.RegionInstanceGroupManagerListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegionInstanceGroupManagerListWarningData(o[0]);
checkRegionInstanceGroupManagerListWarningData(o[1]);
}
core.int buildCounterRegionInstanceGroupManagerListWarning = 0;
buildRegionInstanceGroupManagerListWarning() {
var o = new api.RegionInstanceGroupManagerListWarning();
buildCounterRegionInstanceGroupManagerListWarning++;
if (buildCounterRegionInstanceGroupManagerListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2480();
o.message = "foo";
}
buildCounterRegionInstanceGroupManagerListWarning--;
return o;
}
checkRegionInstanceGroupManagerListWarning(
api.RegionInstanceGroupManagerListWarning o) {
buildCounterRegionInstanceGroupManagerListWarning++;
if (buildCounterRegionInstanceGroupManagerListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2480(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupManagerListWarning--;
}
core.int buildCounterRegionInstanceGroupManagerList = 0;
buildRegionInstanceGroupManagerList() {
var o = new api.RegionInstanceGroupManagerList();
buildCounterRegionInstanceGroupManagerList++;
if (buildCounterRegionInstanceGroupManagerList < 3) {
o.id = "foo";
o.items = buildUnnamed2479();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRegionInstanceGroupManagerListWarning();
}
buildCounterRegionInstanceGroupManagerList--;
return o;
}
checkRegionInstanceGroupManagerList(api.RegionInstanceGroupManagerList o) {
buildCounterRegionInstanceGroupManagerList++;
if (buildCounterRegionInstanceGroupManagerList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2479(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRegionInstanceGroupManagerListWarning(o.warning);
}
buildCounterRegionInstanceGroupManagerList--;
}
buildUnnamed2481() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2481(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 buildCounterRegionInstanceGroupManagersAbandonInstancesRequest = 0;
buildRegionInstanceGroupManagersAbandonInstancesRequest() {
var o = new api.RegionInstanceGroupManagersAbandonInstancesRequest();
buildCounterRegionInstanceGroupManagersAbandonInstancesRequest++;
if (buildCounterRegionInstanceGroupManagersAbandonInstancesRequest < 3) {
o.instances = buildUnnamed2481();
}
buildCounterRegionInstanceGroupManagersAbandonInstancesRequest--;
return o;
}
checkRegionInstanceGroupManagersAbandonInstancesRequest(
api.RegionInstanceGroupManagersAbandonInstancesRequest o) {
buildCounterRegionInstanceGroupManagersAbandonInstancesRequest++;
if (buildCounterRegionInstanceGroupManagersAbandonInstancesRequest < 3) {
checkUnnamed2481(o.instances);
}
buildCounterRegionInstanceGroupManagersAbandonInstancesRequest--;
}
buildUnnamed2482() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2482(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 buildCounterRegionInstanceGroupManagersDeleteInstancesRequest = 0;
buildRegionInstanceGroupManagersDeleteInstancesRequest() {
var o = new api.RegionInstanceGroupManagersDeleteInstancesRequest();
buildCounterRegionInstanceGroupManagersDeleteInstancesRequest++;
if (buildCounterRegionInstanceGroupManagersDeleteInstancesRequest < 3) {
o.instances = buildUnnamed2482();
}
buildCounterRegionInstanceGroupManagersDeleteInstancesRequest--;
return o;
}
checkRegionInstanceGroupManagersDeleteInstancesRequest(
api.RegionInstanceGroupManagersDeleteInstancesRequest o) {
buildCounterRegionInstanceGroupManagersDeleteInstancesRequest++;
if (buildCounterRegionInstanceGroupManagersDeleteInstancesRequest < 3) {
checkUnnamed2482(o.instances);
}
buildCounterRegionInstanceGroupManagersDeleteInstancesRequest--;
}
buildUnnamed2483() {
var o = new core.List<api.ManagedInstance>();
o.add(buildManagedInstance());
o.add(buildManagedInstance());
return o;
}
checkUnnamed2483(core.List<api.ManagedInstance> o) {
unittest.expect(o, unittest.hasLength(2));
checkManagedInstance(o[0]);
checkManagedInstance(o[1]);
}
core.int buildCounterRegionInstanceGroupManagersListInstancesResponse = 0;
buildRegionInstanceGroupManagersListInstancesResponse() {
var o = new api.RegionInstanceGroupManagersListInstancesResponse();
buildCounterRegionInstanceGroupManagersListInstancesResponse++;
if (buildCounterRegionInstanceGroupManagersListInstancesResponse < 3) {
o.managedInstances = buildUnnamed2483();
}
buildCounterRegionInstanceGroupManagersListInstancesResponse--;
return o;
}
checkRegionInstanceGroupManagersListInstancesResponse(
api.RegionInstanceGroupManagersListInstancesResponse o) {
buildCounterRegionInstanceGroupManagersListInstancesResponse++;
if (buildCounterRegionInstanceGroupManagersListInstancesResponse < 3) {
checkUnnamed2483(o.managedInstances);
}
buildCounterRegionInstanceGroupManagersListInstancesResponse--;
}
buildUnnamed2484() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2484(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 buildCounterRegionInstanceGroupManagersRecreateRequest = 0;
buildRegionInstanceGroupManagersRecreateRequest() {
var o = new api.RegionInstanceGroupManagersRecreateRequest();
buildCounterRegionInstanceGroupManagersRecreateRequest++;
if (buildCounterRegionInstanceGroupManagersRecreateRequest < 3) {
o.instances = buildUnnamed2484();
}
buildCounterRegionInstanceGroupManagersRecreateRequest--;
return o;
}
checkRegionInstanceGroupManagersRecreateRequest(
api.RegionInstanceGroupManagersRecreateRequest o) {
buildCounterRegionInstanceGroupManagersRecreateRequest++;
if (buildCounterRegionInstanceGroupManagersRecreateRequest < 3) {
checkUnnamed2484(o.instances);
}
buildCounterRegionInstanceGroupManagersRecreateRequest--;
}
buildUnnamed2485() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2485(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 buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest = 0;
buildRegionInstanceGroupManagersSetTargetPoolsRequest() {
var o = new api.RegionInstanceGroupManagersSetTargetPoolsRequest();
buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest++;
if (buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest < 3) {
o.fingerprint = "foo";
o.targetPools = buildUnnamed2485();
}
buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest--;
return o;
}
checkRegionInstanceGroupManagersSetTargetPoolsRequest(
api.RegionInstanceGroupManagersSetTargetPoolsRequest o) {
buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest++;
if (buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2485(o.targetPools);
}
buildCounterRegionInstanceGroupManagersSetTargetPoolsRequest--;
}
core.int buildCounterRegionInstanceGroupManagersSetTemplateRequest = 0;
buildRegionInstanceGroupManagersSetTemplateRequest() {
var o = new api.RegionInstanceGroupManagersSetTemplateRequest();
buildCounterRegionInstanceGroupManagersSetTemplateRequest++;
if (buildCounterRegionInstanceGroupManagersSetTemplateRequest < 3) {
o.instanceTemplate = "foo";
}
buildCounterRegionInstanceGroupManagersSetTemplateRequest--;
return o;
}
checkRegionInstanceGroupManagersSetTemplateRequest(
api.RegionInstanceGroupManagersSetTemplateRequest o) {
buildCounterRegionInstanceGroupManagersSetTemplateRequest++;
if (buildCounterRegionInstanceGroupManagersSetTemplateRequest < 3) {
unittest.expect(o.instanceTemplate, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupManagersSetTemplateRequest--;
}
buildUnnamed2486() {
var o = new core.List<api.InstanceWithNamedPorts>();
o.add(buildInstanceWithNamedPorts());
o.add(buildInstanceWithNamedPorts());
return o;
}
checkUnnamed2486(core.List<api.InstanceWithNamedPorts> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceWithNamedPorts(o[0]);
checkInstanceWithNamedPorts(o[1]);
}
core.int buildCounterRegionInstanceGroupsListInstancesWarningData = 0;
buildRegionInstanceGroupsListInstancesWarningData() {
var o = new api.RegionInstanceGroupsListInstancesWarningData();
buildCounterRegionInstanceGroupsListInstancesWarningData++;
if (buildCounterRegionInstanceGroupsListInstancesWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRegionInstanceGroupsListInstancesWarningData--;
return o;
}
checkRegionInstanceGroupsListInstancesWarningData(
api.RegionInstanceGroupsListInstancesWarningData o) {
buildCounterRegionInstanceGroupsListInstancesWarningData++;
if (buildCounterRegionInstanceGroupsListInstancesWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupsListInstancesWarningData--;
}
buildUnnamed2487() {
var o = new core.List<api.RegionInstanceGroupsListInstancesWarningData>();
o.add(buildRegionInstanceGroupsListInstancesWarningData());
o.add(buildRegionInstanceGroupsListInstancesWarningData());
return o;
}
checkUnnamed2487(
core.List<api.RegionInstanceGroupsListInstancesWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegionInstanceGroupsListInstancesWarningData(o[0]);
checkRegionInstanceGroupsListInstancesWarningData(o[1]);
}
core.int buildCounterRegionInstanceGroupsListInstancesWarning = 0;
buildRegionInstanceGroupsListInstancesWarning() {
var o = new api.RegionInstanceGroupsListInstancesWarning();
buildCounterRegionInstanceGroupsListInstancesWarning++;
if (buildCounterRegionInstanceGroupsListInstancesWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2487();
o.message = "foo";
}
buildCounterRegionInstanceGroupsListInstancesWarning--;
return o;
}
checkRegionInstanceGroupsListInstancesWarning(
api.RegionInstanceGroupsListInstancesWarning o) {
buildCounterRegionInstanceGroupsListInstancesWarning++;
if (buildCounterRegionInstanceGroupsListInstancesWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2487(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupsListInstancesWarning--;
}
core.int buildCounterRegionInstanceGroupsListInstances = 0;
buildRegionInstanceGroupsListInstances() {
var o = new api.RegionInstanceGroupsListInstances();
buildCounterRegionInstanceGroupsListInstances++;
if (buildCounterRegionInstanceGroupsListInstances < 3) {
o.id = "foo";
o.items = buildUnnamed2486();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRegionInstanceGroupsListInstancesWarning();
}
buildCounterRegionInstanceGroupsListInstances--;
return o;
}
checkRegionInstanceGroupsListInstances(
api.RegionInstanceGroupsListInstances o) {
buildCounterRegionInstanceGroupsListInstances++;
if (buildCounterRegionInstanceGroupsListInstances < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2486(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRegionInstanceGroupsListInstancesWarning(o.warning);
}
buildCounterRegionInstanceGroupsListInstances--;
}
core.int buildCounterRegionInstanceGroupsListInstancesRequest = 0;
buildRegionInstanceGroupsListInstancesRequest() {
var o = new api.RegionInstanceGroupsListInstancesRequest();
buildCounterRegionInstanceGroupsListInstancesRequest++;
if (buildCounterRegionInstanceGroupsListInstancesRequest < 3) {
o.instanceState = "foo";
o.portName = "foo";
}
buildCounterRegionInstanceGroupsListInstancesRequest--;
return o;
}
checkRegionInstanceGroupsListInstancesRequest(
api.RegionInstanceGroupsListInstancesRequest o) {
buildCounterRegionInstanceGroupsListInstancesRequest++;
if (buildCounterRegionInstanceGroupsListInstancesRequest < 3) {
unittest.expect(o.instanceState, unittest.equals('foo'));
unittest.expect(o.portName, unittest.equals('foo'));
}
buildCounterRegionInstanceGroupsListInstancesRequest--;
}
buildUnnamed2488() {
var o = new core.List<api.NamedPort>();
o.add(buildNamedPort());
o.add(buildNamedPort());
return o;
}
checkUnnamed2488(core.List<api.NamedPort> o) {
unittest.expect(o, unittest.hasLength(2));
checkNamedPort(o[0]);
checkNamedPort(o[1]);
}
core.int buildCounterRegionInstanceGroupsSetNamedPortsRequest = 0;
buildRegionInstanceGroupsSetNamedPortsRequest() {
var o = new api.RegionInstanceGroupsSetNamedPortsRequest();
buildCounterRegionInstanceGroupsSetNamedPortsRequest++;
if (buildCounterRegionInstanceGroupsSetNamedPortsRequest < 3) {
o.fingerprint = "foo";
o.namedPorts = buildUnnamed2488();
}
buildCounterRegionInstanceGroupsSetNamedPortsRequest--;
return o;
}
checkRegionInstanceGroupsSetNamedPortsRequest(
api.RegionInstanceGroupsSetNamedPortsRequest o) {
buildCounterRegionInstanceGroupsSetNamedPortsRequest++;
if (buildCounterRegionInstanceGroupsSetNamedPortsRequest < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2488(o.namedPorts);
}
buildCounterRegionInstanceGroupsSetNamedPortsRequest--;
}
buildUnnamed2489() {
var o = new core.List<api.Region>();
o.add(buildRegion());
o.add(buildRegion());
return o;
}
checkUnnamed2489(core.List<api.Region> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegion(o[0]);
checkRegion(o[1]);
}
core.int buildCounterRegionListWarningData = 0;
buildRegionListWarningData() {
var o = new api.RegionListWarningData();
buildCounterRegionListWarningData++;
if (buildCounterRegionListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRegionListWarningData--;
return o;
}
checkRegionListWarningData(api.RegionListWarningData o) {
buildCounterRegionListWarningData++;
if (buildCounterRegionListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRegionListWarningData--;
}
buildUnnamed2490() {
var o = new core.List<api.RegionListWarningData>();
o.add(buildRegionListWarningData());
o.add(buildRegionListWarningData());
return o;
}
checkUnnamed2490(core.List<api.RegionListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRegionListWarningData(o[0]);
checkRegionListWarningData(o[1]);
}
core.int buildCounterRegionListWarning = 0;
buildRegionListWarning() {
var o = new api.RegionListWarning();
buildCounterRegionListWarning++;
if (buildCounterRegionListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2490();
o.message = "foo";
}
buildCounterRegionListWarning--;
return o;
}
checkRegionListWarning(api.RegionListWarning o) {
buildCounterRegionListWarning++;
if (buildCounterRegionListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2490(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRegionListWarning--;
}
core.int buildCounterRegionList = 0;
buildRegionList() {
var o = new api.RegionList();
buildCounterRegionList++;
if (buildCounterRegionList < 3) {
o.id = "foo";
o.items = buildUnnamed2489();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRegionListWarning();
}
buildCounterRegionList--;
return o;
}
checkRegionList(api.RegionList o) {
buildCounterRegionList++;
if (buildCounterRegionList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2489(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRegionListWarning(o.warning);
}
buildCounterRegionList--;
}
core.int buildCounterResourceCommitment = 0;
buildResourceCommitment() {
var o = new api.ResourceCommitment();
buildCounterResourceCommitment++;
if (buildCounterResourceCommitment < 3) {
o.amount = "foo";
o.type = "foo";
}
buildCounterResourceCommitment--;
return o;
}
checkResourceCommitment(api.ResourceCommitment o) {
buildCounterResourceCommitment++;
if (buildCounterResourceCommitment < 3) {
unittest.expect(o.amount, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterResourceCommitment--;
}
core.int buildCounterResourceGroupReference = 0;
buildResourceGroupReference() {
var o = new api.ResourceGroupReference();
buildCounterResourceGroupReference++;
if (buildCounterResourceGroupReference < 3) {
o.group = "foo";
}
buildCounterResourceGroupReference--;
return o;
}
checkResourceGroupReference(api.ResourceGroupReference o) {
buildCounterResourceGroupReference++;
if (buildCounterResourceGroupReference < 3) {
unittest.expect(o.group, unittest.equals('foo'));
}
buildCounterResourceGroupReference--;
}
buildUnnamed2491() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2491(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 buildCounterRouteWarningsData = 0;
buildRouteWarningsData() {
var o = new api.RouteWarningsData();
buildCounterRouteWarningsData++;
if (buildCounterRouteWarningsData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRouteWarningsData--;
return o;
}
checkRouteWarningsData(api.RouteWarningsData o) {
buildCounterRouteWarningsData++;
if (buildCounterRouteWarningsData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRouteWarningsData--;
}
buildUnnamed2492() {
var o = new core.List<api.RouteWarningsData>();
o.add(buildRouteWarningsData());
o.add(buildRouteWarningsData());
return o;
}
checkUnnamed2492(core.List<api.RouteWarningsData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouteWarningsData(o[0]);
checkRouteWarningsData(o[1]);
}
core.int buildCounterRouteWarnings = 0;
buildRouteWarnings() {
var o = new api.RouteWarnings();
buildCounterRouteWarnings++;
if (buildCounterRouteWarnings < 3) {
o.code = "foo";
o.data = buildUnnamed2492();
o.message = "foo";
}
buildCounterRouteWarnings--;
return o;
}
checkRouteWarnings(api.RouteWarnings o) {
buildCounterRouteWarnings++;
if (buildCounterRouteWarnings < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2492(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRouteWarnings--;
}
buildUnnamed2493() {
var o = new core.List<api.RouteWarnings>();
o.add(buildRouteWarnings());
o.add(buildRouteWarnings());
return o;
}
checkUnnamed2493(core.List<api.RouteWarnings> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouteWarnings(o[0]);
checkRouteWarnings(o[1]);
}
core.int buildCounterRoute = 0;
buildRoute() {
var o = new api.Route();
buildCounterRoute++;
if (buildCounterRoute < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.destRange = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.nextHopGateway = "foo";
o.nextHopInstance = "foo";
o.nextHopIp = "foo";
o.nextHopNetwork = "foo";
o.nextHopPeering = "foo";
o.nextHopVpnTunnel = "foo";
o.priority = 42;
o.selfLink = "foo";
o.tags = buildUnnamed2491();
o.warnings = buildUnnamed2493();
}
buildCounterRoute--;
return o;
}
checkRoute(api.Route o) {
buildCounterRoute++;
if (buildCounterRoute < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.destRange, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.nextHopGateway, unittest.equals('foo'));
unittest.expect(o.nextHopInstance, unittest.equals('foo'));
unittest.expect(o.nextHopIp, unittest.equals('foo'));
unittest.expect(o.nextHopNetwork, unittest.equals('foo'));
unittest.expect(o.nextHopPeering, unittest.equals('foo'));
unittest.expect(o.nextHopVpnTunnel, unittest.equals('foo'));
unittest.expect(o.priority, unittest.equals(42));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2491(o.tags);
checkUnnamed2493(o.warnings);
}
buildCounterRoute--;
}
buildUnnamed2494() {
var o = new core.List<api.Route>();
o.add(buildRoute());
o.add(buildRoute());
return o;
}
checkUnnamed2494(core.List<api.Route> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoute(o[0]);
checkRoute(o[1]);
}
core.int buildCounterRouteListWarningData = 0;
buildRouteListWarningData() {
var o = new api.RouteListWarningData();
buildCounterRouteListWarningData++;
if (buildCounterRouteListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRouteListWarningData--;
return o;
}
checkRouteListWarningData(api.RouteListWarningData o) {
buildCounterRouteListWarningData++;
if (buildCounterRouteListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRouteListWarningData--;
}
buildUnnamed2495() {
var o = new core.List<api.RouteListWarningData>();
o.add(buildRouteListWarningData());
o.add(buildRouteListWarningData());
return o;
}
checkUnnamed2495(core.List<api.RouteListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouteListWarningData(o[0]);
checkRouteListWarningData(o[1]);
}
core.int buildCounterRouteListWarning = 0;
buildRouteListWarning() {
var o = new api.RouteListWarning();
buildCounterRouteListWarning++;
if (buildCounterRouteListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2495();
o.message = "foo";
}
buildCounterRouteListWarning--;
return o;
}
checkRouteListWarning(api.RouteListWarning o) {
buildCounterRouteListWarning++;
if (buildCounterRouteListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2495(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRouteListWarning--;
}
core.int buildCounterRouteList = 0;
buildRouteList() {
var o = new api.RouteList();
buildCounterRouteList++;
if (buildCounterRouteList < 3) {
o.id = "foo";
o.items = buildUnnamed2494();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRouteListWarning();
}
buildCounterRouteList--;
return o;
}
checkRouteList(api.RouteList o) {
buildCounterRouteList++;
if (buildCounterRouteList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2494(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRouteListWarning(o.warning);
}
buildCounterRouteList--;
}
buildUnnamed2496() {
var o = new core.List<api.RouterBgpPeer>();
o.add(buildRouterBgpPeer());
o.add(buildRouterBgpPeer());
return o;
}
checkUnnamed2496(core.List<api.RouterBgpPeer> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterBgpPeer(o[0]);
checkRouterBgpPeer(o[1]);
}
buildUnnamed2497() {
var o = new core.List<api.RouterInterface>();
o.add(buildRouterInterface());
o.add(buildRouterInterface());
return o;
}
checkUnnamed2497(core.List<api.RouterInterface> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterInterface(o[0]);
checkRouterInterface(o[1]);
}
core.int buildCounterRouter = 0;
buildRouter() {
var o = new api.Router();
buildCounterRouter++;
if (buildCounterRouter < 3) {
o.bgp = buildRouterBgp();
o.bgpPeers = buildUnnamed2496();
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.interfaces = buildUnnamed2497();
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.region = "foo";
o.selfLink = "foo";
}
buildCounterRouter--;
return o;
}
checkRouter(api.Router o) {
buildCounterRouter++;
if (buildCounterRouter < 3) {
checkRouterBgp(o.bgp);
checkUnnamed2496(o.bgpPeers);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2497(o.interfaces);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterRouter--;
}
buildUnnamed2498() {
var o = new core.Map<core.String, api.RoutersScopedList>();
o["x"] = buildRoutersScopedList();
o["y"] = buildRoutersScopedList();
return o;
}
checkUnnamed2498(core.Map<core.String, api.RoutersScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoutersScopedList(o["x"]);
checkRoutersScopedList(o["y"]);
}
core.int buildCounterRouterAggregatedListWarningData = 0;
buildRouterAggregatedListWarningData() {
var o = new api.RouterAggregatedListWarningData();
buildCounterRouterAggregatedListWarningData++;
if (buildCounterRouterAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRouterAggregatedListWarningData--;
return o;
}
checkRouterAggregatedListWarningData(api.RouterAggregatedListWarningData o) {
buildCounterRouterAggregatedListWarningData++;
if (buildCounterRouterAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRouterAggregatedListWarningData--;
}
buildUnnamed2499() {
var o = new core.List<api.RouterAggregatedListWarningData>();
o.add(buildRouterAggregatedListWarningData());
o.add(buildRouterAggregatedListWarningData());
return o;
}
checkUnnamed2499(core.List<api.RouterAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterAggregatedListWarningData(o[0]);
checkRouterAggregatedListWarningData(o[1]);
}
core.int buildCounterRouterAggregatedListWarning = 0;
buildRouterAggregatedListWarning() {
var o = new api.RouterAggregatedListWarning();
buildCounterRouterAggregatedListWarning++;
if (buildCounterRouterAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2499();
o.message = "foo";
}
buildCounterRouterAggregatedListWarning--;
return o;
}
checkRouterAggregatedListWarning(api.RouterAggregatedListWarning o) {
buildCounterRouterAggregatedListWarning++;
if (buildCounterRouterAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2499(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRouterAggregatedListWarning--;
}
core.int buildCounterRouterAggregatedList = 0;
buildRouterAggregatedList() {
var o = new api.RouterAggregatedList();
buildCounterRouterAggregatedList++;
if (buildCounterRouterAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2498();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRouterAggregatedListWarning();
}
buildCounterRouterAggregatedList--;
return o;
}
checkRouterAggregatedList(api.RouterAggregatedList o) {
buildCounterRouterAggregatedList++;
if (buildCounterRouterAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2498(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRouterAggregatedListWarning(o.warning);
}
buildCounterRouterAggregatedList--;
}
core.int buildCounterRouterBgp = 0;
buildRouterBgp() {
var o = new api.RouterBgp();
buildCounterRouterBgp++;
if (buildCounterRouterBgp < 3) {
o.asn = 42;
}
buildCounterRouterBgp--;
return o;
}
checkRouterBgp(api.RouterBgp o) {
buildCounterRouterBgp++;
if (buildCounterRouterBgp < 3) {
unittest.expect(o.asn, unittest.equals(42));
}
buildCounterRouterBgp--;
}
core.int buildCounterRouterBgpPeer = 0;
buildRouterBgpPeer() {
var o = new api.RouterBgpPeer();
buildCounterRouterBgpPeer++;
if (buildCounterRouterBgpPeer < 3) {
o.advertisedRoutePriority = 42;
o.interfaceName = "foo";
o.ipAddress = "foo";
o.name = "foo";
o.peerAsn = 42;
o.peerIpAddress = "foo";
}
buildCounterRouterBgpPeer--;
return o;
}
checkRouterBgpPeer(api.RouterBgpPeer o) {
buildCounterRouterBgpPeer++;
if (buildCounterRouterBgpPeer < 3) {
unittest.expect(o.advertisedRoutePriority, unittest.equals(42));
unittest.expect(o.interfaceName, unittest.equals('foo'));
unittest.expect(o.ipAddress, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.peerAsn, unittest.equals(42));
unittest.expect(o.peerIpAddress, unittest.equals('foo'));
}
buildCounterRouterBgpPeer--;
}
core.int buildCounterRouterInterface = 0;
buildRouterInterface() {
var o = new api.RouterInterface();
buildCounterRouterInterface++;
if (buildCounterRouterInterface < 3) {
o.ipRange = "foo";
o.linkedInterconnectAttachment = "foo";
o.linkedVpnTunnel = "foo";
o.name = "foo";
}
buildCounterRouterInterface--;
return o;
}
checkRouterInterface(api.RouterInterface o) {
buildCounterRouterInterface++;
if (buildCounterRouterInterface < 3) {
unittest.expect(o.ipRange, unittest.equals('foo'));
unittest.expect(o.linkedInterconnectAttachment, unittest.equals('foo'));
unittest.expect(o.linkedVpnTunnel, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
}
buildCounterRouterInterface--;
}
buildUnnamed2500() {
var o = new core.List<api.Router>();
o.add(buildRouter());
o.add(buildRouter());
return o;
}
checkUnnamed2500(core.List<api.Router> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouter(o[0]);
checkRouter(o[1]);
}
core.int buildCounterRouterListWarningData = 0;
buildRouterListWarningData() {
var o = new api.RouterListWarningData();
buildCounterRouterListWarningData++;
if (buildCounterRouterListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRouterListWarningData--;
return o;
}
checkRouterListWarningData(api.RouterListWarningData o) {
buildCounterRouterListWarningData++;
if (buildCounterRouterListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRouterListWarningData--;
}
buildUnnamed2501() {
var o = new core.List<api.RouterListWarningData>();
o.add(buildRouterListWarningData());
o.add(buildRouterListWarningData());
return o;
}
checkUnnamed2501(core.List<api.RouterListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterListWarningData(o[0]);
checkRouterListWarningData(o[1]);
}
core.int buildCounterRouterListWarning = 0;
buildRouterListWarning() {
var o = new api.RouterListWarning();
buildCounterRouterListWarning++;
if (buildCounterRouterListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2501();
o.message = "foo";
}
buildCounterRouterListWarning--;
return o;
}
checkRouterListWarning(api.RouterListWarning o) {
buildCounterRouterListWarning++;
if (buildCounterRouterListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2501(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRouterListWarning--;
}
core.int buildCounterRouterList = 0;
buildRouterList() {
var o = new api.RouterList();
buildCounterRouterList++;
if (buildCounterRouterList < 3) {
o.id = "foo";
o.items = buildUnnamed2500();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildRouterListWarning();
}
buildCounterRouterList--;
return o;
}
checkRouterList(api.RouterList o) {
buildCounterRouterList++;
if (buildCounterRouterList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2500(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkRouterListWarning(o.warning);
}
buildCounterRouterList--;
}
buildUnnamed2502() {
var o = new core.List<api.Route>();
o.add(buildRoute());
o.add(buildRoute());
return o;
}
checkUnnamed2502(core.List<api.Route> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoute(o[0]);
checkRoute(o[1]);
}
buildUnnamed2503() {
var o = new core.List<api.Route>();
o.add(buildRoute());
o.add(buildRoute());
return o;
}
checkUnnamed2503(core.List<api.Route> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoute(o[0]);
checkRoute(o[1]);
}
buildUnnamed2504() {
var o = new core.List<api.RouterStatusBgpPeerStatus>();
o.add(buildRouterStatusBgpPeerStatus());
o.add(buildRouterStatusBgpPeerStatus());
return o;
}
checkUnnamed2504(core.List<api.RouterStatusBgpPeerStatus> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouterStatusBgpPeerStatus(o[0]);
checkRouterStatusBgpPeerStatus(o[1]);
}
core.int buildCounterRouterStatus = 0;
buildRouterStatus() {
var o = new api.RouterStatus();
buildCounterRouterStatus++;
if (buildCounterRouterStatus < 3) {
o.bestRoutes = buildUnnamed2502();
o.bestRoutesForRouter = buildUnnamed2503();
o.bgpPeerStatus = buildUnnamed2504();
o.network = "foo";
}
buildCounterRouterStatus--;
return o;
}
checkRouterStatus(api.RouterStatus o) {
buildCounterRouterStatus++;
if (buildCounterRouterStatus < 3) {
checkUnnamed2502(o.bestRoutes);
checkUnnamed2503(o.bestRoutesForRouter);
checkUnnamed2504(o.bgpPeerStatus);
unittest.expect(o.network, unittest.equals('foo'));
}
buildCounterRouterStatus--;
}
buildUnnamed2505() {
var o = new core.List<api.Route>();
o.add(buildRoute());
o.add(buildRoute());
return o;
}
checkUnnamed2505(core.List<api.Route> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoute(o[0]);
checkRoute(o[1]);
}
core.int buildCounterRouterStatusBgpPeerStatus = 0;
buildRouterStatusBgpPeerStatus() {
var o = new api.RouterStatusBgpPeerStatus();
buildCounterRouterStatusBgpPeerStatus++;
if (buildCounterRouterStatusBgpPeerStatus < 3) {
o.advertisedRoutes = buildUnnamed2505();
o.ipAddress = "foo";
o.linkedVpnTunnel = "foo";
o.name = "foo";
o.numLearnedRoutes = 42;
o.peerIpAddress = "foo";
o.state = "foo";
o.status = "foo";
o.uptime = "foo";
o.uptimeSeconds = "foo";
}
buildCounterRouterStatusBgpPeerStatus--;
return o;
}
checkRouterStatusBgpPeerStatus(api.RouterStatusBgpPeerStatus o) {
buildCounterRouterStatusBgpPeerStatus++;
if (buildCounterRouterStatusBgpPeerStatus < 3) {
checkUnnamed2505(o.advertisedRoutes);
unittest.expect(o.ipAddress, unittest.equals('foo'));
unittest.expect(o.linkedVpnTunnel, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.numLearnedRoutes, unittest.equals(42));
unittest.expect(o.peerIpAddress, unittest.equals('foo'));
unittest.expect(o.state, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.uptime, unittest.equals('foo'));
unittest.expect(o.uptimeSeconds, unittest.equals('foo'));
}
buildCounterRouterStatusBgpPeerStatus--;
}
core.int buildCounterRouterStatusResponse = 0;
buildRouterStatusResponse() {
var o = new api.RouterStatusResponse();
buildCounterRouterStatusResponse++;
if (buildCounterRouterStatusResponse < 3) {
o.kind = "foo";
o.result = buildRouterStatus();
}
buildCounterRouterStatusResponse--;
return o;
}
checkRouterStatusResponse(api.RouterStatusResponse o) {
buildCounterRouterStatusResponse++;
if (buildCounterRouterStatusResponse < 3) {
unittest.expect(o.kind, unittest.equals('foo'));
checkRouterStatus(o.result);
}
buildCounterRouterStatusResponse--;
}
core.int buildCounterRoutersPreviewResponse = 0;
buildRoutersPreviewResponse() {
var o = new api.RoutersPreviewResponse();
buildCounterRoutersPreviewResponse++;
if (buildCounterRoutersPreviewResponse < 3) {
o.resource = buildRouter();
}
buildCounterRoutersPreviewResponse--;
return o;
}
checkRoutersPreviewResponse(api.RoutersPreviewResponse o) {
buildCounterRoutersPreviewResponse++;
if (buildCounterRoutersPreviewResponse < 3) {
checkRouter(o.resource);
}
buildCounterRoutersPreviewResponse--;
}
buildUnnamed2506() {
var o = new core.List<api.Router>();
o.add(buildRouter());
o.add(buildRouter());
return o;
}
checkUnnamed2506(core.List<api.Router> o) {
unittest.expect(o, unittest.hasLength(2));
checkRouter(o[0]);
checkRouter(o[1]);
}
core.int buildCounterRoutersScopedListWarningData = 0;
buildRoutersScopedListWarningData() {
var o = new api.RoutersScopedListWarningData();
buildCounterRoutersScopedListWarningData++;
if (buildCounterRoutersScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterRoutersScopedListWarningData--;
return o;
}
checkRoutersScopedListWarningData(api.RoutersScopedListWarningData o) {
buildCounterRoutersScopedListWarningData++;
if (buildCounterRoutersScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterRoutersScopedListWarningData--;
}
buildUnnamed2507() {
var o = new core.List<api.RoutersScopedListWarningData>();
o.add(buildRoutersScopedListWarningData());
o.add(buildRoutersScopedListWarningData());
return o;
}
checkUnnamed2507(core.List<api.RoutersScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkRoutersScopedListWarningData(o[0]);
checkRoutersScopedListWarningData(o[1]);
}
core.int buildCounterRoutersScopedListWarning = 0;
buildRoutersScopedListWarning() {
var o = new api.RoutersScopedListWarning();
buildCounterRoutersScopedListWarning++;
if (buildCounterRoutersScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2507();
o.message = "foo";
}
buildCounterRoutersScopedListWarning--;
return o;
}
checkRoutersScopedListWarning(api.RoutersScopedListWarning o) {
buildCounterRoutersScopedListWarning++;
if (buildCounterRoutersScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2507(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterRoutersScopedListWarning--;
}
core.int buildCounterRoutersScopedList = 0;
buildRoutersScopedList() {
var o = new api.RoutersScopedList();
buildCounterRoutersScopedList++;
if (buildCounterRoutersScopedList < 3) {
o.routers = buildUnnamed2506();
o.warning = buildRoutersScopedListWarning();
}
buildCounterRoutersScopedList--;
return o;
}
checkRoutersScopedList(api.RoutersScopedList o) {
buildCounterRoutersScopedList++;
if (buildCounterRoutersScopedList < 3) {
checkUnnamed2506(o.routers);
checkRoutersScopedListWarning(o.warning);
}
buildCounterRoutersScopedList--;
}
core.int buildCounterSSLHealthCheck = 0;
buildSSLHealthCheck() {
var o = new api.SSLHealthCheck();
buildCounterSSLHealthCheck++;
if (buildCounterSSLHealthCheck < 3) {
o.port = 42;
o.portName = "foo";
o.proxyHeader = "foo";
o.request = "foo";
o.response = "foo";
}
buildCounterSSLHealthCheck--;
return o;
}
checkSSLHealthCheck(api.SSLHealthCheck o) {
buildCounterSSLHealthCheck++;
if (buildCounterSSLHealthCheck < 3) {
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.portName, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.request, unittest.equals('foo'));
unittest.expect(o.response, unittest.equals('foo'));
}
buildCounterSSLHealthCheck--;
}
core.int buildCounterScheduling = 0;
buildScheduling() {
var o = new api.Scheduling();
buildCounterScheduling++;
if (buildCounterScheduling < 3) {
o.automaticRestart = true;
o.onHostMaintenance = "foo";
o.preemptible = true;
}
buildCounterScheduling--;
return o;
}
checkScheduling(api.Scheduling o) {
buildCounterScheduling++;
if (buildCounterScheduling < 3) {
unittest.expect(o.automaticRestart, unittest.isTrue);
unittest.expect(o.onHostMaintenance, unittest.equals('foo'));
unittest.expect(o.preemptible, unittest.isTrue);
}
buildCounterScheduling--;
}
core.int buildCounterSerialPortOutput = 0;
buildSerialPortOutput() {
var o = new api.SerialPortOutput();
buildCounterSerialPortOutput++;
if (buildCounterSerialPortOutput < 3) {
o.contents = "foo";
o.kind = "foo";
o.next = "foo";
o.selfLink = "foo";
o.start = "foo";
}
buildCounterSerialPortOutput--;
return o;
}
checkSerialPortOutput(api.SerialPortOutput o) {
buildCounterSerialPortOutput++;
if (buildCounterSerialPortOutput < 3) {
unittest.expect(o.contents, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.next, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.start, unittest.equals('foo'));
}
buildCounterSerialPortOutput--;
}
buildUnnamed2508() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2508(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 = buildUnnamed2508();
}
buildCounterServiceAccount--;
return o;
}
checkServiceAccount(api.ServiceAccount o) {
buildCounterServiceAccount++;
if (buildCounterServiceAccount < 3) {
unittest.expect(o.email, unittest.equals('foo'));
checkUnnamed2508(o.scopes);
}
buildCounterServiceAccount--;
}
buildUnnamed2509() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2509(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'));
}
buildUnnamed2510() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2510(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 buildCounterSnapshot = 0;
buildSnapshot() {
var o = new api.Snapshot();
buildCounterSnapshot++;
if (buildCounterSnapshot < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.diskSizeGb = "foo";
o.id = "foo";
o.kind = "foo";
o.labelFingerprint = "foo";
o.labels = buildUnnamed2509();
o.licenses = buildUnnamed2510();
o.name = "foo";
o.selfLink = "foo";
o.snapshotEncryptionKey = buildCustomerEncryptionKey();
o.sourceDisk = "foo";
o.sourceDiskEncryptionKey = buildCustomerEncryptionKey();
o.sourceDiskId = "foo";
o.status = "foo";
o.storageBytes = "foo";
o.storageBytesStatus = "foo";
}
buildCounterSnapshot--;
return o;
}
checkSnapshot(api.Snapshot o) {
buildCounterSnapshot++;
if (buildCounterSnapshot < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.diskSizeGb, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2509(o.labels);
checkUnnamed2510(o.licenses);
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkCustomerEncryptionKey(o.snapshotEncryptionKey);
unittest.expect(o.sourceDisk, unittest.equals('foo'));
checkCustomerEncryptionKey(o.sourceDiskEncryptionKey);
unittest.expect(o.sourceDiskId, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.storageBytes, unittest.equals('foo'));
unittest.expect(o.storageBytesStatus, unittest.equals('foo'));
}
buildCounterSnapshot--;
}
buildUnnamed2511() {
var o = new core.List<api.Snapshot>();
o.add(buildSnapshot());
o.add(buildSnapshot());
return o;
}
checkUnnamed2511(core.List<api.Snapshot> o) {
unittest.expect(o, unittest.hasLength(2));
checkSnapshot(o[0]);
checkSnapshot(o[1]);
}
core.int buildCounterSnapshotListWarningData = 0;
buildSnapshotListWarningData() {
var o = new api.SnapshotListWarningData();
buildCounterSnapshotListWarningData++;
if (buildCounterSnapshotListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterSnapshotListWarningData--;
return o;
}
checkSnapshotListWarningData(api.SnapshotListWarningData o) {
buildCounterSnapshotListWarningData++;
if (buildCounterSnapshotListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterSnapshotListWarningData--;
}
buildUnnamed2512() {
var o = new core.List<api.SnapshotListWarningData>();
o.add(buildSnapshotListWarningData());
o.add(buildSnapshotListWarningData());
return o;
}
checkUnnamed2512(core.List<api.SnapshotListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkSnapshotListWarningData(o[0]);
checkSnapshotListWarningData(o[1]);
}
core.int buildCounterSnapshotListWarning = 0;
buildSnapshotListWarning() {
var o = new api.SnapshotListWarning();
buildCounterSnapshotListWarning++;
if (buildCounterSnapshotListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2512();
o.message = "foo";
}
buildCounterSnapshotListWarning--;
return o;
}
checkSnapshotListWarning(api.SnapshotListWarning o) {
buildCounterSnapshotListWarning++;
if (buildCounterSnapshotListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2512(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterSnapshotListWarning--;
}
core.int buildCounterSnapshotList = 0;
buildSnapshotList() {
var o = new api.SnapshotList();
buildCounterSnapshotList++;
if (buildCounterSnapshotList < 3) {
o.id = "foo";
o.items = buildUnnamed2511();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildSnapshotListWarning();
}
buildCounterSnapshotList--;
return o;
}
checkSnapshotList(api.SnapshotList o) {
buildCounterSnapshotList++;
if (buildCounterSnapshotList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2511(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkSnapshotListWarning(o.warning);
}
buildCounterSnapshotList--;
}
core.int buildCounterSslCertificate = 0;
buildSslCertificate() {
var o = new api.SslCertificate();
buildCounterSslCertificate++;
if (buildCounterSslCertificate < 3) {
o.certificate = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.privateKey = "foo";
o.selfLink = "foo";
}
buildCounterSslCertificate--;
return o;
}
checkSslCertificate(api.SslCertificate o) {
buildCounterSslCertificate++;
if (buildCounterSslCertificate < 3) {
unittest.expect(o.certificate, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.privateKey, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterSslCertificate--;
}
buildUnnamed2513() {
var o = new core.List<api.SslCertificate>();
o.add(buildSslCertificate());
o.add(buildSslCertificate());
return o;
}
checkUnnamed2513(core.List<api.SslCertificate> o) {
unittest.expect(o, unittest.hasLength(2));
checkSslCertificate(o[0]);
checkSslCertificate(o[1]);
}
core.int buildCounterSslCertificateListWarningData = 0;
buildSslCertificateListWarningData() {
var o = new api.SslCertificateListWarningData();
buildCounterSslCertificateListWarningData++;
if (buildCounterSslCertificateListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterSslCertificateListWarningData--;
return o;
}
checkSslCertificateListWarningData(api.SslCertificateListWarningData o) {
buildCounterSslCertificateListWarningData++;
if (buildCounterSslCertificateListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterSslCertificateListWarningData--;
}
buildUnnamed2514() {
var o = new core.List<api.SslCertificateListWarningData>();
o.add(buildSslCertificateListWarningData());
o.add(buildSslCertificateListWarningData());
return o;
}
checkUnnamed2514(core.List<api.SslCertificateListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkSslCertificateListWarningData(o[0]);
checkSslCertificateListWarningData(o[1]);
}
core.int buildCounterSslCertificateListWarning = 0;
buildSslCertificateListWarning() {
var o = new api.SslCertificateListWarning();
buildCounterSslCertificateListWarning++;
if (buildCounterSslCertificateListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2514();
o.message = "foo";
}
buildCounterSslCertificateListWarning--;
return o;
}
checkSslCertificateListWarning(api.SslCertificateListWarning o) {
buildCounterSslCertificateListWarning++;
if (buildCounterSslCertificateListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2514(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterSslCertificateListWarning--;
}
core.int buildCounterSslCertificateList = 0;
buildSslCertificateList() {
var o = new api.SslCertificateList();
buildCounterSslCertificateList++;
if (buildCounterSslCertificateList < 3) {
o.id = "foo";
o.items = buildUnnamed2513();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildSslCertificateListWarning();
}
buildCounterSslCertificateList--;
return o;
}
checkSslCertificateList(api.SslCertificateList o) {
buildCounterSslCertificateList++;
if (buildCounterSslCertificateList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2513(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkSslCertificateListWarning(o.warning);
}
buildCounterSslCertificateList--;
}
buildUnnamed2515() {
var o = new core.List<api.SubnetworkSecondaryRange>();
o.add(buildSubnetworkSecondaryRange());
o.add(buildSubnetworkSecondaryRange());
return o;
}
checkUnnamed2515(core.List<api.SubnetworkSecondaryRange> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetworkSecondaryRange(o[0]);
checkSubnetworkSecondaryRange(o[1]);
}
core.int buildCounterSubnetwork = 0;
buildSubnetwork() {
var o = new api.Subnetwork();
buildCounterSubnetwork++;
if (buildCounterSubnetwork < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.gatewayAddress = "foo";
o.id = "foo";
o.ipCidrRange = "foo";
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.privateIpGoogleAccess = true;
o.region = "foo";
o.secondaryIpRanges = buildUnnamed2515();
o.selfLink = "foo";
}
buildCounterSubnetwork--;
return o;
}
checkSubnetwork(api.Subnetwork o) {
buildCounterSubnetwork++;
if (buildCounterSubnetwork < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.gatewayAddress, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.ipCidrRange, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.privateIpGoogleAccess, unittest.isTrue);
unittest.expect(o.region, unittest.equals('foo'));
checkUnnamed2515(o.secondaryIpRanges);
unittest.expect(o.selfLink, unittest.equals('foo'));
}
buildCounterSubnetwork--;
}
buildUnnamed2516() {
var o = new core.Map<core.String, api.SubnetworksScopedList>();
o["x"] = buildSubnetworksScopedList();
o["y"] = buildSubnetworksScopedList();
return o;
}
checkUnnamed2516(core.Map<core.String, api.SubnetworksScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetworksScopedList(o["x"]);
checkSubnetworksScopedList(o["y"]);
}
core.int buildCounterSubnetworkAggregatedListWarningData = 0;
buildSubnetworkAggregatedListWarningData() {
var o = new api.SubnetworkAggregatedListWarningData();
buildCounterSubnetworkAggregatedListWarningData++;
if (buildCounterSubnetworkAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterSubnetworkAggregatedListWarningData--;
return o;
}
checkSubnetworkAggregatedListWarningData(
api.SubnetworkAggregatedListWarningData o) {
buildCounterSubnetworkAggregatedListWarningData++;
if (buildCounterSubnetworkAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterSubnetworkAggregatedListWarningData--;
}
buildUnnamed2517() {
var o = new core.List<api.SubnetworkAggregatedListWarningData>();
o.add(buildSubnetworkAggregatedListWarningData());
o.add(buildSubnetworkAggregatedListWarningData());
return o;
}
checkUnnamed2517(core.List<api.SubnetworkAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetworkAggregatedListWarningData(o[0]);
checkSubnetworkAggregatedListWarningData(o[1]);
}
core.int buildCounterSubnetworkAggregatedListWarning = 0;
buildSubnetworkAggregatedListWarning() {
var o = new api.SubnetworkAggregatedListWarning();
buildCounterSubnetworkAggregatedListWarning++;
if (buildCounterSubnetworkAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2517();
o.message = "foo";
}
buildCounterSubnetworkAggregatedListWarning--;
return o;
}
checkSubnetworkAggregatedListWarning(api.SubnetworkAggregatedListWarning o) {
buildCounterSubnetworkAggregatedListWarning++;
if (buildCounterSubnetworkAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2517(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterSubnetworkAggregatedListWarning--;
}
core.int buildCounterSubnetworkAggregatedList = 0;
buildSubnetworkAggregatedList() {
var o = new api.SubnetworkAggregatedList();
buildCounterSubnetworkAggregatedList++;
if (buildCounterSubnetworkAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2516();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildSubnetworkAggregatedListWarning();
}
buildCounterSubnetworkAggregatedList--;
return o;
}
checkSubnetworkAggregatedList(api.SubnetworkAggregatedList o) {
buildCounterSubnetworkAggregatedList++;
if (buildCounterSubnetworkAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2516(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkSubnetworkAggregatedListWarning(o.warning);
}
buildCounterSubnetworkAggregatedList--;
}
buildUnnamed2518() {
var o = new core.List<api.Subnetwork>();
o.add(buildSubnetwork());
o.add(buildSubnetwork());
return o;
}
checkUnnamed2518(core.List<api.Subnetwork> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetwork(o[0]);
checkSubnetwork(o[1]);
}
core.int buildCounterSubnetworkListWarningData = 0;
buildSubnetworkListWarningData() {
var o = new api.SubnetworkListWarningData();
buildCounterSubnetworkListWarningData++;
if (buildCounterSubnetworkListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterSubnetworkListWarningData--;
return o;
}
checkSubnetworkListWarningData(api.SubnetworkListWarningData o) {
buildCounterSubnetworkListWarningData++;
if (buildCounterSubnetworkListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterSubnetworkListWarningData--;
}
buildUnnamed2519() {
var o = new core.List<api.SubnetworkListWarningData>();
o.add(buildSubnetworkListWarningData());
o.add(buildSubnetworkListWarningData());
return o;
}
checkUnnamed2519(core.List<api.SubnetworkListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetworkListWarningData(o[0]);
checkSubnetworkListWarningData(o[1]);
}
core.int buildCounterSubnetworkListWarning = 0;
buildSubnetworkListWarning() {
var o = new api.SubnetworkListWarning();
buildCounterSubnetworkListWarning++;
if (buildCounterSubnetworkListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2519();
o.message = "foo";
}
buildCounterSubnetworkListWarning--;
return o;
}
checkSubnetworkListWarning(api.SubnetworkListWarning o) {
buildCounterSubnetworkListWarning++;
if (buildCounterSubnetworkListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2519(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterSubnetworkListWarning--;
}
core.int buildCounterSubnetworkList = 0;
buildSubnetworkList() {
var o = new api.SubnetworkList();
buildCounterSubnetworkList++;
if (buildCounterSubnetworkList < 3) {
o.id = "foo";
o.items = buildUnnamed2518();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildSubnetworkListWarning();
}
buildCounterSubnetworkList--;
return o;
}
checkSubnetworkList(api.SubnetworkList o) {
buildCounterSubnetworkList++;
if (buildCounterSubnetworkList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2518(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkSubnetworkListWarning(o.warning);
}
buildCounterSubnetworkList--;
}
core.int buildCounterSubnetworkSecondaryRange = 0;
buildSubnetworkSecondaryRange() {
var o = new api.SubnetworkSecondaryRange();
buildCounterSubnetworkSecondaryRange++;
if (buildCounterSubnetworkSecondaryRange < 3) {
o.ipCidrRange = "foo";
o.rangeName = "foo";
}
buildCounterSubnetworkSecondaryRange--;
return o;
}
checkSubnetworkSecondaryRange(api.SubnetworkSecondaryRange o) {
buildCounterSubnetworkSecondaryRange++;
if (buildCounterSubnetworkSecondaryRange < 3) {
unittest.expect(o.ipCidrRange, unittest.equals('foo'));
unittest.expect(o.rangeName, unittest.equals('foo'));
}
buildCounterSubnetworkSecondaryRange--;
}
core.int buildCounterSubnetworksExpandIpCidrRangeRequest = 0;
buildSubnetworksExpandIpCidrRangeRequest() {
var o = new api.SubnetworksExpandIpCidrRangeRequest();
buildCounterSubnetworksExpandIpCidrRangeRequest++;
if (buildCounterSubnetworksExpandIpCidrRangeRequest < 3) {
o.ipCidrRange = "foo";
}
buildCounterSubnetworksExpandIpCidrRangeRequest--;
return o;
}
checkSubnetworksExpandIpCidrRangeRequest(
api.SubnetworksExpandIpCidrRangeRequest o) {
buildCounterSubnetworksExpandIpCidrRangeRequest++;
if (buildCounterSubnetworksExpandIpCidrRangeRequest < 3) {
unittest.expect(o.ipCidrRange, unittest.equals('foo'));
}
buildCounterSubnetworksExpandIpCidrRangeRequest--;
}
buildUnnamed2520() {
var o = new core.List<api.Subnetwork>();
o.add(buildSubnetwork());
o.add(buildSubnetwork());
return o;
}
checkUnnamed2520(core.List<api.Subnetwork> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetwork(o[0]);
checkSubnetwork(o[1]);
}
core.int buildCounterSubnetworksScopedListWarningData = 0;
buildSubnetworksScopedListWarningData() {
var o = new api.SubnetworksScopedListWarningData();
buildCounterSubnetworksScopedListWarningData++;
if (buildCounterSubnetworksScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterSubnetworksScopedListWarningData--;
return o;
}
checkSubnetworksScopedListWarningData(api.SubnetworksScopedListWarningData o) {
buildCounterSubnetworksScopedListWarningData++;
if (buildCounterSubnetworksScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterSubnetworksScopedListWarningData--;
}
buildUnnamed2521() {
var o = new core.List<api.SubnetworksScopedListWarningData>();
o.add(buildSubnetworksScopedListWarningData());
o.add(buildSubnetworksScopedListWarningData());
return o;
}
checkUnnamed2521(core.List<api.SubnetworksScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkSubnetworksScopedListWarningData(o[0]);
checkSubnetworksScopedListWarningData(o[1]);
}
core.int buildCounterSubnetworksScopedListWarning = 0;
buildSubnetworksScopedListWarning() {
var o = new api.SubnetworksScopedListWarning();
buildCounterSubnetworksScopedListWarning++;
if (buildCounterSubnetworksScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2521();
o.message = "foo";
}
buildCounterSubnetworksScopedListWarning--;
return o;
}
checkSubnetworksScopedListWarning(api.SubnetworksScopedListWarning o) {
buildCounterSubnetworksScopedListWarning++;
if (buildCounterSubnetworksScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2521(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterSubnetworksScopedListWarning--;
}
core.int buildCounterSubnetworksScopedList = 0;
buildSubnetworksScopedList() {
var o = new api.SubnetworksScopedList();
buildCounterSubnetworksScopedList++;
if (buildCounterSubnetworksScopedList < 3) {
o.subnetworks = buildUnnamed2520();
o.warning = buildSubnetworksScopedListWarning();
}
buildCounterSubnetworksScopedList--;
return o;
}
checkSubnetworksScopedList(api.SubnetworksScopedList o) {
buildCounterSubnetworksScopedList++;
if (buildCounterSubnetworksScopedList < 3) {
checkUnnamed2520(o.subnetworks);
checkSubnetworksScopedListWarning(o.warning);
}
buildCounterSubnetworksScopedList--;
}
core.int buildCounterSubnetworksSetPrivateIpGoogleAccessRequest = 0;
buildSubnetworksSetPrivateIpGoogleAccessRequest() {
var o = new api.SubnetworksSetPrivateIpGoogleAccessRequest();
buildCounterSubnetworksSetPrivateIpGoogleAccessRequest++;
if (buildCounterSubnetworksSetPrivateIpGoogleAccessRequest < 3) {
o.privateIpGoogleAccess = true;
}
buildCounterSubnetworksSetPrivateIpGoogleAccessRequest--;
return o;
}
checkSubnetworksSetPrivateIpGoogleAccessRequest(
api.SubnetworksSetPrivateIpGoogleAccessRequest o) {
buildCounterSubnetworksSetPrivateIpGoogleAccessRequest++;
if (buildCounterSubnetworksSetPrivateIpGoogleAccessRequest < 3) {
unittest.expect(o.privateIpGoogleAccess, unittest.isTrue);
}
buildCounterSubnetworksSetPrivateIpGoogleAccessRequest--;
}
core.int buildCounterTCPHealthCheck = 0;
buildTCPHealthCheck() {
var o = new api.TCPHealthCheck();
buildCounterTCPHealthCheck++;
if (buildCounterTCPHealthCheck < 3) {
o.port = 42;
o.portName = "foo";
o.proxyHeader = "foo";
o.request = "foo";
o.response = "foo";
}
buildCounterTCPHealthCheck--;
return o;
}
checkTCPHealthCheck(api.TCPHealthCheck o) {
buildCounterTCPHealthCheck++;
if (buildCounterTCPHealthCheck < 3) {
unittest.expect(o.port, unittest.equals(42));
unittest.expect(o.portName, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.request, unittest.equals('foo'));
unittest.expect(o.response, unittest.equals('foo'));
}
buildCounterTCPHealthCheck--;
}
buildUnnamed2522() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2522(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 buildCounterTags = 0;
buildTags() {
var o = new api.Tags();
buildCounterTags++;
if (buildCounterTags < 3) {
o.fingerprint = "foo";
o.items = buildUnnamed2522();
}
buildCounterTags--;
return o;
}
checkTags(api.Tags o) {
buildCounterTags++;
if (buildCounterTags < 3) {
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2522(o.items);
}
buildCounterTags--;
}
core.int buildCounterTargetHttpProxy = 0;
buildTargetHttpProxy() {
var o = new api.TargetHttpProxy();
buildCounterTargetHttpProxy++;
if (buildCounterTargetHttpProxy < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
o.urlMap = "foo";
}
buildCounterTargetHttpProxy--;
return o;
}
checkTargetHttpProxy(api.TargetHttpProxy o) {
buildCounterTargetHttpProxy++;
if (buildCounterTargetHttpProxy < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.urlMap, unittest.equals('foo'));
}
buildCounterTargetHttpProxy--;
}
buildUnnamed2523() {
var o = new core.List<api.TargetHttpProxy>();
o.add(buildTargetHttpProxy());
o.add(buildTargetHttpProxy());
return o;
}
checkUnnamed2523(core.List<api.TargetHttpProxy> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetHttpProxy(o[0]);
checkTargetHttpProxy(o[1]);
}
core.int buildCounterTargetHttpProxyListWarningData = 0;
buildTargetHttpProxyListWarningData() {
var o = new api.TargetHttpProxyListWarningData();
buildCounterTargetHttpProxyListWarningData++;
if (buildCounterTargetHttpProxyListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetHttpProxyListWarningData--;
return o;
}
checkTargetHttpProxyListWarningData(api.TargetHttpProxyListWarningData o) {
buildCounterTargetHttpProxyListWarningData++;
if (buildCounterTargetHttpProxyListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetHttpProxyListWarningData--;
}
buildUnnamed2524() {
var o = new core.List<api.TargetHttpProxyListWarningData>();
o.add(buildTargetHttpProxyListWarningData());
o.add(buildTargetHttpProxyListWarningData());
return o;
}
checkUnnamed2524(core.List<api.TargetHttpProxyListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetHttpProxyListWarningData(o[0]);
checkTargetHttpProxyListWarningData(o[1]);
}
core.int buildCounterTargetHttpProxyListWarning = 0;
buildTargetHttpProxyListWarning() {
var o = new api.TargetHttpProxyListWarning();
buildCounterTargetHttpProxyListWarning++;
if (buildCounterTargetHttpProxyListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2524();
o.message = "foo";
}
buildCounterTargetHttpProxyListWarning--;
return o;
}
checkTargetHttpProxyListWarning(api.TargetHttpProxyListWarning o) {
buildCounterTargetHttpProxyListWarning++;
if (buildCounterTargetHttpProxyListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2524(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetHttpProxyListWarning--;
}
core.int buildCounterTargetHttpProxyList = 0;
buildTargetHttpProxyList() {
var o = new api.TargetHttpProxyList();
buildCounterTargetHttpProxyList++;
if (buildCounterTargetHttpProxyList < 3) {
o.id = "foo";
o.items = buildUnnamed2523();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetHttpProxyListWarning();
}
buildCounterTargetHttpProxyList--;
return o;
}
checkTargetHttpProxyList(api.TargetHttpProxyList o) {
buildCounterTargetHttpProxyList++;
if (buildCounterTargetHttpProxyList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2523(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetHttpProxyListWarning(o.warning);
}
buildCounterTargetHttpProxyList--;
}
buildUnnamed2525() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2525(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 buildCounterTargetHttpsProxiesSetSslCertificatesRequest = 0;
buildTargetHttpsProxiesSetSslCertificatesRequest() {
var o = new api.TargetHttpsProxiesSetSslCertificatesRequest();
buildCounterTargetHttpsProxiesSetSslCertificatesRequest++;
if (buildCounterTargetHttpsProxiesSetSslCertificatesRequest < 3) {
o.sslCertificates = buildUnnamed2525();
}
buildCounterTargetHttpsProxiesSetSslCertificatesRequest--;
return o;
}
checkTargetHttpsProxiesSetSslCertificatesRequest(
api.TargetHttpsProxiesSetSslCertificatesRequest o) {
buildCounterTargetHttpsProxiesSetSslCertificatesRequest++;
if (buildCounterTargetHttpsProxiesSetSslCertificatesRequest < 3) {
checkUnnamed2525(o.sslCertificates);
}
buildCounterTargetHttpsProxiesSetSslCertificatesRequest--;
}
buildUnnamed2526() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2526(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 buildCounterTargetHttpsProxy = 0;
buildTargetHttpsProxy() {
var o = new api.TargetHttpsProxy();
buildCounterTargetHttpsProxy++;
if (buildCounterTargetHttpsProxy < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.selfLink = "foo";
o.sslCertificates = buildUnnamed2526();
o.urlMap = "foo";
}
buildCounterTargetHttpsProxy--;
return o;
}
checkTargetHttpsProxy(api.TargetHttpsProxy o) {
buildCounterTargetHttpsProxy++;
if (buildCounterTargetHttpsProxy < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2526(o.sslCertificates);
unittest.expect(o.urlMap, unittest.equals('foo'));
}
buildCounterTargetHttpsProxy--;
}
buildUnnamed2527() {
var o = new core.List<api.TargetHttpsProxy>();
o.add(buildTargetHttpsProxy());
o.add(buildTargetHttpsProxy());
return o;
}
checkUnnamed2527(core.List<api.TargetHttpsProxy> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetHttpsProxy(o[0]);
checkTargetHttpsProxy(o[1]);
}
core.int buildCounterTargetHttpsProxyListWarningData = 0;
buildTargetHttpsProxyListWarningData() {
var o = new api.TargetHttpsProxyListWarningData();
buildCounterTargetHttpsProxyListWarningData++;
if (buildCounterTargetHttpsProxyListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetHttpsProxyListWarningData--;
return o;
}
checkTargetHttpsProxyListWarningData(api.TargetHttpsProxyListWarningData o) {
buildCounterTargetHttpsProxyListWarningData++;
if (buildCounterTargetHttpsProxyListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetHttpsProxyListWarningData--;
}
buildUnnamed2528() {
var o = new core.List<api.TargetHttpsProxyListWarningData>();
o.add(buildTargetHttpsProxyListWarningData());
o.add(buildTargetHttpsProxyListWarningData());
return o;
}
checkUnnamed2528(core.List<api.TargetHttpsProxyListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetHttpsProxyListWarningData(o[0]);
checkTargetHttpsProxyListWarningData(o[1]);
}
core.int buildCounterTargetHttpsProxyListWarning = 0;
buildTargetHttpsProxyListWarning() {
var o = new api.TargetHttpsProxyListWarning();
buildCounterTargetHttpsProxyListWarning++;
if (buildCounterTargetHttpsProxyListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2528();
o.message = "foo";
}
buildCounterTargetHttpsProxyListWarning--;
return o;
}
checkTargetHttpsProxyListWarning(api.TargetHttpsProxyListWarning o) {
buildCounterTargetHttpsProxyListWarning++;
if (buildCounterTargetHttpsProxyListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2528(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetHttpsProxyListWarning--;
}
core.int buildCounterTargetHttpsProxyList = 0;
buildTargetHttpsProxyList() {
var o = new api.TargetHttpsProxyList();
buildCounterTargetHttpsProxyList++;
if (buildCounterTargetHttpsProxyList < 3) {
o.id = "foo";
o.items = buildUnnamed2527();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetHttpsProxyListWarning();
}
buildCounterTargetHttpsProxyList--;
return o;
}
checkTargetHttpsProxyList(api.TargetHttpsProxyList o) {
buildCounterTargetHttpsProxyList++;
if (buildCounterTargetHttpsProxyList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2527(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetHttpsProxyListWarning(o.warning);
}
buildCounterTargetHttpsProxyList--;
}
core.int buildCounterTargetInstance = 0;
buildTargetInstance() {
var o = new api.TargetInstance();
buildCounterTargetInstance++;
if (buildCounterTargetInstance < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.instance = "foo";
o.kind = "foo";
o.name = "foo";
o.natPolicy = "foo";
o.selfLink = "foo";
o.zone = "foo";
}
buildCounterTargetInstance--;
return o;
}
checkTargetInstance(api.TargetInstance o) {
buildCounterTargetInstance++;
if (buildCounterTargetInstance < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.instance, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.natPolicy, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.zone, unittest.equals('foo'));
}
buildCounterTargetInstance--;
}
buildUnnamed2529() {
var o = new core.Map<core.String, api.TargetInstancesScopedList>();
o["x"] = buildTargetInstancesScopedList();
o["y"] = buildTargetInstancesScopedList();
return o;
}
checkUnnamed2529(core.Map<core.String, api.TargetInstancesScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstancesScopedList(o["x"]);
checkTargetInstancesScopedList(o["y"]);
}
core.int buildCounterTargetInstanceAggregatedListWarningData = 0;
buildTargetInstanceAggregatedListWarningData() {
var o = new api.TargetInstanceAggregatedListWarningData();
buildCounterTargetInstanceAggregatedListWarningData++;
if (buildCounterTargetInstanceAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetInstanceAggregatedListWarningData--;
return o;
}
checkTargetInstanceAggregatedListWarningData(
api.TargetInstanceAggregatedListWarningData o) {
buildCounterTargetInstanceAggregatedListWarningData++;
if (buildCounterTargetInstanceAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetInstanceAggregatedListWarningData--;
}
buildUnnamed2530() {
var o = new core.List<api.TargetInstanceAggregatedListWarningData>();
o.add(buildTargetInstanceAggregatedListWarningData());
o.add(buildTargetInstanceAggregatedListWarningData());
return o;
}
checkUnnamed2530(core.List<api.TargetInstanceAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstanceAggregatedListWarningData(o[0]);
checkTargetInstanceAggregatedListWarningData(o[1]);
}
core.int buildCounterTargetInstanceAggregatedListWarning = 0;
buildTargetInstanceAggregatedListWarning() {
var o = new api.TargetInstanceAggregatedListWarning();
buildCounterTargetInstanceAggregatedListWarning++;
if (buildCounterTargetInstanceAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2530();
o.message = "foo";
}
buildCounterTargetInstanceAggregatedListWarning--;
return o;
}
checkTargetInstanceAggregatedListWarning(
api.TargetInstanceAggregatedListWarning o) {
buildCounterTargetInstanceAggregatedListWarning++;
if (buildCounterTargetInstanceAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2530(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetInstanceAggregatedListWarning--;
}
core.int buildCounterTargetInstanceAggregatedList = 0;
buildTargetInstanceAggregatedList() {
var o = new api.TargetInstanceAggregatedList();
buildCounterTargetInstanceAggregatedList++;
if (buildCounterTargetInstanceAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2529();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetInstanceAggregatedListWarning();
}
buildCounterTargetInstanceAggregatedList--;
return o;
}
checkTargetInstanceAggregatedList(api.TargetInstanceAggregatedList o) {
buildCounterTargetInstanceAggregatedList++;
if (buildCounterTargetInstanceAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2529(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetInstanceAggregatedListWarning(o.warning);
}
buildCounterTargetInstanceAggregatedList--;
}
buildUnnamed2531() {
var o = new core.List<api.TargetInstance>();
o.add(buildTargetInstance());
o.add(buildTargetInstance());
return o;
}
checkUnnamed2531(core.List<api.TargetInstance> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstance(o[0]);
checkTargetInstance(o[1]);
}
core.int buildCounterTargetInstanceListWarningData = 0;
buildTargetInstanceListWarningData() {
var o = new api.TargetInstanceListWarningData();
buildCounterTargetInstanceListWarningData++;
if (buildCounterTargetInstanceListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetInstanceListWarningData--;
return o;
}
checkTargetInstanceListWarningData(api.TargetInstanceListWarningData o) {
buildCounterTargetInstanceListWarningData++;
if (buildCounterTargetInstanceListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetInstanceListWarningData--;
}
buildUnnamed2532() {
var o = new core.List<api.TargetInstanceListWarningData>();
o.add(buildTargetInstanceListWarningData());
o.add(buildTargetInstanceListWarningData());
return o;
}
checkUnnamed2532(core.List<api.TargetInstanceListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstanceListWarningData(o[0]);
checkTargetInstanceListWarningData(o[1]);
}
core.int buildCounterTargetInstanceListWarning = 0;
buildTargetInstanceListWarning() {
var o = new api.TargetInstanceListWarning();
buildCounterTargetInstanceListWarning++;
if (buildCounterTargetInstanceListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2532();
o.message = "foo";
}
buildCounterTargetInstanceListWarning--;
return o;
}
checkTargetInstanceListWarning(api.TargetInstanceListWarning o) {
buildCounterTargetInstanceListWarning++;
if (buildCounterTargetInstanceListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2532(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetInstanceListWarning--;
}
core.int buildCounterTargetInstanceList = 0;
buildTargetInstanceList() {
var o = new api.TargetInstanceList();
buildCounterTargetInstanceList++;
if (buildCounterTargetInstanceList < 3) {
o.id = "foo";
o.items = buildUnnamed2531();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetInstanceListWarning();
}
buildCounterTargetInstanceList--;
return o;
}
checkTargetInstanceList(api.TargetInstanceList o) {
buildCounterTargetInstanceList++;
if (buildCounterTargetInstanceList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2531(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetInstanceListWarning(o.warning);
}
buildCounterTargetInstanceList--;
}
buildUnnamed2533() {
var o = new core.List<api.TargetInstance>();
o.add(buildTargetInstance());
o.add(buildTargetInstance());
return o;
}
checkUnnamed2533(core.List<api.TargetInstance> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstance(o[0]);
checkTargetInstance(o[1]);
}
core.int buildCounterTargetInstancesScopedListWarningData = 0;
buildTargetInstancesScopedListWarningData() {
var o = new api.TargetInstancesScopedListWarningData();
buildCounterTargetInstancesScopedListWarningData++;
if (buildCounterTargetInstancesScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetInstancesScopedListWarningData--;
return o;
}
checkTargetInstancesScopedListWarningData(
api.TargetInstancesScopedListWarningData o) {
buildCounterTargetInstancesScopedListWarningData++;
if (buildCounterTargetInstancesScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetInstancesScopedListWarningData--;
}
buildUnnamed2534() {
var o = new core.List<api.TargetInstancesScopedListWarningData>();
o.add(buildTargetInstancesScopedListWarningData());
o.add(buildTargetInstancesScopedListWarningData());
return o;
}
checkUnnamed2534(core.List<api.TargetInstancesScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetInstancesScopedListWarningData(o[0]);
checkTargetInstancesScopedListWarningData(o[1]);
}
core.int buildCounterTargetInstancesScopedListWarning = 0;
buildTargetInstancesScopedListWarning() {
var o = new api.TargetInstancesScopedListWarning();
buildCounterTargetInstancesScopedListWarning++;
if (buildCounterTargetInstancesScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2534();
o.message = "foo";
}
buildCounterTargetInstancesScopedListWarning--;
return o;
}
checkTargetInstancesScopedListWarning(api.TargetInstancesScopedListWarning o) {
buildCounterTargetInstancesScopedListWarning++;
if (buildCounterTargetInstancesScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2534(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetInstancesScopedListWarning--;
}
core.int buildCounterTargetInstancesScopedList = 0;
buildTargetInstancesScopedList() {
var o = new api.TargetInstancesScopedList();
buildCounterTargetInstancesScopedList++;
if (buildCounterTargetInstancesScopedList < 3) {
o.targetInstances = buildUnnamed2533();
o.warning = buildTargetInstancesScopedListWarning();
}
buildCounterTargetInstancesScopedList--;
return o;
}
checkTargetInstancesScopedList(api.TargetInstancesScopedList o) {
buildCounterTargetInstancesScopedList++;
if (buildCounterTargetInstancesScopedList < 3) {
checkUnnamed2533(o.targetInstances);
checkTargetInstancesScopedListWarning(o.warning);
}
buildCounterTargetInstancesScopedList--;
}
buildUnnamed2535() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2535(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'));
}
buildUnnamed2536() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2536(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 buildCounterTargetPool = 0;
buildTargetPool() {
var o = new api.TargetPool();
buildCounterTargetPool++;
if (buildCounterTargetPool < 3) {
o.backupPool = "foo";
o.creationTimestamp = "foo";
o.description = "foo";
o.failoverRatio = 42.0;
o.healthChecks = buildUnnamed2535();
o.id = "foo";
o.instances = buildUnnamed2536();
o.kind = "foo";
o.name = "foo";
o.region = "foo";
o.selfLink = "foo";
o.sessionAffinity = "foo";
}
buildCounterTargetPool--;
return o;
}
checkTargetPool(api.TargetPool o) {
buildCounterTargetPool++;
if (buildCounterTargetPool < 3) {
unittest.expect(o.backupPool, unittest.equals('foo'));
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.failoverRatio, unittest.equals(42.0));
checkUnnamed2535(o.healthChecks);
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2536(o.instances);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.sessionAffinity, unittest.equals('foo'));
}
buildCounterTargetPool--;
}
buildUnnamed2537() {
var o = new core.Map<core.String, api.TargetPoolsScopedList>();
o["x"] = buildTargetPoolsScopedList();
o["y"] = buildTargetPoolsScopedList();
return o;
}
checkUnnamed2537(core.Map<core.String, api.TargetPoolsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPoolsScopedList(o["x"]);
checkTargetPoolsScopedList(o["y"]);
}
core.int buildCounterTargetPoolAggregatedListWarningData = 0;
buildTargetPoolAggregatedListWarningData() {
var o = new api.TargetPoolAggregatedListWarningData();
buildCounterTargetPoolAggregatedListWarningData++;
if (buildCounterTargetPoolAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetPoolAggregatedListWarningData--;
return o;
}
checkTargetPoolAggregatedListWarningData(
api.TargetPoolAggregatedListWarningData o) {
buildCounterTargetPoolAggregatedListWarningData++;
if (buildCounterTargetPoolAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetPoolAggregatedListWarningData--;
}
buildUnnamed2538() {
var o = new core.List<api.TargetPoolAggregatedListWarningData>();
o.add(buildTargetPoolAggregatedListWarningData());
o.add(buildTargetPoolAggregatedListWarningData());
return o;
}
checkUnnamed2538(core.List<api.TargetPoolAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPoolAggregatedListWarningData(o[0]);
checkTargetPoolAggregatedListWarningData(o[1]);
}
core.int buildCounterTargetPoolAggregatedListWarning = 0;
buildTargetPoolAggregatedListWarning() {
var o = new api.TargetPoolAggregatedListWarning();
buildCounterTargetPoolAggregatedListWarning++;
if (buildCounterTargetPoolAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2538();
o.message = "foo";
}
buildCounterTargetPoolAggregatedListWarning--;
return o;
}
checkTargetPoolAggregatedListWarning(api.TargetPoolAggregatedListWarning o) {
buildCounterTargetPoolAggregatedListWarning++;
if (buildCounterTargetPoolAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2538(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetPoolAggregatedListWarning--;
}
core.int buildCounterTargetPoolAggregatedList = 0;
buildTargetPoolAggregatedList() {
var o = new api.TargetPoolAggregatedList();
buildCounterTargetPoolAggregatedList++;
if (buildCounterTargetPoolAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2537();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetPoolAggregatedListWarning();
}
buildCounterTargetPoolAggregatedList--;
return o;
}
checkTargetPoolAggregatedList(api.TargetPoolAggregatedList o) {
buildCounterTargetPoolAggregatedList++;
if (buildCounterTargetPoolAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2537(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetPoolAggregatedListWarning(o.warning);
}
buildCounterTargetPoolAggregatedList--;
}
buildUnnamed2539() {
var o = new core.List<api.HealthStatus>();
o.add(buildHealthStatus());
o.add(buildHealthStatus());
return o;
}
checkUnnamed2539(core.List<api.HealthStatus> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthStatus(o[0]);
checkHealthStatus(o[1]);
}
core.int buildCounterTargetPoolInstanceHealth = 0;
buildTargetPoolInstanceHealth() {
var o = new api.TargetPoolInstanceHealth();
buildCounterTargetPoolInstanceHealth++;
if (buildCounterTargetPoolInstanceHealth < 3) {
o.healthStatus = buildUnnamed2539();
o.kind = "foo";
}
buildCounterTargetPoolInstanceHealth--;
return o;
}
checkTargetPoolInstanceHealth(api.TargetPoolInstanceHealth o) {
buildCounterTargetPoolInstanceHealth++;
if (buildCounterTargetPoolInstanceHealth < 3) {
checkUnnamed2539(o.healthStatus);
unittest.expect(o.kind, unittest.equals('foo'));
}
buildCounterTargetPoolInstanceHealth--;
}
buildUnnamed2540() {
var o = new core.List<api.TargetPool>();
o.add(buildTargetPool());
o.add(buildTargetPool());
return o;
}
checkUnnamed2540(core.List<api.TargetPool> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPool(o[0]);
checkTargetPool(o[1]);
}
core.int buildCounterTargetPoolListWarningData = 0;
buildTargetPoolListWarningData() {
var o = new api.TargetPoolListWarningData();
buildCounterTargetPoolListWarningData++;
if (buildCounterTargetPoolListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetPoolListWarningData--;
return o;
}
checkTargetPoolListWarningData(api.TargetPoolListWarningData o) {
buildCounterTargetPoolListWarningData++;
if (buildCounterTargetPoolListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetPoolListWarningData--;
}
buildUnnamed2541() {
var o = new core.List<api.TargetPoolListWarningData>();
o.add(buildTargetPoolListWarningData());
o.add(buildTargetPoolListWarningData());
return o;
}
checkUnnamed2541(core.List<api.TargetPoolListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPoolListWarningData(o[0]);
checkTargetPoolListWarningData(o[1]);
}
core.int buildCounterTargetPoolListWarning = 0;
buildTargetPoolListWarning() {
var o = new api.TargetPoolListWarning();
buildCounterTargetPoolListWarning++;
if (buildCounterTargetPoolListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2541();
o.message = "foo";
}
buildCounterTargetPoolListWarning--;
return o;
}
checkTargetPoolListWarning(api.TargetPoolListWarning o) {
buildCounterTargetPoolListWarning++;
if (buildCounterTargetPoolListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2541(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetPoolListWarning--;
}
core.int buildCounterTargetPoolList = 0;
buildTargetPoolList() {
var o = new api.TargetPoolList();
buildCounterTargetPoolList++;
if (buildCounterTargetPoolList < 3) {
o.id = "foo";
o.items = buildUnnamed2540();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetPoolListWarning();
}
buildCounterTargetPoolList--;
return o;
}
checkTargetPoolList(api.TargetPoolList o) {
buildCounterTargetPoolList++;
if (buildCounterTargetPoolList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2540(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetPoolListWarning(o.warning);
}
buildCounterTargetPoolList--;
}
buildUnnamed2542() {
var o = new core.List<api.HealthCheckReference>();
o.add(buildHealthCheckReference());
o.add(buildHealthCheckReference());
return o;
}
checkUnnamed2542(core.List<api.HealthCheckReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthCheckReference(o[0]);
checkHealthCheckReference(o[1]);
}
core.int buildCounterTargetPoolsAddHealthCheckRequest = 0;
buildTargetPoolsAddHealthCheckRequest() {
var o = new api.TargetPoolsAddHealthCheckRequest();
buildCounterTargetPoolsAddHealthCheckRequest++;
if (buildCounterTargetPoolsAddHealthCheckRequest < 3) {
o.healthChecks = buildUnnamed2542();
}
buildCounterTargetPoolsAddHealthCheckRequest--;
return o;
}
checkTargetPoolsAddHealthCheckRequest(api.TargetPoolsAddHealthCheckRequest o) {
buildCounterTargetPoolsAddHealthCheckRequest++;
if (buildCounterTargetPoolsAddHealthCheckRequest < 3) {
checkUnnamed2542(o.healthChecks);
}
buildCounterTargetPoolsAddHealthCheckRequest--;
}
buildUnnamed2543() {
var o = new core.List<api.InstanceReference>();
o.add(buildInstanceReference());
o.add(buildInstanceReference());
return o;
}
checkUnnamed2543(core.List<api.InstanceReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceReference(o[0]);
checkInstanceReference(o[1]);
}
core.int buildCounterTargetPoolsAddInstanceRequest = 0;
buildTargetPoolsAddInstanceRequest() {
var o = new api.TargetPoolsAddInstanceRequest();
buildCounterTargetPoolsAddInstanceRequest++;
if (buildCounterTargetPoolsAddInstanceRequest < 3) {
o.instances = buildUnnamed2543();
}
buildCounterTargetPoolsAddInstanceRequest--;
return o;
}
checkTargetPoolsAddInstanceRequest(api.TargetPoolsAddInstanceRequest o) {
buildCounterTargetPoolsAddInstanceRequest++;
if (buildCounterTargetPoolsAddInstanceRequest < 3) {
checkUnnamed2543(o.instances);
}
buildCounterTargetPoolsAddInstanceRequest--;
}
buildUnnamed2544() {
var o = new core.List<api.HealthCheckReference>();
o.add(buildHealthCheckReference());
o.add(buildHealthCheckReference());
return o;
}
checkUnnamed2544(core.List<api.HealthCheckReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkHealthCheckReference(o[0]);
checkHealthCheckReference(o[1]);
}
core.int buildCounterTargetPoolsRemoveHealthCheckRequest = 0;
buildTargetPoolsRemoveHealthCheckRequest() {
var o = new api.TargetPoolsRemoveHealthCheckRequest();
buildCounterTargetPoolsRemoveHealthCheckRequest++;
if (buildCounterTargetPoolsRemoveHealthCheckRequest < 3) {
o.healthChecks = buildUnnamed2544();
}
buildCounterTargetPoolsRemoveHealthCheckRequest--;
return o;
}
checkTargetPoolsRemoveHealthCheckRequest(
api.TargetPoolsRemoveHealthCheckRequest o) {
buildCounterTargetPoolsRemoveHealthCheckRequest++;
if (buildCounterTargetPoolsRemoveHealthCheckRequest < 3) {
checkUnnamed2544(o.healthChecks);
}
buildCounterTargetPoolsRemoveHealthCheckRequest--;
}
buildUnnamed2545() {
var o = new core.List<api.InstanceReference>();
o.add(buildInstanceReference());
o.add(buildInstanceReference());
return o;
}
checkUnnamed2545(core.List<api.InstanceReference> o) {
unittest.expect(o, unittest.hasLength(2));
checkInstanceReference(o[0]);
checkInstanceReference(o[1]);
}
core.int buildCounterTargetPoolsRemoveInstanceRequest = 0;
buildTargetPoolsRemoveInstanceRequest() {
var o = new api.TargetPoolsRemoveInstanceRequest();
buildCounterTargetPoolsRemoveInstanceRequest++;
if (buildCounterTargetPoolsRemoveInstanceRequest < 3) {
o.instances = buildUnnamed2545();
}
buildCounterTargetPoolsRemoveInstanceRequest--;
return o;
}
checkTargetPoolsRemoveInstanceRequest(api.TargetPoolsRemoveInstanceRequest o) {
buildCounterTargetPoolsRemoveInstanceRequest++;
if (buildCounterTargetPoolsRemoveInstanceRequest < 3) {
checkUnnamed2545(o.instances);
}
buildCounterTargetPoolsRemoveInstanceRequest--;
}
buildUnnamed2546() {
var o = new core.List<api.TargetPool>();
o.add(buildTargetPool());
o.add(buildTargetPool());
return o;
}
checkUnnamed2546(core.List<api.TargetPool> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPool(o[0]);
checkTargetPool(o[1]);
}
core.int buildCounterTargetPoolsScopedListWarningData = 0;
buildTargetPoolsScopedListWarningData() {
var o = new api.TargetPoolsScopedListWarningData();
buildCounterTargetPoolsScopedListWarningData++;
if (buildCounterTargetPoolsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetPoolsScopedListWarningData--;
return o;
}
checkTargetPoolsScopedListWarningData(api.TargetPoolsScopedListWarningData o) {
buildCounterTargetPoolsScopedListWarningData++;
if (buildCounterTargetPoolsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetPoolsScopedListWarningData--;
}
buildUnnamed2547() {
var o = new core.List<api.TargetPoolsScopedListWarningData>();
o.add(buildTargetPoolsScopedListWarningData());
o.add(buildTargetPoolsScopedListWarningData());
return o;
}
checkUnnamed2547(core.List<api.TargetPoolsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetPoolsScopedListWarningData(o[0]);
checkTargetPoolsScopedListWarningData(o[1]);
}
core.int buildCounterTargetPoolsScopedListWarning = 0;
buildTargetPoolsScopedListWarning() {
var o = new api.TargetPoolsScopedListWarning();
buildCounterTargetPoolsScopedListWarning++;
if (buildCounterTargetPoolsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2547();
o.message = "foo";
}
buildCounterTargetPoolsScopedListWarning--;
return o;
}
checkTargetPoolsScopedListWarning(api.TargetPoolsScopedListWarning o) {
buildCounterTargetPoolsScopedListWarning++;
if (buildCounterTargetPoolsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2547(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetPoolsScopedListWarning--;
}
core.int buildCounterTargetPoolsScopedList = 0;
buildTargetPoolsScopedList() {
var o = new api.TargetPoolsScopedList();
buildCounterTargetPoolsScopedList++;
if (buildCounterTargetPoolsScopedList < 3) {
o.targetPools = buildUnnamed2546();
o.warning = buildTargetPoolsScopedListWarning();
}
buildCounterTargetPoolsScopedList--;
return o;
}
checkTargetPoolsScopedList(api.TargetPoolsScopedList o) {
buildCounterTargetPoolsScopedList++;
if (buildCounterTargetPoolsScopedList < 3) {
checkUnnamed2546(o.targetPools);
checkTargetPoolsScopedListWarning(o.warning);
}
buildCounterTargetPoolsScopedList--;
}
core.int buildCounterTargetReference = 0;
buildTargetReference() {
var o = new api.TargetReference();
buildCounterTargetReference++;
if (buildCounterTargetReference < 3) {
o.target = "foo";
}
buildCounterTargetReference--;
return o;
}
checkTargetReference(api.TargetReference o) {
buildCounterTargetReference++;
if (buildCounterTargetReference < 3) {
unittest.expect(o.target, unittest.equals('foo'));
}
buildCounterTargetReference--;
}
core.int buildCounterTargetSslProxiesSetBackendServiceRequest = 0;
buildTargetSslProxiesSetBackendServiceRequest() {
var o = new api.TargetSslProxiesSetBackendServiceRequest();
buildCounterTargetSslProxiesSetBackendServiceRequest++;
if (buildCounterTargetSslProxiesSetBackendServiceRequest < 3) {
o.service = "foo";
}
buildCounterTargetSslProxiesSetBackendServiceRequest--;
return o;
}
checkTargetSslProxiesSetBackendServiceRequest(
api.TargetSslProxiesSetBackendServiceRequest o) {
buildCounterTargetSslProxiesSetBackendServiceRequest++;
if (buildCounterTargetSslProxiesSetBackendServiceRequest < 3) {
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterTargetSslProxiesSetBackendServiceRequest--;
}
core.int buildCounterTargetSslProxiesSetProxyHeaderRequest = 0;
buildTargetSslProxiesSetProxyHeaderRequest() {
var o = new api.TargetSslProxiesSetProxyHeaderRequest();
buildCounterTargetSslProxiesSetProxyHeaderRequest++;
if (buildCounterTargetSslProxiesSetProxyHeaderRequest < 3) {
o.proxyHeader = "foo";
}
buildCounterTargetSslProxiesSetProxyHeaderRequest--;
return o;
}
checkTargetSslProxiesSetProxyHeaderRequest(
api.TargetSslProxiesSetProxyHeaderRequest o) {
buildCounterTargetSslProxiesSetProxyHeaderRequest++;
if (buildCounterTargetSslProxiesSetProxyHeaderRequest < 3) {
unittest.expect(o.proxyHeader, unittest.equals('foo'));
}
buildCounterTargetSslProxiesSetProxyHeaderRequest--;
}
buildUnnamed2548() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2548(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 buildCounterTargetSslProxiesSetSslCertificatesRequest = 0;
buildTargetSslProxiesSetSslCertificatesRequest() {
var o = new api.TargetSslProxiesSetSslCertificatesRequest();
buildCounterTargetSslProxiesSetSslCertificatesRequest++;
if (buildCounterTargetSslProxiesSetSslCertificatesRequest < 3) {
o.sslCertificates = buildUnnamed2548();
}
buildCounterTargetSslProxiesSetSslCertificatesRequest--;
return o;
}
checkTargetSslProxiesSetSslCertificatesRequest(
api.TargetSslProxiesSetSslCertificatesRequest o) {
buildCounterTargetSslProxiesSetSslCertificatesRequest++;
if (buildCounterTargetSslProxiesSetSslCertificatesRequest < 3) {
checkUnnamed2548(o.sslCertificates);
}
buildCounterTargetSslProxiesSetSslCertificatesRequest--;
}
buildUnnamed2549() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2549(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 buildCounterTargetSslProxy = 0;
buildTargetSslProxy() {
var o = new api.TargetSslProxy();
buildCounterTargetSslProxy++;
if (buildCounterTargetSslProxy < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.proxyHeader = "foo";
o.selfLink = "foo";
o.service = "foo";
o.sslCertificates = buildUnnamed2549();
}
buildCounterTargetSslProxy--;
return o;
}
checkTargetSslProxy(api.TargetSslProxy o) {
buildCounterTargetSslProxy++;
if (buildCounterTargetSslProxy < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.service, unittest.equals('foo'));
checkUnnamed2549(o.sslCertificates);
}
buildCounterTargetSslProxy--;
}
buildUnnamed2550() {
var o = new core.List<api.TargetSslProxy>();
o.add(buildTargetSslProxy());
o.add(buildTargetSslProxy());
return o;
}
checkUnnamed2550(core.List<api.TargetSslProxy> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetSslProxy(o[0]);
checkTargetSslProxy(o[1]);
}
core.int buildCounterTargetSslProxyListWarningData = 0;
buildTargetSslProxyListWarningData() {
var o = new api.TargetSslProxyListWarningData();
buildCounterTargetSslProxyListWarningData++;
if (buildCounterTargetSslProxyListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetSslProxyListWarningData--;
return o;
}
checkTargetSslProxyListWarningData(api.TargetSslProxyListWarningData o) {
buildCounterTargetSslProxyListWarningData++;
if (buildCounterTargetSslProxyListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetSslProxyListWarningData--;
}
buildUnnamed2551() {
var o = new core.List<api.TargetSslProxyListWarningData>();
o.add(buildTargetSslProxyListWarningData());
o.add(buildTargetSslProxyListWarningData());
return o;
}
checkUnnamed2551(core.List<api.TargetSslProxyListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetSslProxyListWarningData(o[0]);
checkTargetSslProxyListWarningData(o[1]);
}
core.int buildCounterTargetSslProxyListWarning = 0;
buildTargetSslProxyListWarning() {
var o = new api.TargetSslProxyListWarning();
buildCounterTargetSslProxyListWarning++;
if (buildCounterTargetSslProxyListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2551();
o.message = "foo";
}
buildCounterTargetSslProxyListWarning--;
return o;
}
checkTargetSslProxyListWarning(api.TargetSslProxyListWarning o) {
buildCounterTargetSslProxyListWarning++;
if (buildCounterTargetSslProxyListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2551(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetSslProxyListWarning--;
}
core.int buildCounterTargetSslProxyList = 0;
buildTargetSslProxyList() {
var o = new api.TargetSslProxyList();
buildCounterTargetSslProxyList++;
if (buildCounterTargetSslProxyList < 3) {
o.id = "foo";
o.items = buildUnnamed2550();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetSslProxyListWarning();
}
buildCounterTargetSslProxyList--;
return o;
}
checkTargetSslProxyList(api.TargetSslProxyList o) {
buildCounterTargetSslProxyList++;
if (buildCounterTargetSslProxyList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2550(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetSslProxyListWarning(o.warning);
}
buildCounterTargetSslProxyList--;
}
core.int buildCounterTargetTcpProxiesSetBackendServiceRequest = 0;
buildTargetTcpProxiesSetBackendServiceRequest() {
var o = new api.TargetTcpProxiesSetBackendServiceRequest();
buildCounterTargetTcpProxiesSetBackendServiceRequest++;
if (buildCounterTargetTcpProxiesSetBackendServiceRequest < 3) {
o.service = "foo";
}
buildCounterTargetTcpProxiesSetBackendServiceRequest--;
return o;
}
checkTargetTcpProxiesSetBackendServiceRequest(
api.TargetTcpProxiesSetBackendServiceRequest o) {
buildCounterTargetTcpProxiesSetBackendServiceRequest++;
if (buildCounterTargetTcpProxiesSetBackendServiceRequest < 3) {
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterTargetTcpProxiesSetBackendServiceRequest--;
}
core.int buildCounterTargetTcpProxiesSetProxyHeaderRequest = 0;
buildTargetTcpProxiesSetProxyHeaderRequest() {
var o = new api.TargetTcpProxiesSetProxyHeaderRequest();
buildCounterTargetTcpProxiesSetProxyHeaderRequest++;
if (buildCounterTargetTcpProxiesSetProxyHeaderRequest < 3) {
o.proxyHeader = "foo";
}
buildCounterTargetTcpProxiesSetProxyHeaderRequest--;
return o;
}
checkTargetTcpProxiesSetProxyHeaderRequest(
api.TargetTcpProxiesSetProxyHeaderRequest o) {
buildCounterTargetTcpProxiesSetProxyHeaderRequest++;
if (buildCounterTargetTcpProxiesSetProxyHeaderRequest < 3) {
unittest.expect(o.proxyHeader, unittest.equals('foo'));
}
buildCounterTargetTcpProxiesSetProxyHeaderRequest--;
}
core.int buildCounterTargetTcpProxy = 0;
buildTargetTcpProxy() {
var o = new api.TargetTcpProxy();
buildCounterTargetTcpProxy++;
if (buildCounterTargetTcpProxy < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.proxyHeader = "foo";
o.selfLink = "foo";
o.service = "foo";
}
buildCounterTargetTcpProxy--;
return o;
}
checkTargetTcpProxy(api.TargetTcpProxy o) {
buildCounterTargetTcpProxy++;
if (buildCounterTargetTcpProxy < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.proxyHeader, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterTargetTcpProxy--;
}
buildUnnamed2552() {
var o = new core.List<api.TargetTcpProxy>();
o.add(buildTargetTcpProxy());
o.add(buildTargetTcpProxy());
return o;
}
checkUnnamed2552(core.List<api.TargetTcpProxy> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetTcpProxy(o[0]);
checkTargetTcpProxy(o[1]);
}
core.int buildCounterTargetTcpProxyListWarningData = 0;
buildTargetTcpProxyListWarningData() {
var o = new api.TargetTcpProxyListWarningData();
buildCounterTargetTcpProxyListWarningData++;
if (buildCounterTargetTcpProxyListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetTcpProxyListWarningData--;
return o;
}
checkTargetTcpProxyListWarningData(api.TargetTcpProxyListWarningData o) {
buildCounterTargetTcpProxyListWarningData++;
if (buildCounterTargetTcpProxyListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetTcpProxyListWarningData--;
}
buildUnnamed2553() {
var o = new core.List<api.TargetTcpProxyListWarningData>();
o.add(buildTargetTcpProxyListWarningData());
o.add(buildTargetTcpProxyListWarningData());
return o;
}
checkUnnamed2553(core.List<api.TargetTcpProxyListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetTcpProxyListWarningData(o[0]);
checkTargetTcpProxyListWarningData(o[1]);
}
core.int buildCounterTargetTcpProxyListWarning = 0;
buildTargetTcpProxyListWarning() {
var o = new api.TargetTcpProxyListWarning();
buildCounterTargetTcpProxyListWarning++;
if (buildCounterTargetTcpProxyListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2553();
o.message = "foo";
}
buildCounterTargetTcpProxyListWarning--;
return o;
}
checkTargetTcpProxyListWarning(api.TargetTcpProxyListWarning o) {
buildCounterTargetTcpProxyListWarning++;
if (buildCounterTargetTcpProxyListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2553(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetTcpProxyListWarning--;
}
core.int buildCounterTargetTcpProxyList = 0;
buildTargetTcpProxyList() {
var o = new api.TargetTcpProxyList();
buildCounterTargetTcpProxyList++;
if (buildCounterTargetTcpProxyList < 3) {
o.id = "foo";
o.items = buildUnnamed2552();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetTcpProxyListWarning();
}
buildCounterTargetTcpProxyList--;
return o;
}
checkTargetTcpProxyList(api.TargetTcpProxyList o) {
buildCounterTargetTcpProxyList++;
if (buildCounterTargetTcpProxyList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2552(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetTcpProxyListWarning(o.warning);
}
buildCounterTargetTcpProxyList--;
}
buildUnnamed2554() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2554(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'));
}
buildUnnamed2555() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2555(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 buildCounterTargetVpnGateway = 0;
buildTargetVpnGateway() {
var o = new api.TargetVpnGateway();
buildCounterTargetVpnGateway++;
if (buildCounterTargetVpnGateway < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.forwardingRules = buildUnnamed2554();
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.network = "foo";
o.region = "foo";
o.selfLink = "foo";
o.status = "foo";
o.tunnels = buildUnnamed2555();
}
buildCounterTargetVpnGateway--;
return o;
}
checkTargetVpnGateway(api.TargetVpnGateway o) {
buildCounterTargetVpnGateway++;
if (buildCounterTargetVpnGateway < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
checkUnnamed2554(o.forwardingRules);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.network, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
checkUnnamed2555(o.tunnels);
}
buildCounterTargetVpnGateway--;
}
buildUnnamed2556() {
var o = new core.Map<core.String, api.TargetVpnGatewaysScopedList>();
o["x"] = buildTargetVpnGatewaysScopedList();
o["y"] = buildTargetVpnGatewaysScopedList();
return o;
}
checkUnnamed2556(core.Map<core.String, api.TargetVpnGatewaysScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGatewaysScopedList(o["x"]);
checkTargetVpnGatewaysScopedList(o["y"]);
}
core.int buildCounterTargetVpnGatewayAggregatedListWarningData = 0;
buildTargetVpnGatewayAggregatedListWarningData() {
var o = new api.TargetVpnGatewayAggregatedListWarningData();
buildCounterTargetVpnGatewayAggregatedListWarningData++;
if (buildCounterTargetVpnGatewayAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetVpnGatewayAggregatedListWarningData--;
return o;
}
checkTargetVpnGatewayAggregatedListWarningData(
api.TargetVpnGatewayAggregatedListWarningData o) {
buildCounterTargetVpnGatewayAggregatedListWarningData++;
if (buildCounterTargetVpnGatewayAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetVpnGatewayAggregatedListWarningData--;
}
buildUnnamed2557() {
var o = new core.List<api.TargetVpnGatewayAggregatedListWarningData>();
o.add(buildTargetVpnGatewayAggregatedListWarningData());
o.add(buildTargetVpnGatewayAggregatedListWarningData());
return o;
}
checkUnnamed2557(core.List<api.TargetVpnGatewayAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGatewayAggregatedListWarningData(o[0]);
checkTargetVpnGatewayAggregatedListWarningData(o[1]);
}
core.int buildCounterTargetVpnGatewayAggregatedListWarning = 0;
buildTargetVpnGatewayAggregatedListWarning() {
var o = new api.TargetVpnGatewayAggregatedListWarning();
buildCounterTargetVpnGatewayAggregatedListWarning++;
if (buildCounterTargetVpnGatewayAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2557();
o.message = "foo";
}
buildCounterTargetVpnGatewayAggregatedListWarning--;
return o;
}
checkTargetVpnGatewayAggregatedListWarning(
api.TargetVpnGatewayAggregatedListWarning o) {
buildCounterTargetVpnGatewayAggregatedListWarning++;
if (buildCounterTargetVpnGatewayAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2557(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetVpnGatewayAggregatedListWarning--;
}
core.int buildCounterTargetVpnGatewayAggregatedList = 0;
buildTargetVpnGatewayAggregatedList() {
var o = new api.TargetVpnGatewayAggregatedList();
buildCounterTargetVpnGatewayAggregatedList++;
if (buildCounterTargetVpnGatewayAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2556();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetVpnGatewayAggregatedListWarning();
}
buildCounterTargetVpnGatewayAggregatedList--;
return o;
}
checkTargetVpnGatewayAggregatedList(api.TargetVpnGatewayAggregatedList o) {
buildCounterTargetVpnGatewayAggregatedList++;
if (buildCounterTargetVpnGatewayAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2556(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetVpnGatewayAggregatedListWarning(o.warning);
}
buildCounterTargetVpnGatewayAggregatedList--;
}
buildUnnamed2558() {
var o = new core.List<api.TargetVpnGateway>();
o.add(buildTargetVpnGateway());
o.add(buildTargetVpnGateway());
return o;
}
checkUnnamed2558(core.List<api.TargetVpnGateway> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGateway(o[0]);
checkTargetVpnGateway(o[1]);
}
core.int buildCounterTargetVpnGatewayListWarningData = 0;
buildTargetVpnGatewayListWarningData() {
var o = new api.TargetVpnGatewayListWarningData();
buildCounterTargetVpnGatewayListWarningData++;
if (buildCounterTargetVpnGatewayListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetVpnGatewayListWarningData--;
return o;
}
checkTargetVpnGatewayListWarningData(api.TargetVpnGatewayListWarningData o) {
buildCounterTargetVpnGatewayListWarningData++;
if (buildCounterTargetVpnGatewayListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetVpnGatewayListWarningData--;
}
buildUnnamed2559() {
var o = new core.List<api.TargetVpnGatewayListWarningData>();
o.add(buildTargetVpnGatewayListWarningData());
o.add(buildTargetVpnGatewayListWarningData());
return o;
}
checkUnnamed2559(core.List<api.TargetVpnGatewayListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGatewayListWarningData(o[0]);
checkTargetVpnGatewayListWarningData(o[1]);
}
core.int buildCounterTargetVpnGatewayListWarning = 0;
buildTargetVpnGatewayListWarning() {
var o = new api.TargetVpnGatewayListWarning();
buildCounterTargetVpnGatewayListWarning++;
if (buildCounterTargetVpnGatewayListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2559();
o.message = "foo";
}
buildCounterTargetVpnGatewayListWarning--;
return o;
}
checkTargetVpnGatewayListWarning(api.TargetVpnGatewayListWarning o) {
buildCounterTargetVpnGatewayListWarning++;
if (buildCounterTargetVpnGatewayListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2559(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetVpnGatewayListWarning--;
}
core.int buildCounterTargetVpnGatewayList = 0;
buildTargetVpnGatewayList() {
var o = new api.TargetVpnGatewayList();
buildCounterTargetVpnGatewayList++;
if (buildCounterTargetVpnGatewayList < 3) {
o.id = "foo";
o.items = buildUnnamed2558();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildTargetVpnGatewayListWarning();
}
buildCounterTargetVpnGatewayList--;
return o;
}
checkTargetVpnGatewayList(api.TargetVpnGatewayList o) {
buildCounterTargetVpnGatewayList++;
if (buildCounterTargetVpnGatewayList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2558(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkTargetVpnGatewayListWarning(o.warning);
}
buildCounterTargetVpnGatewayList--;
}
buildUnnamed2560() {
var o = new core.List<api.TargetVpnGateway>();
o.add(buildTargetVpnGateway());
o.add(buildTargetVpnGateway());
return o;
}
checkUnnamed2560(core.List<api.TargetVpnGateway> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGateway(o[0]);
checkTargetVpnGateway(o[1]);
}
core.int buildCounterTargetVpnGatewaysScopedListWarningData = 0;
buildTargetVpnGatewaysScopedListWarningData() {
var o = new api.TargetVpnGatewaysScopedListWarningData();
buildCounterTargetVpnGatewaysScopedListWarningData++;
if (buildCounterTargetVpnGatewaysScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterTargetVpnGatewaysScopedListWarningData--;
return o;
}
checkTargetVpnGatewaysScopedListWarningData(
api.TargetVpnGatewaysScopedListWarningData o) {
buildCounterTargetVpnGatewaysScopedListWarningData++;
if (buildCounterTargetVpnGatewaysScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterTargetVpnGatewaysScopedListWarningData--;
}
buildUnnamed2561() {
var o = new core.List<api.TargetVpnGatewaysScopedListWarningData>();
o.add(buildTargetVpnGatewaysScopedListWarningData());
o.add(buildTargetVpnGatewaysScopedListWarningData());
return o;
}
checkUnnamed2561(core.List<api.TargetVpnGatewaysScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkTargetVpnGatewaysScopedListWarningData(o[0]);
checkTargetVpnGatewaysScopedListWarningData(o[1]);
}
core.int buildCounterTargetVpnGatewaysScopedListWarning = 0;
buildTargetVpnGatewaysScopedListWarning() {
var o = new api.TargetVpnGatewaysScopedListWarning();
buildCounterTargetVpnGatewaysScopedListWarning++;
if (buildCounterTargetVpnGatewaysScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2561();
o.message = "foo";
}
buildCounterTargetVpnGatewaysScopedListWarning--;
return o;
}
checkTargetVpnGatewaysScopedListWarning(
api.TargetVpnGatewaysScopedListWarning o) {
buildCounterTargetVpnGatewaysScopedListWarning++;
if (buildCounterTargetVpnGatewaysScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2561(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterTargetVpnGatewaysScopedListWarning--;
}
core.int buildCounterTargetVpnGatewaysScopedList = 0;
buildTargetVpnGatewaysScopedList() {
var o = new api.TargetVpnGatewaysScopedList();
buildCounterTargetVpnGatewaysScopedList++;
if (buildCounterTargetVpnGatewaysScopedList < 3) {
o.targetVpnGateways = buildUnnamed2560();
o.warning = buildTargetVpnGatewaysScopedListWarning();
}
buildCounterTargetVpnGatewaysScopedList--;
return o;
}
checkTargetVpnGatewaysScopedList(api.TargetVpnGatewaysScopedList o) {
buildCounterTargetVpnGatewaysScopedList++;
if (buildCounterTargetVpnGatewaysScopedList < 3) {
checkUnnamed2560(o.targetVpnGateways);
checkTargetVpnGatewaysScopedListWarning(o.warning);
}
buildCounterTargetVpnGatewaysScopedList--;
}
core.int buildCounterTestFailure = 0;
buildTestFailure() {
var o = new api.TestFailure();
buildCounterTestFailure++;
if (buildCounterTestFailure < 3) {
o.actualService = "foo";
o.expectedService = "foo";
o.host = "foo";
o.path = "foo";
}
buildCounterTestFailure--;
return o;
}
checkTestFailure(api.TestFailure o) {
buildCounterTestFailure++;
if (buildCounterTestFailure < 3) {
unittest.expect(o.actualService, unittest.equals('foo'));
unittest.expect(o.expectedService, unittest.equals('foo'));
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.path, unittest.equals('foo'));
}
buildCounterTestFailure--;
}
buildUnnamed2562() {
var o = new core.List<api.HostRule>();
o.add(buildHostRule());
o.add(buildHostRule());
return o;
}
checkUnnamed2562(core.List<api.HostRule> o) {
unittest.expect(o, unittest.hasLength(2));
checkHostRule(o[0]);
checkHostRule(o[1]);
}
buildUnnamed2563() {
var o = new core.List<api.PathMatcher>();
o.add(buildPathMatcher());
o.add(buildPathMatcher());
return o;
}
checkUnnamed2563(core.List<api.PathMatcher> o) {
unittest.expect(o, unittest.hasLength(2));
checkPathMatcher(o[0]);
checkPathMatcher(o[1]);
}
buildUnnamed2564() {
var o = new core.List<api.UrlMapTest>();
o.add(buildUrlMapTest());
o.add(buildUrlMapTest());
return o;
}
checkUnnamed2564(core.List<api.UrlMapTest> o) {
unittest.expect(o, unittest.hasLength(2));
checkUrlMapTest(o[0]);
checkUrlMapTest(o[1]);
}
core.int buildCounterUrlMap = 0;
buildUrlMap() {
var o = new api.UrlMap();
buildCounterUrlMap++;
if (buildCounterUrlMap < 3) {
o.creationTimestamp = "foo";
o.defaultService = "foo";
o.description = "foo";
o.fingerprint = "foo";
o.hostRules = buildUnnamed2562();
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.pathMatchers = buildUnnamed2563();
o.selfLink = "foo";
o.tests = buildUnnamed2564();
}
buildCounterUrlMap--;
return o;
}
checkUrlMap(api.UrlMap o) {
buildCounterUrlMap++;
if (buildCounterUrlMap < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.defaultService, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.fingerprint, unittest.equals('foo'));
checkUnnamed2562(o.hostRules);
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2563(o.pathMatchers);
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUnnamed2564(o.tests);
}
buildCounterUrlMap--;
}
buildUnnamed2565() {
var o = new core.List<api.UrlMap>();
o.add(buildUrlMap());
o.add(buildUrlMap());
return o;
}
checkUnnamed2565(core.List<api.UrlMap> o) {
unittest.expect(o, unittest.hasLength(2));
checkUrlMap(o[0]);
checkUrlMap(o[1]);
}
core.int buildCounterUrlMapListWarningData = 0;
buildUrlMapListWarningData() {
var o = new api.UrlMapListWarningData();
buildCounterUrlMapListWarningData++;
if (buildCounterUrlMapListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterUrlMapListWarningData--;
return o;
}
checkUrlMapListWarningData(api.UrlMapListWarningData o) {
buildCounterUrlMapListWarningData++;
if (buildCounterUrlMapListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterUrlMapListWarningData--;
}
buildUnnamed2566() {
var o = new core.List<api.UrlMapListWarningData>();
o.add(buildUrlMapListWarningData());
o.add(buildUrlMapListWarningData());
return o;
}
checkUnnamed2566(core.List<api.UrlMapListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkUrlMapListWarningData(o[0]);
checkUrlMapListWarningData(o[1]);
}
core.int buildCounterUrlMapListWarning = 0;
buildUrlMapListWarning() {
var o = new api.UrlMapListWarning();
buildCounterUrlMapListWarning++;
if (buildCounterUrlMapListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2566();
o.message = "foo";
}
buildCounterUrlMapListWarning--;
return o;
}
checkUrlMapListWarning(api.UrlMapListWarning o) {
buildCounterUrlMapListWarning++;
if (buildCounterUrlMapListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2566(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterUrlMapListWarning--;
}
core.int buildCounterUrlMapList = 0;
buildUrlMapList() {
var o = new api.UrlMapList();
buildCounterUrlMapList++;
if (buildCounterUrlMapList < 3) {
o.id = "foo";
o.items = buildUnnamed2565();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildUrlMapListWarning();
}
buildCounterUrlMapList--;
return o;
}
checkUrlMapList(api.UrlMapList o) {
buildCounterUrlMapList++;
if (buildCounterUrlMapList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2565(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkUrlMapListWarning(o.warning);
}
buildCounterUrlMapList--;
}
core.int buildCounterUrlMapReference = 0;
buildUrlMapReference() {
var o = new api.UrlMapReference();
buildCounterUrlMapReference++;
if (buildCounterUrlMapReference < 3) {
o.urlMap = "foo";
}
buildCounterUrlMapReference--;
return o;
}
checkUrlMapReference(api.UrlMapReference o) {
buildCounterUrlMapReference++;
if (buildCounterUrlMapReference < 3) {
unittest.expect(o.urlMap, unittest.equals('foo'));
}
buildCounterUrlMapReference--;
}
core.int buildCounterUrlMapTest = 0;
buildUrlMapTest() {
var o = new api.UrlMapTest();
buildCounterUrlMapTest++;
if (buildCounterUrlMapTest < 3) {
o.description = "foo";
o.host = "foo";
o.path = "foo";
o.service = "foo";
}
buildCounterUrlMapTest--;
return o;
}
checkUrlMapTest(api.UrlMapTest o) {
buildCounterUrlMapTest++;
if (buildCounterUrlMapTest < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.host, unittest.equals('foo'));
unittest.expect(o.path, unittest.equals('foo'));
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterUrlMapTest--;
}
buildUnnamed2567() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2567(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'));
}
buildUnnamed2568() {
var o = new core.List<api.TestFailure>();
o.add(buildTestFailure());
o.add(buildTestFailure());
return o;
}
checkUnnamed2568(core.List<api.TestFailure> o) {
unittest.expect(o, unittest.hasLength(2));
checkTestFailure(o[0]);
checkTestFailure(o[1]);
}
core.int buildCounterUrlMapValidationResult = 0;
buildUrlMapValidationResult() {
var o = new api.UrlMapValidationResult();
buildCounterUrlMapValidationResult++;
if (buildCounterUrlMapValidationResult < 3) {
o.loadErrors = buildUnnamed2567();
o.loadSucceeded = true;
o.testFailures = buildUnnamed2568();
o.testPassed = true;
}
buildCounterUrlMapValidationResult--;
return o;
}
checkUrlMapValidationResult(api.UrlMapValidationResult o) {
buildCounterUrlMapValidationResult++;
if (buildCounterUrlMapValidationResult < 3) {
checkUnnamed2567(o.loadErrors);
unittest.expect(o.loadSucceeded, unittest.isTrue);
checkUnnamed2568(o.testFailures);
unittest.expect(o.testPassed, unittest.isTrue);
}
buildCounterUrlMapValidationResult--;
}
core.int buildCounterUrlMapsValidateRequest = 0;
buildUrlMapsValidateRequest() {
var o = new api.UrlMapsValidateRequest();
buildCounterUrlMapsValidateRequest++;
if (buildCounterUrlMapsValidateRequest < 3) {
o.resource = buildUrlMap();
}
buildCounterUrlMapsValidateRequest--;
return o;
}
checkUrlMapsValidateRequest(api.UrlMapsValidateRequest o) {
buildCounterUrlMapsValidateRequest++;
if (buildCounterUrlMapsValidateRequest < 3) {
checkUrlMap(o.resource);
}
buildCounterUrlMapsValidateRequest--;
}
core.int buildCounterUrlMapsValidateResponse = 0;
buildUrlMapsValidateResponse() {
var o = new api.UrlMapsValidateResponse();
buildCounterUrlMapsValidateResponse++;
if (buildCounterUrlMapsValidateResponse < 3) {
o.result = buildUrlMapValidationResult();
}
buildCounterUrlMapsValidateResponse--;
return o;
}
checkUrlMapsValidateResponse(api.UrlMapsValidateResponse o) {
buildCounterUrlMapsValidateResponse++;
if (buildCounterUrlMapsValidateResponse < 3) {
checkUrlMapValidationResult(o.result);
}
buildCounterUrlMapsValidateResponse--;
}
core.int buildCounterUsageExportLocation = 0;
buildUsageExportLocation() {
var o = new api.UsageExportLocation();
buildCounterUsageExportLocation++;
if (buildCounterUsageExportLocation < 3) {
o.bucketName = "foo";
o.reportNamePrefix = "foo";
}
buildCounterUsageExportLocation--;
return o;
}
checkUsageExportLocation(api.UsageExportLocation o) {
buildCounterUsageExportLocation++;
if (buildCounterUsageExportLocation < 3) {
unittest.expect(o.bucketName, unittest.equals('foo'));
unittest.expect(o.reportNamePrefix, unittest.equals('foo'));
}
buildCounterUsageExportLocation--;
}
buildUnnamed2569() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2569(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'));
}
buildUnnamed2570() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2570(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 buildCounterVpnTunnel = 0;
buildVpnTunnel() {
var o = new api.VpnTunnel();
buildCounterVpnTunnel++;
if (buildCounterVpnTunnel < 3) {
o.creationTimestamp = "foo";
o.description = "foo";
o.detailedStatus = "foo";
o.id = "foo";
o.ikeVersion = 42;
o.kind = "foo";
o.localTrafficSelector = buildUnnamed2569();
o.name = "foo";
o.peerIp = "foo";
o.region = "foo";
o.remoteTrafficSelector = buildUnnamed2570();
o.router = "foo";
o.selfLink = "foo";
o.sharedSecret = "foo";
o.sharedSecretHash = "foo";
o.status = "foo";
o.targetVpnGateway = "foo";
}
buildCounterVpnTunnel--;
return o;
}
checkVpnTunnel(api.VpnTunnel o) {
buildCounterVpnTunnel++;
if (buildCounterVpnTunnel < 3) {
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.detailedStatus, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.ikeVersion, unittest.equals(42));
unittest.expect(o.kind, unittest.equals('foo'));
checkUnnamed2569(o.localTrafficSelector);
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.peerIp, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
checkUnnamed2570(o.remoteTrafficSelector);
unittest.expect(o.router, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.sharedSecret, unittest.equals('foo'));
unittest.expect(o.sharedSecretHash, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
unittest.expect(o.targetVpnGateway, unittest.equals('foo'));
}
buildCounterVpnTunnel--;
}
buildUnnamed2571() {
var o = new core.Map<core.String, api.VpnTunnelsScopedList>();
o["x"] = buildVpnTunnelsScopedList();
o["y"] = buildVpnTunnelsScopedList();
return o;
}
checkUnnamed2571(core.Map<core.String, api.VpnTunnelsScopedList> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnelsScopedList(o["x"]);
checkVpnTunnelsScopedList(o["y"]);
}
core.int buildCounterVpnTunnelAggregatedListWarningData = 0;
buildVpnTunnelAggregatedListWarningData() {
var o = new api.VpnTunnelAggregatedListWarningData();
buildCounterVpnTunnelAggregatedListWarningData++;
if (buildCounterVpnTunnelAggregatedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterVpnTunnelAggregatedListWarningData--;
return o;
}
checkVpnTunnelAggregatedListWarningData(
api.VpnTunnelAggregatedListWarningData o) {
buildCounterVpnTunnelAggregatedListWarningData++;
if (buildCounterVpnTunnelAggregatedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterVpnTunnelAggregatedListWarningData--;
}
buildUnnamed2572() {
var o = new core.List<api.VpnTunnelAggregatedListWarningData>();
o.add(buildVpnTunnelAggregatedListWarningData());
o.add(buildVpnTunnelAggregatedListWarningData());
return o;
}
checkUnnamed2572(core.List<api.VpnTunnelAggregatedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnelAggregatedListWarningData(o[0]);
checkVpnTunnelAggregatedListWarningData(o[1]);
}
core.int buildCounterVpnTunnelAggregatedListWarning = 0;
buildVpnTunnelAggregatedListWarning() {
var o = new api.VpnTunnelAggregatedListWarning();
buildCounterVpnTunnelAggregatedListWarning++;
if (buildCounterVpnTunnelAggregatedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2572();
o.message = "foo";
}
buildCounterVpnTunnelAggregatedListWarning--;
return o;
}
checkVpnTunnelAggregatedListWarning(api.VpnTunnelAggregatedListWarning o) {
buildCounterVpnTunnelAggregatedListWarning++;
if (buildCounterVpnTunnelAggregatedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2572(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterVpnTunnelAggregatedListWarning--;
}
core.int buildCounterVpnTunnelAggregatedList = 0;
buildVpnTunnelAggregatedList() {
var o = new api.VpnTunnelAggregatedList();
buildCounterVpnTunnelAggregatedList++;
if (buildCounterVpnTunnelAggregatedList < 3) {
o.id = "foo";
o.items = buildUnnamed2571();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildVpnTunnelAggregatedListWarning();
}
buildCounterVpnTunnelAggregatedList--;
return o;
}
checkVpnTunnelAggregatedList(api.VpnTunnelAggregatedList o) {
buildCounterVpnTunnelAggregatedList++;
if (buildCounterVpnTunnelAggregatedList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2571(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkVpnTunnelAggregatedListWarning(o.warning);
}
buildCounterVpnTunnelAggregatedList--;
}
buildUnnamed2573() {
var o = new core.List<api.VpnTunnel>();
o.add(buildVpnTunnel());
o.add(buildVpnTunnel());
return o;
}
checkUnnamed2573(core.List<api.VpnTunnel> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnel(o[0]);
checkVpnTunnel(o[1]);
}
core.int buildCounterVpnTunnelListWarningData = 0;
buildVpnTunnelListWarningData() {
var o = new api.VpnTunnelListWarningData();
buildCounterVpnTunnelListWarningData++;
if (buildCounterVpnTunnelListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterVpnTunnelListWarningData--;
return o;
}
checkVpnTunnelListWarningData(api.VpnTunnelListWarningData o) {
buildCounterVpnTunnelListWarningData++;
if (buildCounterVpnTunnelListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterVpnTunnelListWarningData--;
}
buildUnnamed2574() {
var o = new core.List<api.VpnTunnelListWarningData>();
o.add(buildVpnTunnelListWarningData());
o.add(buildVpnTunnelListWarningData());
return o;
}
checkUnnamed2574(core.List<api.VpnTunnelListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnelListWarningData(o[0]);
checkVpnTunnelListWarningData(o[1]);
}
core.int buildCounterVpnTunnelListWarning = 0;
buildVpnTunnelListWarning() {
var o = new api.VpnTunnelListWarning();
buildCounterVpnTunnelListWarning++;
if (buildCounterVpnTunnelListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2574();
o.message = "foo";
}
buildCounterVpnTunnelListWarning--;
return o;
}
checkVpnTunnelListWarning(api.VpnTunnelListWarning o) {
buildCounterVpnTunnelListWarning++;
if (buildCounterVpnTunnelListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2574(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterVpnTunnelListWarning--;
}
core.int buildCounterVpnTunnelList = 0;
buildVpnTunnelList() {
var o = new api.VpnTunnelList();
buildCounterVpnTunnelList++;
if (buildCounterVpnTunnelList < 3) {
o.id = "foo";
o.items = buildUnnamed2573();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildVpnTunnelListWarning();
}
buildCounterVpnTunnelList--;
return o;
}
checkVpnTunnelList(api.VpnTunnelList o) {
buildCounterVpnTunnelList++;
if (buildCounterVpnTunnelList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2573(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkVpnTunnelListWarning(o.warning);
}
buildCounterVpnTunnelList--;
}
buildUnnamed2575() {
var o = new core.List<api.VpnTunnel>();
o.add(buildVpnTunnel());
o.add(buildVpnTunnel());
return o;
}
checkUnnamed2575(core.List<api.VpnTunnel> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnel(o[0]);
checkVpnTunnel(o[1]);
}
core.int buildCounterVpnTunnelsScopedListWarningData = 0;
buildVpnTunnelsScopedListWarningData() {
var o = new api.VpnTunnelsScopedListWarningData();
buildCounterVpnTunnelsScopedListWarningData++;
if (buildCounterVpnTunnelsScopedListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterVpnTunnelsScopedListWarningData--;
return o;
}
checkVpnTunnelsScopedListWarningData(api.VpnTunnelsScopedListWarningData o) {
buildCounterVpnTunnelsScopedListWarningData++;
if (buildCounterVpnTunnelsScopedListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterVpnTunnelsScopedListWarningData--;
}
buildUnnamed2576() {
var o = new core.List<api.VpnTunnelsScopedListWarningData>();
o.add(buildVpnTunnelsScopedListWarningData());
o.add(buildVpnTunnelsScopedListWarningData());
return o;
}
checkUnnamed2576(core.List<api.VpnTunnelsScopedListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkVpnTunnelsScopedListWarningData(o[0]);
checkVpnTunnelsScopedListWarningData(o[1]);
}
core.int buildCounterVpnTunnelsScopedListWarning = 0;
buildVpnTunnelsScopedListWarning() {
var o = new api.VpnTunnelsScopedListWarning();
buildCounterVpnTunnelsScopedListWarning++;
if (buildCounterVpnTunnelsScopedListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2576();
o.message = "foo";
}
buildCounterVpnTunnelsScopedListWarning--;
return o;
}
checkVpnTunnelsScopedListWarning(api.VpnTunnelsScopedListWarning o) {
buildCounterVpnTunnelsScopedListWarning++;
if (buildCounterVpnTunnelsScopedListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2576(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterVpnTunnelsScopedListWarning--;
}
core.int buildCounterVpnTunnelsScopedList = 0;
buildVpnTunnelsScopedList() {
var o = new api.VpnTunnelsScopedList();
buildCounterVpnTunnelsScopedList++;
if (buildCounterVpnTunnelsScopedList < 3) {
o.vpnTunnels = buildUnnamed2575();
o.warning = buildVpnTunnelsScopedListWarning();
}
buildCounterVpnTunnelsScopedList--;
return o;
}
checkVpnTunnelsScopedList(api.VpnTunnelsScopedList o) {
buildCounterVpnTunnelsScopedList++;
if (buildCounterVpnTunnelsScopedList < 3) {
checkUnnamed2575(o.vpnTunnels);
checkVpnTunnelsScopedListWarning(o.warning);
}
buildCounterVpnTunnelsScopedList--;
}
buildUnnamed2577() {
var o = new core.List<api.Project>();
o.add(buildProject());
o.add(buildProject());
return o;
}
checkUnnamed2577(core.List<api.Project> o) {
unittest.expect(o, unittest.hasLength(2));
checkProject(o[0]);
checkProject(o[1]);
}
core.int buildCounterXpnHostListWarningData = 0;
buildXpnHostListWarningData() {
var o = new api.XpnHostListWarningData();
buildCounterXpnHostListWarningData++;
if (buildCounterXpnHostListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterXpnHostListWarningData--;
return o;
}
checkXpnHostListWarningData(api.XpnHostListWarningData o) {
buildCounterXpnHostListWarningData++;
if (buildCounterXpnHostListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterXpnHostListWarningData--;
}
buildUnnamed2578() {
var o = new core.List<api.XpnHostListWarningData>();
o.add(buildXpnHostListWarningData());
o.add(buildXpnHostListWarningData());
return o;
}
checkUnnamed2578(core.List<api.XpnHostListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkXpnHostListWarningData(o[0]);
checkXpnHostListWarningData(o[1]);
}
core.int buildCounterXpnHostListWarning = 0;
buildXpnHostListWarning() {
var o = new api.XpnHostListWarning();
buildCounterXpnHostListWarning++;
if (buildCounterXpnHostListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2578();
o.message = "foo";
}
buildCounterXpnHostListWarning--;
return o;
}
checkXpnHostListWarning(api.XpnHostListWarning o) {
buildCounterXpnHostListWarning++;
if (buildCounterXpnHostListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2578(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterXpnHostListWarning--;
}
core.int buildCounterXpnHostList = 0;
buildXpnHostList() {
var o = new api.XpnHostList();
buildCounterXpnHostList++;
if (buildCounterXpnHostList < 3) {
o.id = "foo";
o.items = buildUnnamed2577();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildXpnHostListWarning();
}
buildCounterXpnHostList--;
return o;
}
checkXpnHostList(api.XpnHostList o) {
buildCounterXpnHostList++;
if (buildCounterXpnHostList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2577(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkXpnHostListWarning(o.warning);
}
buildCounterXpnHostList--;
}
core.int buildCounterXpnResourceId = 0;
buildXpnResourceId() {
var o = new api.XpnResourceId();
buildCounterXpnResourceId++;
if (buildCounterXpnResourceId < 3) {
o.id = "foo";
o.type = "foo";
}
buildCounterXpnResourceId--;
return o;
}
checkXpnResourceId(api.XpnResourceId o) {
buildCounterXpnResourceId++;
if (buildCounterXpnResourceId < 3) {
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.type, unittest.equals('foo'));
}
buildCounterXpnResourceId--;
}
buildUnnamed2579() {
var o = new core.List<core.String>();
o.add("foo");
o.add("foo");
return o;
}
checkUnnamed2579(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 buildCounterZone = 0;
buildZone() {
var o = new api.Zone();
buildCounterZone++;
if (buildCounterZone < 3) {
o.availableCpuPlatforms = buildUnnamed2579();
o.creationTimestamp = "foo";
o.deprecated = buildDeprecationStatus();
o.description = "foo";
o.id = "foo";
o.kind = "foo";
o.name = "foo";
o.region = "foo";
o.selfLink = "foo";
o.status = "foo";
}
buildCounterZone--;
return o;
}
checkZone(api.Zone o) {
buildCounterZone++;
if (buildCounterZone < 3) {
checkUnnamed2579(o.availableCpuPlatforms);
unittest.expect(o.creationTimestamp, unittest.equals('foo'));
checkDeprecationStatus(o.deprecated);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.id, unittest.equals('foo'));
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.region, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
unittest.expect(o.status, unittest.equals('foo'));
}
buildCounterZone--;
}
buildUnnamed2580() {
var o = new core.List<api.Zone>();
o.add(buildZone());
o.add(buildZone());
return o;
}
checkUnnamed2580(core.List<api.Zone> o) {
unittest.expect(o, unittest.hasLength(2));
checkZone(o[0]);
checkZone(o[1]);
}
core.int buildCounterZoneListWarningData = 0;
buildZoneListWarningData() {
var o = new api.ZoneListWarningData();
buildCounterZoneListWarningData++;
if (buildCounterZoneListWarningData < 3) {
o.key = "foo";
o.value = "foo";
}
buildCounterZoneListWarningData--;
return o;
}
checkZoneListWarningData(api.ZoneListWarningData o) {
buildCounterZoneListWarningData++;
if (buildCounterZoneListWarningData < 3) {
unittest.expect(o.key, unittest.equals('foo'));
unittest.expect(o.value, unittest.equals('foo'));
}
buildCounterZoneListWarningData--;
}
buildUnnamed2581() {
var o = new core.List<api.ZoneListWarningData>();
o.add(buildZoneListWarningData());
o.add(buildZoneListWarningData());
return o;
}
checkUnnamed2581(core.List<api.ZoneListWarningData> o) {
unittest.expect(o, unittest.hasLength(2));
checkZoneListWarningData(o[0]);
checkZoneListWarningData(o[1]);
}
core.int buildCounterZoneListWarning = 0;
buildZoneListWarning() {
var o = new api.ZoneListWarning();
buildCounterZoneListWarning++;
if (buildCounterZoneListWarning < 3) {
o.code = "foo";
o.data = buildUnnamed2581();
o.message = "foo";
}
buildCounterZoneListWarning--;
return o;
}
checkZoneListWarning(api.ZoneListWarning o) {
buildCounterZoneListWarning++;
if (buildCounterZoneListWarning < 3) {
unittest.expect(o.code, unittest.equals('foo'));
checkUnnamed2581(o.data);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterZoneListWarning--;
}
core.int buildCounterZoneList = 0;
buildZoneList() {
var o = new api.ZoneList();
buildCounterZoneList++;
if (buildCounterZoneList < 3) {
o.id = "foo";
o.items = buildUnnamed2580();
o.kind = "foo";
o.nextPageToken = "foo";
o.selfLink = "foo";
o.warning = buildZoneListWarning();
}
buildCounterZoneList--;
return o;
}
checkZoneList(api.ZoneList o) {
buildCounterZoneList++;
if (buildCounterZoneList < 3) {
unittest.expect(o.id, unittest.equals('foo'));
checkUnnamed2580(o.items);
unittest.expect(o.kind, unittest.equals('foo'));
unittest.expect(o.nextPageToken, unittest.equals('foo'));
unittest.expect(o.selfLink, unittest.equals('foo'));
checkZoneListWarning(o.warning);
}
buildCounterZoneList--;
}
buildUnnamed2582() {
var o = new core.Map<core.String, core.String>();
o["x"] = "foo";
o["y"] = "foo";
return o;
}
checkUnnamed2582(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 buildCounterZoneSetLabelsRequest = 0;
buildZoneSetLabelsRequest() {
var o = new api.ZoneSetLabelsRequest();
buildCounterZoneSetLabelsRequest++;
if (buildCounterZoneSetLabelsRequest < 3) {
o.labelFingerprint = "foo";
o.labels = buildUnnamed2582();
}
buildCounterZoneSetLabelsRequest--;
return o;
}
checkZoneSetLabelsRequest(api.ZoneSetLabelsRequest o) {
buildCounterZoneSetLabelsRequest++;
if (buildCounterZoneSetLabelsRequest < 3) {
unittest.expect(o.labelFingerprint, unittest.equals('foo'));
checkUnnamed2582(o.labels);
}
buildCounterZoneSetLabelsRequest--;
}
main() {
unittest.group("obj-schema-AcceleratorConfig", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorConfig();
var od = new api.AcceleratorConfig.fromJson(o.toJson());
checkAcceleratorConfig(od);
});
});
unittest.group("obj-schema-AcceleratorType", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorType();
var od = new api.AcceleratorType.fromJson(o.toJson());
checkAcceleratorType(od);
});
});
unittest.group("obj-schema-AcceleratorTypeAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeAggregatedListWarningData();
var od =
new api.AcceleratorTypeAggregatedListWarningData.fromJson(o.toJson());
checkAcceleratorTypeAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-AcceleratorTypeAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeAggregatedListWarning();
var od =
new api.AcceleratorTypeAggregatedListWarning.fromJson(o.toJson());
checkAcceleratorTypeAggregatedListWarning(od);
});
});
unittest.group("obj-schema-AcceleratorTypeAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeAggregatedList();
var od = new api.AcceleratorTypeAggregatedList.fromJson(o.toJson());
checkAcceleratorTypeAggregatedList(od);
});
});
unittest.group("obj-schema-AcceleratorTypeListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeListWarningData();
var od = new api.AcceleratorTypeListWarningData.fromJson(o.toJson());
checkAcceleratorTypeListWarningData(od);
});
});
unittest.group("obj-schema-AcceleratorTypeListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeListWarning();
var od = new api.AcceleratorTypeListWarning.fromJson(o.toJson());
checkAcceleratorTypeListWarning(od);
});
});
unittest.group("obj-schema-AcceleratorTypeList", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypeList();
var od = new api.AcceleratorTypeList.fromJson(o.toJson());
checkAcceleratorTypeList(od);
});
});
unittest.group("obj-schema-AcceleratorTypesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypesScopedListWarningData();
var od =
new api.AcceleratorTypesScopedListWarningData.fromJson(o.toJson());
checkAcceleratorTypesScopedListWarningData(od);
});
});
unittest.group("obj-schema-AcceleratorTypesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypesScopedListWarning();
var od = new api.AcceleratorTypesScopedListWarning.fromJson(o.toJson());
checkAcceleratorTypesScopedListWarning(od);
});
});
unittest.group("obj-schema-AcceleratorTypesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildAcceleratorTypesScopedList();
var od = new api.AcceleratorTypesScopedList.fromJson(o.toJson());
checkAcceleratorTypesScopedList(od);
});
});
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-Address", () {
unittest.test("to-json--from-json", () {
var o = buildAddress();
var od = new api.Address.fromJson(o.toJson());
checkAddress(od);
});
});
unittest.group("obj-schema-AddressAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAddressAggregatedListWarningData();
var od = new api.AddressAggregatedListWarningData.fromJson(o.toJson());
checkAddressAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-AddressAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAddressAggregatedListWarning();
var od = new api.AddressAggregatedListWarning.fromJson(o.toJson());
checkAddressAggregatedListWarning(od);
});
});
unittest.group("obj-schema-AddressAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildAddressAggregatedList();
var od = new api.AddressAggregatedList.fromJson(o.toJson());
checkAddressAggregatedList(od);
});
});
unittest.group("obj-schema-AddressListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAddressListWarningData();
var od = new api.AddressListWarningData.fromJson(o.toJson());
checkAddressListWarningData(od);
});
});
unittest.group("obj-schema-AddressListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAddressListWarning();
var od = new api.AddressListWarning.fromJson(o.toJson());
checkAddressListWarning(od);
});
});
unittest.group("obj-schema-AddressList", () {
unittest.test("to-json--from-json", () {
var o = buildAddressList();
var od = new api.AddressList.fromJson(o.toJson());
checkAddressList(od);
});
});
unittest.group("obj-schema-AddressesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAddressesScopedListWarningData();
var od = new api.AddressesScopedListWarningData.fromJson(o.toJson());
checkAddressesScopedListWarningData(od);
});
});
unittest.group("obj-schema-AddressesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAddressesScopedListWarning();
var od = new api.AddressesScopedListWarning.fromJson(o.toJson());
checkAddressesScopedListWarning(od);
});
});
unittest.group("obj-schema-AddressesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildAddressesScopedList();
var od = new api.AddressesScopedList.fromJson(o.toJson());
checkAddressesScopedList(od);
});
});
unittest.group("obj-schema-AliasIpRange", () {
unittest.test("to-json--from-json", () {
var o = buildAliasIpRange();
var od = new api.AliasIpRange.fromJson(o.toJson());
checkAliasIpRange(od);
});
});
unittest.group("obj-schema-AttachedDisk", () {
unittest.test("to-json--from-json", () {
var o = buildAttachedDisk();
var od = new api.AttachedDisk.fromJson(o.toJson());
checkAttachedDisk(od);
});
});
unittest.group("obj-schema-AttachedDiskInitializeParams", () {
unittest.test("to-json--from-json", () {
var o = buildAttachedDiskInitializeParams();
var od = new api.AttachedDiskInitializeParams.fromJson(o.toJson());
checkAttachedDiskInitializeParams(od);
});
});
unittest.group("obj-schema-Autoscaler", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscaler();
var od = new api.Autoscaler.fromJson(o.toJson());
checkAutoscaler(od);
});
});
unittest.group("obj-schema-AutoscalerAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerAggregatedListWarningData();
var od = new api.AutoscalerAggregatedListWarningData.fromJson(o.toJson());
checkAutoscalerAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-AutoscalerAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerAggregatedListWarning();
var od = new api.AutoscalerAggregatedListWarning.fromJson(o.toJson());
checkAutoscalerAggregatedListWarning(od);
});
});
unittest.group("obj-schema-AutoscalerAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerAggregatedList();
var od = new api.AutoscalerAggregatedList.fromJson(o.toJson());
checkAutoscalerAggregatedList(od);
});
});
unittest.group("obj-schema-AutoscalerListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerListWarningData();
var od = new api.AutoscalerListWarningData.fromJson(o.toJson());
checkAutoscalerListWarningData(od);
});
});
unittest.group("obj-schema-AutoscalerListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerListWarning();
var od = new api.AutoscalerListWarning.fromJson(o.toJson());
checkAutoscalerListWarning(od);
});
});
unittest.group("obj-schema-AutoscalerList", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerList();
var od = new api.AutoscalerList.fromJson(o.toJson());
checkAutoscalerList(od);
});
});
unittest.group("obj-schema-AutoscalerStatusDetails", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalerStatusDetails();
var od = new api.AutoscalerStatusDetails.fromJson(o.toJson());
checkAutoscalerStatusDetails(od);
});
});
unittest.group("obj-schema-AutoscalersScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalersScopedListWarningData();
var od = new api.AutoscalersScopedListWarningData.fromJson(o.toJson());
checkAutoscalersScopedListWarningData(od);
});
});
unittest.group("obj-schema-AutoscalersScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalersScopedListWarning();
var od = new api.AutoscalersScopedListWarning.fromJson(o.toJson());
checkAutoscalersScopedListWarning(od);
});
});
unittest.group("obj-schema-AutoscalersScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalersScopedList();
var od = new api.AutoscalersScopedList.fromJson(o.toJson());
checkAutoscalersScopedList(od);
});
});
unittest.group("obj-schema-AutoscalingPolicy", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalingPolicy();
var od = new api.AutoscalingPolicy.fromJson(o.toJson());
checkAutoscalingPolicy(od);
});
});
unittest.group("obj-schema-AutoscalingPolicyCpuUtilization", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalingPolicyCpuUtilization();
var od = new api.AutoscalingPolicyCpuUtilization.fromJson(o.toJson());
checkAutoscalingPolicyCpuUtilization(od);
});
});
unittest.group("obj-schema-AutoscalingPolicyCustomMetricUtilization", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalingPolicyCustomMetricUtilization();
var od =
new api.AutoscalingPolicyCustomMetricUtilization.fromJson(o.toJson());
checkAutoscalingPolicyCustomMetricUtilization(od);
});
});
unittest.group("obj-schema-AutoscalingPolicyLoadBalancingUtilization", () {
unittest.test("to-json--from-json", () {
var o = buildAutoscalingPolicyLoadBalancingUtilization();
var od = new api.AutoscalingPolicyLoadBalancingUtilization.fromJson(
o.toJson());
checkAutoscalingPolicyLoadBalancingUtilization(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-BackendBucket", () {
unittest.test("to-json--from-json", () {
var o = buildBackendBucket();
var od = new api.BackendBucket.fromJson(o.toJson());
checkBackendBucket(od);
});
});
unittest.group("obj-schema-BackendBucketListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildBackendBucketListWarningData();
var od = new api.BackendBucketListWarningData.fromJson(o.toJson());
checkBackendBucketListWarningData(od);
});
});
unittest.group("obj-schema-BackendBucketListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildBackendBucketListWarning();
var od = new api.BackendBucketListWarning.fromJson(o.toJson());
checkBackendBucketListWarning(od);
});
});
unittest.group("obj-schema-BackendBucketList", () {
unittest.test("to-json--from-json", () {
var o = buildBackendBucketList();
var od = new api.BackendBucketList.fromJson(o.toJson());
checkBackendBucketList(od);
});
});
unittest.group("obj-schema-BackendService", () {
unittest.test("to-json--from-json", () {
var o = buildBackendService();
var od = new api.BackendService.fromJson(o.toJson());
checkBackendService(od);
});
});
unittest.group("obj-schema-BackendServiceAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceAggregatedListWarningData();
var od =
new api.BackendServiceAggregatedListWarningData.fromJson(o.toJson());
checkBackendServiceAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-BackendServiceAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceAggregatedListWarning();
var od = new api.BackendServiceAggregatedListWarning.fromJson(o.toJson());
checkBackendServiceAggregatedListWarning(od);
});
});
unittest.group("obj-schema-BackendServiceAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceAggregatedList();
var od = new api.BackendServiceAggregatedList.fromJson(o.toJson());
checkBackendServiceAggregatedList(od);
});
});
unittest.group("obj-schema-BackendServiceCdnPolicy", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceCdnPolicy();
var od = new api.BackendServiceCdnPolicy.fromJson(o.toJson());
checkBackendServiceCdnPolicy(od);
});
});
unittest.group("obj-schema-BackendServiceGroupHealth", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceGroupHealth();
var od = new api.BackendServiceGroupHealth.fromJson(o.toJson());
checkBackendServiceGroupHealth(od);
});
});
unittest.group("obj-schema-BackendServiceIAP", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceIAP();
var od = new api.BackendServiceIAP.fromJson(o.toJson());
checkBackendServiceIAP(od);
});
});
unittest.group("obj-schema-BackendServiceListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceListWarningData();
var od = new api.BackendServiceListWarningData.fromJson(o.toJson());
checkBackendServiceListWarningData(od);
});
});
unittest.group("obj-schema-BackendServiceListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceListWarning();
var od = new api.BackendServiceListWarning.fromJson(o.toJson());
checkBackendServiceListWarning(od);
});
});
unittest.group("obj-schema-BackendServiceList", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServiceList();
var od = new api.BackendServiceList.fromJson(o.toJson());
checkBackendServiceList(od);
});
});
unittest.group("obj-schema-BackendServicesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServicesScopedListWarningData();
var od =
new api.BackendServicesScopedListWarningData.fromJson(o.toJson());
checkBackendServicesScopedListWarningData(od);
});
});
unittest.group("obj-schema-BackendServicesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServicesScopedListWarning();
var od = new api.BackendServicesScopedListWarning.fromJson(o.toJson());
checkBackendServicesScopedListWarning(od);
});
});
unittest.group("obj-schema-BackendServicesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildBackendServicesScopedList();
var od = new api.BackendServicesScopedList.fromJson(o.toJson());
checkBackendServicesScopedList(od);
});
});
unittest.group("obj-schema-CacheInvalidationRule", () {
unittest.test("to-json--from-json", () {
var o = buildCacheInvalidationRule();
var od = new api.CacheInvalidationRule.fromJson(o.toJson());
checkCacheInvalidationRule(od);
});
});
unittest.group("obj-schema-CacheKeyPolicy", () {
unittest.test("to-json--from-json", () {
var o = buildCacheKeyPolicy();
var od = new api.CacheKeyPolicy.fromJson(o.toJson());
checkCacheKeyPolicy(od);
});
});
unittest.group("obj-schema-Commitment", () {
unittest.test("to-json--from-json", () {
var o = buildCommitment();
var od = new api.Commitment.fromJson(o.toJson());
checkCommitment(od);
});
});
unittest.group("obj-schema-CommitmentAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentAggregatedListWarningData();
var od = new api.CommitmentAggregatedListWarningData.fromJson(o.toJson());
checkCommitmentAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-CommitmentAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentAggregatedListWarning();
var od = new api.CommitmentAggregatedListWarning.fromJson(o.toJson());
checkCommitmentAggregatedListWarning(od);
});
});
unittest.group("obj-schema-CommitmentAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentAggregatedList();
var od = new api.CommitmentAggregatedList.fromJson(o.toJson());
checkCommitmentAggregatedList(od);
});
});
unittest.group("obj-schema-CommitmentListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentListWarningData();
var od = new api.CommitmentListWarningData.fromJson(o.toJson());
checkCommitmentListWarningData(od);
});
});
unittest.group("obj-schema-CommitmentListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentListWarning();
var od = new api.CommitmentListWarning.fromJson(o.toJson());
checkCommitmentListWarning(od);
});
});
unittest.group("obj-schema-CommitmentList", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentList();
var od = new api.CommitmentList.fromJson(o.toJson());
checkCommitmentList(od);
});
});
unittest.group("obj-schema-CommitmentsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentsScopedListWarningData();
var od = new api.CommitmentsScopedListWarningData.fromJson(o.toJson());
checkCommitmentsScopedListWarningData(od);
});
});
unittest.group("obj-schema-CommitmentsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentsScopedListWarning();
var od = new api.CommitmentsScopedListWarning.fromJson(o.toJson());
checkCommitmentsScopedListWarning(od);
});
});
unittest.group("obj-schema-CommitmentsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildCommitmentsScopedList();
var od = new api.CommitmentsScopedList.fromJson(o.toJson());
checkCommitmentsScopedList(od);
});
});
unittest.group("obj-schema-ConnectionDraining", () {
unittest.test("to-json--from-json", () {
var o = buildConnectionDraining();
var od = new api.ConnectionDraining.fromJson(o.toJson());
checkConnectionDraining(od);
});
});
unittest.group("obj-schema-CustomerEncryptionKey", () {
unittest.test("to-json--from-json", () {
var o = buildCustomerEncryptionKey();
var od = new api.CustomerEncryptionKey.fromJson(o.toJson());
checkCustomerEncryptionKey(od);
});
});
unittest.group("obj-schema-CustomerEncryptionKeyProtectedDisk", () {
unittest.test("to-json--from-json", () {
var o = buildCustomerEncryptionKeyProtectedDisk();
var od = new api.CustomerEncryptionKeyProtectedDisk.fromJson(o.toJson());
checkCustomerEncryptionKeyProtectedDisk(od);
});
});
unittest.group("obj-schema-DeprecationStatus", () {
unittest.test("to-json--from-json", () {
var o = buildDeprecationStatus();
var od = new api.DeprecationStatus.fromJson(o.toJson());
checkDeprecationStatus(od);
});
});
unittest.group("obj-schema-Disk", () {
unittest.test("to-json--from-json", () {
var o = buildDisk();
var od = new api.Disk.fromJson(o.toJson());
checkDisk(od);
});
});
unittest.group("obj-schema-DiskAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDiskAggregatedListWarningData();
var od = new api.DiskAggregatedListWarningData.fromJson(o.toJson());
checkDiskAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-DiskAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDiskAggregatedListWarning();
var od = new api.DiskAggregatedListWarning.fromJson(o.toJson());
checkDiskAggregatedListWarning(od);
});
});
unittest.group("obj-schema-DiskAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildDiskAggregatedList();
var od = new api.DiskAggregatedList.fromJson(o.toJson());
checkDiskAggregatedList(od);
});
});
unittest.group("obj-schema-DiskListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDiskListWarningData();
var od = new api.DiskListWarningData.fromJson(o.toJson());
checkDiskListWarningData(od);
});
});
unittest.group("obj-schema-DiskListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDiskListWarning();
var od = new api.DiskListWarning.fromJson(o.toJson());
checkDiskListWarning(od);
});
});
unittest.group("obj-schema-DiskList", () {
unittest.test("to-json--from-json", () {
var o = buildDiskList();
var od = new api.DiskList.fromJson(o.toJson());
checkDiskList(od);
});
});
unittest.group("obj-schema-DiskMoveRequest", () {
unittest.test("to-json--from-json", () {
var o = buildDiskMoveRequest();
var od = new api.DiskMoveRequest.fromJson(o.toJson());
checkDiskMoveRequest(od);
});
});
unittest.group("obj-schema-DiskType", () {
unittest.test("to-json--from-json", () {
var o = buildDiskType();
var od = new api.DiskType.fromJson(o.toJson());
checkDiskType(od);
});
});
unittest.group("obj-schema-DiskTypeAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeAggregatedListWarningData();
var od = new api.DiskTypeAggregatedListWarningData.fromJson(o.toJson());
checkDiskTypeAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-DiskTypeAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeAggregatedListWarning();
var od = new api.DiskTypeAggregatedListWarning.fromJson(o.toJson());
checkDiskTypeAggregatedListWarning(od);
});
});
unittest.group("obj-schema-DiskTypeAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeAggregatedList();
var od = new api.DiskTypeAggregatedList.fromJson(o.toJson());
checkDiskTypeAggregatedList(od);
});
});
unittest.group("obj-schema-DiskTypeListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeListWarningData();
var od = new api.DiskTypeListWarningData.fromJson(o.toJson());
checkDiskTypeListWarningData(od);
});
});
unittest.group("obj-schema-DiskTypeListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeListWarning();
var od = new api.DiskTypeListWarning.fromJson(o.toJson());
checkDiskTypeListWarning(od);
});
});
unittest.group("obj-schema-DiskTypeList", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypeList();
var od = new api.DiskTypeList.fromJson(o.toJson());
checkDiskTypeList(od);
});
});
unittest.group("obj-schema-DiskTypesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypesScopedListWarningData();
var od = new api.DiskTypesScopedListWarningData.fromJson(o.toJson());
checkDiskTypesScopedListWarningData(od);
});
});
unittest.group("obj-schema-DiskTypesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypesScopedListWarning();
var od = new api.DiskTypesScopedListWarning.fromJson(o.toJson());
checkDiskTypesScopedListWarning(od);
});
});
unittest.group("obj-schema-DiskTypesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildDiskTypesScopedList();
var od = new api.DiskTypesScopedList.fromJson(o.toJson());
checkDiskTypesScopedList(od);
});
});
unittest.group("obj-schema-DisksResizeRequest", () {
unittest.test("to-json--from-json", () {
var o = buildDisksResizeRequest();
var od = new api.DisksResizeRequest.fromJson(o.toJson());
checkDisksResizeRequest(od);
});
});
unittest.group("obj-schema-DisksScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildDisksScopedListWarningData();
var od = new api.DisksScopedListWarningData.fromJson(o.toJson());
checkDisksScopedListWarningData(od);
});
});
unittest.group("obj-schema-DisksScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildDisksScopedListWarning();
var od = new api.DisksScopedListWarning.fromJson(o.toJson());
checkDisksScopedListWarning(od);
});
});
unittest.group("obj-schema-DisksScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildDisksScopedList();
var od = new api.DisksScopedList.fromJson(o.toJson());
checkDisksScopedList(od);
});
});
unittest.group("obj-schema-FirewallAllowed", () {
unittest.test("to-json--from-json", () {
var o = buildFirewallAllowed();
var od = new api.FirewallAllowed.fromJson(o.toJson());
checkFirewallAllowed(od);
});
});
unittest.group("obj-schema-FirewallDenied", () {
unittest.test("to-json--from-json", () {
var o = buildFirewallDenied();
var od = new api.FirewallDenied.fromJson(o.toJson());
checkFirewallDenied(od);
});
});
unittest.group("obj-schema-Firewall", () {
unittest.test("to-json--from-json", () {
var o = buildFirewall();
var od = new api.Firewall.fromJson(o.toJson());
checkFirewall(od);
});
});
unittest.group("obj-schema-FirewallListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildFirewallListWarningData();
var od = new api.FirewallListWarningData.fromJson(o.toJson());
checkFirewallListWarningData(od);
});
});
unittest.group("obj-schema-FirewallListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildFirewallListWarning();
var od = new api.FirewallListWarning.fromJson(o.toJson());
checkFirewallListWarning(od);
});
});
unittest.group("obj-schema-FirewallList", () {
unittest.test("to-json--from-json", () {
var o = buildFirewallList();
var od = new api.FirewallList.fromJson(o.toJson());
checkFirewallList(od);
});
});
unittest.group("obj-schema-ForwardingRule", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRule();
var od = new api.ForwardingRule.fromJson(o.toJson());
checkForwardingRule(od);
});
});
unittest.group("obj-schema-ForwardingRuleAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleAggregatedListWarningData();
var od =
new api.ForwardingRuleAggregatedListWarningData.fromJson(o.toJson());
checkForwardingRuleAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-ForwardingRuleAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleAggregatedListWarning();
var od = new api.ForwardingRuleAggregatedListWarning.fromJson(o.toJson());
checkForwardingRuleAggregatedListWarning(od);
});
});
unittest.group("obj-schema-ForwardingRuleAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleAggregatedList();
var od = new api.ForwardingRuleAggregatedList.fromJson(o.toJson());
checkForwardingRuleAggregatedList(od);
});
});
unittest.group("obj-schema-ForwardingRuleListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleListWarningData();
var od = new api.ForwardingRuleListWarningData.fromJson(o.toJson());
checkForwardingRuleListWarningData(od);
});
});
unittest.group("obj-schema-ForwardingRuleListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleListWarning();
var od = new api.ForwardingRuleListWarning.fromJson(o.toJson());
checkForwardingRuleListWarning(od);
});
});
unittest.group("obj-schema-ForwardingRuleList", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRuleList();
var od = new api.ForwardingRuleList.fromJson(o.toJson());
checkForwardingRuleList(od);
});
});
unittest.group("obj-schema-ForwardingRulesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRulesScopedListWarningData();
var od =
new api.ForwardingRulesScopedListWarningData.fromJson(o.toJson());
checkForwardingRulesScopedListWarningData(od);
});
});
unittest.group("obj-schema-ForwardingRulesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRulesScopedListWarning();
var od = new api.ForwardingRulesScopedListWarning.fromJson(o.toJson());
checkForwardingRulesScopedListWarning(od);
});
});
unittest.group("obj-schema-ForwardingRulesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildForwardingRulesScopedList();
var od = new api.ForwardingRulesScopedList.fromJson(o.toJson());
checkForwardingRulesScopedList(od);
});
});
unittest.group("obj-schema-GlobalSetLabelsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildGlobalSetLabelsRequest();
var od = new api.GlobalSetLabelsRequest.fromJson(o.toJson());
checkGlobalSetLabelsRequest(od);
});
});
unittest.group("obj-schema-GuestOsFeature", () {
unittest.test("to-json--from-json", () {
var o = buildGuestOsFeature();
var od = new api.GuestOsFeature.fromJson(o.toJson());
checkGuestOsFeature(od);
});
});
unittest.group("obj-schema-HTTPHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildHTTPHealthCheck();
var od = new api.HTTPHealthCheck.fromJson(o.toJson());
checkHTTPHealthCheck(od);
});
});
unittest.group("obj-schema-HTTPSHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildHTTPSHealthCheck();
var od = new api.HTTPSHealthCheck.fromJson(o.toJson());
checkHTTPSHealthCheck(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-HealthCheckListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildHealthCheckListWarningData();
var od = new api.HealthCheckListWarningData.fromJson(o.toJson());
checkHealthCheckListWarningData(od);
});
});
unittest.group("obj-schema-HealthCheckListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildHealthCheckListWarning();
var od = new api.HealthCheckListWarning.fromJson(o.toJson());
checkHealthCheckListWarning(od);
});
});
unittest.group("obj-schema-HealthCheckList", () {
unittest.test("to-json--from-json", () {
var o = buildHealthCheckList();
var od = new api.HealthCheckList.fromJson(o.toJson());
checkHealthCheckList(od);
});
});
unittest.group("obj-schema-HealthCheckReference", () {
unittest.test("to-json--from-json", () {
var o = buildHealthCheckReference();
var od = new api.HealthCheckReference.fromJson(o.toJson());
checkHealthCheckReference(od);
});
});
unittest.group("obj-schema-HealthStatus", () {
unittest.test("to-json--from-json", () {
var o = buildHealthStatus();
var od = new api.HealthStatus.fromJson(o.toJson());
checkHealthStatus(od);
});
});
unittest.group("obj-schema-HostRule", () {
unittest.test("to-json--from-json", () {
var o = buildHostRule();
var od = new api.HostRule.fromJson(o.toJson());
checkHostRule(od);
});
});
unittest.group("obj-schema-HttpHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildHttpHealthCheck();
var od = new api.HttpHealthCheck.fromJson(o.toJson());
checkHttpHealthCheck(od);
});
});
unittest.group("obj-schema-HttpHealthCheckListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildHttpHealthCheckListWarningData();
var od = new api.HttpHealthCheckListWarningData.fromJson(o.toJson());
checkHttpHealthCheckListWarningData(od);
});
});
unittest.group("obj-schema-HttpHealthCheckListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildHttpHealthCheckListWarning();
var od = new api.HttpHealthCheckListWarning.fromJson(o.toJson());
checkHttpHealthCheckListWarning(od);
});
});
unittest.group("obj-schema-HttpHealthCheckList", () {
unittest.test("to-json--from-json", () {
var o = buildHttpHealthCheckList();
var od = new api.HttpHealthCheckList.fromJson(o.toJson());
checkHttpHealthCheckList(od);
});
});
unittest.group("obj-schema-HttpsHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildHttpsHealthCheck();
var od = new api.HttpsHealthCheck.fromJson(o.toJson());
checkHttpsHealthCheck(od);
});
});
unittest.group("obj-schema-HttpsHealthCheckListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildHttpsHealthCheckListWarningData();
var od = new api.HttpsHealthCheckListWarningData.fromJson(o.toJson());
checkHttpsHealthCheckListWarningData(od);
});
});
unittest.group("obj-schema-HttpsHealthCheckListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildHttpsHealthCheckListWarning();
var od = new api.HttpsHealthCheckListWarning.fromJson(o.toJson());
checkHttpsHealthCheckListWarning(od);
});
});
unittest.group("obj-schema-HttpsHealthCheckList", () {
unittest.test("to-json--from-json", () {
var o = buildHttpsHealthCheckList();
var od = new api.HttpsHealthCheckList.fromJson(o.toJson());
checkHttpsHealthCheckList(od);
});
});
unittest.group("obj-schema-ImageRawDisk", () {
unittest.test("to-json--from-json", () {
var o = buildImageRawDisk();
var od = new api.ImageRawDisk.fromJson(o.toJson());
checkImageRawDisk(od);
});
});
unittest.group("obj-schema-Image", () {
unittest.test("to-json--from-json", () {
var o = buildImage();
var od = new api.Image.fromJson(o.toJson());
checkImage(od);
});
});
unittest.group("obj-schema-ImageListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildImageListWarningData();
var od = new api.ImageListWarningData.fromJson(o.toJson());
checkImageListWarningData(od);
});
});
unittest.group("obj-schema-ImageListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildImageListWarning();
var od = new api.ImageListWarning.fromJson(o.toJson());
checkImageListWarning(od);
});
});
unittest.group("obj-schema-ImageList", () {
unittest.test("to-json--from-json", () {
var o = buildImageList();
var od = new api.ImageList.fromJson(o.toJson());
checkImageList(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-InstanceAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceAggregatedListWarningData();
var od = new api.InstanceAggregatedListWarningData.fromJson(o.toJson());
checkInstanceAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-InstanceAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceAggregatedListWarning();
var od = new api.InstanceAggregatedListWarning.fromJson(o.toJson());
checkInstanceAggregatedListWarning(od);
});
});
unittest.group("obj-schema-InstanceAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceAggregatedList();
var od = new api.InstanceAggregatedList.fromJson(o.toJson());
checkInstanceAggregatedList(od);
});
});
unittest.group("obj-schema-InstanceGroup", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroup();
var od = new api.InstanceGroup.fromJson(o.toJson());
checkInstanceGroup(od);
});
});
unittest.group("obj-schema-InstanceGroupAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupAggregatedListWarningData();
var od =
new api.InstanceGroupAggregatedListWarningData.fromJson(o.toJson());
checkInstanceGroupAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupAggregatedListWarning();
var od = new api.InstanceGroupAggregatedListWarning.fromJson(o.toJson());
checkInstanceGroupAggregatedListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupAggregatedList();
var od = new api.InstanceGroupAggregatedList.fromJson(o.toJson());
checkInstanceGroupAggregatedList(od);
});
});
unittest.group("obj-schema-InstanceGroupListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupListWarningData();
var od = new api.InstanceGroupListWarningData.fromJson(o.toJson());
checkInstanceGroupListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupListWarning();
var od = new api.InstanceGroupListWarning.fromJson(o.toJson());
checkInstanceGroupListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupList();
var od = new api.InstanceGroupList.fromJson(o.toJson());
checkInstanceGroupList(od);
});
});
unittest.group("obj-schema-InstanceGroupManager", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManager();
var od = new api.InstanceGroupManager.fromJson(o.toJson());
checkInstanceGroupManager(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerActionsSummary", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerActionsSummary();
var od = new api.InstanceGroupManagerActionsSummary.fromJson(o.toJson());
checkInstanceGroupManagerActionsSummary(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerAggregatedListWarningData",
() {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerAggregatedListWarningData();
var od = new api.InstanceGroupManagerAggregatedListWarningData.fromJson(
o.toJson());
checkInstanceGroupManagerAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerAggregatedListWarning();
var od = new api.InstanceGroupManagerAggregatedListWarning.fromJson(
o.toJson());
checkInstanceGroupManagerAggregatedListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerAggregatedList();
var od = new api.InstanceGroupManagerAggregatedList.fromJson(o.toJson());
checkInstanceGroupManagerAggregatedList(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerListWarningData();
var od = new api.InstanceGroupManagerListWarningData.fromJson(o.toJson());
checkInstanceGroupManagerListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerListWarning();
var od = new api.InstanceGroupManagerListWarning.fromJson(o.toJson());
checkInstanceGroupManagerListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupManagerList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagerList();
var od = new api.InstanceGroupManagerList.fromJson(o.toJson());
checkInstanceGroupManagerList(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersAbandonInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersAbandonInstancesRequest();
var od = new api.InstanceGroupManagersAbandonInstancesRequest.fromJson(
o.toJson());
checkInstanceGroupManagersAbandonInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersDeleteInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersDeleteInstancesRequest();
var od = new api.InstanceGroupManagersDeleteInstancesRequest.fromJson(
o.toJson());
checkInstanceGroupManagersDeleteInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersListManagedInstancesResponse",
() {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersListManagedInstancesResponse();
var od =
new api.InstanceGroupManagersListManagedInstancesResponse.fromJson(
o.toJson());
checkInstanceGroupManagersListManagedInstancesResponse(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersRecreateInstancesRequest",
() {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersRecreateInstancesRequest();
var od = new api.InstanceGroupManagersRecreateInstancesRequest.fromJson(
o.toJson());
checkInstanceGroupManagersRecreateInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersScopedListWarningData();
var od = new api.InstanceGroupManagersScopedListWarningData.fromJson(
o.toJson());
checkInstanceGroupManagersScopedListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersScopedListWarning();
var od =
new api.InstanceGroupManagersScopedListWarning.fromJson(o.toJson());
checkInstanceGroupManagersScopedListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersScopedList();
var od = new api.InstanceGroupManagersScopedList.fromJson(o.toJson());
checkInstanceGroupManagersScopedList(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersSetInstanceTemplateRequest",
() {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersSetInstanceTemplateRequest();
var od = new api.InstanceGroupManagersSetInstanceTemplateRequest.fromJson(
o.toJson());
checkInstanceGroupManagersSetInstanceTemplateRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupManagersSetTargetPoolsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupManagersSetTargetPoolsRequest();
var od = new api.InstanceGroupManagersSetTargetPoolsRequest.fromJson(
o.toJson());
checkInstanceGroupManagersSetTargetPoolsRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupsAddInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsAddInstancesRequest();
var od = new api.InstanceGroupsAddInstancesRequest.fromJson(o.toJson());
checkInstanceGroupsAddInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupsListInstancesWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsListInstancesWarningData();
var od =
new api.InstanceGroupsListInstancesWarningData.fromJson(o.toJson());
checkInstanceGroupsListInstancesWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupsListInstancesWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsListInstancesWarning();
var od = new api.InstanceGroupsListInstancesWarning.fromJson(o.toJson());
checkInstanceGroupsListInstancesWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupsListInstances", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsListInstances();
var od = new api.InstanceGroupsListInstances.fromJson(o.toJson());
checkInstanceGroupsListInstances(od);
});
});
unittest.group("obj-schema-InstanceGroupsListInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsListInstancesRequest();
var od = new api.InstanceGroupsListInstancesRequest.fromJson(o.toJson());
checkInstanceGroupsListInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupsRemoveInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsRemoveInstancesRequest();
var od =
new api.InstanceGroupsRemoveInstancesRequest.fromJson(o.toJson());
checkInstanceGroupsRemoveInstancesRequest(od);
});
});
unittest.group("obj-schema-InstanceGroupsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsScopedListWarningData();
var od = new api.InstanceGroupsScopedListWarningData.fromJson(o.toJson());
checkInstanceGroupsScopedListWarningData(od);
});
});
unittest.group("obj-schema-InstanceGroupsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsScopedListWarning();
var od = new api.InstanceGroupsScopedListWarning.fromJson(o.toJson());
checkInstanceGroupsScopedListWarning(od);
});
});
unittest.group("obj-schema-InstanceGroupsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsScopedList();
var od = new api.InstanceGroupsScopedList.fromJson(o.toJson());
checkInstanceGroupsScopedList(od);
});
});
unittest.group("obj-schema-InstanceGroupsSetNamedPortsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceGroupsSetNamedPortsRequest();
var od = new api.InstanceGroupsSetNamedPortsRequest.fromJson(o.toJson());
checkInstanceGroupsSetNamedPortsRequest(od);
});
});
unittest.group("obj-schema-InstanceListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceListWarningData();
var od = new api.InstanceListWarningData.fromJson(o.toJson());
checkInstanceListWarningData(od);
});
});
unittest.group("obj-schema-InstanceListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceListWarning();
var od = new api.InstanceListWarning.fromJson(o.toJson());
checkInstanceListWarning(od);
});
});
unittest.group("obj-schema-InstanceList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceList();
var od = new api.InstanceList.fromJson(o.toJson());
checkInstanceList(od);
});
});
unittest.group("obj-schema-InstanceMoveRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceMoveRequest();
var od = new api.InstanceMoveRequest.fromJson(o.toJson());
checkInstanceMoveRequest(od);
});
});
unittest.group("obj-schema-InstanceProperties", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceProperties();
var od = new api.InstanceProperties.fromJson(o.toJson());
checkInstanceProperties(od);
});
});
unittest.group("obj-schema-InstanceReference", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceReference();
var od = new api.InstanceReference.fromJson(o.toJson());
checkInstanceReference(od);
});
});
unittest.group("obj-schema-InstanceTemplate", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceTemplate();
var od = new api.InstanceTemplate.fromJson(o.toJson());
checkInstanceTemplate(od);
});
});
unittest.group("obj-schema-InstanceTemplateListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceTemplateListWarningData();
var od = new api.InstanceTemplateListWarningData.fromJson(o.toJson());
checkInstanceTemplateListWarningData(od);
});
});
unittest.group("obj-schema-InstanceTemplateListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceTemplateListWarning();
var od = new api.InstanceTemplateListWarning.fromJson(o.toJson());
checkInstanceTemplateListWarning(od);
});
});
unittest.group("obj-schema-InstanceTemplateList", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceTemplateList();
var od = new api.InstanceTemplateList.fromJson(o.toJson());
checkInstanceTemplateList(od);
});
});
unittest.group("obj-schema-InstanceWithNamedPorts", () {
unittest.test("to-json--from-json", () {
var o = buildInstanceWithNamedPorts();
var od = new api.InstanceWithNamedPorts.fromJson(o.toJson());
checkInstanceWithNamedPorts(od);
});
});
unittest.group("obj-schema-InstancesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesScopedListWarningData();
var od = new api.InstancesScopedListWarningData.fromJson(o.toJson());
checkInstancesScopedListWarningData(od);
});
});
unittest.group("obj-schema-InstancesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesScopedListWarning();
var od = new api.InstancesScopedListWarning.fromJson(o.toJson());
checkInstancesScopedListWarning(od);
});
});
unittest.group("obj-schema-InstancesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesScopedList();
var od = new api.InstancesScopedList.fromJson(o.toJson());
checkInstancesScopedList(od);
});
});
unittest.group("obj-schema-InstancesSetLabelsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesSetLabelsRequest();
var od = new api.InstancesSetLabelsRequest.fromJson(o.toJson());
checkInstancesSetLabelsRequest(od);
});
});
unittest.group("obj-schema-InstancesSetMachineResourcesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesSetMachineResourcesRequest();
var od = new api.InstancesSetMachineResourcesRequest.fromJson(o.toJson());
checkInstancesSetMachineResourcesRequest(od);
});
});
unittest.group("obj-schema-InstancesSetMachineTypeRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesSetMachineTypeRequest();
var od = new api.InstancesSetMachineTypeRequest.fromJson(o.toJson());
checkInstancesSetMachineTypeRequest(od);
});
});
unittest.group("obj-schema-InstancesSetMinCpuPlatformRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesSetMinCpuPlatformRequest();
var od = new api.InstancesSetMinCpuPlatformRequest.fromJson(o.toJson());
checkInstancesSetMinCpuPlatformRequest(od);
});
});
unittest.group("obj-schema-InstancesSetServiceAccountRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesSetServiceAccountRequest();
var od = new api.InstancesSetServiceAccountRequest.fromJson(o.toJson());
checkInstancesSetServiceAccountRequest(od);
});
});
unittest.group("obj-schema-InstancesStartWithEncryptionKeyRequest", () {
unittest.test("to-json--from-json", () {
var o = buildInstancesStartWithEncryptionKeyRequest();
var od =
new api.InstancesStartWithEncryptionKeyRequest.fromJson(o.toJson());
checkInstancesStartWithEncryptionKeyRequest(od);
});
});
unittest.group("obj-schema-Interconnect", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnect();
var od = new api.Interconnect.fromJson(o.toJson());
checkInterconnect(od);
});
});
unittest.group("obj-schema-InterconnectAttachment", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachment();
var od = new api.InterconnectAttachment.fromJson(o.toJson());
checkInterconnectAttachment(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentAggregatedListWarningData",
() {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentAggregatedListWarningData();
var od = new api.InterconnectAttachmentAggregatedListWarningData.fromJson(
o.toJson());
checkInterconnectAttachmentAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentAggregatedListWarning();
var od = new api.InterconnectAttachmentAggregatedListWarning.fromJson(
o.toJson());
checkInterconnectAttachmentAggregatedListWarning(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentAggregatedList();
var od =
new api.InterconnectAttachmentAggregatedList.fromJson(o.toJson());
checkInterconnectAttachmentAggregatedList(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentListWarningData();
var od =
new api.InterconnectAttachmentListWarningData.fromJson(o.toJson());
checkInterconnectAttachmentListWarningData(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentListWarning();
var od = new api.InterconnectAttachmentListWarning.fromJson(o.toJson());
checkInterconnectAttachmentListWarning(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentList", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentList();
var od = new api.InterconnectAttachmentList.fromJson(o.toJson());
checkInterconnectAttachmentList(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentPrivateInfo", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentPrivateInfo();
var od = new api.InterconnectAttachmentPrivateInfo.fromJson(o.toJson());
checkInterconnectAttachmentPrivateInfo(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentsScopedListWarningData();
var od = new api.InterconnectAttachmentsScopedListWarningData.fromJson(
o.toJson());
checkInterconnectAttachmentsScopedListWarningData(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentsScopedListWarning();
var od =
new api.InterconnectAttachmentsScopedListWarning.fromJson(o.toJson());
checkInterconnectAttachmentsScopedListWarning(od);
});
});
unittest.group("obj-schema-InterconnectAttachmentsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectAttachmentsScopedList();
var od = new api.InterconnectAttachmentsScopedList.fromJson(o.toJson());
checkInterconnectAttachmentsScopedList(od);
});
});
unittest.group("obj-schema-InterconnectCircuitInfo", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectCircuitInfo();
var od = new api.InterconnectCircuitInfo.fromJson(o.toJson());
checkInterconnectCircuitInfo(od);
});
});
unittest.group("obj-schema-InterconnectListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectListWarningData();
var od = new api.InterconnectListWarningData.fromJson(o.toJson());
checkInterconnectListWarningData(od);
});
});
unittest.group("obj-schema-InterconnectListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectListWarning();
var od = new api.InterconnectListWarning.fromJson(o.toJson());
checkInterconnectListWarning(od);
});
});
unittest.group("obj-schema-InterconnectList", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectList();
var od = new api.InterconnectList.fromJson(o.toJson());
checkInterconnectList(od);
});
});
unittest.group("obj-schema-InterconnectLocation", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectLocation();
var od = new api.InterconnectLocation.fromJson(o.toJson());
checkInterconnectLocation(od);
});
});
unittest.group("obj-schema-InterconnectLocationListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectLocationListWarningData();
var od = new api.InterconnectLocationListWarningData.fromJson(o.toJson());
checkInterconnectLocationListWarningData(od);
});
});
unittest.group("obj-schema-InterconnectLocationListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectLocationListWarning();
var od = new api.InterconnectLocationListWarning.fromJson(o.toJson());
checkInterconnectLocationListWarning(od);
});
});
unittest.group("obj-schema-InterconnectLocationList", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectLocationList();
var od = new api.InterconnectLocationList.fromJson(o.toJson());
checkInterconnectLocationList(od);
});
});
unittest.group("obj-schema-InterconnectLocationRegionInfo", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectLocationRegionInfo();
var od = new api.InterconnectLocationRegionInfo.fromJson(o.toJson());
checkInterconnectLocationRegionInfo(od);
});
});
unittest.group("obj-schema-InterconnectOutageNotification", () {
unittest.test("to-json--from-json", () {
var o = buildInterconnectOutageNotification();
var od = new api.InterconnectOutageNotification.fromJson(o.toJson());
checkInterconnectOutageNotification(od);
});
});
unittest.group("obj-schema-License", () {
unittest.test("to-json--from-json", () {
var o = buildLicense();
var od = new api.License.fromJson(o.toJson());
checkLicense(od);
});
});
unittest.group("obj-schema-MachineTypeScratchDisks", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeScratchDisks();
var od = new api.MachineTypeScratchDisks.fromJson(o.toJson());
checkMachineTypeScratchDisks(od);
});
});
unittest.group("obj-schema-MachineType", () {
unittest.test("to-json--from-json", () {
var o = buildMachineType();
var od = new api.MachineType.fromJson(o.toJson());
checkMachineType(od);
});
});
unittest.group("obj-schema-MachineTypeAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeAggregatedListWarningData();
var od =
new api.MachineTypeAggregatedListWarningData.fromJson(o.toJson());
checkMachineTypeAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-MachineTypeAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeAggregatedListWarning();
var od = new api.MachineTypeAggregatedListWarning.fromJson(o.toJson());
checkMachineTypeAggregatedListWarning(od);
});
});
unittest.group("obj-schema-MachineTypeAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeAggregatedList();
var od = new api.MachineTypeAggregatedList.fromJson(o.toJson());
checkMachineTypeAggregatedList(od);
});
});
unittest.group("obj-schema-MachineTypeListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeListWarningData();
var od = new api.MachineTypeListWarningData.fromJson(o.toJson());
checkMachineTypeListWarningData(od);
});
});
unittest.group("obj-schema-MachineTypeListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeListWarning();
var od = new api.MachineTypeListWarning.fromJson(o.toJson());
checkMachineTypeListWarning(od);
});
});
unittest.group("obj-schema-MachineTypeList", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypeList();
var od = new api.MachineTypeList.fromJson(o.toJson());
checkMachineTypeList(od);
});
});
unittest.group("obj-schema-MachineTypesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypesScopedListWarningData();
var od = new api.MachineTypesScopedListWarningData.fromJson(o.toJson());
checkMachineTypesScopedListWarningData(od);
});
});
unittest.group("obj-schema-MachineTypesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypesScopedListWarning();
var od = new api.MachineTypesScopedListWarning.fromJson(o.toJson());
checkMachineTypesScopedListWarning(od);
});
});
unittest.group("obj-schema-MachineTypesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildMachineTypesScopedList();
var od = new api.MachineTypesScopedList.fromJson(o.toJson());
checkMachineTypesScopedList(od);
});
});
unittest.group("obj-schema-ManagedInstance", () {
unittest.test("to-json--from-json", () {
var o = buildManagedInstance();
var od = new api.ManagedInstance.fromJson(o.toJson());
checkManagedInstance(od);
});
});
unittest.group("obj-schema-ManagedInstanceLastAttemptErrorsErrors", () {
unittest.test("to-json--from-json", () {
var o = buildManagedInstanceLastAttemptErrorsErrors();
var od =
new api.ManagedInstanceLastAttemptErrorsErrors.fromJson(o.toJson());
checkManagedInstanceLastAttemptErrorsErrors(od);
});
});
unittest.group("obj-schema-ManagedInstanceLastAttemptErrors", () {
unittest.test("to-json--from-json", () {
var o = buildManagedInstanceLastAttemptErrors();
var od = new api.ManagedInstanceLastAttemptErrors.fromJson(o.toJson());
checkManagedInstanceLastAttemptErrors(od);
});
});
unittest.group("obj-schema-ManagedInstanceLastAttempt", () {
unittest.test("to-json--from-json", () {
var o = buildManagedInstanceLastAttempt();
var od = new api.ManagedInstanceLastAttempt.fromJson(o.toJson());
checkManagedInstanceLastAttempt(od);
});
});
unittest.group("obj-schema-MetadataItems", () {
unittest.test("to-json--from-json", () {
var o = buildMetadataItems();
var od = new api.MetadataItems.fromJson(o.toJson());
checkMetadataItems(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-NamedPort", () {
unittest.test("to-json--from-json", () {
var o = buildNamedPort();
var od = new api.NamedPort.fromJson(o.toJson());
checkNamedPort(od);
});
});
unittest.group("obj-schema-Network", () {
unittest.test("to-json--from-json", () {
var o = buildNetwork();
var od = new api.Network.fromJson(o.toJson());
checkNetwork(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-NetworkListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildNetworkListWarningData();
var od = new api.NetworkListWarningData.fromJson(o.toJson());
checkNetworkListWarningData(od);
});
});
unittest.group("obj-schema-NetworkListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildNetworkListWarning();
var od = new api.NetworkListWarning.fromJson(o.toJson());
checkNetworkListWarning(od);
});
});
unittest.group("obj-schema-NetworkList", () {
unittest.test("to-json--from-json", () {
var o = buildNetworkList();
var od = new api.NetworkList.fromJson(o.toJson());
checkNetworkList(od);
});
});
unittest.group("obj-schema-NetworkPeering", () {
unittest.test("to-json--from-json", () {
var o = buildNetworkPeering();
var od = new api.NetworkPeering.fromJson(o.toJson());
checkNetworkPeering(od);
});
});
unittest.group("obj-schema-NetworkRoutingConfig", () {
unittest.test("to-json--from-json", () {
var o = buildNetworkRoutingConfig();
var od = new api.NetworkRoutingConfig.fromJson(o.toJson());
checkNetworkRoutingConfig(od);
});
});
unittest.group("obj-schema-NetworksAddPeeringRequest", () {
unittest.test("to-json--from-json", () {
var o = buildNetworksAddPeeringRequest();
var od = new api.NetworksAddPeeringRequest.fromJson(o.toJson());
checkNetworksAddPeeringRequest(od);
});
});
unittest.group("obj-schema-NetworksRemovePeeringRequest", () {
unittest.test("to-json--from-json", () {
var o = buildNetworksRemovePeeringRequest();
var od = new api.NetworksRemovePeeringRequest.fromJson(o.toJson());
checkNetworksRemovePeeringRequest(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-OperationAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildOperationAggregatedListWarningData();
var od = new api.OperationAggregatedListWarningData.fromJson(o.toJson());
checkOperationAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-OperationAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildOperationAggregatedListWarning();
var od = new api.OperationAggregatedListWarning.fromJson(o.toJson());
checkOperationAggregatedListWarning(od);
});
});
unittest.group("obj-schema-OperationAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildOperationAggregatedList();
var od = new api.OperationAggregatedList.fromJson(o.toJson());
checkOperationAggregatedList(od);
});
});
unittest.group("obj-schema-OperationListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildOperationListWarningData();
var od = new api.OperationListWarningData.fromJson(o.toJson());
checkOperationListWarningData(od);
});
});
unittest.group("obj-schema-OperationListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildOperationListWarning();
var od = new api.OperationListWarning.fromJson(o.toJson());
checkOperationListWarning(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-OperationsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildOperationsScopedListWarningData();
var od = new api.OperationsScopedListWarningData.fromJson(o.toJson());
checkOperationsScopedListWarningData(od);
});
});
unittest.group("obj-schema-OperationsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildOperationsScopedListWarning();
var od = new api.OperationsScopedListWarning.fromJson(o.toJson());
checkOperationsScopedListWarning(od);
});
});
unittest.group("obj-schema-OperationsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildOperationsScopedList();
var od = new api.OperationsScopedList.fromJson(o.toJson());
checkOperationsScopedList(od);
});
});
unittest.group("obj-schema-PathMatcher", () {
unittest.test("to-json--from-json", () {
var o = buildPathMatcher();
var od = new api.PathMatcher.fromJson(o.toJson());
checkPathMatcher(od);
});
});
unittest.group("obj-schema-PathRule", () {
unittest.test("to-json--from-json", () {
var o = buildPathRule();
var od = new api.PathRule.fromJson(o.toJson());
checkPathRule(od);
});
});
unittest.group("obj-schema-Project", () {
unittest.test("to-json--from-json", () {
var o = buildProject();
var od = new api.Project.fromJson(o.toJson());
checkProject(od);
});
});
unittest.group("obj-schema-ProjectsDisableXpnResourceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildProjectsDisableXpnResourceRequest();
var od = new api.ProjectsDisableXpnResourceRequest.fromJson(o.toJson());
checkProjectsDisableXpnResourceRequest(od);
});
});
unittest.group("obj-schema-ProjectsEnableXpnResourceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildProjectsEnableXpnResourceRequest();
var od = new api.ProjectsEnableXpnResourceRequest.fromJson(o.toJson());
checkProjectsEnableXpnResourceRequest(od);
});
});
unittest.group("obj-schema-ProjectsGetXpnResources", () {
unittest.test("to-json--from-json", () {
var o = buildProjectsGetXpnResources();
var od = new api.ProjectsGetXpnResources.fromJson(o.toJson());
checkProjectsGetXpnResources(od);
});
});
unittest.group("obj-schema-ProjectsListXpnHostsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildProjectsListXpnHostsRequest();
var od = new api.ProjectsListXpnHostsRequest.fromJson(o.toJson());
checkProjectsListXpnHostsRequest(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-Region", () {
unittest.test("to-json--from-json", () {
var o = buildRegion();
var od = new api.Region.fromJson(o.toJson());
checkRegion(od);
});
});
unittest.group("obj-schema-RegionAutoscalerListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRegionAutoscalerListWarningData();
var od = new api.RegionAutoscalerListWarningData.fromJson(o.toJson());
checkRegionAutoscalerListWarningData(od);
});
});
unittest.group("obj-schema-RegionAutoscalerListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRegionAutoscalerListWarning();
var od = new api.RegionAutoscalerListWarning.fromJson(o.toJson());
checkRegionAutoscalerListWarning(od);
});
});
unittest.group("obj-schema-RegionAutoscalerList", () {
unittest.test("to-json--from-json", () {
var o = buildRegionAutoscalerList();
var od = new api.RegionAutoscalerList.fromJson(o.toJson());
checkRegionAutoscalerList(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupListWarningData();
var od = new api.RegionInstanceGroupListWarningData.fromJson(o.toJson());
checkRegionInstanceGroupListWarningData(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupListWarning();
var od = new api.RegionInstanceGroupListWarning.fromJson(o.toJson());
checkRegionInstanceGroupListWarning(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupList", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupList();
var od = new api.RegionInstanceGroupList.fromJson(o.toJson());
checkRegionInstanceGroupList(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagerListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagerListWarningData();
var od = new api.RegionInstanceGroupManagerListWarningData.fromJson(
o.toJson());
checkRegionInstanceGroupManagerListWarningData(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagerListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagerListWarning();
var od =
new api.RegionInstanceGroupManagerListWarning.fromJson(o.toJson());
checkRegionInstanceGroupManagerListWarning(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagerList", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagerList();
var od = new api.RegionInstanceGroupManagerList.fromJson(o.toJson());
checkRegionInstanceGroupManagerList(od);
});
});
unittest.group(
"obj-schema-RegionInstanceGroupManagersAbandonInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersAbandonInstancesRequest();
var od =
new api.RegionInstanceGroupManagersAbandonInstancesRequest.fromJson(
o.toJson());
checkRegionInstanceGroupManagersAbandonInstancesRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagersDeleteInstancesRequest",
() {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersDeleteInstancesRequest();
var od =
new api.RegionInstanceGroupManagersDeleteInstancesRequest.fromJson(
o.toJson());
checkRegionInstanceGroupManagersDeleteInstancesRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagersListInstancesResponse",
() {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersListInstancesResponse();
var od =
new api.RegionInstanceGroupManagersListInstancesResponse.fromJson(
o.toJson());
checkRegionInstanceGroupManagersListInstancesResponse(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagersRecreateRequest", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersRecreateRequest();
var od = new api.RegionInstanceGroupManagersRecreateRequest.fromJson(
o.toJson());
checkRegionInstanceGroupManagersRecreateRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagersSetTargetPoolsRequest",
() {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersSetTargetPoolsRequest();
var od =
new api.RegionInstanceGroupManagersSetTargetPoolsRequest.fromJson(
o.toJson());
checkRegionInstanceGroupManagersSetTargetPoolsRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupManagersSetTemplateRequest",
() {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupManagersSetTemplateRequest();
var od = new api.RegionInstanceGroupManagersSetTemplateRequest.fromJson(
o.toJson());
checkRegionInstanceGroupManagersSetTemplateRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupsListInstancesWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupsListInstancesWarningData();
var od = new api.RegionInstanceGroupsListInstancesWarningData.fromJson(
o.toJson());
checkRegionInstanceGroupsListInstancesWarningData(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupsListInstancesWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupsListInstancesWarning();
var od =
new api.RegionInstanceGroupsListInstancesWarning.fromJson(o.toJson());
checkRegionInstanceGroupsListInstancesWarning(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupsListInstances", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupsListInstances();
var od = new api.RegionInstanceGroupsListInstances.fromJson(o.toJson());
checkRegionInstanceGroupsListInstances(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupsListInstancesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupsListInstancesRequest();
var od =
new api.RegionInstanceGroupsListInstancesRequest.fromJson(o.toJson());
checkRegionInstanceGroupsListInstancesRequest(od);
});
});
unittest.group("obj-schema-RegionInstanceGroupsSetNamedPortsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildRegionInstanceGroupsSetNamedPortsRequest();
var od =
new api.RegionInstanceGroupsSetNamedPortsRequest.fromJson(o.toJson());
checkRegionInstanceGroupsSetNamedPortsRequest(od);
});
});
unittest.group("obj-schema-RegionListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRegionListWarningData();
var od = new api.RegionListWarningData.fromJson(o.toJson());
checkRegionListWarningData(od);
});
});
unittest.group("obj-schema-RegionListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRegionListWarning();
var od = new api.RegionListWarning.fromJson(o.toJson());
checkRegionListWarning(od);
});
});
unittest.group("obj-schema-RegionList", () {
unittest.test("to-json--from-json", () {
var o = buildRegionList();
var od = new api.RegionList.fromJson(o.toJson());
checkRegionList(od);
});
});
unittest.group("obj-schema-ResourceCommitment", () {
unittest.test("to-json--from-json", () {
var o = buildResourceCommitment();
var od = new api.ResourceCommitment.fromJson(o.toJson());
checkResourceCommitment(od);
});
});
unittest.group("obj-schema-ResourceGroupReference", () {
unittest.test("to-json--from-json", () {
var o = buildResourceGroupReference();
var od = new api.ResourceGroupReference.fromJson(o.toJson());
checkResourceGroupReference(od);
});
});
unittest.group("obj-schema-RouteWarningsData", () {
unittest.test("to-json--from-json", () {
var o = buildRouteWarningsData();
var od = new api.RouteWarningsData.fromJson(o.toJson());
checkRouteWarningsData(od);
});
});
unittest.group("obj-schema-RouteWarnings", () {
unittest.test("to-json--from-json", () {
var o = buildRouteWarnings();
var od = new api.RouteWarnings.fromJson(o.toJson());
checkRouteWarnings(od);
});
});
unittest.group("obj-schema-Route", () {
unittest.test("to-json--from-json", () {
var o = buildRoute();
var od = new api.Route.fromJson(o.toJson());
checkRoute(od);
});
});
unittest.group("obj-schema-RouteListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRouteListWarningData();
var od = new api.RouteListWarningData.fromJson(o.toJson());
checkRouteListWarningData(od);
});
});
unittest.group("obj-schema-RouteListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRouteListWarning();
var od = new api.RouteListWarning.fromJson(o.toJson());
checkRouteListWarning(od);
});
});
unittest.group("obj-schema-RouteList", () {
unittest.test("to-json--from-json", () {
var o = buildRouteList();
var od = new api.RouteList.fromJson(o.toJson());
checkRouteList(od);
});
});
unittest.group("obj-schema-Router", () {
unittest.test("to-json--from-json", () {
var o = buildRouter();
var od = new api.Router.fromJson(o.toJson());
checkRouter(od);
});
});
unittest.group("obj-schema-RouterAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRouterAggregatedListWarningData();
var od = new api.RouterAggregatedListWarningData.fromJson(o.toJson());
checkRouterAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-RouterAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRouterAggregatedListWarning();
var od = new api.RouterAggregatedListWarning.fromJson(o.toJson());
checkRouterAggregatedListWarning(od);
});
});
unittest.group("obj-schema-RouterAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildRouterAggregatedList();
var od = new api.RouterAggregatedList.fromJson(o.toJson());
checkRouterAggregatedList(od);
});
});
unittest.group("obj-schema-RouterBgp", () {
unittest.test("to-json--from-json", () {
var o = buildRouterBgp();
var od = new api.RouterBgp.fromJson(o.toJson());
checkRouterBgp(od);
});
});
unittest.group("obj-schema-RouterBgpPeer", () {
unittest.test("to-json--from-json", () {
var o = buildRouterBgpPeer();
var od = new api.RouterBgpPeer.fromJson(o.toJson());
checkRouterBgpPeer(od);
});
});
unittest.group("obj-schema-RouterInterface", () {
unittest.test("to-json--from-json", () {
var o = buildRouterInterface();
var od = new api.RouterInterface.fromJson(o.toJson());
checkRouterInterface(od);
});
});
unittest.group("obj-schema-RouterListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRouterListWarningData();
var od = new api.RouterListWarningData.fromJson(o.toJson());
checkRouterListWarningData(od);
});
});
unittest.group("obj-schema-RouterListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRouterListWarning();
var od = new api.RouterListWarning.fromJson(o.toJson());
checkRouterListWarning(od);
});
});
unittest.group("obj-schema-RouterList", () {
unittest.test("to-json--from-json", () {
var o = buildRouterList();
var od = new api.RouterList.fromJson(o.toJson());
checkRouterList(od);
});
});
unittest.group("obj-schema-RouterStatus", () {
unittest.test("to-json--from-json", () {
var o = buildRouterStatus();
var od = new api.RouterStatus.fromJson(o.toJson());
checkRouterStatus(od);
});
});
unittest.group("obj-schema-RouterStatusBgpPeerStatus", () {
unittest.test("to-json--from-json", () {
var o = buildRouterStatusBgpPeerStatus();
var od = new api.RouterStatusBgpPeerStatus.fromJson(o.toJson());
checkRouterStatusBgpPeerStatus(od);
});
});
unittest.group("obj-schema-RouterStatusResponse", () {
unittest.test("to-json--from-json", () {
var o = buildRouterStatusResponse();
var od = new api.RouterStatusResponse.fromJson(o.toJson());
checkRouterStatusResponse(od);
});
});
unittest.group("obj-schema-RoutersPreviewResponse", () {
unittest.test("to-json--from-json", () {
var o = buildRoutersPreviewResponse();
var od = new api.RoutersPreviewResponse.fromJson(o.toJson());
checkRoutersPreviewResponse(od);
});
});
unittest.group("obj-schema-RoutersScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildRoutersScopedListWarningData();
var od = new api.RoutersScopedListWarningData.fromJson(o.toJson());
checkRoutersScopedListWarningData(od);
});
});
unittest.group("obj-schema-RoutersScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildRoutersScopedListWarning();
var od = new api.RoutersScopedListWarning.fromJson(o.toJson());
checkRoutersScopedListWarning(od);
});
});
unittest.group("obj-schema-RoutersScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildRoutersScopedList();
var od = new api.RoutersScopedList.fromJson(o.toJson());
checkRoutersScopedList(od);
});
});
unittest.group("obj-schema-SSLHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildSSLHealthCheck();
var od = new api.SSLHealthCheck.fromJson(o.toJson());
checkSSLHealthCheck(od);
});
});
unittest.group("obj-schema-Scheduling", () {
unittest.test("to-json--from-json", () {
var o = buildScheduling();
var od = new api.Scheduling.fromJson(o.toJson());
checkScheduling(od);
});
});
unittest.group("obj-schema-SerialPortOutput", () {
unittest.test("to-json--from-json", () {
var o = buildSerialPortOutput();
var od = new api.SerialPortOutput.fromJson(o.toJson());
checkSerialPortOutput(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-Snapshot", () {
unittest.test("to-json--from-json", () {
var o = buildSnapshot();
var od = new api.Snapshot.fromJson(o.toJson());
checkSnapshot(od);
});
});
unittest.group("obj-schema-SnapshotListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildSnapshotListWarningData();
var od = new api.SnapshotListWarningData.fromJson(o.toJson());
checkSnapshotListWarningData(od);
});
});
unittest.group("obj-schema-SnapshotListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildSnapshotListWarning();
var od = new api.SnapshotListWarning.fromJson(o.toJson());
checkSnapshotListWarning(od);
});
});
unittest.group("obj-schema-SnapshotList", () {
unittest.test("to-json--from-json", () {
var o = buildSnapshotList();
var od = new api.SnapshotList.fromJson(o.toJson());
checkSnapshotList(od);
});
});
unittest.group("obj-schema-SslCertificate", () {
unittest.test("to-json--from-json", () {
var o = buildSslCertificate();
var od = new api.SslCertificate.fromJson(o.toJson());
checkSslCertificate(od);
});
});
unittest.group("obj-schema-SslCertificateListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildSslCertificateListWarningData();
var od = new api.SslCertificateListWarningData.fromJson(o.toJson());
checkSslCertificateListWarningData(od);
});
});
unittest.group("obj-schema-SslCertificateListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildSslCertificateListWarning();
var od = new api.SslCertificateListWarning.fromJson(o.toJson());
checkSslCertificateListWarning(od);
});
});
unittest.group("obj-schema-SslCertificateList", () {
unittest.test("to-json--from-json", () {
var o = buildSslCertificateList();
var od = new api.SslCertificateList.fromJson(o.toJson());
checkSslCertificateList(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-SubnetworkAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkAggregatedListWarningData();
var od = new api.SubnetworkAggregatedListWarningData.fromJson(o.toJson());
checkSubnetworkAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-SubnetworkAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkAggregatedListWarning();
var od = new api.SubnetworkAggregatedListWarning.fromJson(o.toJson());
checkSubnetworkAggregatedListWarning(od);
});
});
unittest.group("obj-schema-SubnetworkAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkAggregatedList();
var od = new api.SubnetworkAggregatedList.fromJson(o.toJson());
checkSubnetworkAggregatedList(od);
});
});
unittest.group("obj-schema-SubnetworkListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkListWarningData();
var od = new api.SubnetworkListWarningData.fromJson(o.toJson());
checkSubnetworkListWarningData(od);
});
});
unittest.group("obj-schema-SubnetworkListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkListWarning();
var od = new api.SubnetworkListWarning.fromJson(o.toJson());
checkSubnetworkListWarning(od);
});
});
unittest.group("obj-schema-SubnetworkList", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkList();
var od = new api.SubnetworkList.fromJson(o.toJson());
checkSubnetworkList(od);
});
});
unittest.group("obj-schema-SubnetworkSecondaryRange", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworkSecondaryRange();
var od = new api.SubnetworkSecondaryRange.fromJson(o.toJson());
checkSubnetworkSecondaryRange(od);
});
});
unittest.group("obj-schema-SubnetworksExpandIpCidrRangeRequest", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworksExpandIpCidrRangeRequest();
var od = new api.SubnetworksExpandIpCidrRangeRequest.fromJson(o.toJson());
checkSubnetworksExpandIpCidrRangeRequest(od);
});
});
unittest.group("obj-schema-SubnetworksScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworksScopedListWarningData();
var od = new api.SubnetworksScopedListWarningData.fromJson(o.toJson());
checkSubnetworksScopedListWarningData(od);
});
});
unittest.group("obj-schema-SubnetworksScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworksScopedListWarning();
var od = new api.SubnetworksScopedListWarning.fromJson(o.toJson());
checkSubnetworksScopedListWarning(od);
});
});
unittest.group("obj-schema-SubnetworksScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworksScopedList();
var od = new api.SubnetworksScopedList.fromJson(o.toJson());
checkSubnetworksScopedList(od);
});
});
unittest.group("obj-schema-SubnetworksSetPrivateIpGoogleAccessRequest", () {
unittest.test("to-json--from-json", () {
var o = buildSubnetworksSetPrivateIpGoogleAccessRequest();
var od = new api.SubnetworksSetPrivateIpGoogleAccessRequest.fromJson(
o.toJson());
checkSubnetworksSetPrivateIpGoogleAccessRequest(od);
});
});
unittest.group("obj-schema-TCPHealthCheck", () {
unittest.test("to-json--from-json", () {
var o = buildTCPHealthCheck();
var od = new api.TCPHealthCheck.fromJson(o.toJson());
checkTCPHealthCheck(od);
});
});
unittest.group("obj-schema-Tags", () {
unittest.test("to-json--from-json", () {
var o = buildTags();
var od = new api.Tags.fromJson(o.toJson());
checkTags(od);
});
});
unittest.group("obj-schema-TargetHttpProxy", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpProxy();
var od = new api.TargetHttpProxy.fromJson(o.toJson());
checkTargetHttpProxy(od);
});
});
unittest.group("obj-schema-TargetHttpProxyListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpProxyListWarningData();
var od = new api.TargetHttpProxyListWarningData.fromJson(o.toJson());
checkTargetHttpProxyListWarningData(od);
});
});
unittest.group("obj-schema-TargetHttpProxyListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpProxyListWarning();
var od = new api.TargetHttpProxyListWarning.fromJson(o.toJson());
checkTargetHttpProxyListWarning(od);
});
});
unittest.group("obj-schema-TargetHttpProxyList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpProxyList();
var od = new api.TargetHttpProxyList.fromJson(o.toJson());
checkTargetHttpProxyList(od);
});
});
unittest.group("obj-schema-TargetHttpsProxiesSetSslCertificatesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpsProxiesSetSslCertificatesRequest();
var od = new api.TargetHttpsProxiesSetSslCertificatesRequest.fromJson(
o.toJson());
checkTargetHttpsProxiesSetSslCertificatesRequest(od);
});
});
unittest.group("obj-schema-TargetHttpsProxy", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpsProxy();
var od = new api.TargetHttpsProxy.fromJson(o.toJson());
checkTargetHttpsProxy(od);
});
});
unittest.group("obj-schema-TargetHttpsProxyListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpsProxyListWarningData();
var od = new api.TargetHttpsProxyListWarningData.fromJson(o.toJson());
checkTargetHttpsProxyListWarningData(od);
});
});
unittest.group("obj-schema-TargetHttpsProxyListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpsProxyListWarning();
var od = new api.TargetHttpsProxyListWarning.fromJson(o.toJson());
checkTargetHttpsProxyListWarning(od);
});
});
unittest.group("obj-schema-TargetHttpsProxyList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetHttpsProxyList();
var od = new api.TargetHttpsProxyList.fromJson(o.toJson());
checkTargetHttpsProxyList(od);
});
});
unittest.group("obj-schema-TargetInstance", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstance();
var od = new api.TargetInstance.fromJson(o.toJson());
checkTargetInstance(od);
});
});
unittest.group("obj-schema-TargetInstanceAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceAggregatedListWarningData();
var od =
new api.TargetInstanceAggregatedListWarningData.fromJson(o.toJson());
checkTargetInstanceAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-TargetInstanceAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceAggregatedListWarning();
var od = new api.TargetInstanceAggregatedListWarning.fromJson(o.toJson());
checkTargetInstanceAggregatedListWarning(od);
});
});
unittest.group("obj-schema-TargetInstanceAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceAggregatedList();
var od = new api.TargetInstanceAggregatedList.fromJson(o.toJson());
checkTargetInstanceAggregatedList(od);
});
});
unittest.group("obj-schema-TargetInstanceListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceListWarningData();
var od = new api.TargetInstanceListWarningData.fromJson(o.toJson());
checkTargetInstanceListWarningData(od);
});
});
unittest.group("obj-schema-TargetInstanceListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceListWarning();
var od = new api.TargetInstanceListWarning.fromJson(o.toJson());
checkTargetInstanceListWarning(od);
});
});
unittest.group("obj-schema-TargetInstanceList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstanceList();
var od = new api.TargetInstanceList.fromJson(o.toJson());
checkTargetInstanceList(od);
});
});
unittest.group("obj-schema-TargetInstancesScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstancesScopedListWarningData();
var od =
new api.TargetInstancesScopedListWarningData.fromJson(o.toJson());
checkTargetInstancesScopedListWarningData(od);
});
});
unittest.group("obj-schema-TargetInstancesScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstancesScopedListWarning();
var od = new api.TargetInstancesScopedListWarning.fromJson(o.toJson());
checkTargetInstancesScopedListWarning(od);
});
});
unittest.group("obj-schema-TargetInstancesScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetInstancesScopedList();
var od = new api.TargetInstancesScopedList.fromJson(o.toJson());
checkTargetInstancesScopedList(od);
});
});
unittest.group("obj-schema-TargetPool", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPool();
var od = new api.TargetPool.fromJson(o.toJson());
checkTargetPool(od);
});
});
unittest.group("obj-schema-TargetPoolAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolAggregatedListWarningData();
var od = new api.TargetPoolAggregatedListWarningData.fromJson(o.toJson());
checkTargetPoolAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-TargetPoolAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolAggregatedListWarning();
var od = new api.TargetPoolAggregatedListWarning.fromJson(o.toJson());
checkTargetPoolAggregatedListWarning(od);
});
});
unittest.group("obj-schema-TargetPoolAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolAggregatedList();
var od = new api.TargetPoolAggregatedList.fromJson(o.toJson());
checkTargetPoolAggregatedList(od);
});
});
unittest.group("obj-schema-TargetPoolInstanceHealth", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolInstanceHealth();
var od = new api.TargetPoolInstanceHealth.fromJson(o.toJson());
checkTargetPoolInstanceHealth(od);
});
});
unittest.group("obj-schema-TargetPoolListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolListWarningData();
var od = new api.TargetPoolListWarningData.fromJson(o.toJson());
checkTargetPoolListWarningData(od);
});
});
unittest.group("obj-schema-TargetPoolListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolListWarning();
var od = new api.TargetPoolListWarning.fromJson(o.toJson());
checkTargetPoolListWarning(od);
});
});
unittest.group("obj-schema-TargetPoolList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolList();
var od = new api.TargetPoolList.fromJson(o.toJson());
checkTargetPoolList(od);
});
});
unittest.group("obj-schema-TargetPoolsAddHealthCheckRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsAddHealthCheckRequest();
var od = new api.TargetPoolsAddHealthCheckRequest.fromJson(o.toJson());
checkTargetPoolsAddHealthCheckRequest(od);
});
});
unittest.group("obj-schema-TargetPoolsAddInstanceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsAddInstanceRequest();
var od = new api.TargetPoolsAddInstanceRequest.fromJson(o.toJson());
checkTargetPoolsAddInstanceRequest(od);
});
});
unittest.group("obj-schema-TargetPoolsRemoveHealthCheckRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsRemoveHealthCheckRequest();
var od = new api.TargetPoolsRemoveHealthCheckRequest.fromJson(o.toJson());
checkTargetPoolsRemoveHealthCheckRequest(od);
});
});
unittest.group("obj-schema-TargetPoolsRemoveInstanceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsRemoveInstanceRequest();
var od = new api.TargetPoolsRemoveInstanceRequest.fromJson(o.toJson());
checkTargetPoolsRemoveInstanceRequest(od);
});
});
unittest.group("obj-schema-TargetPoolsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsScopedListWarningData();
var od = new api.TargetPoolsScopedListWarningData.fromJson(o.toJson());
checkTargetPoolsScopedListWarningData(od);
});
});
unittest.group("obj-schema-TargetPoolsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsScopedListWarning();
var od = new api.TargetPoolsScopedListWarning.fromJson(o.toJson());
checkTargetPoolsScopedListWarning(od);
});
});
unittest.group("obj-schema-TargetPoolsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetPoolsScopedList();
var od = new api.TargetPoolsScopedList.fromJson(o.toJson());
checkTargetPoolsScopedList(od);
});
});
unittest.group("obj-schema-TargetReference", () {
unittest.test("to-json--from-json", () {
var o = buildTargetReference();
var od = new api.TargetReference.fromJson(o.toJson());
checkTargetReference(od);
});
});
unittest.group("obj-schema-TargetSslProxiesSetBackendServiceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxiesSetBackendServiceRequest();
var od =
new api.TargetSslProxiesSetBackendServiceRequest.fromJson(o.toJson());
checkTargetSslProxiesSetBackendServiceRequest(od);
});
});
unittest.group("obj-schema-TargetSslProxiesSetProxyHeaderRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxiesSetProxyHeaderRequest();
var od =
new api.TargetSslProxiesSetProxyHeaderRequest.fromJson(o.toJson());
checkTargetSslProxiesSetProxyHeaderRequest(od);
});
});
unittest.group("obj-schema-TargetSslProxiesSetSslCertificatesRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxiesSetSslCertificatesRequest();
var od = new api.TargetSslProxiesSetSslCertificatesRequest.fromJson(
o.toJson());
checkTargetSslProxiesSetSslCertificatesRequest(od);
});
});
unittest.group("obj-schema-TargetSslProxy", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxy();
var od = new api.TargetSslProxy.fromJson(o.toJson());
checkTargetSslProxy(od);
});
});
unittest.group("obj-schema-TargetSslProxyListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxyListWarningData();
var od = new api.TargetSslProxyListWarningData.fromJson(o.toJson());
checkTargetSslProxyListWarningData(od);
});
});
unittest.group("obj-schema-TargetSslProxyListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxyListWarning();
var od = new api.TargetSslProxyListWarning.fromJson(o.toJson());
checkTargetSslProxyListWarning(od);
});
});
unittest.group("obj-schema-TargetSslProxyList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetSslProxyList();
var od = new api.TargetSslProxyList.fromJson(o.toJson());
checkTargetSslProxyList(od);
});
});
unittest.group("obj-schema-TargetTcpProxiesSetBackendServiceRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxiesSetBackendServiceRequest();
var od =
new api.TargetTcpProxiesSetBackendServiceRequest.fromJson(o.toJson());
checkTargetTcpProxiesSetBackendServiceRequest(od);
});
});
unittest.group("obj-schema-TargetTcpProxiesSetProxyHeaderRequest", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxiesSetProxyHeaderRequest();
var od =
new api.TargetTcpProxiesSetProxyHeaderRequest.fromJson(o.toJson());
checkTargetTcpProxiesSetProxyHeaderRequest(od);
});
});
unittest.group("obj-schema-TargetTcpProxy", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxy();
var od = new api.TargetTcpProxy.fromJson(o.toJson());
checkTargetTcpProxy(od);
});
});
unittest.group("obj-schema-TargetTcpProxyListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxyListWarningData();
var od = new api.TargetTcpProxyListWarningData.fromJson(o.toJson());
checkTargetTcpProxyListWarningData(od);
});
});
unittest.group("obj-schema-TargetTcpProxyListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxyListWarning();
var od = new api.TargetTcpProxyListWarning.fromJson(o.toJson());
checkTargetTcpProxyListWarning(od);
});
});
unittest.group("obj-schema-TargetTcpProxyList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetTcpProxyList();
var od = new api.TargetTcpProxyList.fromJson(o.toJson());
checkTargetTcpProxyList(od);
});
});
unittest.group("obj-schema-TargetVpnGateway", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGateway();
var od = new api.TargetVpnGateway.fromJson(o.toJson());
checkTargetVpnGateway(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayAggregatedListWarningData();
var od = new api.TargetVpnGatewayAggregatedListWarningData.fromJson(
o.toJson());
checkTargetVpnGatewayAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayAggregatedListWarning();
var od =
new api.TargetVpnGatewayAggregatedListWarning.fromJson(o.toJson());
checkTargetVpnGatewayAggregatedListWarning(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayAggregatedList();
var od = new api.TargetVpnGatewayAggregatedList.fromJson(o.toJson());
checkTargetVpnGatewayAggregatedList(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayListWarningData();
var od = new api.TargetVpnGatewayListWarningData.fromJson(o.toJson());
checkTargetVpnGatewayListWarningData(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayListWarning();
var od = new api.TargetVpnGatewayListWarning.fromJson(o.toJson());
checkTargetVpnGatewayListWarning(od);
});
});
unittest.group("obj-schema-TargetVpnGatewayList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewayList();
var od = new api.TargetVpnGatewayList.fromJson(o.toJson());
checkTargetVpnGatewayList(od);
});
});
unittest.group("obj-schema-TargetVpnGatewaysScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewaysScopedListWarningData();
var od =
new api.TargetVpnGatewaysScopedListWarningData.fromJson(o.toJson());
checkTargetVpnGatewaysScopedListWarningData(od);
});
});
unittest.group("obj-schema-TargetVpnGatewaysScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewaysScopedListWarning();
var od = new api.TargetVpnGatewaysScopedListWarning.fromJson(o.toJson());
checkTargetVpnGatewaysScopedListWarning(od);
});
});
unittest.group("obj-schema-TargetVpnGatewaysScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildTargetVpnGatewaysScopedList();
var od = new api.TargetVpnGatewaysScopedList.fromJson(o.toJson());
checkTargetVpnGatewaysScopedList(od);
});
});
unittest.group("obj-schema-TestFailure", () {
unittest.test("to-json--from-json", () {
var o = buildTestFailure();
var od = new api.TestFailure.fromJson(o.toJson());
checkTestFailure(od);
});
});
unittest.group("obj-schema-UrlMap", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMap();
var od = new api.UrlMap.fromJson(o.toJson());
checkUrlMap(od);
});
});
unittest.group("obj-schema-UrlMapListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapListWarningData();
var od = new api.UrlMapListWarningData.fromJson(o.toJson());
checkUrlMapListWarningData(od);
});
});
unittest.group("obj-schema-UrlMapListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapListWarning();
var od = new api.UrlMapListWarning.fromJson(o.toJson());
checkUrlMapListWarning(od);
});
});
unittest.group("obj-schema-UrlMapList", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapList();
var od = new api.UrlMapList.fromJson(o.toJson());
checkUrlMapList(od);
});
});
unittest.group("obj-schema-UrlMapReference", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapReference();
var od = new api.UrlMapReference.fromJson(o.toJson());
checkUrlMapReference(od);
});
});
unittest.group("obj-schema-UrlMapTest", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapTest();
var od = new api.UrlMapTest.fromJson(o.toJson());
checkUrlMapTest(od);
});
});
unittest.group("obj-schema-UrlMapValidationResult", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapValidationResult();
var od = new api.UrlMapValidationResult.fromJson(o.toJson());
checkUrlMapValidationResult(od);
});
});
unittest.group("obj-schema-UrlMapsValidateRequest", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapsValidateRequest();
var od = new api.UrlMapsValidateRequest.fromJson(o.toJson());
checkUrlMapsValidateRequest(od);
});
});
unittest.group("obj-schema-UrlMapsValidateResponse", () {
unittest.test("to-json--from-json", () {
var o = buildUrlMapsValidateResponse();
var od = new api.UrlMapsValidateResponse.fromJson(o.toJson());
checkUrlMapsValidateResponse(od);
});
});
unittest.group("obj-schema-UsageExportLocation", () {
unittest.test("to-json--from-json", () {
var o = buildUsageExportLocation();
var od = new api.UsageExportLocation.fromJson(o.toJson());
checkUsageExportLocation(od);
});
});
unittest.group("obj-schema-VpnTunnel", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnel();
var od = new api.VpnTunnel.fromJson(o.toJson());
checkVpnTunnel(od);
});
});
unittest.group("obj-schema-VpnTunnelAggregatedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelAggregatedListWarningData();
var od = new api.VpnTunnelAggregatedListWarningData.fromJson(o.toJson());
checkVpnTunnelAggregatedListWarningData(od);
});
});
unittest.group("obj-schema-VpnTunnelAggregatedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelAggregatedListWarning();
var od = new api.VpnTunnelAggregatedListWarning.fromJson(o.toJson());
checkVpnTunnelAggregatedListWarning(od);
});
});
unittest.group("obj-schema-VpnTunnelAggregatedList", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelAggregatedList();
var od = new api.VpnTunnelAggregatedList.fromJson(o.toJson());
checkVpnTunnelAggregatedList(od);
});
});
unittest.group("obj-schema-VpnTunnelListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelListWarningData();
var od = new api.VpnTunnelListWarningData.fromJson(o.toJson());
checkVpnTunnelListWarningData(od);
});
});
unittest.group("obj-schema-VpnTunnelListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelListWarning();
var od = new api.VpnTunnelListWarning.fromJson(o.toJson());
checkVpnTunnelListWarning(od);
});
});
unittest.group("obj-schema-VpnTunnelList", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelList();
var od = new api.VpnTunnelList.fromJson(o.toJson());
checkVpnTunnelList(od);
});
});
unittest.group("obj-schema-VpnTunnelsScopedListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelsScopedListWarningData();
var od = new api.VpnTunnelsScopedListWarningData.fromJson(o.toJson());
checkVpnTunnelsScopedListWarningData(od);
});
});
unittest.group("obj-schema-VpnTunnelsScopedListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelsScopedListWarning();
var od = new api.VpnTunnelsScopedListWarning.fromJson(o.toJson());
checkVpnTunnelsScopedListWarning(od);
});
});
unittest.group("obj-schema-VpnTunnelsScopedList", () {
unittest.test("to-json--from-json", () {
var o = buildVpnTunnelsScopedList();
var od = new api.VpnTunnelsScopedList.fromJson(o.toJson());
checkVpnTunnelsScopedList(od);
});
});
unittest.group("obj-schema-XpnHostListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildXpnHostListWarningData();
var od = new api.XpnHostListWarningData.fromJson(o.toJson());
checkXpnHostListWarningData(od);
});
});
unittest.group("obj-schema-XpnHostListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildXpnHostListWarning();
var od = new api.XpnHostListWarning.fromJson(o.toJson());
checkXpnHostListWarning(od);
});
});
unittest.group("obj-schema-XpnHostList", () {
unittest.test("to-json--from-json", () {
var o = buildXpnHostList();
var od = new api.XpnHostList.fromJson(o.toJson());
checkXpnHostList(od);
});
});
unittest.group("obj-schema-XpnResourceId", () {
unittest.test("to-json--from-json", () {
var o = buildXpnResourceId();
var od = new api.XpnResourceId.fromJson(o.toJson());
checkXpnResourceId(od);
});
});
unittest.group("obj-schema-Zone", () {
unittest.test("to-json--from-json", () {
var o = buildZone();
var od = new api.Zone.fromJson(o.toJson());
checkZone(od);
});
});
unittest.group("obj-schema-ZoneListWarningData", () {
unittest.test("to-json--from-json", () {
var o = buildZoneListWarningData();
var od = new api.ZoneListWarningData.fromJson(o.toJson());
checkZoneListWarningData(od);
});
});
unittest.group("obj-schema-ZoneListWarning", () {
unittest.test("to-json--from-json", () {
var o = buildZoneListWarning();
var od = new api.ZoneListWarning.fromJson(o.toJson());
checkZoneListWarning(od);
});
});
unittest.group("obj-schema-ZoneList", () {
unittest.test("to-json--from-json", () {
var o = buildZoneList();
var od = new api.ZoneList.fromJson(o.toJson());
checkZoneList(od);
});
});
unittest.group("obj-schema-ZoneSetLabelsRequest", () {
unittest.test("to-json--from-json", () {
var o = buildZoneSetLabelsRequest();
var od = new api.ZoneSetLabelsRequest.fromJson(o.toJson());
checkZoneSetLabelsRequest(od);
});
});
unittest.group("resource-AcceleratorTypesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.AcceleratorTypesResourceApi res =
new api.ComputeApi(mock).acceleratorTypes;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAcceleratorTypeAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.AcceleratorTypeAggregatedList response) {
checkAcceleratorTypeAggregatedList(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.AcceleratorTypesResourceApi res =
new api.ComputeApi(mock).acceleratorTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_acceleratorType = "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 = {};
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(buildAcceleratorType());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_acceleratorType, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.AcceleratorType response) {
checkAcceleratorType(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.AcceleratorTypesResourceApi res =
new api.ComputeApi(mock).acceleratorTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAcceleratorTypeList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AcceleratorTypeList response) {
checkAcceleratorTypeList(response);
})));
});
});
unittest.group("resource-AddressesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.AddressesResourceApi res = new api.ComputeApi(mock).addresses;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAddressAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AddressAggregatedList response) {
checkAddressAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.AddressesResourceApi res = new api.ComputeApi(mock).addresses;
var arg_project = "foo";
var arg_region = "foo";
var arg_address = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_address,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.AddressesResourceApi res = new api.ComputeApi(mock).addresses;
var arg_project = "foo";
var arg_region = "foo";
var arg_address = "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 = {};
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(buildAddress());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_address, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Address response) {
checkAddress(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.AddressesResourceApi res = new api.ComputeApi(mock).addresses;
var arg_request = buildAddress();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Address.fromJson(json);
checkAddress(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.AddressesResourceApi res = new api.ComputeApi(mock).addresses;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAddressList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AddressList response) {
checkAddressList(response);
})));
});
});
unittest.group("resource-AutoscalersResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAutoscalerAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AutoscalerAggregatedList response) {
checkAutoscalerAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_autoscaler,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_autoscaler = "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 = {};
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(buildAutoscaler());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_autoscaler, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Autoscaler response) {
checkAutoscaler(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAutoscalerList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AutoscalerList response) {
checkAutoscalerList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_zone = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["autoscaler"].first, unittest.equals(arg_autoscaler));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone,
autoscaler: arg_autoscaler,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.AutoscalersResourceApi res = new api.ComputeApi(mock).autoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_zone = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["autoscaler"].first, unittest.equals(arg_autoscaler));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_zone,
autoscaler: arg_autoscaler,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-BackendBucketsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_project = "foo";
var arg_backendBucket = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_backendBucket,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_project = "foo";
var arg_backendBucket = "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 = {};
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(buildBackendBucket());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_backendBucket, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendBucket response) {
checkBackendBucket(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_request = buildBackendBucket();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendBucket.fromJson(json);
checkBackendBucket(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildBackendBucketList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendBucketList response) {
checkBackendBucketList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_request = buildBackendBucket();
var arg_project = "foo";
var arg_backendBucket = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendBucket.fromJson(json);
checkBackendBucket(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_backendBucket,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.BackendBucketsResourceApi res =
new api.ComputeApi(mock).backendBuckets;
var arg_request = buildBackendBucket();
var arg_project = "foo";
var arg_backendBucket = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendBucket.fromJson(json);
checkBackendBucket(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_backendBucket,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-BackendServicesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildBackendServiceAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.BackendServiceAggregatedList response) {
checkBackendServiceAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_project = "foo";
var arg_backendService = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_project = "foo";
var arg_backendService = "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 = {};
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(buildBackendService());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_backendService, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendService response) {
checkBackendService(response);
})));
});
unittest.test("method--getHealth", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_request = buildResourceGroupReference();
var arg_project = "foo";
var arg_backendService = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ResourceGroupReference.fromJson(json);
checkResourceGroupReference(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 = {};
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(buildBackendServiceGroupHealth());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getHealth(arg_request, arg_project, arg_backendService,
$fields: arg_$fields)
.then(
unittest.expectAsync1(((api.BackendServiceGroupHealth response) {
checkBackendServiceGroupHealth(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildBackendServiceList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendServiceList response) {
checkBackendServiceList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_backendService = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.BackendServicesResourceApi res =
new api.ComputeApi(mock).backendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_backendService = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-DiskTypesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.DiskTypesResourceApi res = new api.ComputeApi(mock).diskTypes;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildDiskTypeAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.DiskTypeAggregatedList response) {
checkDiskTypeAggregatedList(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.DiskTypesResourceApi res = new api.ComputeApi(mock).diskTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_diskType = "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 = {};
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(buildDiskType());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_diskType, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.DiskType response) {
checkDiskType(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.DiskTypesResourceApi res = new api.ComputeApi(mock).diskTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildDiskTypeList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.DiskTypeList response) {
checkDiskTypeList(response);
})));
});
});
unittest.group("resource-DisksResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildDiskAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.DiskAggregatedList response) {
checkDiskAggregatedList(response);
})));
});
unittest.test("method--createSnapshot", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_request = buildSnapshot();
var arg_project = "foo";
var arg_zone = "foo";
var arg_disk = "foo";
var arg_guestFlush = true;
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Snapshot.fromJson(json);
checkSnapshot(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 = {};
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["guestFlush"].first, unittest.equals("$arg_guestFlush"));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.createSnapshot(arg_request, arg_project, arg_zone, arg_disk,
guestFlush: arg_guestFlush,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_project = "foo";
var arg_zone = "foo";
var arg_disk = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_disk,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_project = "foo";
var arg_zone = "foo";
var arg_disk = "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 = {};
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(buildDisk());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_disk, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Disk response) {
checkDisk(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_request = buildDisk();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_sourceImage = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Disk.fromJson(json);
checkDisk(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
unittest.expect(
queryMap["sourceImage"].first, unittest.equals(arg_sourceImage));
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,
requestId: arg_requestId,
sourceImage: arg_sourceImage,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildDiskList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.DiskList response) {
checkDiskList(response);
})));
});
unittest.test("method--resize", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_request = buildDisksResizeRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_disk = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.DisksResizeRequest.fromJson(json);
checkDisksResizeRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.resize(arg_request, arg_project, arg_zone, arg_disk,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setLabels", () {
var mock = new HttpServerMock();
api.DisksResourceApi res = new api.ComputeApi(mock).disks;
var arg_request = buildZoneSetLabelsRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_resource = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ZoneSetLabelsRequest.fromJson(json);
checkZoneSetLabelsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setLabels(arg_request, arg_project, arg_zone, arg_resource,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-FirewallsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_project = "foo";
var arg_firewall = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_firewall,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_project = "foo";
var arg_firewall = "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 = {};
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(buildFirewall());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_firewall, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Firewall response) {
checkFirewall(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_request = buildFirewall();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Firewall.fromJson(json);
checkFirewall(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildFirewallList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.FirewallList response) {
checkFirewallList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_request = buildFirewall();
var arg_project = "foo";
var arg_firewall = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Firewall.fromJson(json);
checkFirewall(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_firewall,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.FirewallsResourceApi res = new api.ComputeApi(mock).firewalls;
var arg_request = buildFirewall();
var arg_project = "foo";
var arg_firewall = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Firewall.fromJson(json);
checkFirewall(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_firewall,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-ForwardingRulesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildForwardingRuleAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.ForwardingRuleAggregatedList response) {
checkForwardingRuleAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_project = "foo";
var arg_region = "foo";
var arg_forwardingRule = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_forwardingRule,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_project = "foo";
var arg_region = "foo";
var arg_forwardingRule = "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 = {};
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(buildForwardingRule());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_forwardingRule,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ForwardingRule response) {
checkForwardingRule(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_request = buildForwardingRule();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ForwardingRule.fromJson(json);
checkForwardingRule(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildForwardingRuleList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ForwardingRuleList response) {
checkForwardingRuleList(response);
})));
});
unittest.test("method--setTarget", () {
var mock = new HttpServerMock();
api.ForwardingRulesResourceApi res =
new api.ComputeApi(mock).forwardingRules;
var arg_request = buildTargetReference();
var arg_project = "foo";
var arg_region = "foo";
var arg_forwardingRule = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetReference.fromJson(json);
checkTargetReference(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setTarget(arg_request, arg_project, arg_region, arg_forwardingRule,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-GlobalAddressesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.GlobalAddressesResourceApi res =
new api.ComputeApi(mock).globalAddresses;
var arg_project = "foo";
var arg_address = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_address,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.GlobalAddressesResourceApi res =
new api.ComputeApi(mock).globalAddresses;
var arg_project = "foo";
var arg_address = "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 = {};
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(buildAddress());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_address, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Address response) {
checkAddress(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.GlobalAddressesResourceApi res =
new api.ComputeApi(mock).globalAddresses;
var arg_request = buildAddress();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Address.fromJson(json);
checkAddress(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.GlobalAddressesResourceApi res =
new api.ComputeApi(mock).globalAddresses;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildAddressList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.AddressList response) {
checkAddressList(response);
})));
});
});
unittest.group("resource-GlobalForwardingRulesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.GlobalForwardingRulesResourceApi res =
new api.ComputeApi(mock).globalForwardingRules;
var arg_project = "foo";
var arg_forwardingRule = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_forwardingRule,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.GlobalForwardingRulesResourceApi res =
new api.ComputeApi(mock).globalForwardingRules;
var arg_project = "foo";
var arg_forwardingRule = "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 = {};
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(buildForwardingRule());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_forwardingRule, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.ForwardingRule response) {
checkForwardingRule(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.GlobalForwardingRulesResourceApi res =
new api.ComputeApi(mock).globalForwardingRules;
var arg_request = buildForwardingRule();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ForwardingRule.fromJson(json);
checkForwardingRule(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.GlobalForwardingRulesResourceApi res =
new api.ComputeApi(mock).globalForwardingRules;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildForwardingRuleList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ForwardingRuleList response) {
checkForwardingRuleList(response);
})));
});
unittest.test("method--setTarget", () {
var mock = new HttpServerMock();
api.GlobalForwardingRulesResourceApi res =
new api.ComputeApi(mock).globalForwardingRules;
var arg_request = buildTargetReference();
var arg_project = "foo";
var arg_forwardingRule = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetReference.fromJson(json);
checkTargetReference(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setTarget(arg_request, arg_project, arg_forwardingRule,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-GlobalOperationsResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.GlobalOperationsResourceApi res =
new api.ComputeApi(mock).globalOperations;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildOperationAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.OperationAggregatedList response) {
checkOperationAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.GlobalOperationsResourceApi res =
new api.ComputeApi(mock).globalOperations;
var arg_project = "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 = {};
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_project, arg_operation, $fields: arg_$fields)
.then(unittest.expectAsync1((_) {}));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.GlobalOperationsResourceApi res =
new api.ComputeApi(mock).globalOperations;
var arg_project = "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 = {};
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_operation, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.GlobalOperationsResourceApi res =
new api.ComputeApi(mock).globalOperations;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.OperationList response) {
checkOperationList(response);
})));
});
});
unittest.group("resource-HealthChecksResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_project = "foo";
var arg_healthCheck = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_healthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_project = "foo";
var arg_healthCheck = "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 = {};
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(buildHealthCheck());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_healthCheck, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.HealthCheck response) {
checkHealthCheck(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_request = buildHealthCheck();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HealthCheck.fromJson(json);
checkHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildHealthCheckList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.HealthCheckList response) {
checkHealthCheckList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_request = buildHealthCheck();
var arg_project = "foo";
var arg_healthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HealthCheck.fromJson(json);
checkHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_healthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.HealthChecksResourceApi res = new api.ComputeApi(mock).healthChecks;
var arg_request = buildHealthCheck();
var arg_project = "foo";
var arg_healthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HealthCheck.fromJson(json);
checkHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_healthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-HttpHealthChecksResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_project = "foo";
var arg_httpHealthCheck = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_httpHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_project = "foo";
var arg_httpHealthCheck = "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 = {};
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(buildHttpHealthCheck());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_httpHealthCheck, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.HttpHealthCheck response) {
checkHttpHealthCheck(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_request = buildHttpHealthCheck();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpHealthCheck.fromJson(json);
checkHttpHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildHttpHealthCheckList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.HttpHealthCheckList response) {
checkHttpHealthCheckList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_request = buildHttpHealthCheck();
var arg_project = "foo";
var arg_httpHealthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpHealthCheck.fromJson(json);
checkHttpHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_httpHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.HttpHealthChecksResourceApi res =
new api.ComputeApi(mock).httpHealthChecks;
var arg_request = buildHttpHealthCheck();
var arg_project = "foo";
var arg_httpHealthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpHealthCheck.fromJson(json);
checkHttpHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_httpHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-HttpsHealthChecksResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_project = "foo";
var arg_httpsHealthCheck = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_httpsHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_project = "foo";
var arg_httpsHealthCheck = "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 = {};
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(buildHttpsHealthCheck());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_httpsHealthCheck, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.HttpsHealthCheck response) {
checkHttpsHealthCheck(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_request = buildHttpsHealthCheck();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpsHealthCheck.fromJson(json);
checkHttpsHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildHttpsHealthCheckList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.HttpsHealthCheckList response) {
checkHttpsHealthCheckList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_request = buildHttpsHealthCheck();
var arg_project = "foo";
var arg_httpsHealthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpsHealthCheck.fromJson(json);
checkHttpsHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_httpsHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.HttpsHealthChecksResourceApi res =
new api.ComputeApi(mock).httpsHealthChecks;
var arg_request = buildHttpsHealthCheck();
var arg_project = "foo";
var arg_httpsHealthCheck = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.HttpsHealthCheck.fromJson(json);
checkHttpsHealthCheck(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_httpsHealthCheck,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-ImagesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_project = "foo";
var arg_image = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_image,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--deprecate", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_request = buildDeprecationStatus();
var arg_project = "foo";
var arg_image = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.DeprecationStatus.fromJson(json);
checkDeprecationStatus(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.deprecate(arg_request, arg_project, arg_image,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_project = "foo";
var arg_image = "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 = {};
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(buildImage());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_image, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Image response) {
checkImage(response);
})));
});
unittest.test("method--getFromFamily", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_project = "foo";
var arg_family = "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 = {};
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(buildImage());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getFromFamily(arg_project, arg_family, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Image response) {
checkImage(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_request = buildImage();
var arg_project = "foo";
var arg_forceCreate = true;
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Image.fromJson(json);
checkImage(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 = {};
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["forceCreate"].first, unittest.equals("$arg_forceCreate"));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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,
forceCreate: arg_forceCreate,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildImageList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ImageList response) {
checkImageList(response);
})));
});
unittest.test("method--setLabels", () {
var mock = new HttpServerMock();
api.ImagesResourceApi res = new api.ComputeApi(mock).images;
var arg_request = buildGlobalSetLabelsRequest();
var arg_project = "foo";
var arg_resource = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.GlobalSetLabelsRequest.fromJson(json);
checkGlobalSetLabelsRequest(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 = {};
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
.setLabels(arg_request, arg_project, arg_resource,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-InstanceGroupManagersResourceApi", () {
unittest.test("method--abandonInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManagersAbandonInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.InstanceGroupManagersAbandonInstancesRequest.fromJson(json);
checkInstanceGroupManagersAbandonInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.abandonInstances(
arg_request, arg_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupManagerAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.InstanceGroupManagerAggregatedList response) {
checkInstanceGroupManagerAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--deleteInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManagersDeleteInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.InstanceGroupManagersDeleteInstancesRequest.fromJson(json);
checkInstanceGroupManagersDeleteInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.deleteInstances(
arg_request, arg_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "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 = {};
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(buildInstanceGroupManager());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_instanceGroupManager,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroupManager response) {
checkInstanceGroupManager(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManager();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupManager.fromJson(json);
checkInstanceGroupManager(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupManagerList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroupManagerList response) {
checkInstanceGroupManagerList(response);
})));
});
unittest.test("method--listManagedInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["order_by"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupManagersListManagedInstancesResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.listManagedInstances(arg_project, arg_zone, arg_instanceGroupManager,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(
((api.InstanceGroupManagersListManagedInstancesResponse
response) {
checkInstanceGroupManagersListManagedInstancesResponse(response);
})));
});
unittest.test("method--recreateInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManagersRecreateInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.InstanceGroupManagersRecreateInstancesRequest.fromJson(
json);
checkInstanceGroupManagersRecreateInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.recreateInstances(
arg_request, arg_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--resize", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_size = 42;
var arg_requestId = "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 = {};
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["size"].first), unittest.equals(arg_size));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.resize(arg_project, arg_zone, arg_instanceGroupManager, arg_size,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setInstanceTemplate", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManagersSetInstanceTemplateRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.InstanceGroupManagersSetInstanceTemplateRequest.fromJson(
json);
checkInstanceGroupManagersSetInstanceTemplateRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setInstanceTemplate(
arg_request, arg_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setTargetPools", () {
var mock = new HttpServerMock();
api.InstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).instanceGroupManagers;
var arg_request = buildInstanceGroupManagersSetTargetPoolsRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.InstanceGroupManagersSetTargetPoolsRequest.fromJson(json);
checkInstanceGroupManagersSetTargetPoolsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setTargetPools(
arg_request, arg_project, arg_zone, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-InstanceGroupsResourceApi", () {
unittest.test("method--addInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_request = buildInstanceGroupsAddInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupsAddInstancesRequest.fromJson(json);
checkInstanceGroupsAddInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.addInstances(arg_request, arg_project, arg_zone, arg_instanceGroup,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.InstanceGroupAggregatedList response) {
checkInstanceGroupAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_instanceGroup,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "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 = {};
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(buildInstanceGroup());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_instanceGroup, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroup response) {
checkInstanceGroup(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_request = buildInstanceGroup();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroup.fromJson(json);
checkInstanceGroup(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroupList response) {
checkInstanceGroupList(response);
})));
});
unittest.test("method--listInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_request = buildInstanceGroupsListInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "foo";
var arg_pageToken = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupsListInstancesRequest.fromJson(json);
checkInstanceGroupsListInstancesRequest(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 = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceGroupsListInstances());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.listInstances(arg_request, arg_project, arg_zone, arg_instanceGroup,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.InstanceGroupsListInstances response) {
checkInstanceGroupsListInstances(response);
})));
});
unittest.test("method--removeInstances", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_request = buildInstanceGroupsRemoveInstancesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupsRemoveInstancesRequest.fromJson(json);
checkInstanceGroupsRemoveInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.removeInstances(
arg_request, arg_project, arg_zone, arg_instanceGroup,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setNamedPorts", () {
var mock = new HttpServerMock();
api.InstanceGroupsResourceApi res =
new api.ComputeApi(mock).instanceGroups;
var arg_request = buildInstanceGroupsSetNamedPortsRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instanceGroup = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupsSetNamedPortsRequest.fromJson(json);
checkInstanceGroupsSetNamedPortsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setNamedPorts(arg_request, arg_project, arg_zone, arg_instanceGroup,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-InstanceTemplatesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InstanceTemplatesResourceApi res =
new api.ComputeApi(mock).instanceTemplates;
var arg_project = "foo";
var arg_instanceTemplate = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_instanceTemplate,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InstanceTemplatesResourceApi res =
new api.ComputeApi(mock).instanceTemplates;
var arg_project = "foo";
var arg_instanceTemplate = "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 = {};
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(buildInstanceTemplate());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_instanceTemplate, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceTemplate response) {
checkInstanceTemplate(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InstanceTemplatesResourceApi res =
new api.ComputeApi(mock).instanceTemplates;
var arg_request = buildInstanceTemplate();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceTemplate.fromJson(json);
checkInstanceTemplate(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InstanceTemplatesResourceApi res =
new api.ComputeApi(mock).instanceTemplates;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceTemplateList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceTemplateList response) {
checkInstanceTemplateList(response);
})));
});
});
unittest.group("resource-InstancesResourceApi", () {
unittest.test("method--addAccessConfig", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildAccessConfig();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_networkInterface = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.AccessConfig.fromJson(json);
checkAccessConfig(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 = {};
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["networkInterface"].first,
unittest.equals(arg_networkInterface));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.addAccessConfig(arg_request, arg_project, arg_zone, arg_instance,
arg_networkInterface,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceAggregatedList response) {
checkInstanceAggregatedList(response);
})));
});
unittest.test("method--attachDisk", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildAttachedDisk();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.AttachedDisk.fromJson(json);
checkAttachedDisk(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.attachDisk(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--deleteAccessConfig", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_accessConfig = "foo";
var arg_networkInterface = "foo";
var arg_requestId = "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 = {};
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["accessConfig"].first, unittest.equals(arg_accessConfig));
unittest.expect(queryMap["networkInterface"].first,
unittest.equals(arg_networkInterface));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.deleteAccessConfig(arg_project, arg_zone, arg_instance,
arg_accessConfig, arg_networkInterface,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--detachDisk", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_deviceName = "foo";
var arg_requestId = "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 = {};
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["deviceName"].first, unittest.equals(arg_deviceName));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.detachDisk(arg_project, arg_zone, arg_instance, arg_deviceName,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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(buildInstance());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_instance, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Instance response) {
checkInstance(response);
})));
});
unittest.test("method--getSerialPortOutput", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_port = 42;
var arg_start_1 = "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 = {};
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["port"].first), unittest.equals(arg_port));
unittest.expect(queryMap["start"].first, unittest.equals(arg_start_1));
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
"content-type": "application/json; charset=utf-8",
};
var resp = convert.JSON.encode(buildSerialPortOutput());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getSerialPortOutput(arg_project, arg_zone, arg_instance,
port: arg_port, start_1: arg_start_1, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.SerialPortOutput response) {
checkSerialPortOutput(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstance();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Instance.fromJson(json);
checkInstance(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInstanceList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceList response) {
checkInstanceList(response);
})));
});
unittest.test("method--reset", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.reset(arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setDeletionProtection", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_resource = "foo";
var arg_deletionProtection = true;
var arg_requestId = "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 = {};
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["deletionProtection"].first,
unittest.equals("$arg_deletionProtection"));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.setDeletionProtection(arg_project, arg_zone, arg_resource,
deletionProtection: arg_deletionProtection,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setDiskAutoDelete", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_autoDelete = true;
var arg_deviceName = "foo";
var arg_requestId = "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 = {};
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["autoDelete"].first, unittest.equals("$arg_autoDelete"));
unittest.expect(
queryMap["deviceName"].first, unittest.equals(arg_deviceName));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.setDiskAutoDelete(arg_project, arg_zone, arg_instance,
arg_autoDelete, arg_deviceName,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setLabels", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesSetLabelsRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesSetLabelsRequest.fromJson(json);
checkInstancesSetLabelsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setLabels(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setMachineResources", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesSetMachineResourcesRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesSetMachineResourcesRequest.fromJson(json);
checkInstancesSetMachineResourcesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setMachineResources(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setMachineType", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesSetMachineTypeRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesSetMachineTypeRequest.fromJson(json);
checkInstancesSetMachineTypeRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setMachineType(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setMetadata", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildMetadata();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Metadata.fromJson(json);
checkMetadata(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setMetadata(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setMinCpuPlatform", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesSetMinCpuPlatformRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesSetMinCpuPlatformRequest.fromJson(json);
checkInstancesSetMinCpuPlatformRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setMinCpuPlatform(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setScheduling", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildScheduling();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Scheduling.fromJson(json);
checkScheduling(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setScheduling(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setServiceAccount", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesSetServiceAccountRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesSetServiceAccountRequest.fromJson(json);
checkInstancesSetServiceAccountRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setServiceAccount(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setTags", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildTags();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Tags.fromJson(json);
checkTags(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setTags(arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--start", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.start(arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--startWithEncryptionKey", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_request = buildInstancesStartWithEncryptionKeyRequest();
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstancesStartWithEncryptionKeyRequest.fromJson(json);
checkInstancesStartWithEncryptionKeyRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.startWithEncryptionKey(
arg_request, arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--stop", () {
var mock = new HttpServerMock();
api.InstancesResourceApi res = new api.ComputeApi(mock).instances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_instance = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.stop(arg_project, arg_zone, arg_instance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-InterconnectAttachmentsResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.InterconnectAttachmentsResourceApi res =
new api.ComputeApi(mock).interconnectAttachments;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInterconnectAttachmentAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(
((api.InterconnectAttachmentAggregatedList response) {
checkInterconnectAttachmentAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InterconnectAttachmentsResourceApi res =
new api.ComputeApi(mock).interconnectAttachments;
var arg_project = "foo";
var arg_region = "foo";
var arg_interconnectAttachment = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_interconnectAttachment,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InterconnectAttachmentsResourceApi res =
new api.ComputeApi(mock).interconnectAttachments;
var arg_project = "foo";
var arg_region = "foo";
var arg_interconnectAttachment = "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 = {};
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(buildInterconnectAttachment());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_interconnectAttachment,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InterconnectAttachment response) {
checkInterconnectAttachment(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InterconnectAttachmentsResourceApi res =
new api.ComputeApi(mock).interconnectAttachments;
var arg_request = buildInterconnectAttachment();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InterconnectAttachment.fromJson(json);
checkInterconnectAttachment(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InterconnectAttachmentsResourceApi res =
new api.ComputeApi(mock).interconnectAttachments;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInterconnectAttachmentList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(
unittest.expectAsync1(((api.InterconnectAttachmentList response) {
checkInterconnectAttachmentList(response);
})));
});
});
unittest.group("resource-InterconnectLocationsResourceApi", () {
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InterconnectLocationsResourceApi res =
new api.ComputeApi(mock).interconnectLocations;
var arg_project = "foo";
var arg_interconnectLocation = "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 = {};
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(buildInterconnectLocation());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_interconnectLocation, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.InterconnectLocation response) {
checkInterconnectLocation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InterconnectLocationsResourceApi res =
new api.ComputeApi(mock).interconnectLocations;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInterconnectLocationList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InterconnectLocationList response) {
checkInterconnectLocationList(response);
})));
});
});
unittest.group("resource-InterconnectsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.InterconnectsResourceApi res = new api.ComputeApi(mock).interconnects;
var arg_project = "foo";
var arg_interconnect = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_interconnect,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.InterconnectsResourceApi res = new api.ComputeApi(mock).interconnects;
var arg_project = "foo";
var arg_interconnect = "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 = {};
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(buildInterconnect());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_interconnect, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Interconnect response) {
checkInterconnect(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.InterconnectsResourceApi res = new api.ComputeApi(mock).interconnects;
var arg_request = buildInterconnect();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Interconnect.fromJson(json);
checkInterconnect(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.InterconnectsResourceApi res = new api.ComputeApi(mock).interconnects;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildInterconnectList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InterconnectList response) {
checkInterconnectList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.InterconnectsResourceApi res = new api.ComputeApi(mock).interconnects;
var arg_request = buildInterconnect();
var arg_project = "foo";
var arg_interconnect = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Interconnect.fromJson(json);
checkInterconnect(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_interconnect,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-LicensesResourceApi", () {
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.LicensesResourceApi res = new api.ComputeApi(mock).licenses;
var arg_project = "foo";
var arg_license = "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 = {};
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(buildLicense());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_license, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.License response) {
checkLicense(response);
})));
});
});
unittest.group("resource-MachineTypesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.MachineTypesResourceApi res = new api.ComputeApi(mock).machineTypes;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildMachineTypeAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(
unittest.expectAsync1(((api.MachineTypeAggregatedList response) {
checkMachineTypeAggregatedList(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.MachineTypesResourceApi res = new api.ComputeApi(mock).machineTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_machineType = "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 = {};
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(buildMachineType());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_machineType, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.MachineType response) {
checkMachineType(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.MachineTypesResourceApi res = new api.ComputeApi(mock).machineTypes;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildMachineTypeList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.MachineTypeList response) {
checkMachineTypeList(response);
})));
});
});
unittest.group("resource-NetworksResourceApi", () {
unittest.test("method--addPeering", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_request = buildNetworksAddPeeringRequest();
var arg_project = "foo";
var arg_network = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.NetworksAddPeeringRequest.fromJson(json);
checkNetworksAddPeeringRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.addPeering(arg_request, arg_project, arg_network,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_project = "foo";
var arg_network = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_network,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_project = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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(buildNetwork());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_network, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Network response) {
checkNetwork(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_request = buildNetwork();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Network.fromJson(json);
checkNetwork(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildNetworkList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.NetworkList response) {
checkNetworkList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_request = buildNetwork();
var arg_project = "foo";
var arg_network = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Network.fromJson(json);
checkNetwork(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_network,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--removePeering", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_request = buildNetworksRemovePeeringRequest();
var arg_project = "foo";
var arg_network = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.NetworksRemovePeeringRequest.fromJson(json);
checkNetworksRemovePeeringRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.removePeering(arg_request, arg_project, arg_network,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--switchToCustomMode", () {
var mock = new HttpServerMock();
api.NetworksResourceApi res = new api.ComputeApi(mock).networks;
var arg_project = "foo";
var arg_network = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.switchToCustomMode(arg_project, arg_network,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-ProjectsResourceApi", () {
unittest.test("method--disableXpnHost", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_project = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.disableXpnHost(arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--disableXpnResource", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildProjectsDisableXpnResourceRequest();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ProjectsDisableXpnResourceRequest.fromJson(json);
checkProjectsDisableXpnResourceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.disableXpnResource(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--enableXpnHost", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_project = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.enableXpnHost(arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--enableXpnResource", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildProjectsEnableXpnResourceRequest();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ProjectsEnableXpnResourceRequest.fromJson(json);
checkProjectsEnableXpnResourceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.enableXpnResource(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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(buildProject());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Project response) {
checkProject(response);
})));
});
unittest.test("method--getXpnHost", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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(buildProject());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getXpnHost(arg_project, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Project response) {
checkProject(response);
})));
});
unittest.test("method--getXpnResources", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["order_by"].first, unittest.equals(arg_orderBy));
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(buildProjectsGetXpnResources());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getXpnResources(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ProjectsGetXpnResources response) {
checkProjectsGetXpnResources(response);
})));
});
unittest.test("method--listXpnHosts", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildProjectsListXpnHostsRequest();
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "foo";
var arg_pageToken = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ProjectsListXpnHostsRequest.fromJson(json);
checkProjectsListXpnHostsRequest(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 = {};
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["order_by"].first, unittest.equals(arg_orderBy));
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(buildXpnHostList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.listXpnHosts(arg_request, arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.XpnHostList response) {
checkXpnHostList(response);
})));
});
unittest.test("method--moveDisk", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildDiskMoveRequest();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.DiskMoveRequest.fromJson(json);
checkDiskMoveRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.moveDisk(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--moveInstance", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildInstanceMoveRequest();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceMoveRequest.fromJson(json);
checkInstanceMoveRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.moveInstance(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setCommonInstanceMetadata", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildMetadata();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Metadata.fromJson(json);
checkMetadata(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setCommonInstanceMetadata(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setUsageExportBucket", () {
var mock = new HttpServerMock();
api.ProjectsResourceApi res = new api.ComputeApi(mock).projects;
var arg_request = buildUsageExportLocation();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UsageExportLocation.fromJson(json);
checkUsageExportLocation(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setUsageExportBucket(arg_request, arg_project,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RegionAutoscalersResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_project = "foo";
var arg_region = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_autoscaler,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_project = "foo";
var arg_region = "foo";
var arg_autoscaler = "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 = {};
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(buildAutoscaler());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_autoscaler, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Autoscaler response) {
checkAutoscaler(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRegionAutoscalerList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RegionAutoscalerList response) {
checkRegionAutoscalerList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_region = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["autoscaler"].first, unittest.equals(arg_autoscaler));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region,
autoscaler: arg_autoscaler,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.RegionAutoscalersResourceApi res =
new api.ComputeApi(mock).regionAutoscalers;
var arg_request = buildAutoscaler();
var arg_project = "foo";
var arg_region = "foo";
var arg_autoscaler = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Autoscaler.fromJson(json);
checkAutoscaler(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 = {};
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["autoscaler"].first, unittest.equals(arg_autoscaler));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_region,
autoscaler: arg_autoscaler,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RegionBackendServicesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_project = "foo";
var arg_region = "foo";
var arg_backendService = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_project = "foo";
var arg_region = "foo";
var arg_backendService = "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 = {};
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(buildBackendService());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_backendService,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendService response) {
checkBackendService(response);
})));
});
unittest.test("method--getHealth", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_request = buildResourceGroupReference();
var arg_project = "foo";
var arg_region = "foo";
var arg_backendService = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.ResourceGroupReference.fromJson(json);
checkResourceGroupReference(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 = {};
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(buildBackendServiceGroupHealth());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getHealth(arg_request, arg_project, arg_region, arg_backendService,
$fields: arg_$fields)
.then(
unittest.expectAsync1(((api.BackendServiceGroupHealth response) {
checkBackendServiceGroupHealth(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildBackendServiceList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.BackendServiceList response) {
checkBackendServiceList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_region = "foo";
var arg_backendService = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.RegionBackendServicesResourceApi res =
new api.ComputeApi(mock).regionBackendServices;
var arg_request = buildBackendService();
var arg_project = "foo";
var arg_region = "foo";
var arg_backendService = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.BackendService.fromJson(json);
checkBackendService(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_region, arg_backendService,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RegionCommitmentsResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.RegionCommitmentsResourceApi res =
new api.ComputeApi(mock).regionCommitments;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildCommitmentAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.CommitmentAggregatedList response) {
checkCommitmentAggregatedList(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionCommitmentsResourceApi res =
new api.ComputeApi(mock).regionCommitments;
var arg_project = "foo";
var arg_region = "foo";
var arg_commitment = "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 = {};
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(buildCommitment());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_commitment, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Commitment response) {
checkCommitment(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RegionCommitmentsResourceApi res =
new api.ComputeApi(mock).regionCommitments;
var arg_request = buildCommitment();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Commitment.fromJson(json);
checkCommitment(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionCommitmentsResourceApi res =
new api.ComputeApi(mock).regionCommitments;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildCommitmentList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.CommitmentList response) {
checkCommitmentList(response);
})));
});
});
unittest.group("resource-RegionInstanceGroupManagersResourceApi", () {
unittest.test("method--abandonInstances", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request =
buildRegionInstanceGroupManagersAbandonInstancesRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupManagersAbandonInstancesRequest.fromJson(
json);
checkRegionInstanceGroupManagersAbandonInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.abandonInstances(
arg_request, arg_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--deleteInstances", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request =
buildRegionInstanceGroupManagersDeleteInstancesRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupManagersDeleteInstancesRequest.fromJson(
json);
checkRegionInstanceGroupManagersDeleteInstancesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.deleteInstances(
arg_request, arg_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "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 = {};
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(buildInstanceGroupManager());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_instanceGroupManager,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroupManager response) {
checkInstanceGroupManager(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request = buildInstanceGroupManager();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceGroupManager.fromJson(json);
checkInstanceGroupManager(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRegionInstanceGroupManagerList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.RegionInstanceGroupManagerList response) {
checkRegionInstanceGroupManagerList(response);
})));
});
unittest.test("method--listManagedInstances", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["order_by"].first, unittest.equals(arg_orderBy));
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(buildRegionInstanceGroupManagersListInstancesResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.listManagedInstances(
arg_project, arg_region, arg_instanceGroupManager,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(
((api.RegionInstanceGroupManagersListInstancesResponse response) {
checkRegionInstanceGroupManagersListInstancesResponse(response);
})));
});
unittest.test("method--recreateInstances", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request = buildRegionInstanceGroupManagersRecreateRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupManagersRecreateRequest.fromJson(json);
checkRegionInstanceGroupManagersRecreateRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.recreateInstances(
arg_request, arg_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--resize", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_size = 42;
var arg_requestId = "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 = {};
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["size"].first), unittest.equals(arg_size));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.resize(arg_project, arg_region, arg_instanceGroupManager, arg_size,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setInstanceTemplate", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request = buildRegionInstanceGroupManagersSetTemplateRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupManagersSetTemplateRequest.fromJson(
json);
checkRegionInstanceGroupManagersSetTemplateRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setInstanceTemplate(
arg_request, arg_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setTargetPools", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupManagersResourceApi res =
new api.ComputeApi(mock).regionInstanceGroupManagers;
var arg_request = buildRegionInstanceGroupManagersSetTargetPoolsRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroupManager = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupManagersSetTargetPoolsRequest.fromJson(
json);
checkRegionInstanceGroupManagersSetTargetPoolsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setTargetPools(
arg_request, arg_project, arg_region, arg_instanceGroupManager,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RegionInstanceGroupsResourceApi", () {
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupsResourceApi res =
new api.ComputeApi(mock).regionInstanceGroups;
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroup = "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 = {};
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(buildInstanceGroup());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_instanceGroup, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.InstanceGroup response) {
checkInstanceGroup(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupsResourceApi res =
new api.ComputeApi(mock).regionInstanceGroups;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRegionInstanceGroupList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RegionInstanceGroupList response) {
checkRegionInstanceGroupList(response);
})));
});
unittest.test("method--listInstances", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupsResourceApi res =
new api.ComputeApi(mock).regionInstanceGroups;
var arg_request = buildRegionInstanceGroupsListInstancesRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroup = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "foo";
var arg_pageToken = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupsListInstancesRequest.fromJson(json);
checkRegionInstanceGroupsListInstancesRequest(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 = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRegionInstanceGroupsListInstances());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.listInstances(
arg_request, arg_project, arg_region, arg_instanceGroup,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.RegionInstanceGroupsListInstances response) {
checkRegionInstanceGroupsListInstances(response);
})));
});
unittest.test("method--setNamedPorts", () {
var mock = new HttpServerMock();
api.RegionInstanceGroupsResourceApi res =
new api.ComputeApi(mock).regionInstanceGroups;
var arg_request = buildRegionInstanceGroupsSetNamedPortsRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_instanceGroup = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.RegionInstanceGroupsSetNamedPortsRequest.fromJson(json);
checkRegionInstanceGroupsSetNamedPortsRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setNamedPorts(
arg_request, arg_project, arg_region, arg_instanceGroup,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RegionOperationsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RegionOperationsResourceApi res =
new api.ComputeApi(mock).regionOperations;
var arg_project = "foo";
var arg_region = "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 = {};
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_project, arg_region, arg_operation, $fields: arg_$fields)
.then(unittest.expectAsync1((_) {}));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionOperationsResourceApi res =
new api.ComputeApi(mock).regionOperations;
var arg_project = "foo";
var arg_region = "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 = {};
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_region, arg_operation, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionOperationsResourceApi res =
new api.ComputeApi(mock).regionOperations;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.OperationList response) {
checkOperationList(response);
})));
});
});
unittest.group("resource-RegionsResourceApi", () {
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RegionsResourceApi res = new api.ComputeApi(mock).regions;
var arg_project = "foo";
var arg_region = "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 = {};
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(buildRegion());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Region response) {
checkRegion(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RegionsResourceApi res = new api.ComputeApi(mock).regions;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRegionList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RegionList response) {
checkRegionList(response);
})));
});
});
unittest.group("resource-RoutersResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRouterAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RouterAggregatedList response) {
checkRouterAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_router,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "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 = {};
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(buildRouter());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_router, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Router response) {
checkRouter(response);
})));
});
unittest.test("method--getRouterStatus", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "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 = {};
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(buildRouterStatusResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getRouterStatus(arg_project, arg_region, arg_router,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RouterStatusResponse response) {
checkRouterStatusResponse(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_request = buildRouter();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Router.fromJson(json);
checkRouter(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRouterList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RouterList response) {
checkRouterList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_request = buildRouter();
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Router.fromJson(json);
checkRouter(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_router,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--preview", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_request = buildRouter();
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Router.fromJson(json);
checkRouter(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 = {};
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(buildRoutersPreviewResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.preview(arg_request, arg_project, arg_region, arg_router,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RoutersPreviewResponse response) {
checkRoutersPreviewResponse(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.RoutersResourceApi res = new api.ComputeApi(mock).routers;
var arg_request = buildRouter();
var arg_project = "foo";
var arg_region = "foo";
var arg_router = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Router.fromJson(json);
checkRouter(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_region, arg_router,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-RoutesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.RoutesResourceApi res = new api.ComputeApi(mock).routes;
var arg_project = "foo";
var arg_route = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_route,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.RoutesResourceApi res = new api.ComputeApi(mock).routes;
var arg_project = "foo";
var arg_route = "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 = {};
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(buildRoute());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_route, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Route response) {
checkRoute(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.RoutesResourceApi res = new api.ComputeApi(mock).routes;
var arg_request = buildRoute();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Route.fromJson(json);
checkRoute(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.RoutesResourceApi res = new api.ComputeApi(mock).routes;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildRouteList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.RouteList response) {
checkRouteList(response);
})));
});
});
unittest.group("resource-SnapshotsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.SnapshotsResourceApi res = new api.ComputeApi(mock).snapshots;
var arg_project = "foo";
var arg_snapshot = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_snapshot,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.SnapshotsResourceApi res = new api.ComputeApi(mock).snapshots;
var arg_project = "foo";
var arg_snapshot = "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 = {};
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
.get(arg_project, arg_snapshot, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Snapshot response) {
checkSnapshot(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.SnapshotsResourceApi res = new api.ComputeApi(mock).snapshots;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildSnapshotList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.SnapshotList response) {
checkSnapshotList(response);
})));
});
unittest.test("method--setLabels", () {
var mock = new HttpServerMock();
api.SnapshotsResourceApi res = new api.ComputeApi(mock).snapshots;
var arg_request = buildGlobalSetLabelsRequest();
var arg_project = "foo";
var arg_resource = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.GlobalSetLabelsRequest.fromJson(json);
checkGlobalSetLabelsRequest(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 = {};
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
.setLabels(arg_request, arg_project, arg_resource,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-SslCertificatesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.SslCertificatesResourceApi res =
new api.ComputeApi(mock).sslCertificates;
var arg_project = "foo";
var arg_sslCertificate = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_sslCertificate,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.SslCertificatesResourceApi res =
new api.ComputeApi(mock).sslCertificates;
var arg_project = "foo";
var arg_sslCertificate = "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 = {};
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(buildSslCertificate());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_sslCertificate, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.SslCertificate response) {
checkSslCertificate(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.SslCertificatesResourceApi res =
new api.ComputeApi(mock).sslCertificates;
var arg_request = buildSslCertificate();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.SslCertificate.fromJson(json);
checkSslCertificate(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.SslCertificatesResourceApi res =
new api.ComputeApi(mock).sslCertificates;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildSslCertificateList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.SslCertificateList response) {
checkSslCertificateList(response);
})));
});
});
unittest.group("resource-SubnetworksResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildSubnetworkAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.SubnetworkAggregatedList response) {
checkSubnetworkAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_project = "foo";
var arg_region = "foo";
var arg_subnetwork = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_subnetwork,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--expandIpCidrRange", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_request = buildSubnetworksExpandIpCidrRangeRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_subnetwork = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.SubnetworksExpandIpCidrRangeRequest.fromJson(json);
checkSubnetworksExpandIpCidrRangeRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.expandIpCidrRange(
arg_request, arg_project, arg_region, arg_subnetwork,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_project = "foo";
var arg_region = "foo";
var arg_subnetwork = "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 = {};
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(buildSubnetwork());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_subnetwork, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Subnetwork response) {
checkSubnetwork(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_request = buildSubnetwork();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.Subnetwork.fromJson(json);
checkSubnetwork(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildSubnetworkList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.SubnetworkList response) {
checkSubnetworkList(response);
})));
});
unittest.test("method--setPrivateIpGoogleAccess", () {
var mock = new HttpServerMock();
api.SubnetworksResourceApi res = new api.ComputeApi(mock).subnetworks;
var arg_request = buildSubnetworksSetPrivateIpGoogleAccessRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_subnetwork = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.SubnetworksSetPrivateIpGoogleAccessRequest.fromJson(json);
checkSubnetworksSetPrivateIpGoogleAccessRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setPrivateIpGoogleAccess(
arg_request, arg_project, arg_region, arg_subnetwork,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetHttpProxiesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetHttpProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpProxies;
var arg_project = "foo";
var arg_targetHttpProxy = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_targetHttpProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetHttpProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpProxies;
var arg_project = "foo";
var arg_targetHttpProxy = "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 = {};
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(buildTargetHttpProxy());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_targetHttpProxy, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetHttpProxy response) {
checkTargetHttpProxy(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetHttpProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpProxies;
var arg_request = buildTargetHttpProxy();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetHttpProxy.fromJson(json);
checkTargetHttpProxy(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetHttpProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpProxies;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetHttpProxyList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetHttpProxyList response) {
checkTargetHttpProxyList(response);
})));
});
unittest.test("method--setUrlMap", () {
var mock = new HttpServerMock();
api.TargetHttpProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpProxies;
var arg_request = buildUrlMapReference();
var arg_project = "foo";
var arg_targetHttpProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMapReference.fromJson(json);
checkUrlMapReference(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setUrlMap(arg_request, arg_project, arg_targetHttpProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetHttpsProxiesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_project = "foo";
var arg_targetHttpsProxy = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_targetHttpsProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_project = "foo";
var arg_targetHttpsProxy = "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 = {};
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(buildTargetHttpsProxy());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_targetHttpsProxy, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetHttpsProxy response) {
checkTargetHttpsProxy(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_request = buildTargetHttpsProxy();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetHttpsProxy.fromJson(json);
checkTargetHttpsProxy(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetHttpsProxyList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetHttpsProxyList response) {
checkTargetHttpsProxyList(response);
})));
});
unittest.test("method--setSslCertificates", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_request = buildTargetHttpsProxiesSetSslCertificatesRequest();
var arg_project = "foo";
var arg_targetHttpsProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.TargetHttpsProxiesSetSslCertificatesRequest.fromJson(json);
checkTargetHttpsProxiesSetSslCertificatesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setSslCertificates(arg_request, arg_project, arg_targetHttpsProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setUrlMap", () {
var mock = new HttpServerMock();
api.TargetHttpsProxiesResourceApi res =
new api.ComputeApi(mock).targetHttpsProxies;
var arg_request = buildUrlMapReference();
var arg_project = "foo";
var arg_targetHttpsProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMapReference.fromJson(json);
checkUrlMapReference(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setUrlMap(arg_request, arg_project, arg_targetHttpsProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetInstancesResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.TargetInstancesResourceApi res =
new api.ComputeApi(mock).targetInstances;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetInstanceAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.TargetInstanceAggregatedList response) {
checkTargetInstanceAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetInstancesResourceApi res =
new api.ComputeApi(mock).targetInstances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_targetInstance = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_zone, arg_targetInstance,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetInstancesResourceApi res =
new api.ComputeApi(mock).targetInstances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_targetInstance = "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 = {};
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(buildTargetInstance());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, arg_targetInstance, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetInstance response) {
checkTargetInstance(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetInstancesResourceApi res =
new api.ComputeApi(mock).targetInstances;
var arg_request = buildTargetInstance();
var arg_project = "foo";
var arg_zone = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetInstance.fromJson(json);
checkTargetInstance(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetInstancesResourceApi res =
new api.ComputeApi(mock).targetInstances;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetInstanceList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_zone,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetInstanceList response) {
checkTargetInstanceList(response);
})));
});
});
unittest.group("resource-TargetPoolsResourceApi", () {
unittest.test("method--addHealthCheck", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetPoolsAddHealthCheckRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetPoolsAddHealthCheckRequest.fromJson(json);
checkTargetPoolsAddHealthCheckRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.addHealthCheck(arg_request, arg_project, arg_region, arg_targetPool,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--addInstance", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetPoolsAddInstanceRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetPoolsAddInstanceRequest.fromJson(json);
checkTargetPoolsAddInstanceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.addInstance(arg_request, arg_project, arg_region, arg_targetPool,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetPoolAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetPoolAggregatedList response) {
checkTargetPoolAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_targetPool,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "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 = {};
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(buildTargetPool());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_targetPool, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetPool response) {
checkTargetPool(response);
})));
});
unittest.test("method--getHealth", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildInstanceReference();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.InstanceReference.fromJson(json);
checkInstanceReference(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 = {};
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(buildTargetPoolInstanceHealth());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.getHealth(arg_request, arg_project, arg_region, arg_targetPool,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetPoolInstanceHealth response) {
checkTargetPoolInstanceHealth(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetPool();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetPool.fromJson(json);
checkTargetPool(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetPoolList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetPoolList response) {
checkTargetPoolList(response);
})));
});
unittest.test("method--removeHealthCheck", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetPoolsRemoveHealthCheckRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetPoolsRemoveHealthCheckRequest.fromJson(json);
checkTargetPoolsRemoveHealthCheckRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.removeHealthCheck(
arg_request, arg_project, arg_region, arg_targetPool,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--removeInstance", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetPoolsRemoveInstanceRequest();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetPoolsRemoveInstanceRequest.fromJson(json);
checkTargetPoolsRemoveInstanceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.removeInstance(arg_request, arg_project, arg_region, arg_targetPool,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setBackup", () {
var mock = new HttpServerMock();
api.TargetPoolsResourceApi res = new api.ComputeApi(mock).targetPools;
var arg_request = buildTargetReference();
var arg_project = "foo";
var arg_region = "foo";
var arg_targetPool = "foo";
var arg_failoverRatio = 42.0;
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetReference.fromJson(json);
checkTargetReference(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 = {};
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.num.parse(queryMap["failoverRatio"].first),
unittest.equals(arg_failoverRatio));
unittest.expect(
queryMap["requestId"].first, unittest.equals(arg_requestId));
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
.setBackup(arg_request, arg_project, arg_region, arg_targetPool,
failoverRatio: arg_failoverRatio,
requestId: arg_requestId,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetSslProxiesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_project = "foo";
var arg_targetSslProxy = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_targetSslProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_project = "foo";
var arg_targetSslProxy = "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 = {};
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(buildTargetSslProxy());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_targetSslProxy, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetSslProxy response) {
checkTargetSslProxy(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_request = buildTargetSslProxy();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetSslProxy.fromJson(json);
checkTargetSslProxy(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetSslProxyList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetSslProxyList response) {
checkTargetSslProxyList(response);
})));
});
unittest.test("method--setBackendService", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_request = buildTargetSslProxiesSetBackendServiceRequest();
var arg_project = "foo";
var arg_targetSslProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.TargetSslProxiesSetBackendServiceRequest.fromJson(json);
checkTargetSslProxiesSetBackendServiceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setBackendService(arg_request, arg_project, arg_targetSslProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setProxyHeader", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_request = buildTargetSslProxiesSetProxyHeaderRequest();
var arg_project = "foo";
var arg_targetSslProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetSslProxiesSetProxyHeaderRequest.fromJson(json);
checkTargetSslProxiesSetProxyHeaderRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setProxyHeader(arg_request, arg_project, arg_targetSslProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setSslCertificates", () {
var mock = new HttpServerMock();
api.TargetSslProxiesResourceApi res =
new api.ComputeApi(mock).targetSslProxies;
var arg_request = buildTargetSslProxiesSetSslCertificatesRequest();
var arg_project = "foo";
var arg_targetSslProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.TargetSslProxiesSetSslCertificatesRequest.fromJson(json);
checkTargetSslProxiesSetSslCertificatesRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setSslCertificates(arg_request, arg_project, arg_targetSslProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetTcpProxiesResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_project = "foo";
var arg_targetTcpProxy = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_targetTcpProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_project = "foo";
var arg_targetTcpProxy = "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 = {};
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(buildTargetTcpProxy());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_targetTcpProxy, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetTcpProxy response) {
checkTargetTcpProxy(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_request = buildTargetTcpProxy();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetTcpProxy.fromJson(json);
checkTargetTcpProxy(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetTcpProxyList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetTcpProxyList response) {
checkTargetTcpProxyList(response);
})));
});
unittest.test("method--setBackendService", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_request = buildTargetTcpProxiesSetBackendServiceRequest();
var arg_project = "foo";
var arg_targetTcpProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj =
new api.TargetTcpProxiesSetBackendServiceRequest.fromJson(json);
checkTargetTcpProxiesSetBackendServiceRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setBackendService(arg_request, arg_project, arg_targetTcpProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--setProxyHeader", () {
var mock = new HttpServerMock();
api.TargetTcpProxiesResourceApi res =
new api.ComputeApi(mock).targetTcpProxies;
var arg_request = buildTargetTcpProxiesSetProxyHeaderRequest();
var arg_project = "foo";
var arg_targetTcpProxy = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetTcpProxiesSetProxyHeaderRequest.fromJson(json);
checkTargetTcpProxiesSetProxyHeaderRequest(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.setProxyHeader(arg_request, arg_project, arg_targetTcpProxy,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
});
unittest.group("resource-TargetVpnGatewaysResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.TargetVpnGatewaysResourceApi res =
new api.ComputeApi(mock).targetVpnGateways;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetVpnGatewayAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest
.expectAsync1(((api.TargetVpnGatewayAggregatedList response) {
checkTargetVpnGatewayAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.TargetVpnGatewaysResourceApi res =
new api.ComputeApi(mock).targetVpnGateways;
var arg_project = "foo";
var arg_region = "foo";
var arg_targetVpnGateway = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_targetVpnGateway,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.TargetVpnGatewaysResourceApi res =
new api.ComputeApi(mock).targetVpnGateways;
var arg_project = "foo";
var arg_region = "foo";
var arg_targetVpnGateway = "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 = {};
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(buildTargetVpnGateway());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_targetVpnGateway,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetVpnGateway response) {
checkTargetVpnGateway(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.TargetVpnGatewaysResourceApi res =
new api.ComputeApi(mock).targetVpnGateways;
var arg_request = buildTargetVpnGateway();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.TargetVpnGateway.fromJson(json);
checkTargetVpnGateway(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.TargetVpnGatewaysResourceApi res =
new api.ComputeApi(mock).targetVpnGateways;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildTargetVpnGatewayList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.TargetVpnGatewayList response) {
checkTargetVpnGatewayList(response);
})));
});
});
unittest.group("resource-UrlMapsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_project = "foo";
var arg_urlMap = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_urlMap,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_project = "foo";
var arg_urlMap = "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 = {};
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(buildUrlMap());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_urlMap, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.UrlMap response) {
checkUrlMap(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_request = buildUrlMap();
var arg_project = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMap.fromJson(json);
checkUrlMap(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--invalidateCache", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_request = buildCacheInvalidationRule();
var arg_project = "foo";
var arg_urlMap = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.CacheInvalidationRule.fromJson(json);
checkCacheInvalidationRule(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.invalidateCache(arg_request, arg_project, arg_urlMap,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildUrlMapList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.UrlMapList response) {
checkUrlMapList(response);
})));
});
unittest.test("method--patch", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_request = buildUrlMap();
var arg_project = "foo";
var arg_urlMap = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMap.fromJson(json);
checkUrlMap(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_urlMap,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--update", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_request = buildUrlMap();
var arg_project = "foo";
var arg_urlMap = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMap.fromJson(json);
checkUrlMap(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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
.update(arg_request, arg_project, arg_urlMap,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--validate", () {
var mock = new HttpServerMock();
api.UrlMapsResourceApi res = new api.ComputeApi(mock).urlMaps;
var arg_request = buildUrlMapsValidateRequest();
var arg_project = "foo";
var arg_urlMap = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.UrlMapsValidateRequest.fromJson(json);
checkUrlMapsValidateRequest(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 = {};
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(buildUrlMapsValidateResponse());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.validate(arg_request, arg_project, arg_urlMap, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.UrlMapsValidateResponse response) {
checkUrlMapsValidateResponse(response);
})));
});
});
unittest.group("resource-VpnTunnelsResourceApi", () {
unittest.test("method--aggregatedList", () {
var mock = new HttpServerMock();
api.VpnTunnelsResourceApi res = new api.ComputeApi(mock).vpnTunnels;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildVpnTunnelAggregatedList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.aggregatedList(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.VpnTunnelAggregatedList response) {
checkVpnTunnelAggregatedList(response);
})));
});
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.VpnTunnelsResourceApi res = new api.ComputeApi(mock).vpnTunnels;
var arg_project = "foo";
var arg_region = "foo";
var arg_vpnTunnel = "foo";
var arg_requestId = "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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_project, arg_region, arg_vpnTunnel,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.VpnTunnelsResourceApi res = new api.ComputeApi(mock).vpnTunnels;
var arg_project = "foo";
var arg_region = "foo";
var arg_vpnTunnel = "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 = {};
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(buildVpnTunnel());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_region, arg_vpnTunnel, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.VpnTunnel response) {
checkVpnTunnel(response);
})));
});
unittest.test("method--insert", () {
var mock = new HttpServerMock();
api.VpnTunnelsResourceApi res = new api.ComputeApi(mock).vpnTunnels;
var arg_request = buildVpnTunnel();
var arg_project = "foo";
var arg_region = "foo";
var arg_requestId = "foo";
var arg_$fields = "foo";
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = new api.VpnTunnel.fromJson(json);
checkVpnTunnel(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 = {};
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["requestId"].first, unittest.equals(arg_requestId));
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_region,
requestId: arg_requestId, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.VpnTunnelsResourceApi res = new api.ComputeApi(mock).vpnTunnels;
var arg_project = "foo";
var arg_region = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildVpnTunnelList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project, arg_region,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.VpnTunnelList response) {
checkVpnTunnelList(response);
})));
});
});
unittest.group("resource-ZoneOperationsResourceApi", () {
unittest.test("method--delete", () {
var mock = new HttpServerMock();
api.ZoneOperationsResourceApi res =
new api.ComputeApi(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 = {};
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_project, arg_zone, arg_operation, $fields: arg_$fields)
.then(unittest.expectAsync1((_) {}));
});
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.ZoneOperationsResourceApi res =
new api.ComputeApi(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 = {};
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(((api.Operation response) {
checkOperation(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.ZoneOperationsResourceApi res =
new api.ComputeApi(mock).zoneOperations;
var arg_project = "foo";
var arg_zone = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.OperationList response) {
checkOperationList(response);
})));
});
});
unittest.group("resource-ZonesResourceApi", () {
unittest.test("method--get", () {
var mock = new HttpServerMock();
api.ZonesResourceApi res = new api.ComputeApi(mock).zones;
var arg_project = "foo";
var arg_zone = "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 = {};
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(buildZone());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_project, arg_zone, $fields: arg_$fields)
.then(unittest.expectAsync1(((api.Zone response) {
checkZone(response);
})));
});
unittest.test("method--list", () {
var mock = new HttpServerMock();
api.ZonesResourceApi res = new api.ComputeApi(mock).zones;
var arg_project = "foo";
var arg_filter = "foo";
var arg_maxResults = 42;
var arg_orderBy = "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;
var query = (req.url).query;
var queryOffset = 0;
var queryMap = {};
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["orderBy"].first, unittest.equals(arg_orderBy));
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(buildZoneList());
return new async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_project,
filter: arg_filter,
maxResults: arg_maxResults,
orderBy: arg_orderBy,
pageToken: arg_pageToken,
$fields: arg_$fields)
.then(unittest.expectAsync1(((api.ZoneList response) {
checkZoneList(response);
})));
});
});
}