| Index: generated/googleapis/test/ml/v1_test.dart
|
| diff --git a/generated/googleapis/test/ml/v1_test.dart b/generated/googleapis/test/ml/v1_test.dart
|
| index 5b3aa22b418c215d9c7c94bd3246b804288aecb9..af0341298a60ffb1e6e649b2eb96d6fa9add635e 100644
|
| --- a/generated/googleapis/test/ml/v1_test.dart
|
| +++ b/generated/googleapis/test/ml/v1_test.dart
|
| @@ -592,6 +592,7 @@ buildGoogleCloudMlV1PredictionInput() {
|
| var o = new api.GoogleCloudMlV1PredictionInput();
|
| buildCounterGoogleCloudMlV1PredictionInput++;
|
| if (buildCounterGoogleCloudMlV1PredictionInput < 3) {
|
| + o.batchSize = "foo";
|
| o.dataFormat = "foo";
|
| o.inputPaths = buildUnnamed11();
|
| o.maxWorkerCount = "foo";
|
| @@ -609,6 +610,7 @@ buildGoogleCloudMlV1PredictionInput() {
|
| checkGoogleCloudMlV1PredictionInput(api.GoogleCloudMlV1PredictionInput o) {
|
| buildCounterGoogleCloudMlV1PredictionInput++;
|
| if (buildCounterGoogleCloudMlV1PredictionInput < 3) {
|
| + unittest.expect(o.batchSize, unittest.equals('foo'));
|
| unittest.expect(o.dataFormat, unittest.equals('foo'));
|
| checkUnnamed11(o.inputPaths);
|
| unittest.expect(o.maxWorkerCount, unittest.equals('foo'));
|
| @@ -963,6 +965,7 @@ buildGoogleIamV1LogConfigDataAccessOptions() {
|
| var o = new api.GoogleIamV1LogConfigDataAccessOptions();
|
| buildCounterGoogleIamV1LogConfigDataAccessOptions++;
|
| if (buildCounterGoogleIamV1LogConfigDataAccessOptions < 3) {
|
| + o.logMode = "foo";
|
| }
|
| buildCounterGoogleIamV1LogConfigDataAccessOptions--;
|
| return o;
|
| @@ -971,6 +974,7 @@ buildGoogleIamV1LogConfigDataAccessOptions() {
|
| checkGoogleIamV1LogConfigDataAccessOptions(api.GoogleIamV1LogConfigDataAccessOptions o) {
|
| buildCounterGoogleIamV1LogConfigDataAccessOptions++;
|
| if (buildCounterGoogleIamV1LogConfigDataAccessOptions < 3) {
|
| + unittest.expect(o.logMode, unittest.equals('foo'));
|
| }
|
| buildCounterGoogleIamV1LogConfigDataAccessOptions--;
|
| }
|
| @@ -2226,6 +2230,51 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--getIamPolicy", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs;
|
| + 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("/"));
|
| + pathOffset += 1;
|
| + 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;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildGoogleIamV1Policy());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.GoogleIamV1Policy response) {
|
| + checkGoogleIamV1Policy(response);
|
| + })));
|
| + });
|
| +
|
| unittest.test("method--list", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -2277,6 +2326,104 @@ main() {
|
| })));
|
| });
|
|
|
| + unittest.test("method--setIamPolicy", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs;
|
| + var arg_request = buildGoogleIamV1SetIamPolicyRequest();
|
| + var arg_resource = "foo";
|
| + mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| + var obj = new api.GoogleIamV1SetIamPolicyRequest.fromJson(json);
|
| + checkGoogleIamV1SetIamPolicyRequest(obj);
|
| +
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| + pathOffset += 3;
|
| + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildGoogleIamV1Policy());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((api.GoogleIamV1Policy response) {
|
| + checkGoogleIamV1Policy(response);
|
| + })));
|
| + });
|
| +
|
| + unittest.test("method--testIamPermissions", () {
|
| +
|
| + var mock = new HttpServerMock();
|
| + api.ProjectsJobsResourceApi res = new api.MlApi(mock).projects.jobs;
|
| + var arg_request = buildGoogleIamV1TestIamPermissionsRequest();
|
| + var arg_resource = "foo";
|
| + mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| + var obj = new api.GoogleIamV1TestIamPermissionsRequest.fromJson(json);
|
| + checkGoogleIamV1TestIamPermissionsRequest(obj);
|
| +
|
| + var path = (req.url).path;
|
| + var pathOffset = 0;
|
| + var index;
|
| + var subPart;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| + pathOffset += 1;
|
| + unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
|
| + pathOffset += 3;
|
| + // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| +
|
| + var query = (req.url).query;
|
| + var queryOffset = 0;
|
| + var queryMap = {};
|
| + addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| + parseBool(n) {
|
| + if (n == "true") return true;
|
| + if (n == "false") return false;
|
| + if (n == null) return null;
|
| + throw new core.ArgumentError("Invalid boolean: $n");
|
| + }
|
| + if (query.length > 0) {
|
| + for (var part in query.split("&")) {
|
| + var keyvalue = part.split("=");
|
| + addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| + }
|
| + }
|
| +
|
| +
|
| + var h = {
|
| + "content-type" : "application/json; charset=utf-8",
|
| + };
|
| + var resp = convert.JSON.encode(buildGoogleIamV1TestIamPermissionsResponse());
|
| + return new async.Future.value(stringResponse(200, h, resp));
|
| + }), true);
|
| + res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsync1(((api.GoogleIamV1TestIamPermissionsResponse response) {
|
| + checkGoogleIamV1TestIamPermissionsResponse(response);
|
| + })));
|
| + });
|
| +
|
| });
|
|
|
|
|
| @@ -2997,9 +3144,9 @@ main() {
|
| var mock = new HttpServerMock();
|
| api.ProjectsOperationsResourceApi res = new api.MlApi(mock).projects.operations;
|
| var arg_name = "foo";
|
| - var arg_filter = "foo";
|
| var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| + var arg_filter = "foo";
|
| mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -3027,9 +3174,9 @@ main() {
|
| addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| - unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
|
| unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| + unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
|
|
|
|
|
| var h = {
|
| @@ -3038,7 +3185,7 @@ main() {
|
| var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(arg_name, filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsResponse response) {
|
| + res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsResponse response) {
|
| checkGoogleLongrunningListOperationsResponse(response);
|
| })));
|
| });
|
|
|