Index: generated/googleapis/test/cloudkms/v1_test.dart |
diff --git a/generated/googleapis/test/cloudkms/v1_test.dart b/generated/googleapis/test/cloudkms/v1_test.dart |
index 5342a920a9f93f6f30f19437249ebcf73f7d7776..8835c75db253d330081655b7bc098c66ed379a80 100644 |
--- a/generated/googleapis/test/cloudkms/v1_test.dart |
+++ b/generated/googleapis/test/cloudkms/v1_test.dart |
@@ -1,12 +1,10 @@ |
library googleapis.cloudkms.v1.test; |
import "dart:core" as core; |
-import "dart:collection" as collection; |
import "dart:async" as async; |
import "dart:convert" as convert; |
import 'package:http/http.dart' as http; |
-import 'package:http/testing.dart' as http_testing; |
import 'package:test/test.dart' as unittest; |
import 'package:googleapis/cloudkms/v1.dart' as api; |
@@ -22,7 +20,8 @@ class HttpServerMock extends http.BaseClient { |
async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
if (_expectJson) { |
- return request.finalize() |
+ return request |
+ .finalize() |
.transform(convert.UTF8.decoder) |
.join('') |
.then((core.String jsonString) { |
@@ -45,33 +44,33 @@ class HttpServerMock extends http.BaseClient { |
} |
} |
-http.StreamedResponse stringResponse( |
- core.int status, core.Map<core.String, core.String> headers, core.String body) { |
+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); |
} |
-buildUnnamed1387() { |
+buildUnnamed1383() { |
var o = new core.List<api.AuditLogConfig>(); |
o.add(buildAuditLogConfig()); |
o.add(buildAuditLogConfig()); |
return o; |
} |
-checkUnnamed1387(core.List<api.AuditLogConfig> o) { |
+checkUnnamed1383(core.List<api.AuditLogConfig> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAuditLogConfig(o[0]); |
checkAuditLogConfig(o[1]); |
} |
-buildUnnamed1388() { |
+buildUnnamed1384() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1388(core.List<core.String> o) { |
+checkUnnamed1384(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')); |
@@ -82,8 +81,8 @@ buildAuditConfig() { |
var o = new api.AuditConfig(); |
buildCounterAuditConfig++; |
if (buildCounterAuditConfig < 3) { |
- o.auditLogConfigs = buildUnnamed1387(); |
- o.exemptedMembers = buildUnnamed1388(); |
+ o.auditLogConfigs = buildUnnamed1383(); |
+ o.exemptedMembers = buildUnnamed1384(); |
o.service = "foo"; |
} |
buildCounterAuditConfig--; |
@@ -93,21 +92,21 @@ buildAuditConfig() { |
checkAuditConfig(api.AuditConfig o) { |
buildCounterAuditConfig++; |
if (buildCounterAuditConfig < 3) { |
- checkUnnamed1387(o.auditLogConfigs); |
- checkUnnamed1388(o.exemptedMembers); |
+ checkUnnamed1383(o.auditLogConfigs); |
+ checkUnnamed1384(o.exemptedMembers); |
unittest.expect(o.service, unittest.equals('foo')); |
} |
buildCounterAuditConfig--; |
} |
-buildUnnamed1389() { |
+buildUnnamed1385() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1389(core.List<core.String> o) { |
+checkUnnamed1385(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')); |
@@ -118,7 +117,7 @@ buildAuditLogConfig() { |
var o = new api.AuditLogConfig(); |
buildCounterAuditLogConfig++; |
if (buildCounterAuditLogConfig < 3) { |
- o.exemptedMembers = buildUnnamed1389(); |
+ o.exemptedMembers = buildUnnamed1385(); |
o.logType = "foo"; |
} |
buildCounterAuditLogConfig--; |
@@ -128,20 +127,20 @@ buildAuditLogConfig() { |
checkAuditLogConfig(api.AuditLogConfig o) { |
buildCounterAuditLogConfig++; |
if (buildCounterAuditLogConfig < 3) { |
- checkUnnamed1389(o.exemptedMembers); |
+ checkUnnamed1385(o.exemptedMembers); |
unittest.expect(o.logType, unittest.equals('foo')); |
} |
buildCounterAuditLogConfig--; |
} |
-buildUnnamed1390() { |
+buildUnnamed1386() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1390(core.List<core.String> o) { |
+checkUnnamed1386(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')); |
@@ -153,7 +152,7 @@ buildBinding() { |
buildCounterBinding++; |
if (buildCounterBinding < 3) { |
o.condition = buildExpr(); |
- o.members = buildUnnamed1390(); |
+ o.members = buildUnnamed1386(); |
o.role = "foo"; |
} |
buildCounterBinding--; |
@@ -164,92 +163,23 @@ checkBinding(api.Binding o) { |
buildCounterBinding++; |
if (buildCounterBinding < 3) { |
checkExpr(o.condition); |
- checkUnnamed1390(o.members); |
+ checkUnnamed1386(o.members); |
unittest.expect(o.role, unittest.equals('foo')); |
} |
buildCounterBinding--; |
} |
-core.int buildCounterCloudAuditOptions = 0; |
-buildCloudAuditOptions() { |
- var o = new api.CloudAuditOptions(); |
- buildCounterCloudAuditOptions++; |
- if (buildCounterCloudAuditOptions < 3) { |
- o.logName = "foo"; |
- } |
- buildCounterCloudAuditOptions--; |
- return o; |
-} |
- |
-checkCloudAuditOptions(api.CloudAuditOptions o) { |
- buildCounterCloudAuditOptions++; |
- if (buildCounterCloudAuditOptions < 3) { |
- unittest.expect(o.logName, unittest.equals('foo')); |
- } |
- buildCounterCloudAuditOptions--; |
-} |
- |
-buildUnnamed1391() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
+buildUnnamed1387() { |
+ var o = new core.Map<core.String, core.String>(); |
+ o["x"] = "foo"; |
+ o["y"] = "foo"; |
return o; |
} |
-checkUnnamed1391(core.List<core.String> o) { |
+checkUnnamed1387(core.Map<core.String, core.String> o) { |
unittest.expect(o, unittest.hasLength(2)); |
- unittest.expect(o[0], unittest.equals('foo')); |
- unittest.expect(o[1], unittest.equals('foo')); |
-} |
- |
-core.int buildCounterCondition = 0; |
-buildCondition() { |
- var o = new api.Condition(); |
- buildCounterCondition++; |
- if (buildCounterCondition < 3) { |
- o.iam = "foo"; |
- o.op = "foo"; |
- o.svc = "foo"; |
- o.sys = "foo"; |
- o.value = "foo"; |
- o.values = buildUnnamed1391(); |
- } |
- buildCounterCondition--; |
- return o; |
-} |
- |
-checkCondition(api.Condition o) { |
- buildCounterCondition++; |
- if (buildCounterCondition < 3) { |
- unittest.expect(o.iam, unittest.equals('foo')); |
- unittest.expect(o.op, unittest.equals('foo')); |
- unittest.expect(o.svc, unittest.equals('foo')); |
- unittest.expect(o.sys, unittest.equals('foo')); |
- unittest.expect(o.value, unittest.equals('foo')); |
- checkUnnamed1391(o.values); |
- } |
- buildCounterCondition--; |
-} |
- |
-core.int buildCounterCounterOptions = 0; |
-buildCounterOptions() { |
- var o = new api.CounterOptions(); |
- buildCounterCounterOptions++; |
- if (buildCounterCounterOptions < 3) { |
- o.field = "foo"; |
- o.metric = "foo"; |
- } |
- buildCounterCounterOptions--; |
- return o; |
-} |
- |
-checkCounterOptions(api.CounterOptions o) { |
- buildCounterCounterOptions++; |
- if (buildCounterCounterOptions < 3) { |
- unittest.expect(o.field, unittest.equals('foo')); |
- unittest.expect(o.metric, unittest.equals('foo')); |
- } |
- buildCounterCounterOptions--; |
+ unittest.expect(o["x"], unittest.equals('foo')); |
+ unittest.expect(o["y"], unittest.equals('foo')); |
} |
core.int buildCounterCryptoKey = 0; |
@@ -258,6 +188,7 @@ buildCryptoKey() { |
buildCounterCryptoKey++; |
if (buildCounterCryptoKey < 3) { |
o.createTime = "foo"; |
+ o.labels = buildUnnamed1387(); |
o.name = "foo"; |
o.nextRotationTime = "foo"; |
o.primary = buildCryptoKeyVersion(); |
@@ -272,6 +203,7 @@ checkCryptoKey(api.CryptoKey o) { |
buildCounterCryptoKey++; |
if (buildCounterCryptoKey < 3) { |
unittest.expect(o.createTime, unittest.equals('foo')); |
+ checkUnnamed1387(o.labels); |
unittest.expect(o.name, unittest.equals('foo')); |
unittest.expect(o.nextRotationTime, unittest.equals('foo')); |
checkCryptoKeyVersion(o.primary); |
@@ -308,25 +240,6 @@ checkCryptoKeyVersion(api.CryptoKeyVersion o) { |
buildCounterCryptoKeyVersion--; |
} |
-core.int buildCounterDataAccessOptions = 0; |
-buildDataAccessOptions() { |
- var o = new api.DataAccessOptions(); |
- buildCounterDataAccessOptions++; |
- if (buildCounterDataAccessOptions < 3) { |
- o.logMode = "foo"; |
- } |
- buildCounterDataAccessOptions--; |
- return o; |
-} |
- |
-checkDataAccessOptions(api.DataAccessOptions o) { |
- buildCounterDataAccessOptions++; |
- if (buildCounterDataAccessOptions < 3) { |
- unittest.expect(o.logMode, unittest.equals('foo')); |
- } |
- buildCounterDataAccessOptions--; |
-} |
- |
core.int buildCounterDecryptRequest = 0; |
buildDecryptRequest() { |
var o = new api.DecryptRequest(); |
@@ -371,16 +284,14 @@ core.int buildCounterDestroyCryptoKeyVersionRequest = 0; |
buildDestroyCryptoKeyVersionRequest() { |
var o = new api.DestroyCryptoKeyVersionRequest(); |
buildCounterDestroyCryptoKeyVersionRequest++; |
- if (buildCounterDestroyCryptoKeyVersionRequest < 3) { |
- } |
+ if (buildCounterDestroyCryptoKeyVersionRequest < 3) {} |
buildCounterDestroyCryptoKeyVersionRequest--; |
return o; |
} |
checkDestroyCryptoKeyVersionRequest(api.DestroyCryptoKeyVersionRequest o) { |
buildCounterDestroyCryptoKeyVersionRequest++; |
- if (buildCounterDestroyCryptoKeyVersionRequest < 3) { |
- } |
+ if (buildCounterDestroyCryptoKeyVersionRequest < 3) {} |
buildCounterDestroyCryptoKeyVersionRequest--; |
} |
@@ -472,14 +383,14 @@ checkKeyRing(api.KeyRing o) { |
buildCounterKeyRing--; |
} |
-buildUnnamed1392() { |
+buildUnnamed1388() { |
var o = new core.List<api.CryptoKeyVersion>(); |
o.add(buildCryptoKeyVersion()); |
o.add(buildCryptoKeyVersion()); |
return o; |
} |
-checkUnnamed1392(core.List<api.CryptoKeyVersion> o) { |
+checkUnnamed1388(core.List<api.CryptoKeyVersion> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkCryptoKeyVersion(o[0]); |
checkCryptoKeyVersion(o[1]); |
@@ -490,7 +401,7 @@ buildListCryptoKeyVersionsResponse() { |
var o = new api.ListCryptoKeyVersionsResponse(); |
buildCounterListCryptoKeyVersionsResponse++; |
if (buildCounterListCryptoKeyVersionsResponse < 3) { |
- o.cryptoKeyVersions = buildUnnamed1392(); |
+ o.cryptoKeyVersions = buildUnnamed1388(); |
o.nextPageToken = "foo"; |
o.totalSize = 42; |
} |
@@ -501,21 +412,21 @@ buildListCryptoKeyVersionsResponse() { |
checkListCryptoKeyVersionsResponse(api.ListCryptoKeyVersionsResponse o) { |
buildCounterListCryptoKeyVersionsResponse++; |
if (buildCounterListCryptoKeyVersionsResponse < 3) { |
- checkUnnamed1392(o.cryptoKeyVersions); |
+ checkUnnamed1388(o.cryptoKeyVersions); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
unittest.expect(o.totalSize, unittest.equals(42)); |
} |
buildCounterListCryptoKeyVersionsResponse--; |
} |
-buildUnnamed1393() { |
+buildUnnamed1389() { |
var o = new core.List<api.CryptoKey>(); |
o.add(buildCryptoKey()); |
o.add(buildCryptoKey()); |
return o; |
} |
-checkUnnamed1393(core.List<api.CryptoKey> o) { |
+checkUnnamed1389(core.List<api.CryptoKey> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkCryptoKey(o[0]); |
checkCryptoKey(o[1]); |
@@ -526,7 +437,7 @@ buildListCryptoKeysResponse() { |
var o = new api.ListCryptoKeysResponse(); |
buildCounterListCryptoKeysResponse++; |
if (buildCounterListCryptoKeysResponse < 3) { |
- o.cryptoKeys = buildUnnamed1393(); |
+ o.cryptoKeys = buildUnnamed1389(); |
o.nextPageToken = "foo"; |
o.totalSize = 42; |
} |
@@ -537,21 +448,21 @@ buildListCryptoKeysResponse() { |
checkListCryptoKeysResponse(api.ListCryptoKeysResponse o) { |
buildCounterListCryptoKeysResponse++; |
if (buildCounterListCryptoKeysResponse < 3) { |
- checkUnnamed1393(o.cryptoKeys); |
+ checkUnnamed1389(o.cryptoKeys); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
unittest.expect(o.totalSize, unittest.equals(42)); |
} |
buildCounterListCryptoKeysResponse--; |
} |
-buildUnnamed1394() { |
+buildUnnamed1390() { |
var o = new core.List<api.KeyRing>(); |
o.add(buildKeyRing()); |
o.add(buildKeyRing()); |
return o; |
} |
-checkUnnamed1394(core.List<api.KeyRing> o) { |
+checkUnnamed1390(core.List<api.KeyRing> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkKeyRing(o[0]); |
checkKeyRing(o[1]); |
@@ -562,7 +473,7 @@ buildListKeyRingsResponse() { |
var o = new api.ListKeyRingsResponse(); |
buildCounterListKeyRingsResponse++; |
if (buildCounterListKeyRingsResponse < 3) { |
- o.keyRings = buildUnnamed1394(); |
+ o.keyRings = buildUnnamed1390(); |
o.nextPageToken = "foo"; |
o.totalSize = 42; |
} |
@@ -573,21 +484,21 @@ buildListKeyRingsResponse() { |
checkListKeyRingsResponse(api.ListKeyRingsResponse o) { |
buildCounterListKeyRingsResponse++; |
if (buildCounterListKeyRingsResponse < 3) { |
- checkUnnamed1394(o.keyRings); |
+ checkUnnamed1390(o.keyRings); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
unittest.expect(o.totalSize, unittest.equals(42)); |
} |
buildCounterListKeyRingsResponse--; |
} |
-buildUnnamed1395() { |
+buildUnnamed1391() { |
var o = new core.List<api.Location>(); |
o.add(buildLocation()); |
o.add(buildLocation()); |
return o; |
} |
-checkUnnamed1395(core.List<api.Location> o) { |
+checkUnnamed1391(core.List<api.Location> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkLocation(o[0]); |
checkLocation(o[1]); |
@@ -598,7 +509,7 @@ buildListLocationsResponse() { |
var o = new api.ListLocationsResponse(); |
buildCounterListLocationsResponse++; |
if (buildCounterListLocationsResponse < 3) { |
- o.locations = buildUnnamed1395(); |
+ o.locations = buildUnnamed1391(); |
o.nextPageToken = "foo"; |
} |
buildCounterListLocationsResponse--; |
@@ -608,36 +519,52 @@ buildListLocationsResponse() { |
checkListLocationsResponse(api.ListLocationsResponse o) { |
buildCounterListLocationsResponse++; |
if (buildCounterListLocationsResponse < 3) { |
- checkUnnamed1395(o.locations); |
+ checkUnnamed1391(o.locations); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
} |
buildCounterListLocationsResponse--; |
} |
-buildUnnamed1396() { |
+buildUnnamed1392() { |
var o = new core.Map<core.String, core.String>(); |
o["x"] = "foo"; |
o["y"] = "foo"; |
return o; |
} |
-checkUnnamed1396(core.Map<core.String, core.String> o) { |
+checkUnnamed1392(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')); |
} |
-buildUnnamed1397() { |
+buildUnnamed1393() { |
var o = new core.Map<core.String, core.Object>(); |
- o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
- o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
+ o["x"] = { |
+ 'list': [1, 2, 3], |
+ 'bool': true, |
+ 'string': 'foo' |
+ }; |
+ o["y"] = { |
+ 'list': [1, 2, 3], |
+ 'bool': true, |
+ 'string': 'foo' |
+ }; |
return o; |
} |
-checkUnnamed1397(core.Map<core.String, core.Object> o) { |
+checkUnnamed1393(core.Map<core.String, core.Object> o) { |
unittest.expect(o, unittest.hasLength(2)); |
- var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); |
- var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLength(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); |
+ var casted1 = (o["x"]) as core.Map; |
+ unittest.expect(casted1, unittest.hasLength(3)); |
+ unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
+ unittest.expect(casted1["bool"], unittest.equals(true)); |
+ unittest.expect(casted1["string"], unittest.equals('foo')); |
+ var casted2 = (o["y"]) as core.Map; |
+ unittest.expect(casted2, unittest.hasLength(3)); |
+ unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
+ unittest.expect(casted2["bool"], unittest.equals(true)); |
+ unittest.expect(casted2["string"], unittest.equals('foo')); |
} |
core.int buildCounterLocation = 0; |
@@ -645,9 +572,9 @@ buildLocation() { |
var o = new api.Location(); |
buildCounterLocation++; |
if (buildCounterLocation < 3) { |
- o.labels = buildUnnamed1396(); |
+ o.labels = buildUnnamed1392(); |
o.locationId = "foo"; |
- o.metadata = buildUnnamed1397(); |
+ o.metadata = buildUnnamed1393(); |
o.name = "foo"; |
} |
buildCounterLocation--; |
@@ -657,86 +584,49 @@ buildLocation() { |
checkLocation(api.Location o) { |
buildCounterLocation++; |
if (buildCounterLocation < 3) { |
- checkUnnamed1396(o.labels); |
+ checkUnnamed1392(o.labels); |
unittest.expect(o.locationId, unittest.equals('foo')); |
- checkUnnamed1397(o.metadata); |
+ checkUnnamed1393(o.metadata); |
unittest.expect(o.name, unittest.equals('foo')); |
} |
buildCounterLocation--; |
} |
-core.int buildCounterLogConfig = 0; |
-buildLogConfig() { |
- var o = new api.LogConfig(); |
- buildCounterLogConfig++; |
- if (buildCounterLogConfig < 3) { |
- o.cloudAudit = buildCloudAuditOptions(); |
- o.counter = buildCounterOptions(); |
- o.dataAccess = buildDataAccessOptions(); |
- } |
- buildCounterLogConfig--; |
- return o; |
-} |
- |
-checkLogConfig(api.LogConfig o) { |
- buildCounterLogConfig++; |
- if (buildCounterLogConfig < 3) { |
- checkCloudAuditOptions(o.cloudAudit); |
- checkCounterOptions(o.counter); |
- checkDataAccessOptions(o.dataAccess); |
- } |
- buildCounterLogConfig--; |
-} |
- |
-buildUnnamed1398() { |
+buildUnnamed1394() { |
var o = new core.List<api.AuditConfig>(); |
o.add(buildAuditConfig()); |
o.add(buildAuditConfig()); |
return o; |
} |
-checkUnnamed1398(core.List<api.AuditConfig> o) { |
+checkUnnamed1394(core.List<api.AuditConfig> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkAuditConfig(o[0]); |
checkAuditConfig(o[1]); |
} |
-buildUnnamed1399() { |
+buildUnnamed1395() { |
var o = new core.List<api.Binding>(); |
o.add(buildBinding()); |
o.add(buildBinding()); |
return o; |
} |
-checkUnnamed1399(core.List<api.Binding> o) { |
+checkUnnamed1395(core.List<api.Binding> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkBinding(o[0]); |
checkBinding(o[1]); |
} |
-buildUnnamed1400() { |
- var o = new core.List<api.Rule>(); |
- o.add(buildRule()); |
- o.add(buildRule()); |
- return o; |
-} |
- |
-checkUnnamed1400(core.List<api.Rule> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkRule(o[0]); |
- checkRule(o[1]); |
-} |
- |
core.int buildCounterPolicy = 0; |
buildPolicy() { |
var o = new api.Policy(); |
buildCounterPolicy++; |
if (buildCounterPolicy < 3) { |
- o.auditConfigs = buildUnnamed1398(); |
- o.bindings = buildUnnamed1399(); |
+ o.auditConfigs = buildUnnamed1394(); |
+ o.bindings = buildUnnamed1395(); |
o.etag = "foo"; |
o.iamOwned = true; |
- o.rules = buildUnnamed1400(); |
o.version = 42; |
} |
buildCounterPolicy--; |
@@ -746,11 +636,10 @@ buildPolicy() { |
checkPolicy(api.Policy o) { |
buildCounterPolicy++; |
if (buildCounterPolicy < 3) { |
- checkUnnamed1398(o.auditConfigs); |
- checkUnnamed1399(o.bindings); |
+ checkUnnamed1394(o.auditConfigs); |
+ checkUnnamed1395(o.bindings); |
unittest.expect(o.etag, unittest.equals('foo')); |
unittest.expect(o.iamOwned, unittest.isTrue); |
- checkUnnamed1400(o.rules); |
unittest.expect(o.version, unittest.equals(42)); |
} |
buildCounterPolicy--; |
@@ -760,115 +649,17 @@ core.int buildCounterRestoreCryptoKeyVersionRequest = 0; |
buildRestoreCryptoKeyVersionRequest() { |
var o = new api.RestoreCryptoKeyVersionRequest(); |
buildCounterRestoreCryptoKeyVersionRequest++; |
- if (buildCounterRestoreCryptoKeyVersionRequest < 3) { |
- } |
+ if (buildCounterRestoreCryptoKeyVersionRequest < 3) {} |
buildCounterRestoreCryptoKeyVersionRequest--; |
return o; |
} |
checkRestoreCryptoKeyVersionRequest(api.RestoreCryptoKeyVersionRequest o) { |
buildCounterRestoreCryptoKeyVersionRequest++; |
- if (buildCounterRestoreCryptoKeyVersionRequest < 3) { |
- } |
+ if (buildCounterRestoreCryptoKeyVersionRequest < 3) {} |
buildCounterRestoreCryptoKeyVersionRequest--; |
} |
-buildUnnamed1401() { |
- var o = new core.List<api.Condition>(); |
- o.add(buildCondition()); |
- o.add(buildCondition()); |
- return o; |
-} |
- |
-checkUnnamed1401(core.List<api.Condition> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkCondition(o[0]); |
- checkCondition(o[1]); |
-} |
- |
-buildUnnamed1402() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed1402(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')); |
-} |
- |
-buildUnnamed1403() { |
- var o = new core.List<api.LogConfig>(); |
- o.add(buildLogConfig()); |
- o.add(buildLogConfig()); |
- return o; |
-} |
- |
-checkUnnamed1403(core.List<api.LogConfig> o) { |
- unittest.expect(o, unittest.hasLength(2)); |
- checkLogConfig(o[0]); |
- checkLogConfig(o[1]); |
-} |
- |
-buildUnnamed1404() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed1404(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')); |
-} |
- |
-buildUnnamed1405() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed1405(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 buildCounterRule = 0; |
-buildRule() { |
- var o = new api.Rule(); |
- buildCounterRule++; |
- if (buildCounterRule < 3) { |
- o.action = "foo"; |
- o.conditions = buildUnnamed1401(); |
- o.description = "foo"; |
- o.in_ = buildUnnamed1402(); |
- o.logConfig = buildUnnamed1403(); |
- o.notIn = buildUnnamed1404(); |
- o.permissions = buildUnnamed1405(); |
- } |
- buildCounterRule--; |
- return o; |
-} |
- |
-checkRule(api.Rule o) { |
- buildCounterRule++; |
- if (buildCounterRule < 3) { |
- unittest.expect(o.action, unittest.equals('foo')); |
- checkUnnamed1401(o.conditions); |
- unittest.expect(o.description, unittest.equals('foo')); |
- checkUnnamed1402(o.in_); |
- checkUnnamed1403(o.logConfig); |
- checkUnnamed1404(o.notIn); |
- checkUnnamed1405(o.permissions); |
- } |
- buildCounterRule--; |
-} |
- |
core.int buildCounterSetIamPolicyRequest = 0; |
buildSetIamPolicyRequest() { |
var o = new api.SetIamPolicyRequest(); |
@@ -890,14 +681,14 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
buildCounterSetIamPolicyRequest--; |
} |
-buildUnnamed1406() { |
+buildUnnamed1396() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1406(core.List<core.String> o) { |
+checkUnnamed1396(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')); |
@@ -908,7 +699,7 @@ buildTestIamPermissionsRequest() { |
var o = new api.TestIamPermissionsRequest(); |
buildCounterTestIamPermissionsRequest++; |
if (buildCounterTestIamPermissionsRequest < 3) { |
- o.permissions = buildUnnamed1406(); |
+ o.permissions = buildUnnamed1396(); |
} |
buildCounterTestIamPermissionsRequest--; |
return o; |
@@ -917,19 +708,19 @@ buildTestIamPermissionsRequest() { |
checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
buildCounterTestIamPermissionsRequest++; |
if (buildCounterTestIamPermissionsRequest < 3) { |
- checkUnnamed1406(o.permissions); |
+ checkUnnamed1396(o.permissions); |
} |
buildCounterTestIamPermissionsRequest--; |
} |
-buildUnnamed1407() { |
+buildUnnamed1397() { |
var o = new core.List<core.String>(); |
o.add("foo"); |
o.add("foo"); |
return o; |
} |
-checkUnnamed1407(core.List<core.String> o) { |
+checkUnnamed1397(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')); |
@@ -940,7 +731,7 @@ buildTestIamPermissionsResponse() { |
var o = new api.TestIamPermissionsResponse(); |
buildCounterTestIamPermissionsResponse++; |
if (buildCounterTestIamPermissionsResponse < 3) { |
- o.permissions = buildUnnamed1407(); |
+ o.permissions = buildUnnamed1397(); |
} |
buildCounterTestIamPermissionsResponse--; |
return o; |
@@ -949,7 +740,7 @@ buildTestIamPermissionsResponse() { |
checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
buildCounterTestIamPermissionsResponse++; |
if (buildCounterTestIamPermissionsResponse < 3) { |
- checkUnnamed1407(o.permissions); |
+ checkUnnamed1397(o.permissions); |
} |
buildCounterTestIamPermissionsResponse--; |
} |
@@ -965,7 +756,8 @@ buildUpdateCryptoKeyPrimaryVersionRequest() { |
return o; |
} |
-checkUpdateCryptoKeyPrimaryVersionRequest(api.UpdateCryptoKeyPrimaryVersionRequest o) { |
+checkUpdateCryptoKeyPrimaryVersionRequest( |
+ api.UpdateCryptoKeyPrimaryVersionRequest o) { |
buildCounterUpdateCryptoKeyPrimaryVersionRequest++; |
if (buildCounterUpdateCryptoKeyPrimaryVersionRequest < 3) { |
unittest.expect(o.cryptoKeyVersionId, unittest.equals('foo')); |
@@ -973,7 +765,6 @@ checkUpdateCryptoKeyPrimaryVersionRequest(api.UpdateCryptoKeyPrimaryVersionReque |
buildCounterUpdateCryptoKeyPrimaryVersionRequest--; |
} |
- |
main() { |
unittest.group("obj-schema-AuditConfig", () { |
unittest.test("to-json--from-json", () { |
@@ -983,7 +774,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-AuditLogConfig", () { |
unittest.test("to-json--from-json", () { |
var o = buildAuditLogConfig(); |
@@ -992,7 +782,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Binding", () { |
unittest.test("to-json--from-json", () { |
var o = buildBinding(); |
@@ -1001,34 +790,6 @@ main() { |
}); |
}); |
- |
- unittest.group("obj-schema-CloudAuditOptions", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildCloudAuditOptions(); |
- var od = new api.CloudAuditOptions.fromJson(o.toJson()); |
- checkCloudAuditOptions(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-Condition", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildCondition(); |
- var od = new api.Condition.fromJson(o.toJson()); |
- checkCondition(od); |
- }); |
- }); |
- |
- |
- unittest.group("obj-schema-CounterOptions", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildCounterOptions(); |
- var od = new api.CounterOptions.fromJson(o.toJson()); |
- checkCounterOptions(od); |
- }); |
- }); |
- |
- |
unittest.group("obj-schema-CryptoKey", () { |
unittest.test("to-json--from-json", () { |
var o = buildCryptoKey(); |
@@ -1037,7 +798,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-CryptoKeyVersion", () { |
unittest.test("to-json--from-json", () { |
var o = buildCryptoKeyVersion(); |
@@ -1046,16 +806,6 @@ main() { |
}); |
}); |
- |
- unittest.group("obj-schema-DataAccessOptions", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildDataAccessOptions(); |
- var od = new api.DataAccessOptions.fromJson(o.toJson()); |
- checkDataAccessOptions(od); |
- }); |
- }); |
- |
- |
unittest.group("obj-schema-DecryptRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildDecryptRequest(); |
@@ -1064,7 +814,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-DecryptResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildDecryptResponse(); |
@@ -1073,7 +822,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-DestroyCryptoKeyVersionRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildDestroyCryptoKeyVersionRequest(); |
@@ -1082,7 +830,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-EncryptRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildEncryptRequest(); |
@@ -1091,7 +838,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-EncryptResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildEncryptResponse(); |
@@ -1100,7 +846,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Expr", () { |
unittest.test("to-json--from-json", () { |
var o = buildExpr(); |
@@ -1109,7 +854,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-KeyRing", () { |
unittest.test("to-json--from-json", () { |
var o = buildKeyRing(); |
@@ -1118,7 +862,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListCryptoKeyVersionsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListCryptoKeyVersionsResponse(); |
@@ -1127,7 +870,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListCryptoKeysResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListCryptoKeysResponse(); |
@@ -1136,7 +878,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListKeyRingsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListKeyRingsResponse(); |
@@ -1145,7 +886,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-ListLocationsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildListLocationsResponse(); |
@@ -1154,7 +894,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-Location", () { |
unittest.test("to-json--from-json", () { |
var o = buildLocation(); |
@@ -1163,16 +902,6 @@ main() { |
}); |
}); |
- |
- unittest.group("obj-schema-LogConfig", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildLogConfig(); |
- var od = new api.LogConfig.fromJson(o.toJson()); |
- checkLogConfig(od); |
- }); |
- }); |
- |
- |
unittest.group("obj-schema-Policy", () { |
unittest.test("to-json--from-json", () { |
var o = buildPolicy(); |
@@ -1181,7 +910,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-RestoreCryptoKeyVersionRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildRestoreCryptoKeyVersionRequest(); |
@@ -1190,16 +918,6 @@ main() { |
}); |
}); |
- |
- unittest.group("obj-schema-Rule", () { |
- unittest.test("to-json--from-json", () { |
- var o = buildRule(); |
- var od = new api.Rule.fromJson(o.toJson()); |
- checkRule(od); |
- }); |
- }); |
- |
- |
unittest.group("obj-schema-SetIamPolicyRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildSetIamPolicyRequest(); |
@@ -1208,7 +926,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-TestIamPermissionsRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildTestIamPermissionsRequest(); |
@@ -1217,7 +934,6 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-TestIamPermissionsResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildTestIamPermissionsResponse(); |
@@ -1226,30 +942,31 @@ main() { |
}); |
}); |
- |
unittest.group("obj-schema-UpdateCryptoKeyPrimaryVersionRequest", () { |
unittest.test("to-json--from-json", () { |
var o = buildUpdateCryptoKeyPrimaryVersionRequest(); |
- var od = new api.UpdateCryptoKeyPrimaryVersionRequest.fromJson(o.toJson()); |
+ var od = |
+ new api.UpdateCryptoKeyPrimaryVersionRequest.fromJson(o.toJson()); |
checkUpdateCryptoKeyPrimaryVersionRequest(od); |
}); |
}); |
- |
unittest.group("resource-ProjectsLocationsResourceApi", () { |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects.locations; |
+ api.ProjectsLocationsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations; |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1263,16 +980,17 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildLocation()); |
return new async.Future.value(stringResponse(200, h, resp)); |
@@ -1283,21 +1001,23 @@ main() { |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects.locations; |
+ api.ProjectsLocationsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations; |
var arg_name = "foo"; |
- var arg_pageSize = 42; |
var arg_filter = "foo"; |
var arg_pageToken = "foo"; |
+ var arg_pageSize = 42; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1311,36 +1031,42 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListLocationsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListLocationsResponse response) { |
+ res |
+ .list(arg_name, |
+ filter: arg_filter, |
+ pageToken: arg_pageToken, |
+ pageSize: arg_pageSize) |
+ .then(unittest.expectAsync1(((api.ListLocationsResponse response) { |
checkListLocationsResponse(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-ProjectsLocationsKeyRingsResourceApi", () { |
unittest.test("method--create", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_request = buildKeyRing(); |
var arg_parent = "foo"; |
var arg_keyRingId = "foo"; |
@@ -1352,9 +1078,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1368,39 +1096,45 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["keyRingId"].first, unittest.equals(arg_keyRingId)); |
- |
+ unittest.expect( |
+ queryMap["keyRingId"].first, unittest.equals(arg_keyRingId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildKeyRing()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.create(arg_request, arg_parent, keyRingId: arg_keyRingId).then(unittest.expectAsync1(((api.KeyRing response) { |
+ res |
+ .create(arg_request, arg_parent, keyRingId: arg_keyRingId) |
+ .then(unittest.expectAsync1(((api.KeyRing response) { |
checkKeyRing(response); |
}))); |
}); |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1414,16 +1148,17 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildKeyRing()); |
return new async.Future.value(stringResponse(200, h, resp)); |
@@ -1434,18 +1169,20 @@ main() { |
}); |
unittest.test("method--getIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1459,40 +1196,45 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildPolicy()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy response) { |
+ res |
+ .getIamPolicy(arg_resource) |
+ .then(unittest.expectAsync1(((api.Policy response) { |
checkPolicy(response); |
}))); |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_parent = "foo"; |
- var arg_pageSize = 42; |
var arg_pageToken = "foo"; |
+ var arg_pageSize = 42; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1506,31 +1248,36 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListKeyRingsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListKeyRingsResponse response) { |
+ res |
+ .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize) |
+ .then(unittest.expectAsync1(((api.ListKeyRingsResponse response) { |
checkListKeyRingsResponse(response); |
}))); |
}); |
unittest.test("method--setIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_request = buildSetIamPolicyRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1541,9 +1288,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1557,29 +1306,32 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildPolicy()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) { |
+ res |
+ .setIamPolicy(arg_request, arg_resource) |
+ .then(unittest.expectAsync1(((api.Policy response) { |
checkPolicy(response); |
}))); |
}); |
unittest.test("method--testIamPermissions", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings; |
+ api.ProjectsLocationsKeyRingsResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings; |
var arg_request = buildTestIamPermissionsRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1590,9 +1342,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1606,33 +1360,33 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
+ res.testIamPermissions(arg_request, arg_resource).then( |
+ unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
checkTestIamPermissionsResponse(response); |
}))); |
}); |
- |
}); |
- |
unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysResourceApi", () { |
unittest.test("method--create", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildCryptoKey(); |
var arg_parent = "foo"; |
var arg_cryptoKeyId = "foo"; |
@@ -1644,9 +1398,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1660,30 +1416,34 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["cryptoKeyId"].first, unittest.equals(arg_cryptoKeyId)); |
- |
+ unittest.expect( |
+ queryMap["cryptoKeyId"].first, unittest.equals(arg_cryptoKeyId)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKey()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.create(arg_request, arg_parent, cryptoKeyId: arg_cryptoKeyId).then(unittest.expectAsync1(((api.CryptoKey response) { |
+ res |
+ .create(arg_request, arg_parent, cryptoKeyId: arg_cryptoKeyId) |
+ .then(unittest.expectAsync1(((api.CryptoKey response) { |
checkCryptoKey(response); |
}))); |
}); |
unittest.test("method--decrypt", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildDecryptRequest(); |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1694,9 +1454,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1710,29 +1472,32 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildDecryptResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.decrypt(arg_request, arg_name).then(unittest.expectAsync1(((api.DecryptResponse response) { |
+ res |
+ .decrypt(arg_request, arg_name) |
+ .then(unittest.expectAsync1(((api.DecryptResponse response) { |
checkDecryptResponse(response); |
}))); |
}); |
unittest.test("method--encrypt", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildEncryptRequest(); |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1743,9 +1508,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1759,38 +1526,43 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildEncryptResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.encrypt(arg_request, arg_name).then(unittest.expectAsync1(((api.EncryptResponse response) { |
+ res |
+ .encrypt(arg_request, arg_name) |
+ .then(unittest.expectAsync1(((api.EncryptResponse response) { |
checkEncryptResponse(response); |
}))); |
}); |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1804,16 +1576,17 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKey()); |
return new async.Future.value(stringResponse(200, h, resp)); |
@@ -1824,18 +1597,20 @@ main() { |
}); |
unittest.test("method--getIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1849,40 +1624,45 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildPolicy()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy response) { |
+ res |
+ .getIamPolicy(arg_resource) |
+ .then(unittest.expectAsync1(((api.Policy response) { |
checkPolicy(response); |
}))); |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_parent = "foo"; |
- var arg_pageSize = 42; |
var arg_pageToken = "foo"; |
+ var arg_pageSize = 42; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1896,31 +1676,36 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListCryptoKeysResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListCryptoKeysResponse response) { |
+ res |
+ .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize) |
+ .then(unittest.expectAsync1(((api.ListCryptoKeysResponse response) { |
checkListCryptoKeysResponse(response); |
}))); |
}); |
unittest.test("method--patch", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildCryptoKey(); |
var arg_name = "foo"; |
var arg_updateMask = "foo"; |
@@ -1932,9 +1717,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1948,30 +1735,34 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
- |
+ unittest.expect( |
+ queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKey()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest.expectAsync1(((api.CryptoKey response) { |
+ res |
+ .patch(arg_request, arg_name, updateMask: arg_updateMask) |
+ .then(unittest.expectAsync1(((api.CryptoKey response) { |
checkCryptoKey(response); |
}))); |
}); |
unittest.test("method--setIamPolicy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildSetIamPolicyRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -1982,9 +1773,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -1998,29 +1791,32 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildPolicy()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.Policy response) { |
+ res |
+ .setIamPolicy(arg_request, arg_resource) |
+ .then(unittest.expectAsync1(((api.Policy response) { |
checkPolicy(response); |
}))); |
}); |
unittest.test("method--testIamPermissions", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildTestIamPermissionsRequest(); |
var arg_resource = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -2031,9 +1827,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2047,29 +1845,31 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
+ res.testIamPermissions(arg_request, arg_resource).then( |
+ unittest.expectAsync1(((api.TestIamPermissionsResponse response) { |
checkTestIamPermissionsResponse(response); |
}))); |
}); |
unittest.test("method--updatePrimaryVersion", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
+ api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = |
+ new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys; |
var arg_request = buildUpdateCryptoKeyPrimaryVersionRequest(); |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -2080,9 +1880,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2096,33 +1898,41 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKey()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.updatePrimaryVersion(arg_request, arg_name).then(unittest.expectAsync1(((api.CryptoKey response) { |
+ res |
+ .updatePrimaryVersion(arg_request, arg_name) |
+ .then(unittest.expectAsync1(((api.CryptoKey response) { |
checkCryptoKey(response); |
}))); |
}); |
- |
}); |
- |
- unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi", () { |
+ unittest.group( |
+ "resource-ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi", |
+ () { |
unittest.test("method--create", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_request = buildCryptoKeyVersion(); |
var arg_parent = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -2133,9 +1943,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2149,29 +1961,37 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKeyVersion()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
+ res |
+ .create(arg_request, arg_parent) |
+ .then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
checkCryptoKeyVersion(response); |
}))); |
}); |
unittest.test("method--destroy", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_request = buildDestroyCryptoKeyVersionRequest(); |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -2182,9 +2002,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2198,38 +2020,48 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKeyVersion()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.destroy(arg_request, arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
+ res |
+ .destroy(arg_request, arg_name) |
+ .then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
checkCryptoKeyVersion(response); |
}))); |
}); |
unittest.test("method--get", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2243,40 +2075,50 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKeyVersion()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.get(arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
+ res |
+ .get(arg_name) |
+ .then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
checkCryptoKeyVersion(response); |
}))); |
}); |
unittest.test("method--list", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_parent = "foo"; |
- var arg_pageSize = 42; |
var arg_pageToken = "foo"; |
+ var arg_pageSize = 42; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
var path = (req.url).path; |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2290,31 +2132,42 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize)); |
- unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
- |
+ unittest.expect( |
+ queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
+ unittest.expect(core.int.parse(queryMap["pageSize"].first), |
+ unittest.equals(arg_pageSize)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildListCryptoKeyVersionsResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListCryptoKeyVersionsResponse response) { |
+ res |
+ .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize) |
+ .then(unittest |
+ .expectAsync1(((api.ListCryptoKeyVersionsResponse response) { |
checkListCryptoKeyVersionsResponse(response); |
}))); |
}); |
unittest.test("method--patch", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_request = buildCryptoKeyVersion(); |
var arg_name = "foo"; |
var arg_updateMask = "foo"; |
@@ -2326,9 +2179,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2342,30 +2197,39 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
- |
+ unittest.expect( |
+ queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKeyVersion()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
+ res |
+ .patch(arg_request, arg_name, updateMask: arg_updateMask) |
+ .then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
checkCryptoKeyVersion(response); |
}))); |
}); |
unittest.test("method--restore", () { |
- |
var mock = new HttpServerMock(); |
- api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersions; |
+ api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = |
+ new api.CloudkmsApi(mock) |
+ .projects |
+ .locations |
+ .keyRings |
+ .cryptoKeys |
+ .cryptoKeyVersions; |
var arg_request = buildRestoreCryptoKeyVersionRequest(); |
var arg_name = "foo"; |
mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
@@ -2376,9 +2240,11 @@ main() { |
var pathOffset = 0; |
var index; |
var subPart; |
- unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
pathOffset += 1; |
- unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
+ unittest.expect( |
+ path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
pathOffset += 3; |
// NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
@@ -2392,27 +2258,26 @@ main() { |
if (n == null) return null; |
throw new core.ArgumentError("Invalid boolean: $n"); |
} |
+ |
if (query.length > 0) { |
for (var part in query.split("&")) { |
var keyvalue = part.split("="); |
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
+ addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
+ core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
- |
var h = { |
- "content-type" : "application/json; charset=utf-8", |
+ "content-type": "application/json; charset=utf-8", |
}; |
var resp = convert.JSON.encode(buildCryptoKeyVersion()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.restore(arg_request, arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
+ res |
+ .restore(arg_request, arg_name) |
+ .then(unittest.expectAsync1(((api.CryptoKeyVersion response) { |
checkCryptoKeyVersion(response); |
}))); |
}); |
- |
}); |
- |
- |
} |
- |