| Index: generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| diff --git a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| index f944921ba69ff14f4a1147e34809499f88953654..c2056aadb642fc027a900f84a85c03b27f6e1bc1 100644
|
| --- a/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| +++ b/generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart
|
| @@ -70,14 +70,14 @@ checkAncestor(api.Ancestor o) {
|
| buildCounterAncestor--;
|
| }
|
|
|
| -buildUnnamed3422() {
|
| +buildUnnamed3409() {
|
| var o = new core.List<api.AuditLogConfig>();
|
| o.add(buildAuditLogConfig());
|
| o.add(buildAuditLogConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3422(core.List<api.AuditLogConfig> o) {
|
| +checkUnnamed3409(core.List<api.AuditLogConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditLogConfig(o[0]);
|
| checkAuditLogConfig(o[1]);
|
| @@ -88,7 +88,7 @@ buildAuditConfig() {
|
| var o = new api.AuditConfig();
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - o.auditLogConfigs = buildUnnamed3422();
|
| + o.auditLogConfigs = buildUnnamed3409();
|
| o.service = "foo";
|
| }
|
| buildCounterAuditConfig--;
|
| @@ -98,20 +98,20 @@ buildAuditConfig() {
|
| checkAuditConfig(api.AuditConfig o) {
|
| buildCounterAuditConfig++;
|
| if (buildCounterAuditConfig < 3) {
|
| - checkUnnamed3422(o.auditLogConfigs);
|
| + checkUnnamed3409(o.auditLogConfigs);
|
| unittest.expect(o.service, unittest.equals('foo'));
|
| }
|
| buildCounterAuditConfig--;
|
| }
|
|
|
| -buildUnnamed3423() {
|
| +buildUnnamed3410() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3423(core.List<core.String> o) {
|
| +checkUnnamed3410(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -122,7 +122,7 @@ buildAuditLogConfig() {
|
| var o = new api.AuditLogConfig();
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - o.exemptedMembers = buildUnnamed3423();
|
| + o.exemptedMembers = buildUnnamed3410();
|
| o.logType = "foo";
|
| }
|
| buildCounterAuditLogConfig--;
|
| @@ -132,20 +132,20 @@ buildAuditLogConfig() {
|
| checkAuditLogConfig(api.AuditLogConfig o) {
|
| buildCounterAuditLogConfig++;
|
| if (buildCounterAuditLogConfig < 3) {
|
| - checkUnnamed3423(o.exemptedMembers);
|
| + checkUnnamed3410(o.exemptedMembers);
|
| unittest.expect(o.logType, unittest.equals('foo'));
|
| }
|
| buildCounterAuditLogConfig--;
|
| }
|
|
|
| -buildUnnamed3424() {
|
| +buildUnnamed3411() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3424(core.List<core.String> o) {
|
| +checkUnnamed3411(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -156,7 +156,7 @@ buildBinding() {
|
| var o = new api.Binding();
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - o.members = buildUnnamed3424();
|
| + o.members = buildUnnamed3411();
|
| o.role = "foo";
|
| }
|
| buildCounterBinding--;
|
| @@ -166,100 +166,12 @@ buildBinding() {
|
| checkBinding(api.Binding o) {
|
| buildCounterBinding++;
|
| if (buildCounterBinding < 3) {
|
| - checkUnnamed3424(o.members);
|
| + checkUnnamed3411(o.members);
|
| unittest.expect(o.role, unittest.equals('foo'));
|
| }
|
| buildCounterBinding--;
|
| }
|
|
|
| -core.int buildCounterBooleanConstraint = 0;
|
| -buildBooleanConstraint() {
|
| - var o = new api.BooleanConstraint();
|
| - buildCounterBooleanConstraint++;
|
| - if (buildCounterBooleanConstraint < 3) {
|
| - }
|
| - buildCounterBooleanConstraint--;
|
| - return o;
|
| -}
|
| -
|
| -checkBooleanConstraint(api.BooleanConstraint o) {
|
| - buildCounterBooleanConstraint++;
|
| - if (buildCounterBooleanConstraint < 3) {
|
| - }
|
| - buildCounterBooleanConstraint--;
|
| -}
|
| -
|
| -core.int buildCounterBooleanPolicy = 0;
|
| -buildBooleanPolicy() {
|
| - var o = new api.BooleanPolicy();
|
| - buildCounterBooleanPolicy++;
|
| - if (buildCounterBooleanPolicy < 3) {
|
| - o.enforced = true;
|
| - }
|
| - buildCounterBooleanPolicy--;
|
| - return o;
|
| -}
|
| -
|
| -checkBooleanPolicy(api.BooleanPolicy o) {
|
| - buildCounterBooleanPolicy++;
|
| - if (buildCounterBooleanPolicy < 3) {
|
| - unittest.expect(o.enforced, unittest.isTrue);
|
| - }
|
| - buildCounterBooleanPolicy--;
|
| -}
|
| -
|
| -core.int buildCounterClearOrgPolicyRequest = 0;
|
| -buildClearOrgPolicyRequest() {
|
| - var o = new api.ClearOrgPolicyRequest();
|
| - buildCounterClearOrgPolicyRequest++;
|
| - if (buildCounterClearOrgPolicyRequest < 3) {
|
| - o.constraint = "foo";
|
| - o.etag = "foo";
|
| - }
|
| - buildCounterClearOrgPolicyRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkClearOrgPolicyRequest(api.ClearOrgPolicyRequest o) {
|
| - buildCounterClearOrgPolicyRequest++;
|
| - if (buildCounterClearOrgPolicyRequest < 3) {
|
| - unittest.expect(o.constraint, unittest.equals('foo'));
|
| - unittest.expect(o.etag, unittest.equals('foo'));
|
| - }
|
| - buildCounterClearOrgPolicyRequest--;
|
| -}
|
| -
|
| -core.int buildCounterConstraint = 0;
|
| -buildConstraint() {
|
| - var o = new api.Constraint();
|
| - buildCounterConstraint++;
|
| - if (buildCounterConstraint < 3) {
|
| - o.booleanConstraint = buildBooleanConstraint();
|
| - o.constraintDefault = "foo";
|
| - o.description = "foo";
|
| - o.displayName = "foo";
|
| - o.listConstraint = buildListConstraint();
|
| - o.name = "foo";
|
| - o.version = 42;
|
| - }
|
| - buildCounterConstraint--;
|
| - return o;
|
| -}
|
| -
|
| -checkConstraint(api.Constraint o) {
|
| - buildCounterConstraint++;
|
| - if (buildCounterConstraint < 3) {
|
| - checkBooleanConstraint(o.booleanConstraint);
|
| - unittest.expect(o.constraintDefault, unittest.equals('foo'));
|
| - unittest.expect(o.description, unittest.equals('foo'));
|
| - unittest.expect(o.displayName, unittest.equals('foo'));
|
| - checkListConstraint(o.listConstraint);
|
| - unittest.expect(o.name, unittest.equals('foo'));
|
| - unittest.expect(o.version, unittest.equals(42));
|
| - }
|
| - buildCounterConstraint--;
|
| -}
|
| -
|
| core.int buildCounterEmpty = 0;
|
| buildEmpty() {
|
| var o = new api.Empty();
|
| @@ -338,14 +250,14 @@ checkGetAncestryRequest(api.GetAncestryRequest o) {
|
| buildCounterGetAncestryRequest--;
|
| }
|
|
|
| -buildUnnamed3425() {
|
| +buildUnnamed3412() {
|
| var o = new core.List<api.Ancestor>();
|
| o.add(buildAncestor());
|
| o.add(buildAncestor());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3425(core.List<api.Ancestor> o) {
|
| +checkUnnamed3412(core.List<api.Ancestor> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAncestor(o[0]);
|
| checkAncestor(o[1]);
|
| @@ -356,7 +268,7 @@ buildGetAncestryResponse() {
|
| var o = new api.GetAncestryResponse();
|
| buildCounterGetAncestryResponse++;
|
| if (buildCounterGetAncestryResponse < 3) {
|
| - o.ancestor = buildUnnamed3425();
|
| + o.ancestor = buildUnnamed3412();
|
| }
|
| buildCounterGetAncestryResponse--;
|
| return o;
|
| @@ -365,30 +277,11 @@ buildGetAncestryResponse() {
|
| checkGetAncestryResponse(api.GetAncestryResponse o) {
|
| buildCounterGetAncestryResponse++;
|
| if (buildCounterGetAncestryResponse < 3) {
|
| - checkUnnamed3425(o.ancestor);
|
| + checkUnnamed3412(o.ancestor);
|
| }
|
| buildCounterGetAncestryResponse--;
|
| }
|
|
|
| -core.int buildCounterGetEffectiveOrgPolicyRequest = 0;
|
| -buildGetEffectiveOrgPolicyRequest() {
|
| - var o = new api.GetEffectiveOrgPolicyRequest();
|
| - buildCounterGetEffectiveOrgPolicyRequest++;
|
| - if (buildCounterGetEffectiveOrgPolicyRequest < 3) {
|
| - o.constraint = "foo";
|
| - }
|
| - buildCounterGetEffectiveOrgPolicyRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkGetEffectiveOrgPolicyRequest(api.GetEffectiveOrgPolicyRequest o) {
|
| - buildCounterGetEffectiveOrgPolicyRequest++;
|
| - if (buildCounterGetEffectiveOrgPolicyRequest < 3) {
|
| - unittest.expect(o.constraint, unittest.equals('foo'));
|
| - }
|
| - buildCounterGetEffectiveOrgPolicyRequest--;
|
| -}
|
| -
|
| core.int buildCounterGetIamPolicyRequest = 0;
|
| buildGetIamPolicyRequest() {
|
| var o = new api.GetIamPolicyRequest();
|
| @@ -406,162 +299,14 @@ checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
|
| buildCounterGetIamPolicyRequest--;
|
| }
|
|
|
| -core.int buildCounterGetOrgPolicyRequest = 0;
|
| -buildGetOrgPolicyRequest() {
|
| - var o = new api.GetOrgPolicyRequest();
|
| - buildCounterGetOrgPolicyRequest++;
|
| - if (buildCounterGetOrgPolicyRequest < 3) {
|
| - o.constraint = "foo";
|
| - }
|
| - buildCounterGetOrgPolicyRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkGetOrgPolicyRequest(api.GetOrgPolicyRequest o) {
|
| - buildCounterGetOrgPolicyRequest++;
|
| - if (buildCounterGetOrgPolicyRequest < 3) {
|
| - unittest.expect(o.constraint, unittest.equals('foo'));
|
| - }
|
| - buildCounterGetOrgPolicyRequest--;
|
| -}
|
| -
|
| -core.int buildCounterListAvailableOrgPolicyConstraintsRequest = 0;
|
| -buildListAvailableOrgPolicyConstraintsRequest() {
|
| - var o = new api.ListAvailableOrgPolicyConstraintsRequest();
|
| - buildCounterListAvailableOrgPolicyConstraintsRequest++;
|
| - if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) {
|
| - o.pageSize = 42;
|
| - o.pageToken = "foo";
|
| - }
|
| - buildCounterListAvailableOrgPolicyConstraintsRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkListAvailableOrgPolicyConstraintsRequest(api.ListAvailableOrgPolicyConstraintsRequest o) {
|
| - buildCounterListAvailableOrgPolicyConstraintsRequest++;
|
| - if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) {
|
| - unittest.expect(o.pageSize, unittest.equals(42));
|
| - unittest.expect(o.pageToken, unittest.equals('foo'));
|
| - }
|
| - buildCounterListAvailableOrgPolicyConstraintsRequest--;
|
| -}
|
| -
|
| -buildUnnamed3426() {
|
| - var o = new core.List<api.Constraint>();
|
| - o.add(buildConstraint());
|
| - o.add(buildConstraint());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed3426(core.List<api.Constraint> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkConstraint(o[0]);
|
| - checkConstraint(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterListAvailableOrgPolicyConstraintsResponse = 0;
|
| -buildListAvailableOrgPolicyConstraintsResponse() {
|
| - var o = new api.ListAvailableOrgPolicyConstraintsResponse();
|
| - buildCounterListAvailableOrgPolicyConstraintsResponse++;
|
| - if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) {
|
| - o.constraints = buildUnnamed3426();
|
| - o.nextPageToken = "foo";
|
| - }
|
| - buildCounterListAvailableOrgPolicyConstraintsResponse--;
|
| - return o;
|
| -}
|
| -
|
| -checkListAvailableOrgPolicyConstraintsResponse(api.ListAvailableOrgPolicyConstraintsResponse o) {
|
| - buildCounterListAvailableOrgPolicyConstraintsResponse++;
|
| - if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) {
|
| - checkUnnamed3426(o.constraints);
|
| - unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - }
|
| - buildCounterListAvailableOrgPolicyConstraintsResponse--;
|
| -}
|
| -
|
| -core.int buildCounterListConstraint = 0;
|
| -buildListConstraint() {
|
| - var o = new api.ListConstraint();
|
| - buildCounterListConstraint++;
|
| - if (buildCounterListConstraint < 3) {
|
| - o.suggestedValue = "foo";
|
| - }
|
| - buildCounterListConstraint--;
|
| - return o;
|
| -}
|
| -
|
| -checkListConstraint(api.ListConstraint o) {
|
| - buildCounterListConstraint++;
|
| - if (buildCounterListConstraint < 3) {
|
| - unittest.expect(o.suggestedValue, unittest.equals('foo'));
|
| - }
|
| - buildCounterListConstraint--;
|
| -}
|
| -
|
| -core.int buildCounterListOrgPoliciesRequest = 0;
|
| -buildListOrgPoliciesRequest() {
|
| - var o = new api.ListOrgPoliciesRequest();
|
| - buildCounterListOrgPoliciesRequest++;
|
| - if (buildCounterListOrgPoliciesRequest < 3) {
|
| - o.pageSize = 42;
|
| - o.pageToken = "foo";
|
| - }
|
| - buildCounterListOrgPoliciesRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkListOrgPoliciesRequest(api.ListOrgPoliciesRequest o) {
|
| - buildCounterListOrgPoliciesRequest++;
|
| - if (buildCounterListOrgPoliciesRequest < 3) {
|
| - unittest.expect(o.pageSize, unittest.equals(42));
|
| - unittest.expect(o.pageToken, unittest.equals('foo'));
|
| - }
|
| - buildCounterListOrgPoliciesRequest--;
|
| -}
|
| -
|
| -buildUnnamed3427() {
|
| - var o = new core.List<api.OrgPolicy>();
|
| - o.add(buildOrgPolicy());
|
| - o.add(buildOrgPolicy());
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed3427(core.List<api.OrgPolicy> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - checkOrgPolicy(o[0]);
|
| - checkOrgPolicy(o[1]);
|
| -}
|
| -
|
| -core.int buildCounterListOrgPoliciesResponse = 0;
|
| -buildListOrgPoliciesResponse() {
|
| - var o = new api.ListOrgPoliciesResponse();
|
| - buildCounterListOrgPoliciesResponse++;
|
| - if (buildCounterListOrgPoliciesResponse < 3) {
|
| - o.nextPageToken = "foo";
|
| - o.policies = buildUnnamed3427();
|
| - }
|
| - buildCounterListOrgPoliciesResponse--;
|
| - return o;
|
| -}
|
| -
|
| -checkListOrgPoliciesResponse(api.ListOrgPoliciesResponse o) {
|
| - buildCounterListOrgPoliciesResponse++;
|
| - if (buildCounterListOrgPoliciesResponse < 3) {
|
| - unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3427(o.policies);
|
| - }
|
| - buildCounterListOrgPoliciesResponse--;
|
| -}
|
| -
|
| -buildUnnamed3428() {
|
| +buildUnnamed3413() {
|
| var o = new core.List<api.Organization>();
|
| o.add(buildOrganization());
|
| o.add(buildOrganization());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3428(core.List<api.Organization> o) {
|
| +checkUnnamed3413(core.List<api.Organization> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkOrganization(o[0]);
|
| checkOrganization(o[1]);
|
| @@ -573,7 +318,7 @@ buildListOrganizationsResponse() {
|
| buildCounterListOrganizationsResponse++;
|
| if (buildCounterListOrganizationsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.organizations = buildUnnamed3428();
|
| + o.organizations = buildUnnamed3413();
|
| }
|
| buildCounterListOrganizationsResponse--;
|
| return o;
|
| @@ -583,72 +328,19 @@ checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
|
| buildCounterListOrganizationsResponse++;
|
| if (buildCounterListOrganizationsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3428(o.organizations);
|
| + checkUnnamed3413(o.organizations);
|
| }
|
| buildCounterListOrganizationsResponse--;
|
| }
|
|
|
| -buildUnnamed3429() {
|
| - var o = new core.List<core.String>();
|
| - o.add("foo");
|
| - o.add("foo");
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed3429(core.List<core.String> o) {
|
| - unittest.expect(o, unittest.hasLength(2));
|
| - unittest.expect(o[0], unittest.equals('foo'));
|
| - unittest.expect(o[1], unittest.equals('foo'));
|
| -}
|
| -
|
| -buildUnnamed3430() {
|
| - var o = new core.List<core.String>();
|
| - o.add("foo");
|
| - o.add("foo");
|
| - return o;
|
| -}
|
| -
|
| -checkUnnamed3430(core.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 buildCounterListPolicy = 0;
|
| -buildListPolicy() {
|
| - var o = new api.ListPolicy();
|
| - buildCounterListPolicy++;
|
| - if (buildCounterListPolicy < 3) {
|
| - o.allValues = "foo";
|
| - o.allowedValues = buildUnnamed3429();
|
| - o.deniedValues = buildUnnamed3430();
|
| - o.inheritFromParent = true;
|
| - o.suggestedValue = "foo";
|
| - }
|
| - buildCounterListPolicy--;
|
| - return o;
|
| -}
|
| -
|
| -checkListPolicy(api.ListPolicy o) {
|
| - buildCounterListPolicy++;
|
| - if (buildCounterListPolicy < 3) {
|
| - unittest.expect(o.allValues, unittest.equals('foo'));
|
| - checkUnnamed3429(o.allowedValues);
|
| - checkUnnamed3430(o.deniedValues);
|
| - unittest.expect(o.inheritFromParent, unittest.isTrue);
|
| - unittest.expect(o.suggestedValue, unittest.equals('foo'));
|
| - }
|
| - buildCounterListPolicy--;
|
| -}
|
| -
|
| -buildUnnamed3431() {
|
| +buildUnnamed3414() {
|
| var o = new core.List<api.Project>();
|
| o.add(buildProject());
|
| o.add(buildProject());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3431(core.List<api.Project> o) {
|
| +checkUnnamed3414(core.List<api.Project> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkProject(o[0]);
|
| checkProject(o[1]);
|
| @@ -660,7 +352,7 @@ buildListProjectsResponse() {
|
| buildCounterListProjectsResponse++;
|
| if (buildCounterListProjectsResponse < 3) {
|
| o.nextPageToken = "foo";
|
| - o.projects = buildUnnamed3431();
|
| + o.projects = buildUnnamed3414();
|
| }
|
| buildCounterListProjectsResponse--;
|
| return o;
|
| @@ -670,42 +362,11 @@ checkListProjectsResponse(api.ListProjectsResponse o) {
|
| buildCounterListProjectsResponse++;
|
| if (buildCounterListProjectsResponse < 3) {
|
| unittest.expect(o.nextPageToken, unittest.equals('foo'));
|
| - checkUnnamed3431(o.projects);
|
| + checkUnnamed3414(o.projects);
|
| }
|
| buildCounterListProjectsResponse--;
|
| }
|
|
|
| -core.int buildCounterOrgPolicy = 0;
|
| -buildOrgPolicy() {
|
| - var o = new api.OrgPolicy();
|
| - buildCounterOrgPolicy++;
|
| - if (buildCounterOrgPolicy < 3) {
|
| - o.booleanPolicy = buildBooleanPolicy();
|
| - o.constraint = "foo";
|
| - o.etag = "foo";
|
| - o.listPolicy = buildListPolicy();
|
| - o.restoreDefault = buildRestoreDefault();
|
| - o.updateTime = "foo";
|
| - o.version = 42;
|
| - }
|
| - buildCounterOrgPolicy--;
|
| - return o;
|
| -}
|
| -
|
| -checkOrgPolicy(api.OrgPolicy o) {
|
| - buildCounterOrgPolicy++;
|
| - if (buildCounterOrgPolicy < 3) {
|
| - checkBooleanPolicy(o.booleanPolicy);
|
| - unittest.expect(o.constraint, unittest.equals('foo'));
|
| - unittest.expect(o.etag, unittest.equals('foo'));
|
| - checkListPolicy(o.listPolicy);
|
| - checkRestoreDefault(o.restoreDefault);
|
| - unittest.expect(o.updateTime, unittest.equals('foo'));
|
| - unittest.expect(o.version, unittest.equals(42));
|
| - }
|
| - buildCounterOrgPolicy--;
|
| -}
|
| -
|
| core.int buildCounterOrganization = 0;
|
| buildOrganization() {
|
| var o = new api.Organization();
|
| @@ -754,27 +415,27 @@ checkOrganizationOwner(api.OrganizationOwner o) {
|
| buildCounterOrganizationOwner--;
|
| }
|
|
|
| -buildUnnamed3432() {
|
| +buildUnnamed3415() {
|
| var o = new core.List<api.AuditConfig>();
|
| o.add(buildAuditConfig());
|
| o.add(buildAuditConfig());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3432(core.List<api.AuditConfig> o) {
|
| +checkUnnamed3415(core.List<api.AuditConfig> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkAuditConfig(o[0]);
|
| checkAuditConfig(o[1]);
|
| }
|
|
|
| -buildUnnamed3433() {
|
| +buildUnnamed3416() {
|
| var o = new core.List<api.Binding>();
|
| o.add(buildBinding());
|
| o.add(buildBinding());
|
| return o;
|
| }
|
|
|
| -checkUnnamed3433(core.List<api.Binding> o) {
|
| +checkUnnamed3416(core.List<api.Binding> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkBinding(o[0]);
|
| checkBinding(o[1]);
|
| @@ -785,8 +446,8 @@ buildPolicy() {
|
| var o = new api.Policy();
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - o.auditConfigs = buildUnnamed3432();
|
| - o.bindings = buildUnnamed3433();
|
| + o.auditConfigs = buildUnnamed3415();
|
| + o.bindings = buildUnnamed3416();
|
| o.etag = "foo";
|
| o.version = 42;
|
| }
|
| @@ -797,22 +458,22 @@ buildPolicy() {
|
| checkPolicy(api.Policy o) {
|
| buildCounterPolicy++;
|
| if (buildCounterPolicy < 3) {
|
| - checkUnnamed3432(o.auditConfigs);
|
| - checkUnnamed3433(o.bindings);
|
| + checkUnnamed3415(o.auditConfigs);
|
| + checkUnnamed3416(o.bindings);
|
| unittest.expect(o.etag, unittest.equals('foo'));
|
| unittest.expect(o.version, unittest.equals(42));
|
| }
|
| buildCounterPolicy--;
|
| }
|
|
|
| -buildUnnamed3434() {
|
| +buildUnnamed3417() {
|
| var o = new core.Map<core.String, core.String>();
|
| o["x"] = "foo";
|
| o["y"] = "foo";
|
| return o;
|
| }
|
|
|
| -checkUnnamed3434(core.Map<core.String, core.String> o) {
|
| +checkUnnamed3417(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'));
|
| @@ -824,7 +485,7 @@ buildProject() {
|
| buildCounterProject++;
|
| if (buildCounterProject < 3) {
|
| o.createTime = "foo";
|
| - o.labels = buildUnnamed3434();
|
| + o.labels = buildUnnamed3417();
|
| o.lifecycleState = "foo";
|
| o.name = "foo";
|
| o.parent = buildResourceId();
|
| @@ -839,7 +500,7 @@ checkProject(api.Project o) {
|
| buildCounterProject++;
|
| if (buildCounterProject < 3) {
|
| unittest.expect(o.createTime, unittest.equals('foo'));
|
| - checkUnnamed3434(o.labels);
|
| + checkUnnamed3417(o.labels);
|
| unittest.expect(o.lifecycleState, unittest.equals('foo'));
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| checkResourceId(o.parent);
|
| @@ -893,23 +554,6 @@ checkResourceId(api.ResourceId o) {
|
| buildCounterResourceId--;
|
| }
|
|
|
| -core.int buildCounterRestoreDefault = 0;
|
| -buildRestoreDefault() {
|
| - var o = new api.RestoreDefault();
|
| - buildCounterRestoreDefault++;
|
| - if (buildCounterRestoreDefault < 3) {
|
| - }
|
| - buildCounterRestoreDefault--;
|
| - return o;
|
| -}
|
| -
|
| -checkRestoreDefault(api.RestoreDefault o) {
|
| - buildCounterRestoreDefault++;
|
| - if (buildCounterRestoreDefault < 3) {
|
| - }
|
| - buildCounterRestoreDefault--;
|
| -}
|
| -
|
| core.int buildCounterSetIamPolicyRequest = 0;
|
| buildSetIamPolicyRequest() {
|
| var o = new api.SetIamPolicyRequest();
|
| @@ -931,33 +575,14 @@ checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
|
| buildCounterSetIamPolicyRequest--;
|
| }
|
|
|
| -core.int buildCounterSetOrgPolicyRequest = 0;
|
| -buildSetOrgPolicyRequest() {
|
| - var o = new api.SetOrgPolicyRequest();
|
| - buildCounterSetOrgPolicyRequest++;
|
| - if (buildCounterSetOrgPolicyRequest < 3) {
|
| - o.policy = buildOrgPolicy();
|
| - }
|
| - buildCounterSetOrgPolicyRequest--;
|
| - return o;
|
| -}
|
| -
|
| -checkSetOrgPolicyRequest(api.SetOrgPolicyRequest o) {
|
| - buildCounterSetOrgPolicyRequest++;
|
| - if (buildCounterSetOrgPolicyRequest < 3) {
|
| - checkOrgPolicy(o.policy);
|
| - }
|
| - buildCounterSetOrgPolicyRequest--;
|
| -}
|
| -
|
| -buildUnnamed3435() {
|
| +buildUnnamed3418() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3435(core.List<core.String> o) {
|
| +checkUnnamed3418(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -968,7 +593,7 @@ buildTestIamPermissionsRequest() {
|
| var o = new api.TestIamPermissionsRequest();
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - o.permissions = buildUnnamed3435();
|
| + o.permissions = buildUnnamed3418();
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| return o;
|
| @@ -977,19 +602,19 @@ buildTestIamPermissionsRequest() {
|
| checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
|
| buildCounterTestIamPermissionsRequest++;
|
| if (buildCounterTestIamPermissionsRequest < 3) {
|
| - checkUnnamed3435(o.permissions);
|
| + checkUnnamed3418(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsRequest--;
|
| }
|
|
|
| -buildUnnamed3436() {
|
| +buildUnnamed3419() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed3436(core.List<core.String> o) {
|
| +checkUnnamed3419(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -1000,7 +625,7 @@ buildTestIamPermissionsResponse() {
|
| var o = new api.TestIamPermissionsResponse();
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - o.permissions = buildUnnamed3436();
|
| + o.permissions = buildUnnamed3419();
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| return o;
|
| @@ -1009,7 +634,7 @@ buildTestIamPermissionsResponse() {
|
| checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
|
| buildCounterTestIamPermissionsResponse++;
|
| if (buildCounterTestIamPermissionsResponse < 3) {
|
| - checkUnnamed3436(o.permissions);
|
| + checkUnnamed3419(o.permissions);
|
| }
|
| buildCounterTestIamPermissionsResponse--;
|
| }
|
| @@ -1069,42 +694,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-BooleanConstraint", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBooleanConstraint();
|
| - var od = new api.BooleanConstraint.fromJson(o.toJson());
|
| - checkBooleanConstraint(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-BooleanPolicy", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildBooleanPolicy();
|
| - var od = new api.BooleanPolicy.fromJson(o.toJson());
|
| - checkBooleanPolicy(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ClearOrgPolicyRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildClearOrgPolicyRequest();
|
| - var od = new api.ClearOrgPolicyRequest.fromJson(o.toJson());
|
| - checkClearOrgPolicyRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-Constraint", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildConstraint();
|
| - var od = new api.Constraint.fromJson(o.toJson());
|
| - checkConstraint(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-Empty", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildEmpty();
|
| @@ -1150,15 +739,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-GetEffectiveOrgPolicyRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildGetEffectiveOrgPolicyRequest();
|
| - var od = new api.GetEffectiveOrgPolicyRequest.fromJson(o.toJson());
|
| - checkGetEffectiveOrgPolicyRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-GetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildGetIamPolicyRequest();
|
| @@ -1168,60 +748,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-GetOrgPolicyRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildGetOrgPolicyRequest();
|
| - var od = new api.GetOrgPolicyRequest.fromJson(o.toJson());
|
| - checkGetOrgPolicyRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListAvailableOrgPolicyConstraintsRequest();
|
| - var od = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(o.toJson());
|
| - checkListAvailableOrgPolicyConstraintsRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsResponse", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListAvailableOrgPolicyConstraintsResponse();
|
| - var od = new api.ListAvailableOrgPolicyConstraintsResponse.fromJson(o.toJson());
|
| - checkListAvailableOrgPolicyConstraintsResponse(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ListConstraint", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListConstraint();
|
| - var od = new api.ListConstraint.fromJson(o.toJson());
|
| - checkListConstraint(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ListOrgPoliciesRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListOrgPoliciesRequest();
|
| - var od = new api.ListOrgPoliciesRequest.fromJson(o.toJson());
|
| - checkListOrgPoliciesRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| - unittest.group("obj-schema-ListOrgPoliciesResponse", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListOrgPoliciesResponse();
|
| - var od = new api.ListOrgPoliciesResponse.fromJson(o.toJson());
|
| - checkListOrgPoliciesResponse(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-ListOrganizationsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListOrganizationsResponse();
|
| @@ -1231,15 +757,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-ListPolicy", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildListPolicy();
|
| - var od = new api.ListPolicy.fromJson(o.toJson());
|
| - checkListPolicy(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-ListProjectsResponse", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildListProjectsResponse();
|
| @@ -1249,15 +766,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-OrgPolicy", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildOrgPolicy();
|
| - var od = new api.OrgPolicy.fromJson(o.toJson());
|
| - checkOrgPolicy(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-Organization", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildOrganization();
|
| @@ -1312,15 +820,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-RestoreDefault", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildRestoreDefault();
|
| - var od = new api.RestoreDefault.fromJson(o.toJson());
|
| - checkRestoreDefault(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-SetIamPolicyRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildSetIamPolicyRequest();
|
| @@ -1330,15 +829,6 @@ main() {
|
| });
|
|
|
|
|
| - unittest.group("obj-schema-SetOrgPolicyRequest", () {
|
| - unittest.test("to-json--from-json", () {
|
| - var o = buildSetOrgPolicyRequest();
|
| - var od = new api.SetOrgPolicyRequest.fromJson(o.toJson());
|
| - checkSetOrgPolicyRequest(od);
|
| - });
|
| - });
|
| -
|
| -
|
| unittest.group("obj-schema-TestIamPermissionsRequest", () {
|
| unittest.test("to-json--from-json", () {
|
| var o = buildTestIamPermissionsRequest();
|
| @@ -1367,16 +857,13 @@ main() {
|
|
|
|
|
| unittest.group("resource-OrganizationsResourceApi", () {
|
| - unittest.test("method--clearOrgPolicy", () {
|
| + unittest.test("method--get", () {
|
|
|
| var mock = new HttpServerMock();
|
| api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildClearOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| + var arg_name = "foo";
|
| + var arg_organizationId = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.ClearOrgPolicyRequest.fromJson(json);
|
| - checkClearOrgPolicyRequest(obj);
|
| -
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| var index;
|
| @@ -1403,28 +890,29 @@ main() {
|
| addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| + unittest.expect(queryMap["organizationId"].first, unittest.equals(arg_organizationId));
|
|
|
|
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildEmpty());
|
| + var resp = convert.JSON.encode(buildOrganization());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.Empty response) {
|
| - checkEmpty(response);
|
| + res.get(arg_name, organizationId: arg_organizationId).then(unittest.expectAsync(((api.Organization response) {
|
| + checkOrganization(response);
|
| })));
|
| });
|
|
|
| - unittest.test("method--clearOrgPolicyV1", () {
|
| + unittest.test("method--getIamPolicy", () {
|
|
|
| var mock = new HttpServerMock();
|
| api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildClearOrgPolicyRequest();
|
| + var arg_request = buildGetIamPolicyRequest();
|
| var arg_resource = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.ClearOrgPolicyRequest.fromJson(json);
|
| - checkClearOrgPolicyRequest(obj);
|
| + var obj = new api.GetIamPolicyRequest.fromJson(json);
|
| + checkGetIamPolicyRequest(obj);
|
|
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -1457,313 +945,21 @@ main() {
|
| var h = {
|
| "content-type" : "application/json; charset=utf-8",
|
| };
|
| - var resp = convert.JSON.encode(buildEmpty());
|
| + var resp = convert.JSON.encode(buildPolicy());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.clearOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((api.Empty response) {
|
| - checkEmpty(response);
|
| + res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.Policy response) {
|
| + checkPolicy(response);
|
| })));
|
| });
|
|
|
| - unittest.test("method--get", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_name = "foo";
|
| - var arg_organizationId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (query.length > 0) {
|
| - for (var part in query.split("&")) {
|
| - var keyvalue = part.split("=");
|
| - addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| - }
|
| - }
|
| - unittest.expect(queryMap["organizationId"].first, unittest.equals(arg_organizationId));
|
| -
|
| -
|
| - var h = {
|
| - "content-type" : "application/json; charset=utf-8",
|
| - };
|
| - var resp = convert.JSON.encode(buildOrganization());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.get(arg_name, organizationId: arg_organizationId).then(unittest.expectAsync(((api.Organization response) {
|
| - checkOrganization(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--getEffectiveOrgPolicy", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildGetEffectiveOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json);
|
| - checkGetEffectiveOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--getEffectiveOrgPolicyV1", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildGetEffectiveOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json);
|
| - checkGetEffectiveOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.getEffectiveOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--getIamPolicy", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildGetIamPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.GetIamPolicyRequest.fromJson(json);
|
| - checkGetIamPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.Policy response) {
|
| - checkPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--getOrgPolicy", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildGetOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.GetOrgPolicyRequest.fromJson(json);
|
| - checkGetOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--getOrgPolicyV1", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildGetOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.GetOrgPolicyRequest.fromJson(json);
|
| - checkGetOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.getOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--list", () {
|
| + unittest.test("method--list", () {
|
|
|
| var mock = new HttpServerMock();
|
| api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| + var arg_pageToken = "foo";
|
| var arg_pageSize = 42;
|
| var arg_filter = "foo";
|
| - var arg_pageToken = "foo";
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -1790,9 +986,9 @@ main() {
|
| addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
|
| }
|
| }
|
| + unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
| unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
| unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
|
| - unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken));
|
|
|
|
|
| var h = {
|
| @@ -1801,109 +997,11 @@ main() {
|
| var resp = convert.JSON.encode(buildListOrganizationsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListOrganizationsResponse response) {
|
| + res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_filter).then(unittest.expectAsync(((api.ListOrganizationsResponse response) {
|
| checkListOrganizationsResponse(response);
|
| })));
|
| });
|
|
|
| - unittest.test("method--listAvailableOrgPolicyConstraints", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildListAvailableOrgPolicyConstraintsRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json);
|
| - checkListAvailableOrgPolicyConstraintsRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildListAvailableOrgPolicyConstraintsResponse());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unittest.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) {
|
| - checkListAvailableOrgPolicyConstraintsResponse(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--listOrgPolicies", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildListOrgPoliciesRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.ListOrgPoliciesRequest.fromJson(json);
|
| - checkListOrgPoliciesRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildListOrgPoliciesResponse());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync(((api.ListOrgPoliciesResponse response) {
|
| - checkListOrgPoliciesResponse(response);
|
| - })));
|
| - });
|
| -
|
| unittest.test("method--setIamPolicy", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -1953,104 +1051,6 @@ main() {
|
| })));
|
| });
|
|
|
| - unittest.test("method--setOrgPolicy", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildSetOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.SetOrgPolicyRequest.fromJson(json);
|
| - checkSetOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| - unittest.test("method--setOrgPolicyV1", () {
|
| -
|
| - var mock = new HttpServerMock();
|
| - api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).organizations;
|
| - var arg_request = buildSetOrgPolicyRequest();
|
| - var arg_resource = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| - var obj = new api.SetOrgPolicyRequest.fromJson(json);
|
| - checkSetOrgPolicyRequest(obj);
|
| -
|
| - var path = (req.url).path;
|
| - var pathOffset = 0;
|
| - var index;
|
| - var subPart;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
|
| - pathOffset += 1;
|
| - unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("v1beta1/"));
|
| - pathOffset += 8;
|
| - // NOTE: We cannot test reserved expansions due to the inability to reverse the operation;
|
| -
|
| - var query = (req.url).query;
|
| - var queryOffset = 0;
|
| - var queryMap = {};
|
| - addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
|
| - parseBool(n) {
|
| - if (n == "true") return true;
|
| - if (n == "false") return false;
|
| - if (n == null) return null;
|
| - throw new core.ArgumentError("Invalid boolean: $n");
|
| - }
|
| - if (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(buildOrgPolicy());
|
| - return new async.Future.value(stringResponse(200, h, resp));
|
| - }), true);
|
| - res.setOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((api.OrgPolicy response) {
|
| - checkOrgPolicy(response);
|
| - })));
|
| - });
|
| -
|
| unittest.test("method--testIamPermissions", () {
|
|
|
| var mock = new HttpServerMock();
|
| @@ -2410,9 +1410,9 @@ main() {
|
|
|
| var mock = new HttpServerMock();
|
| api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projects;
|
| - var arg_pageSize = 42;
|
| var arg_filter = "foo";
|
| var arg_pageToken = "foo";
|
| + var arg_pageSize = 42;
|
| mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| var path = (req.url).path;
|
| var pathOffset = 0;
|
| @@ -2439,9 +1439,9 @@ main() {
|
| 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(core.int.parse(queryMap["pageSize"].first), unittest.equals(arg_pageSize));
|
|
|
|
|
| var h = {
|
| @@ -2450,7 +1450,7 @@ main() {
|
| var resp = convert.JSON.encode(buildListProjectsResponse());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListProjectsResponse response) {
|
| + res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync(((api.ListProjectsResponse response) {
|
| checkListProjectsResponse(response);
|
| })));
|
| });
|
|
|