blob: 57fdeff0915dbaaab565616506b7f0fa9161da9a [file] [log] [blame]
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: file_names
// ignore_for_file: library_names
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: prefer_expression_function_bodies
// ignore_for_file: prefer_final_locals
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_cast
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: unnecessary_string_interpolations
// ignore_for_file: avoid_returning_null
// ignore_for_file: cascade_invocations
// ignore_for_file: prefer_single_quotes
// ignore_for_file: unused_local_variable
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:http/http.dart' as http;
import 'package:test/test.dart' as unittest;
import 'package:googleapis/cloudasset/v1.dart' as api;
import '../test_shared.dart';
core.List<core.String> buildUnnamed2669() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2669(core.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.List<api.GoogleCloudOrgpolicyV1Policy> buildUnnamed2670() {
var o = <api.GoogleCloudOrgpolicyV1Policy>[];
o.add(buildGoogleCloudOrgpolicyV1Policy());
o.add(buildGoogleCloudOrgpolicyV1Policy());
return o;
}
void checkUnnamed2670(core.List<api.GoogleCloudOrgpolicyV1Policy> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleCloudOrgpolicyV1Policy(o[0] as api.GoogleCloudOrgpolicyV1Policy);
checkGoogleCloudOrgpolicyV1Policy(o[1] as api.GoogleCloudOrgpolicyV1Policy);
}
core.int buildCounterAsset = 0;
api.Asset buildAsset() {
var o = api.Asset();
buildCounterAsset++;
if (buildCounterAsset < 3) {
o.accessLevel = buildGoogleIdentityAccesscontextmanagerV1AccessLevel();
o.accessPolicy = buildGoogleIdentityAccesscontextmanagerV1AccessPolicy();
o.ancestors = buildUnnamed2669();
o.assetType = 'foo';
o.iamPolicy = buildPolicy();
o.name = 'foo';
o.orgPolicy = buildUnnamed2670();
o.resource = buildResource();
o.servicePerimeter =
buildGoogleIdentityAccesscontextmanagerV1ServicePerimeter();
o.updateTime = 'foo';
}
buildCounterAsset--;
return o;
}
void checkAsset(api.Asset o) {
buildCounterAsset++;
if (buildCounterAsset < 3) {
checkGoogleIdentityAccesscontextmanagerV1AccessLevel(
o.accessLevel as api.GoogleIdentityAccesscontextmanagerV1AccessLevel);
checkGoogleIdentityAccesscontextmanagerV1AccessPolicy(
o.accessPolicy as api.GoogleIdentityAccesscontextmanagerV1AccessPolicy);
checkUnnamed2669(o.ancestors);
unittest.expect(o.assetType, unittest.equals('foo'));
checkPolicy(o.iamPolicy as api.Policy);
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2670(o.orgPolicy);
checkResource(o.resource as api.Resource);
checkGoogleIdentityAccesscontextmanagerV1ServicePerimeter(o.servicePerimeter
as api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter);
unittest.expect(o.updateTime, unittest.equals('foo'));
}
buildCounterAsset--;
}
core.List<api.AuditLogConfig> buildUnnamed2671() {
var o = <api.AuditLogConfig>[];
o.add(buildAuditLogConfig());
o.add(buildAuditLogConfig());
return o;
}
void checkUnnamed2671(core.List<api.AuditLogConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuditLogConfig(o[0] as api.AuditLogConfig);
checkAuditLogConfig(o[1] as api.AuditLogConfig);
}
core.int buildCounterAuditConfig = 0;
api.AuditConfig buildAuditConfig() {
var o = api.AuditConfig();
buildCounterAuditConfig++;
if (buildCounterAuditConfig < 3) {
o.auditLogConfigs = buildUnnamed2671();
o.service = 'foo';
}
buildCounterAuditConfig--;
return o;
}
void checkAuditConfig(api.AuditConfig o) {
buildCounterAuditConfig++;
if (buildCounterAuditConfig < 3) {
checkUnnamed2671(o.auditLogConfigs);
unittest.expect(o.service, unittest.equals('foo'));
}
buildCounterAuditConfig--;
}
core.List<core.String> buildUnnamed2672() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2672(core.List<core.String> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(o[0], unittest.equals('foo'));
unittest.expect(o[1], unittest.equals('foo'));
}
core.int buildCounterAuditLogConfig = 0;
api.AuditLogConfig buildAuditLogConfig() {
var o = api.AuditLogConfig();
buildCounterAuditLogConfig++;
if (buildCounterAuditLogConfig < 3) {
o.exemptedMembers = buildUnnamed2672();
o.logType = 'foo';
}
buildCounterAuditLogConfig--;
return o;
}
void checkAuditLogConfig(api.AuditLogConfig o) {
buildCounterAuditLogConfig++;
if (buildCounterAuditLogConfig < 3) {
checkUnnamed2672(o.exemptedMembers);
unittest.expect(o.logType, unittest.equals('foo'));
}
buildCounterAuditLogConfig--;
}
core.List<api.TemporalAsset> buildUnnamed2673() {
var o = <api.TemporalAsset>[];
o.add(buildTemporalAsset());
o.add(buildTemporalAsset());
return o;
}
void checkUnnamed2673(core.List<api.TemporalAsset> o) {
unittest.expect(o, unittest.hasLength(2));
checkTemporalAsset(o[0] as api.TemporalAsset);
checkTemporalAsset(o[1] as api.TemporalAsset);
}
core.int buildCounterBatchGetAssetsHistoryResponse = 0;
api.BatchGetAssetsHistoryResponse buildBatchGetAssetsHistoryResponse() {
var o = api.BatchGetAssetsHistoryResponse();
buildCounterBatchGetAssetsHistoryResponse++;
if (buildCounterBatchGetAssetsHistoryResponse < 3) {
o.assets = buildUnnamed2673();
}
buildCounterBatchGetAssetsHistoryResponse--;
return o;
}
void checkBatchGetAssetsHistoryResponse(api.BatchGetAssetsHistoryResponse o) {
buildCounterBatchGetAssetsHistoryResponse++;
if (buildCounterBatchGetAssetsHistoryResponse < 3) {
checkUnnamed2673(o.assets);
}
buildCounterBatchGetAssetsHistoryResponse--;
}
core.int buildCounterBigQueryDestination = 0;
api.BigQueryDestination buildBigQueryDestination() {
var o = api.BigQueryDestination();
buildCounterBigQueryDestination++;
if (buildCounterBigQueryDestination < 3) {
o.dataset = 'foo';
o.force = true;
o.partitionSpec = buildPartitionSpec();
o.separateTablesPerAssetType = true;
o.table = 'foo';
}
buildCounterBigQueryDestination--;
return o;
}
void checkBigQueryDestination(api.BigQueryDestination o) {
buildCounterBigQueryDestination++;
if (buildCounterBigQueryDestination < 3) {
unittest.expect(o.dataset, unittest.equals('foo'));
unittest.expect(o.force, unittest.isTrue);
checkPartitionSpec(o.partitionSpec as api.PartitionSpec);
unittest.expect(o.separateTablesPerAssetType, unittest.isTrue);
unittest.expect(o.table, unittest.equals('foo'));
}
buildCounterBigQueryDestination--;
}
core.List<core.String> buildUnnamed2674() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2674(core.List<core.String> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(o[0], unittest.equals('foo'));
unittest.expect(o[1], unittest.equals('foo'));
}
core.int buildCounterBinding = 0;
api.Binding buildBinding() {
var o = api.Binding();
buildCounterBinding++;
if (buildCounterBinding < 3) {
o.condition = buildExpr();
o.members = buildUnnamed2674();
o.role = 'foo';
}
buildCounterBinding--;
return o;
}
void checkBinding(api.Binding o) {
buildCounterBinding++;
if (buildCounterBinding < 3) {
checkExpr(o.condition as api.Expr);
checkUnnamed2674(o.members);
unittest.expect(o.role, unittest.equals('foo'));
}
buildCounterBinding--;
}
core.int buildCounterCreateFeedRequest = 0;
api.CreateFeedRequest buildCreateFeedRequest() {
var o = api.CreateFeedRequest();
buildCounterCreateFeedRequest++;
if (buildCounterCreateFeedRequest < 3) {
o.feed = buildFeed();
o.feedId = 'foo';
}
buildCounterCreateFeedRequest--;
return o;
}
void checkCreateFeedRequest(api.CreateFeedRequest o) {
buildCounterCreateFeedRequest++;
if (buildCounterCreateFeedRequest < 3) {
checkFeed(o.feed as api.Feed);
unittest.expect(o.feedId, unittest.equals('foo'));
}
buildCounterCreateFeedRequest--;
}
core.int buildCounterEmpty = 0;
api.Empty buildEmpty() {
var o = api.Empty();
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
return o;
}
void checkEmpty(api.Empty o) {
buildCounterEmpty++;
if (buildCounterEmpty < 3) {}
buildCounterEmpty--;
}
core.Map<core.String, api.Permissions> buildUnnamed2675() {
var o = <core.String, api.Permissions>{};
o['x'] = buildPermissions();
o['y'] = buildPermissions();
return o;
}
void checkUnnamed2675(core.Map<core.String, api.Permissions> o) {
unittest.expect(o, unittest.hasLength(2));
checkPermissions(o['x'] as api.Permissions);
checkPermissions(o['y'] as api.Permissions);
}
core.int buildCounterExplanation = 0;
api.Explanation buildExplanation() {
var o = api.Explanation();
buildCounterExplanation++;
if (buildCounterExplanation < 3) {
o.matchedPermissions = buildUnnamed2675();
}
buildCounterExplanation--;
return o;
}
void checkExplanation(api.Explanation o) {
buildCounterExplanation++;
if (buildCounterExplanation < 3) {
checkUnnamed2675(o.matchedPermissions);
}
buildCounterExplanation--;
}
core.List<core.String> buildUnnamed2676() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2676(core.List<core.String> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(o[0], unittest.equals('foo'));
unittest.expect(o[1], unittest.equals('foo'));
}
core.int buildCounterExportAssetsRequest = 0;
api.ExportAssetsRequest buildExportAssetsRequest() {
var o = api.ExportAssetsRequest();
buildCounterExportAssetsRequest++;
if (buildCounterExportAssetsRequest < 3) {
o.assetTypes = buildUnnamed2676();
o.contentType = 'foo';
o.outputConfig = buildOutputConfig();
o.readTime = 'foo';
}
buildCounterExportAssetsRequest--;
return o;
}
void checkExportAssetsRequest(api.ExportAssetsRequest o) {
buildCounterExportAssetsRequest++;
if (buildCounterExportAssetsRequest < 3) {
checkUnnamed2676(o.assetTypes);
unittest.expect(o.contentType, unittest.equals('foo'));
checkOutputConfig(o.outputConfig as api.OutputConfig);
unittest.expect(o.readTime, unittest.equals('foo'));
}
buildCounterExportAssetsRequest--;
}
core.int buildCounterExpr = 0;
api.Expr buildExpr() {
var o = api.Expr();
buildCounterExpr++;
if (buildCounterExpr < 3) {
o.description = 'foo';
o.expression = 'foo';
o.location = 'foo';
o.title = 'foo';
}
buildCounterExpr--;
return o;
}
void checkExpr(api.Expr o) {
buildCounterExpr++;
if (buildCounterExpr < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.expression, unittest.equals('foo'));
unittest.expect(o.location, unittest.equals('foo'));
unittest.expect(o.title, unittest.equals('foo'));
}
buildCounterExpr--;
}
core.List<core.String> buildUnnamed2677() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2677(core.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.List<core.String> buildUnnamed2678() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2678(core.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 buildCounterFeed = 0;
api.Feed buildFeed() {
var o = api.Feed();
buildCounterFeed++;
if (buildCounterFeed < 3) {
o.assetNames = buildUnnamed2677();
o.assetTypes = buildUnnamed2678();
o.condition = buildExpr();
o.contentType = 'foo';
o.feedOutputConfig = buildFeedOutputConfig();
o.name = 'foo';
}
buildCounterFeed--;
return o;
}
void checkFeed(api.Feed o) {
buildCounterFeed++;
if (buildCounterFeed < 3) {
checkUnnamed2677(o.assetNames);
checkUnnamed2678(o.assetTypes);
checkExpr(o.condition as api.Expr);
unittest.expect(o.contentType, unittest.equals('foo'));
checkFeedOutputConfig(o.feedOutputConfig as api.FeedOutputConfig);
unittest.expect(o.name, unittest.equals('foo'));
}
buildCounterFeed--;
}
core.int buildCounterFeedOutputConfig = 0;
api.FeedOutputConfig buildFeedOutputConfig() {
var o = api.FeedOutputConfig();
buildCounterFeedOutputConfig++;
if (buildCounterFeedOutputConfig < 3) {
o.pubsubDestination = buildPubsubDestination();
}
buildCounterFeedOutputConfig--;
return o;
}
void checkFeedOutputConfig(api.FeedOutputConfig o) {
buildCounterFeedOutputConfig++;
if (buildCounterFeedOutputConfig < 3) {
checkPubsubDestination(o.pubsubDestination as api.PubsubDestination);
}
buildCounterFeedOutputConfig--;
}
core.int buildCounterGcsDestination = 0;
api.GcsDestination buildGcsDestination() {
var o = api.GcsDestination();
buildCounterGcsDestination++;
if (buildCounterGcsDestination < 3) {
o.uri = 'foo';
o.uriPrefix = 'foo';
}
buildCounterGcsDestination--;
return o;
}
void checkGcsDestination(api.GcsDestination o) {
buildCounterGcsDestination++;
if (buildCounterGcsDestination < 3) {
unittest.expect(o.uri, unittest.equals('foo'));
unittest.expect(o.uriPrefix, unittest.equals('foo'));
}
buildCounterGcsDestination--;
}
core.int buildCounterGoogleCloudOrgpolicyV1BooleanPolicy = 0;
api.GoogleCloudOrgpolicyV1BooleanPolicy
buildGoogleCloudOrgpolicyV1BooleanPolicy() {
var o = api.GoogleCloudOrgpolicyV1BooleanPolicy();
buildCounterGoogleCloudOrgpolicyV1BooleanPolicy++;
if (buildCounterGoogleCloudOrgpolicyV1BooleanPolicy < 3) {
o.enforced = true;
}
buildCounterGoogleCloudOrgpolicyV1BooleanPolicy--;
return o;
}
void checkGoogleCloudOrgpolicyV1BooleanPolicy(
api.GoogleCloudOrgpolicyV1BooleanPolicy o) {
buildCounterGoogleCloudOrgpolicyV1BooleanPolicy++;
if (buildCounterGoogleCloudOrgpolicyV1BooleanPolicy < 3) {
unittest.expect(o.enforced, unittest.isTrue);
}
buildCounterGoogleCloudOrgpolicyV1BooleanPolicy--;
}
core.List<core.String> buildUnnamed2679() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2679(core.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.List<core.String> buildUnnamed2680() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2680(core.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 buildCounterGoogleCloudOrgpolicyV1ListPolicy = 0;
api.GoogleCloudOrgpolicyV1ListPolicy buildGoogleCloudOrgpolicyV1ListPolicy() {
var o = api.GoogleCloudOrgpolicyV1ListPolicy();
buildCounterGoogleCloudOrgpolicyV1ListPolicy++;
if (buildCounterGoogleCloudOrgpolicyV1ListPolicy < 3) {
o.allValues = 'foo';
o.allowedValues = buildUnnamed2679();
o.deniedValues = buildUnnamed2680();
o.inheritFromParent = true;
o.suggestedValue = 'foo';
}
buildCounterGoogleCloudOrgpolicyV1ListPolicy--;
return o;
}
void checkGoogleCloudOrgpolicyV1ListPolicy(
api.GoogleCloudOrgpolicyV1ListPolicy o) {
buildCounterGoogleCloudOrgpolicyV1ListPolicy++;
if (buildCounterGoogleCloudOrgpolicyV1ListPolicy < 3) {
unittest.expect(o.allValues, unittest.equals('foo'));
checkUnnamed2679(o.allowedValues);
checkUnnamed2680(o.deniedValues);
unittest.expect(o.inheritFromParent, unittest.isTrue);
unittest.expect(o.suggestedValue, unittest.equals('foo'));
}
buildCounterGoogleCloudOrgpolicyV1ListPolicy--;
}
core.int buildCounterGoogleCloudOrgpolicyV1Policy = 0;
api.GoogleCloudOrgpolicyV1Policy buildGoogleCloudOrgpolicyV1Policy() {
var o = api.GoogleCloudOrgpolicyV1Policy();
buildCounterGoogleCloudOrgpolicyV1Policy++;
if (buildCounterGoogleCloudOrgpolicyV1Policy < 3) {
o.booleanPolicy = buildGoogleCloudOrgpolicyV1BooleanPolicy();
o.constraint = 'foo';
o.etag = 'foo';
o.listPolicy = buildGoogleCloudOrgpolicyV1ListPolicy();
o.restoreDefault = buildGoogleCloudOrgpolicyV1RestoreDefault();
o.updateTime = 'foo';
o.version = 42;
}
buildCounterGoogleCloudOrgpolicyV1Policy--;
return o;
}
void checkGoogleCloudOrgpolicyV1Policy(api.GoogleCloudOrgpolicyV1Policy o) {
buildCounterGoogleCloudOrgpolicyV1Policy++;
if (buildCounterGoogleCloudOrgpolicyV1Policy < 3) {
checkGoogleCloudOrgpolicyV1BooleanPolicy(
o.booleanPolicy as api.GoogleCloudOrgpolicyV1BooleanPolicy);
unittest.expect(o.constraint, unittest.equals('foo'));
unittest.expect(o.etag, unittest.equals('foo'));
checkGoogleCloudOrgpolicyV1ListPolicy(
o.listPolicy as api.GoogleCloudOrgpolicyV1ListPolicy);
checkGoogleCloudOrgpolicyV1RestoreDefault(
o.restoreDefault as api.GoogleCloudOrgpolicyV1RestoreDefault);
unittest.expect(o.updateTime, unittest.equals('foo'));
unittest.expect(o.version, unittest.equals(42));
}
buildCounterGoogleCloudOrgpolicyV1Policy--;
}
core.int buildCounterGoogleCloudOrgpolicyV1RestoreDefault = 0;
api.GoogleCloudOrgpolicyV1RestoreDefault
buildGoogleCloudOrgpolicyV1RestoreDefault() {
var o = api.GoogleCloudOrgpolicyV1RestoreDefault();
buildCounterGoogleCloudOrgpolicyV1RestoreDefault++;
if (buildCounterGoogleCloudOrgpolicyV1RestoreDefault < 3) {}
buildCounterGoogleCloudOrgpolicyV1RestoreDefault--;
return o;
}
void checkGoogleCloudOrgpolicyV1RestoreDefault(
api.GoogleCloudOrgpolicyV1RestoreDefault o) {
buildCounterGoogleCloudOrgpolicyV1RestoreDefault++;
if (buildCounterGoogleCloudOrgpolicyV1RestoreDefault < 3) {}
buildCounterGoogleCloudOrgpolicyV1RestoreDefault--;
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel = 0;
api.GoogleIdentityAccesscontextmanagerV1AccessLevel
buildGoogleIdentityAccesscontextmanagerV1AccessLevel() {
var o = api.GoogleIdentityAccesscontextmanagerV1AccessLevel();
buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel < 3) {
o.basic = buildGoogleIdentityAccesscontextmanagerV1BasicLevel();
o.custom = buildGoogleIdentityAccesscontextmanagerV1CustomLevel();
o.description = 'foo';
o.name = 'foo';
o.title = 'foo';
}
buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1AccessLevel(
api.GoogleIdentityAccesscontextmanagerV1AccessLevel o) {
buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel < 3) {
checkGoogleIdentityAccesscontextmanagerV1BasicLevel(
o.basic as api.GoogleIdentityAccesscontextmanagerV1BasicLevel);
checkGoogleIdentityAccesscontextmanagerV1CustomLevel(
o.custom as api.GoogleIdentityAccesscontextmanagerV1CustomLevel);
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.title, unittest.equals('foo'));
}
buildCounterGoogleIdentityAccesscontextmanagerV1AccessLevel--;
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy = 0;
api.GoogleIdentityAccesscontextmanagerV1AccessPolicy
buildGoogleIdentityAccesscontextmanagerV1AccessPolicy() {
var o = api.GoogleIdentityAccesscontextmanagerV1AccessPolicy();
buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy < 3) {
o.etag = 'foo';
o.name = 'foo';
o.parent = 'foo';
o.title = 'foo';
}
buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1AccessPolicy(
api.GoogleIdentityAccesscontextmanagerV1AccessPolicy o) {
buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy < 3) {
unittest.expect(o.etag, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.parent, unittest.equals('foo'));
unittest.expect(o.title, unittest.equals('foo'));
}
buildCounterGoogleIdentityAccesscontextmanagerV1AccessPolicy--;
}
core.List<api.GoogleIdentityAccesscontextmanagerV1Condition>
buildUnnamed2681() {
var o = <api.GoogleIdentityAccesscontextmanagerV1Condition>[];
o.add(buildGoogleIdentityAccesscontextmanagerV1Condition());
o.add(buildGoogleIdentityAccesscontextmanagerV1Condition());
return o;
}
void checkUnnamed2681(
core.List<api.GoogleIdentityAccesscontextmanagerV1Condition> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleIdentityAccesscontextmanagerV1Condition(
o[0] as api.GoogleIdentityAccesscontextmanagerV1Condition);
checkGoogleIdentityAccesscontextmanagerV1Condition(
o[1] as api.GoogleIdentityAccesscontextmanagerV1Condition);
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel = 0;
api.GoogleIdentityAccesscontextmanagerV1BasicLevel
buildGoogleIdentityAccesscontextmanagerV1BasicLevel() {
var o = api.GoogleIdentityAccesscontextmanagerV1BasicLevel();
buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel < 3) {
o.combiningFunction = 'foo';
o.conditions = buildUnnamed2681();
}
buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1BasicLevel(
api.GoogleIdentityAccesscontextmanagerV1BasicLevel o) {
buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel < 3) {
unittest.expect(o.combiningFunction, unittest.equals('foo'));
checkUnnamed2681(o.conditions);
}
buildCounterGoogleIdentityAccesscontextmanagerV1BasicLevel--;
}
core.List<core.String> buildUnnamed2682() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2682(core.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.List<core.String> buildUnnamed2683() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2683(core.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.List<core.String> buildUnnamed2684() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2684(core.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.List<core.String> buildUnnamed2685() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2685(core.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 buildCounterGoogleIdentityAccesscontextmanagerV1Condition = 0;
api.GoogleIdentityAccesscontextmanagerV1Condition
buildGoogleIdentityAccesscontextmanagerV1Condition() {
var o = api.GoogleIdentityAccesscontextmanagerV1Condition();
buildCounterGoogleIdentityAccesscontextmanagerV1Condition++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1Condition < 3) {
o.devicePolicy = buildGoogleIdentityAccesscontextmanagerV1DevicePolicy();
o.ipSubnetworks = buildUnnamed2682();
o.members = buildUnnamed2683();
o.negate = true;
o.regions = buildUnnamed2684();
o.requiredAccessLevels = buildUnnamed2685();
}
buildCounterGoogleIdentityAccesscontextmanagerV1Condition--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1Condition(
api.GoogleIdentityAccesscontextmanagerV1Condition o) {
buildCounterGoogleIdentityAccesscontextmanagerV1Condition++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1Condition < 3) {
checkGoogleIdentityAccesscontextmanagerV1DevicePolicy(
o.devicePolicy as api.GoogleIdentityAccesscontextmanagerV1DevicePolicy);
checkUnnamed2682(o.ipSubnetworks);
checkUnnamed2683(o.members);
unittest.expect(o.negate, unittest.isTrue);
checkUnnamed2684(o.regions);
checkUnnamed2685(o.requiredAccessLevels);
}
buildCounterGoogleIdentityAccesscontextmanagerV1Condition--;
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel = 0;
api.GoogleIdentityAccesscontextmanagerV1CustomLevel
buildGoogleIdentityAccesscontextmanagerV1CustomLevel() {
var o = api.GoogleIdentityAccesscontextmanagerV1CustomLevel();
buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel < 3) {
o.expr = buildExpr();
}
buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1CustomLevel(
api.GoogleIdentityAccesscontextmanagerV1CustomLevel o) {
buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel < 3) {
checkExpr(o.expr as api.Expr);
}
buildCounterGoogleIdentityAccesscontextmanagerV1CustomLevel--;
}
core.List<core.String> buildUnnamed2686() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2686(core.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.List<core.String> buildUnnamed2687() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2687(core.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.List<api.GoogleIdentityAccesscontextmanagerV1OsConstraint>
buildUnnamed2688() {
var o = <api.GoogleIdentityAccesscontextmanagerV1OsConstraint>[];
o.add(buildGoogleIdentityAccesscontextmanagerV1OsConstraint());
o.add(buildGoogleIdentityAccesscontextmanagerV1OsConstraint());
return o;
}
void checkUnnamed2688(
core.List<api.GoogleIdentityAccesscontextmanagerV1OsConstraint> o) {
unittest.expect(o, unittest.hasLength(2));
checkGoogleIdentityAccesscontextmanagerV1OsConstraint(
o[0] as api.GoogleIdentityAccesscontextmanagerV1OsConstraint);
checkGoogleIdentityAccesscontextmanagerV1OsConstraint(
o[1] as api.GoogleIdentityAccesscontextmanagerV1OsConstraint);
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy = 0;
api.GoogleIdentityAccesscontextmanagerV1DevicePolicy
buildGoogleIdentityAccesscontextmanagerV1DevicePolicy() {
var o = api.GoogleIdentityAccesscontextmanagerV1DevicePolicy();
buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy < 3) {
o.allowedDeviceManagementLevels = buildUnnamed2686();
o.allowedEncryptionStatuses = buildUnnamed2687();
o.osConstraints = buildUnnamed2688();
o.requireAdminApproval = true;
o.requireCorpOwned = true;
o.requireScreenlock = true;
}
buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1DevicePolicy(
api.GoogleIdentityAccesscontextmanagerV1DevicePolicy o) {
buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy < 3) {
checkUnnamed2686(o.allowedDeviceManagementLevels);
checkUnnamed2687(o.allowedEncryptionStatuses);
checkUnnamed2688(o.osConstraints);
unittest.expect(o.requireAdminApproval, unittest.isTrue);
unittest.expect(o.requireCorpOwned, unittest.isTrue);
unittest.expect(o.requireScreenlock, unittest.isTrue);
}
buildCounterGoogleIdentityAccesscontextmanagerV1DevicePolicy--;
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint = 0;
api.GoogleIdentityAccesscontextmanagerV1OsConstraint
buildGoogleIdentityAccesscontextmanagerV1OsConstraint() {
var o = api.GoogleIdentityAccesscontextmanagerV1OsConstraint();
buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint < 3) {
o.minimumVersion = 'foo';
o.osType = 'foo';
o.requireVerifiedChromeOs = true;
}
buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1OsConstraint(
api.GoogleIdentityAccesscontextmanagerV1OsConstraint o) {
buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint < 3) {
unittest.expect(o.minimumVersion, unittest.equals('foo'));
unittest.expect(o.osType, unittest.equals('foo'));
unittest.expect(o.requireVerifiedChromeOs, unittest.isTrue);
}
buildCounterGoogleIdentityAccesscontextmanagerV1OsConstraint--;
}
core.int buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter = 0;
api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter
buildGoogleIdentityAccesscontextmanagerV1ServicePerimeter() {
var o = api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter();
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter < 3) {
o.description = 'foo';
o.name = 'foo';
o.perimeterType = 'foo';
o.spec = buildGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig();
o.status =
buildGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig();
o.title = 'foo';
o.useExplicitDryRunSpec = true;
}
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1ServicePerimeter(
api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter o) {
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter < 3) {
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
unittest.expect(o.perimeterType, unittest.equals('foo'));
checkGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig(o.spec
as api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig);
checkGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig(o.status
as api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig);
unittest.expect(o.title, unittest.equals('foo'));
unittest.expect(o.useExplicitDryRunSpec, unittest.isTrue);
}
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeter--;
}
core.List<core.String> buildUnnamed2689() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2689(core.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.List<core.String> buildUnnamed2690() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2690(core.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.List<core.String> buildUnnamed2691() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2691(core.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
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig = 0;
api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig
buildGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig() {
var o = api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig();
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig <
3) {
o.accessLevels = buildUnnamed2689();
o.resources = buildUnnamed2690();
o.restrictedServices = buildUnnamed2691();
o.vpcAccessibleServices =
buildGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices();
}
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig(
api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig o) {
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig <
3) {
checkUnnamed2689(o.accessLevels);
checkUnnamed2690(o.resources);
checkUnnamed2691(o.restrictedServices);
checkGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices(
o.vpcAccessibleServices
as api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices);
}
buildCounterGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig--;
}
core.List<core.String> buildUnnamed2692() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2692(core.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 buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices =
0;
api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices
buildGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices() {
var o = api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices();
buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices <
3) {
o.allowedServices = buildUnnamed2692();
o.enableRestriction = true;
}
buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices--;
return o;
}
void checkGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices(
api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices o) {
buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices++;
if (buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices <
3) {
checkUnnamed2692(o.allowedServices);
unittest.expect(o.enableRestriction, unittest.isTrue);
}
buildCounterGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices--;
}
core.int buildCounterIamPolicySearchResult = 0;
api.IamPolicySearchResult buildIamPolicySearchResult() {
var o = api.IamPolicySearchResult();
buildCounterIamPolicySearchResult++;
if (buildCounterIamPolicySearchResult < 3) {
o.explanation = buildExplanation();
o.policy = buildPolicy();
o.project = 'foo';
o.resource = 'foo';
}
buildCounterIamPolicySearchResult--;
return o;
}
void checkIamPolicySearchResult(api.IamPolicySearchResult o) {
buildCounterIamPolicySearchResult++;
if (buildCounterIamPolicySearchResult < 3) {
checkExplanation(o.explanation as api.Explanation);
checkPolicy(o.policy as api.Policy);
unittest.expect(o.project, unittest.equals('foo'));
unittest.expect(o.resource, unittest.equals('foo'));
}
buildCounterIamPolicySearchResult--;
}
core.List<api.Feed> buildUnnamed2693() {
var o = <api.Feed>[];
o.add(buildFeed());
o.add(buildFeed());
return o;
}
void checkUnnamed2693(core.List<api.Feed> o) {
unittest.expect(o, unittest.hasLength(2));
checkFeed(o[0] as api.Feed);
checkFeed(o[1] as api.Feed);
}
core.int buildCounterListFeedsResponse = 0;
api.ListFeedsResponse buildListFeedsResponse() {
var o = api.ListFeedsResponse();
buildCounterListFeedsResponse++;
if (buildCounterListFeedsResponse < 3) {
o.feeds = buildUnnamed2693();
}
buildCounterListFeedsResponse--;
return o;
}
void checkListFeedsResponse(api.ListFeedsResponse o) {
buildCounterListFeedsResponse++;
if (buildCounterListFeedsResponse < 3) {
checkUnnamed2693(o.feeds);
}
buildCounterListFeedsResponse--;
}
core.Map<core.String, core.Object> buildUnnamed2694() {
var o = <core.String, core.Object>{};
o['x'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o['y'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
void checkUnnamed2694(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted1 = (o['x']) as core.Map;
unittest.expect(casted1, unittest.hasLength(3));
unittest.expect(casted1['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted1['bool'], unittest.equals(true));
unittest.expect(casted1['string'], unittest.equals('foo'));
var casted2 = (o['y']) as core.Map;
unittest.expect(casted2, unittest.hasLength(3));
unittest.expect(casted2['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted2['bool'], unittest.equals(true));
unittest.expect(casted2['string'], unittest.equals('foo'));
}
core.Map<core.String, core.Object> buildUnnamed2695() {
var o = <core.String, core.Object>{};
o['x'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o['y'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
void checkUnnamed2695(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted3 = (o['x']) as core.Map;
unittest.expect(casted3, unittest.hasLength(3));
unittest.expect(casted3['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted3['bool'], unittest.equals(true));
unittest.expect(casted3['string'], unittest.equals('foo'));
var casted4 = (o['y']) as core.Map;
unittest.expect(casted4, unittest.hasLength(3));
unittest.expect(casted4['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted4['bool'], unittest.equals(true));
unittest.expect(casted4['string'], unittest.equals('foo'));
}
core.int buildCounterOperation = 0;
api.Operation buildOperation() {
var o = api.Operation();
buildCounterOperation++;
if (buildCounterOperation < 3) {
o.done = true;
o.error = buildStatus();
o.metadata = buildUnnamed2694();
o.name = 'foo';
o.response = buildUnnamed2695();
}
buildCounterOperation--;
return o;
}
void checkOperation(api.Operation o) {
buildCounterOperation++;
if (buildCounterOperation < 3) {
unittest.expect(o.done, unittest.isTrue);
checkStatus(o.error as api.Status);
checkUnnamed2694(o.metadata);
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2695(o.response);
}
buildCounterOperation--;
}
core.int buildCounterOutputConfig = 0;
api.OutputConfig buildOutputConfig() {
var o = api.OutputConfig();
buildCounterOutputConfig++;
if (buildCounterOutputConfig < 3) {
o.bigqueryDestination = buildBigQueryDestination();
o.gcsDestination = buildGcsDestination();
}
buildCounterOutputConfig--;
return o;
}
void checkOutputConfig(api.OutputConfig o) {
buildCounterOutputConfig++;
if (buildCounterOutputConfig < 3) {
checkBigQueryDestination(o.bigqueryDestination as api.BigQueryDestination);
checkGcsDestination(o.gcsDestination as api.GcsDestination);
}
buildCounterOutputConfig--;
}
core.int buildCounterPartitionSpec = 0;
api.PartitionSpec buildPartitionSpec() {
var o = api.PartitionSpec();
buildCounterPartitionSpec++;
if (buildCounterPartitionSpec < 3) {
o.partitionKey = 'foo';
}
buildCounterPartitionSpec--;
return o;
}
void checkPartitionSpec(api.PartitionSpec o) {
buildCounterPartitionSpec++;
if (buildCounterPartitionSpec < 3) {
unittest.expect(o.partitionKey, unittest.equals('foo'));
}
buildCounterPartitionSpec--;
}
core.List<core.String> buildUnnamed2696() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2696(core.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 buildCounterPermissions = 0;
api.Permissions buildPermissions() {
var o = api.Permissions();
buildCounterPermissions++;
if (buildCounterPermissions < 3) {
o.permissions = buildUnnamed2696();
}
buildCounterPermissions--;
return o;
}
void checkPermissions(api.Permissions o) {
buildCounterPermissions++;
if (buildCounterPermissions < 3) {
checkUnnamed2696(o.permissions);
}
buildCounterPermissions--;
}
core.List<api.AuditConfig> buildUnnamed2697() {
var o = <api.AuditConfig>[];
o.add(buildAuditConfig());
o.add(buildAuditConfig());
return o;
}
void checkUnnamed2697(core.List<api.AuditConfig> o) {
unittest.expect(o, unittest.hasLength(2));
checkAuditConfig(o[0] as api.AuditConfig);
checkAuditConfig(o[1] as api.AuditConfig);
}
core.List<api.Binding> buildUnnamed2698() {
var o = <api.Binding>[];
o.add(buildBinding());
o.add(buildBinding());
return o;
}
void checkUnnamed2698(core.List<api.Binding> o) {
unittest.expect(o, unittest.hasLength(2));
checkBinding(o[0] as api.Binding);
checkBinding(o[1] as api.Binding);
}
core.int buildCounterPolicy = 0;
api.Policy buildPolicy() {
var o = api.Policy();
buildCounterPolicy++;
if (buildCounterPolicy < 3) {
o.auditConfigs = buildUnnamed2697();
o.bindings = buildUnnamed2698();
o.etag = 'foo';
o.version = 42;
}
buildCounterPolicy--;
return o;
}
void checkPolicy(api.Policy o) {
buildCounterPolicy++;
if (buildCounterPolicy < 3) {
checkUnnamed2697(o.auditConfigs);
checkUnnamed2698(o.bindings);
unittest.expect(o.etag, unittest.equals('foo'));
unittest.expect(o.version, unittest.equals(42));
}
buildCounterPolicy--;
}
core.int buildCounterPubsubDestination = 0;
api.PubsubDestination buildPubsubDestination() {
var o = api.PubsubDestination();
buildCounterPubsubDestination++;
if (buildCounterPubsubDestination < 3) {
o.topic = 'foo';
}
buildCounterPubsubDestination--;
return o;
}
void checkPubsubDestination(api.PubsubDestination o) {
buildCounterPubsubDestination++;
if (buildCounterPubsubDestination < 3) {
unittest.expect(o.topic, unittest.equals('foo'));
}
buildCounterPubsubDestination--;
}
core.Map<core.String, core.Object> buildUnnamed2699() {
var o = <core.String, core.Object>{};
o['x'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o['y'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
void checkUnnamed2699(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted5 = (o['x']) as core.Map;
unittest.expect(casted5, unittest.hasLength(3));
unittest.expect(casted5['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted5['bool'], unittest.equals(true));
unittest.expect(casted5['string'], unittest.equals('foo'));
var casted6 = (o['y']) as core.Map;
unittest.expect(casted6, unittest.hasLength(3));
unittest.expect(casted6['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted6['bool'], unittest.equals(true));
unittest.expect(casted6['string'], unittest.equals('foo'));
}
core.int buildCounterResource = 0;
api.Resource buildResource() {
var o = api.Resource();
buildCounterResource++;
if (buildCounterResource < 3) {
o.data = buildUnnamed2699();
o.discoveryDocumentUri = 'foo';
o.discoveryName = 'foo';
o.location = 'foo';
o.parent = 'foo';
o.resourceUrl = 'foo';
o.version = 'foo';
}
buildCounterResource--;
return o;
}
void checkResource(api.Resource o) {
buildCounterResource++;
if (buildCounterResource < 3) {
checkUnnamed2699(o.data);
unittest.expect(o.discoveryDocumentUri, unittest.equals('foo'));
unittest.expect(o.discoveryName, unittest.equals('foo'));
unittest.expect(o.location, unittest.equals('foo'));
unittest.expect(o.parent, unittest.equals('foo'));
unittest.expect(o.resourceUrl, unittest.equals('foo'));
unittest.expect(o.version, unittest.equals('foo'));
}
buildCounterResource--;
}
core.Map<core.String, core.Object> buildUnnamed2700() {
var o = <core.String, core.Object>{};
o['x'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o['y'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
void checkUnnamed2700(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted7 = (o['x']) as core.Map;
unittest.expect(casted7, unittest.hasLength(3));
unittest.expect(casted7['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted7['bool'], unittest.equals(true));
unittest.expect(casted7['string'], unittest.equals('foo'));
var casted8 = (o['y']) as core.Map;
unittest.expect(casted8, unittest.hasLength(3));
unittest.expect(casted8['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted8['bool'], unittest.equals(true));
unittest.expect(casted8['string'], unittest.equals('foo'));
}
core.Map<core.String, core.String> buildUnnamed2701() {
var o = <core.String, core.String>{};
o['x'] = 'foo';
o['y'] = 'foo';
return o;
}
void checkUnnamed2701(core.Map<core.String, core.String> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(o['x'], unittest.equals('foo'));
unittest.expect(o['y'], unittest.equals('foo'));
}
core.List<core.String> buildUnnamed2702() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2702(core.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 buildCounterResourceSearchResult = 0;
api.ResourceSearchResult buildResourceSearchResult() {
var o = api.ResourceSearchResult();
buildCounterResourceSearchResult++;
if (buildCounterResourceSearchResult < 3) {
o.additionalAttributes = buildUnnamed2700();
o.assetType = 'foo';
o.description = 'foo';
o.displayName = 'foo';
o.labels = buildUnnamed2701();
o.location = 'foo';
o.name = 'foo';
o.networkTags = buildUnnamed2702();
o.project = 'foo';
}
buildCounterResourceSearchResult--;
return o;
}
void checkResourceSearchResult(api.ResourceSearchResult o) {
buildCounterResourceSearchResult++;
if (buildCounterResourceSearchResult < 3) {
checkUnnamed2700(o.additionalAttributes);
unittest.expect(o.assetType, unittest.equals('foo'));
unittest.expect(o.description, unittest.equals('foo'));
unittest.expect(o.displayName, unittest.equals('foo'));
checkUnnamed2701(o.labels);
unittest.expect(o.location, unittest.equals('foo'));
unittest.expect(o.name, unittest.equals('foo'));
checkUnnamed2702(o.networkTags);
unittest.expect(o.project, unittest.equals('foo'));
}
buildCounterResourceSearchResult--;
}
core.List<api.IamPolicySearchResult> buildUnnamed2703() {
var o = <api.IamPolicySearchResult>[];
o.add(buildIamPolicySearchResult());
o.add(buildIamPolicySearchResult());
return o;
}
void checkUnnamed2703(core.List<api.IamPolicySearchResult> o) {
unittest.expect(o, unittest.hasLength(2));
checkIamPolicySearchResult(o[0] as api.IamPolicySearchResult);
checkIamPolicySearchResult(o[1] as api.IamPolicySearchResult);
}
core.int buildCounterSearchAllIamPoliciesResponse = 0;
api.SearchAllIamPoliciesResponse buildSearchAllIamPoliciesResponse() {
var o = api.SearchAllIamPoliciesResponse();
buildCounterSearchAllIamPoliciesResponse++;
if (buildCounterSearchAllIamPoliciesResponse < 3) {
o.nextPageToken = 'foo';
o.results = buildUnnamed2703();
}
buildCounterSearchAllIamPoliciesResponse--;
return o;
}
void checkSearchAllIamPoliciesResponse(api.SearchAllIamPoliciesResponse o) {
buildCounterSearchAllIamPoliciesResponse++;
if (buildCounterSearchAllIamPoliciesResponse < 3) {
unittest.expect(o.nextPageToken, unittest.equals('foo'));
checkUnnamed2703(o.results);
}
buildCounterSearchAllIamPoliciesResponse--;
}
core.List<api.ResourceSearchResult> buildUnnamed2704() {
var o = <api.ResourceSearchResult>[];
o.add(buildResourceSearchResult());
o.add(buildResourceSearchResult());
return o;
}
void checkUnnamed2704(core.List<api.ResourceSearchResult> o) {
unittest.expect(o, unittest.hasLength(2));
checkResourceSearchResult(o[0] as api.ResourceSearchResult);
checkResourceSearchResult(o[1] as api.ResourceSearchResult);
}
core.int buildCounterSearchAllResourcesResponse = 0;
api.SearchAllResourcesResponse buildSearchAllResourcesResponse() {
var o = api.SearchAllResourcesResponse();
buildCounterSearchAllResourcesResponse++;
if (buildCounterSearchAllResourcesResponse < 3) {
o.nextPageToken = 'foo';
o.results = buildUnnamed2704();
}
buildCounterSearchAllResourcesResponse--;
return o;
}
void checkSearchAllResourcesResponse(api.SearchAllResourcesResponse o) {
buildCounterSearchAllResourcesResponse++;
if (buildCounterSearchAllResourcesResponse < 3) {
unittest.expect(o.nextPageToken, unittest.equals('foo'));
checkUnnamed2704(o.results);
}
buildCounterSearchAllResourcesResponse--;
}
core.Map<core.String, core.Object> buildUnnamed2705() {
var o = <core.String, core.Object>{};
o['x'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
o['y'] = {
'list': [1, 2, 3],
'bool': true,
'string': 'foo'
};
return o;
}
void checkUnnamed2705(core.Map<core.String, core.Object> o) {
unittest.expect(o, unittest.hasLength(2));
var casted9 = (o['x']) as core.Map;
unittest.expect(casted9, unittest.hasLength(3));
unittest.expect(casted9['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted9['bool'], unittest.equals(true));
unittest.expect(casted9['string'], unittest.equals('foo'));
var casted10 = (o['y']) as core.Map;
unittest.expect(casted10, unittest.hasLength(3));
unittest.expect(casted10['list'], unittest.equals([1, 2, 3]));
unittest.expect(casted10['bool'], unittest.equals(true));
unittest.expect(casted10['string'], unittest.equals('foo'));
}
core.List<core.Map<core.String, core.Object>> buildUnnamed2706() {
var o = <core.Map<core.String, core.Object>>[];
o.add(buildUnnamed2705());
o.add(buildUnnamed2705());
return o;
}
void checkUnnamed2706(core.List<core.Map<core.String, core.Object>> o) {
unittest.expect(o, unittest.hasLength(2));
checkUnnamed2705(o[0]);
checkUnnamed2705(o[1]);
}
core.int buildCounterStatus = 0;
api.Status buildStatus() {
var o = api.Status();
buildCounterStatus++;
if (buildCounterStatus < 3) {
o.code = 42;
o.details = buildUnnamed2706();
o.message = 'foo';
}
buildCounterStatus--;
return o;
}
void checkStatus(api.Status o) {
buildCounterStatus++;
if (buildCounterStatus < 3) {
unittest.expect(o.code, unittest.equals(42));
checkUnnamed2706(o.details);
unittest.expect(o.message, unittest.equals('foo'));
}
buildCounterStatus--;
}
core.int buildCounterTemporalAsset = 0;
api.TemporalAsset buildTemporalAsset() {
var o = api.TemporalAsset();
buildCounterTemporalAsset++;
if (buildCounterTemporalAsset < 3) {
o.asset = buildAsset();
o.deleted = true;
o.priorAsset = buildAsset();
o.priorAssetState = 'foo';
o.window = buildTimeWindow();
}
buildCounterTemporalAsset--;
return o;
}
void checkTemporalAsset(api.TemporalAsset o) {
buildCounterTemporalAsset++;
if (buildCounterTemporalAsset < 3) {
checkAsset(o.asset as api.Asset);
unittest.expect(o.deleted, unittest.isTrue);
checkAsset(o.priorAsset as api.Asset);
unittest.expect(o.priorAssetState, unittest.equals('foo'));
checkTimeWindow(o.window as api.TimeWindow);
}
buildCounterTemporalAsset--;
}
core.int buildCounterTimeWindow = 0;
api.TimeWindow buildTimeWindow() {
var o = api.TimeWindow();
buildCounterTimeWindow++;
if (buildCounterTimeWindow < 3) {
o.endTime = 'foo';
o.startTime = 'foo';
}
buildCounterTimeWindow--;
return o;
}
void checkTimeWindow(api.TimeWindow o) {
buildCounterTimeWindow++;
if (buildCounterTimeWindow < 3) {
unittest.expect(o.endTime, unittest.equals('foo'));
unittest.expect(o.startTime, unittest.equals('foo'));
}
buildCounterTimeWindow--;
}
core.int buildCounterUpdateFeedRequest = 0;
api.UpdateFeedRequest buildUpdateFeedRequest() {
var o = api.UpdateFeedRequest();
buildCounterUpdateFeedRequest++;
if (buildCounterUpdateFeedRequest < 3) {
o.feed = buildFeed();
o.updateMask = 'foo';
}
buildCounterUpdateFeedRequest--;
return o;
}
void checkUpdateFeedRequest(api.UpdateFeedRequest o) {
buildCounterUpdateFeedRequest++;
if (buildCounterUpdateFeedRequest < 3) {
checkFeed(o.feed as api.Feed);
unittest.expect(o.updateMask, unittest.equals('foo'));
}
buildCounterUpdateFeedRequest--;
}
core.List<core.String> buildUnnamed2707() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2707(core.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.List<core.String> buildUnnamed2708() {
var o = <core.String>[];
o.add('foo');
o.add('foo');
return o;
}
void checkUnnamed2708(core.List<core.String> o) {
unittest.expect(o, unittest.hasLength(2));
unittest.expect(o[0], unittest.equals('foo'));
unittest.expect(o[1], unittest.equals('foo'));
}
void main() {
unittest.group('obj-schema-Asset', () {
unittest.test('to-json--from-json', () {
var o = buildAsset();
var od = api.Asset.fromJson(o.toJson());
checkAsset(od as api.Asset);
});
});
unittest.group('obj-schema-AuditConfig', () {
unittest.test('to-json--from-json', () {
var o = buildAuditConfig();
var od = api.AuditConfig.fromJson(o.toJson());
checkAuditConfig(od as api.AuditConfig);
});
});
unittest.group('obj-schema-AuditLogConfig', () {
unittest.test('to-json--from-json', () {
var o = buildAuditLogConfig();
var od = api.AuditLogConfig.fromJson(o.toJson());
checkAuditLogConfig(od as api.AuditLogConfig);
});
});
unittest.group('obj-schema-BatchGetAssetsHistoryResponse', () {
unittest.test('to-json--from-json', () {
var o = buildBatchGetAssetsHistoryResponse();
var od = api.BatchGetAssetsHistoryResponse.fromJson(o.toJson());
checkBatchGetAssetsHistoryResponse(
od as api.BatchGetAssetsHistoryResponse);
});
});
unittest.group('obj-schema-BigQueryDestination', () {
unittest.test('to-json--from-json', () {
var o = buildBigQueryDestination();
var od = api.BigQueryDestination.fromJson(o.toJson());
checkBigQueryDestination(od as api.BigQueryDestination);
});
});
unittest.group('obj-schema-Binding', () {
unittest.test('to-json--from-json', () {
var o = buildBinding();
var od = api.Binding.fromJson(o.toJson());
checkBinding(od as api.Binding);
});
});
unittest.group('obj-schema-CreateFeedRequest', () {
unittest.test('to-json--from-json', () {
var o = buildCreateFeedRequest();
var od = api.CreateFeedRequest.fromJson(o.toJson());
checkCreateFeedRequest(od as api.CreateFeedRequest);
});
});
unittest.group('obj-schema-Empty', () {
unittest.test('to-json--from-json', () {
var o = buildEmpty();
var od = api.Empty.fromJson(o.toJson());
checkEmpty(od as api.Empty);
});
});
unittest.group('obj-schema-Explanation', () {
unittest.test('to-json--from-json', () {
var o = buildExplanation();
var od = api.Explanation.fromJson(o.toJson());
checkExplanation(od as api.Explanation);
});
});
unittest.group('obj-schema-ExportAssetsRequest', () {
unittest.test('to-json--from-json', () {
var o = buildExportAssetsRequest();
var od = api.ExportAssetsRequest.fromJson(o.toJson());
checkExportAssetsRequest(od as api.ExportAssetsRequest);
});
});
unittest.group('obj-schema-Expr', () {
unittest.test('to-json--from-json', () {
var o = buildExpr();
var od = api.Expr.fromJson(o.toJson());
checkExpr(od as api.Expr);
});
});
unittest.group('obj-schema-Feed', () {
unittest.test('to-json--from-json', () {
var o = buildFeed();
var od = api.Feed.fromJson(o.toJson());
checkFeed(od as api.Feed);
});
});
unittest.group('obj-schema-FeedOutputConfig', () {
unittest.test('to-json--from-json', () {
var o = buildFeedOutputConfig();
var od = api.FeedOutputConfig.fromJson(o.toJson());
checkFeedOutputConfig(od as api.FeedOutputConfig);
});
});
unittest.group('obj-schema-GcsDestination', () {
unittest.test('to-json--from-json', () {
var o = buildGcsDestination();
var od = api.GcsDestination.fromJson(o.toJson());
checkGcsDestination(od as api.GcsDestination);
});
});
unittest.group('obj-schema-GoogleCloudOrgpolicyV1BooleanPolicy', () {
unittest.test('to-json--from-json', () {
var o = buildGoogleCloudOrgpolicyV1BooleanPolicy();
var od = api.GoogleCloudOrgpolicyV1BooleanPolicy.fromJson(o.toJson());
checkGoogleCloudOrgpolicyV1BooleanPolicy(
od as api.GoogleCloudOrgpolicyV1BooleanPolicy);
});
});
unittest.group('obj-schema-GoogleCloudOrgpolicyV1ListPolicy', () {
unittest.test('to-json--from-json', () {
var o = buildGoogleCloudOrgpolicyV1ListPolicy();
var od = api.GoogleCloudOrgpolicyV1ListPolicy.fromJson(o.toJson());
checkGoogleCloudOrgpolicyV1ListPolicy(
od as api.GoogleCloudOrgpolicyV1ListPolicy);
});
});
unittest.group('obj-schema-GoogleCloudOrgpolicyV1Policy', () {
unittest.test('to-json--from-json', () {
var o = buildGoogleCloudOrgpolicyV1Policy();
var od = api.GoogleCloudOrgpolicyV1Policy.fromJson(o.toJson());
checkGoogleCloudOrgpolicyV1Policy(od as api.GoogleCloudOrgpolicyV1Policy);
});
});
unittest.group('obj-schema-GoogleCloudOrgpolicyV1RestoreDefault', () {
unittest.test('to-json--from-json', () {
var o = buildGoogleCloudOrgpolicyV1RestoreDefault();
var od = api.GoogleCloudOrgpolicyV1RestoreDefault.fromJson(o.toJson());
checkGoogleCloudOrgpolicyV1RestoreDefault(
od as api.GoogleCloudOrgpolicyV1RestoreDefault);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1AccessLevel',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1AccessLevel();
var od = api.GoogleIdentityAccesscontextmanagerV1AccessLevel.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1AccessLevel(
od as api.GoogleIdentityAccesscontextmanagerV1AccessLevel);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1AccessPolicy',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1AccessPolicy();
var od = api.GoogleIdentityAccesscontextmanagerV1AccessPolicy.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1AccessPolicy(
od as api.GoogleIdentityAccesscontextmanagerV1AccessPolicy);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1BasicLevel',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1BasicLevel();
var od = api.GoogleIdentityAccesscontextmanagerV1BasicLevel.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1BasicLevel(
od as api.GoogleIdentityAccesscontextmanagerV1BasicLevel);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1Condition',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1Condition();
var od = api.GoogleIdentityAccesscontextmanagerV1Condition.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1Condition(
od as api.GoogleIdentityAccesscontextmanagerV1Condition);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1CustomLevel',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1CustomLevel();
var od = api.GoogleIdentityAccesscontextmanagerV1CustomLevel.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1CustomLevel(
od as api.GoogleIdentityAccesscontextmanagerV1CustomLevel);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1DevicePolicy',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1DevicePolicy();
var od = api.GoogleIdentityAccesscontextmanagerV1DevicePolicy.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1DevicePolicy(
od as api.GoogleIdentityAccesscontextmanagerV1DevicePolicy);
});
});
unittest.group('obj-schema-GoogleIdentityAccesscontextmanagerV1OsConstraint',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1OsConstraint();
var od = api.GoogleIdentityAccesscontextmanagerV1OsConstraint.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1OsConstraint(
od as api.GoogleIdentityAccesscontextmanagerV1OsConstraint);
});
});
unittest.group(
'obj-schema-GoogleIdentityAccesscontextmanagerV1ServicePerimeter', () {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1ServicePerimeter();
var od =
api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter.fromJson(
o.toJson());
checkGoogleIdentityAccesscontextmanagerV1ServicePerimeter(
od as api.GoogleIdentityAccesscontextmanagerV1ServicePerimeter);
});
});
unittest.group(
'obj-schema-GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig();
var od = api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig
.fromJson(o.toJson());
checkGoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig(
od as api.GoogleIdentityAccesscontextmanagerV1ServicePerimeterConfig);
});
});
unittest.group(
'obj-schema-GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices',
() {
unittest.test('to-json--from-json', () {
var o = buildGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices();
var od = api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices
.fromJson(o.toJson());
checkGoogleIdentityAccesscontextmanagerV1VpcAccessibleServices(
od as api.GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices);
});
});
unittest.group('obj-schema-IamPolicySearchResult', () {
unittest.test('to-json--from-json', () {
var o = buildIamPolicySearchResult();
var od = api.IamPolicySearchResult.fromJson(o.toJson());
checkIamPolicySearchResult(od as api.IamPolicySearchResult);
});
});
unittest.group('obj-schema-ListFeedsResponse', () {
unittest.test('to-json--from-json', () {
var o = buildListFeedsResponse();
var od = api.ListFeedsResponse.fromJson(o.toJson());
checkListFeedsResponse(od as api.ListFeedsResponse);
});
});
unittest.group('obj-schema-Operation', () {
unittest.test('to-json--from-json', () {
var o = buildOperation();
var od = api.Operation.fromJson(o.toJson());
checkOperation(od as api.Operation);
});
});
unittest.group('obj-schema-OutputConfig', () {
unittest.test('to-json--from-json', () {
var o = buildOutputConfig();
var od = api.OutputConfig.fromJson(o.toJson());
checkOutputConfig(od as api.OutputConfig);
});
});
unittest.group('obj-schema-PartitionSpec', () {
unittest.test('to-json--from-json', () {
var o = buildPartitionSpec();
var od = api.PartitionSpec.fromJson(o.toJson());
checkPartitionSpec(od as api.PartitionSpec);
});
});
unittest.group('obj-schema-Permissions', () {
unittest.test('to-json--from-json', () {
var o = buildPermissions();
var od = api.Permissions.fromJson(o.toJson());
checkPermissions(od as api.Permissions);
});
});
unittest.group('obj-schema-Policy', () {
unittest.test('to-json--from-json', () {
var o = buildPolicy();
var od = api.Policy.fromJson(o.toJson());
checkPolicy(od as api.Policy);
});
});
unittest.group('obj-schema-PubsubDestination', () {
unittest.test('to-json--from-json', () {
var o = buildPubsubDestination();
var od = api.PubsubDestination.fromJson(o.toJson());
checkPubsubDestination(od as api.PubsubDestination);
});
});
unittest.group('obj-schema-Resource', () {
unittest.test('to-json--from-json', () {
var o = buildResource();
var od = api.Resource.fromJson(o.toJson());
checkResource(od as api.Resource);
});
});
unittest.group('obj-schema-ResourceSearchResult', () {
unittest.test('to-json--from-json', () {
var o = buildResourceSearchResult();
var od = api.ResourceSearchResult.fromJson(o.toJson());
checkResourceSearchResult(od as api.ResourceSearchResult);
});
});
unittest.group('obj-schema-SearchAllIamPoliciesResponse', () {
unittest.test('to-json--from-json', () {
var o = buildSearchAllIamPoliciesResponse();
var od = api.SearchAllIamPoliciesResponse.fromJson(o.toJson());
checkSearchAllIamPoliciesResponse(od as api.SearchAllIamPoliciesResponse);
});
});
unittest.group('obj-schema-SearchAllResourcesResponse', () {
unittest.test('to-json--from-json', () {
var o = buildSearchAllResourcesResponse();
var od = api.SearchAllResourcesResponse.fromJson(o.toJson());
checkSearchAllResourcesResponse(od as api.SearchAllResourcesResponse);
});
});
unittest.group('obj-schema-Status', () {
unittest.test('to-json--from-json', () {
var o = buildStatus();
var od = api.Status.fromJson(o.toJson());
checkStatus(od as api.Status);
});
});
unittest.group('obj-schema-TemporalAsset', () {
unittest.test('to-json--from-json', () {
var o = buildTemporalAsset();
var od = api.TemporalAsset.fromJson(o.toJson());
checkTemporalAsset(od as api.TemporalAsset);
});
});
unittest.group('obj-schema-TimeWindow', () {
unittest.test('to-json--from-json', () {
var o = buildTimeWindow();
var od = api.TimeWindow.fromJson(o.toJson());
checkTimeWindow(od as api.TimeWindow);
});
});
unittest.group('obj-schema-UpdateFeedRequest', () {
unittest.test('to-json--from-json', () {
var o = buildUpdateFeedRequest();
var od = api.UpdateFeedRequest.fromJson(o.toJson());
checkUpdateFeedRequest(od as api.UpdateFeedRequest);
});
});
unittest.group('resource-FeedsResourceApi', () {
unittest.test('method--create', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).feeds;
var arg_request = buildCreateFeedRequest();
var arg_parent = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = api.CreateFeedRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkCreateFeedRequest(obj as api.CreateFeedRequest);
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildFeed());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.create(arg_request, arg_parent, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkFeed(response as api.Feed);
})));
});
unittest.test('method--delete', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).feeds;
var arg_name = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildEmpty());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.delete(arg_name, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkEmpty(response as api.Empty);
})));
});
unittest.test('method--get', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).feeds;
var arg_name = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildFeed());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_name, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkFeed(response as api.Feed);
})));
});
unittest.test('method--list', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).feeds;
var arg_parent = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildListFeedsResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.list(arg_parent, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkListFeedsResponse(response as api.ListFeedsResponse);
})));
});
unittest.test('method--patch', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).feeds;
var arg_request = buildUpdateFeedRequest();
var arg_name = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = api.UpdateFeedRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkUpdateFeedRequest(obj as api.UpdateFeedRequest);
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildFeed());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.patch(arg_request, arg_name, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkFeed(response as api.Feed);
})));
});
});
unittest.group('resource-OperationsResourceApi', () {
unittest.test('method--get', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).operations;
var arg_name = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.get(arg_name, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkOperation(response as api.Operation);
})));
});
});
unittest.group('resource-V1ResourceApi', () {
unittest.test('method--batchGetAssetsHistory', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).v1;
var arg_parent = 'foo';
var arg_assetNames = buildUnnamed2707();
var arg_contentType = 'foo';
var arg_readTimeWindow_endTime = 'foo';
var arg_readTimeWindow_startTime = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap["assetNames"], unittest.equals(arg_assetNames));
unittest.expect(
queryMap["contentType"].first, unittest.equals(arg_contentType));
unittest.expect(queryMap["readTimeWindow.endTime"].first,
unittest.equals(arg_readTimeWindow_endTime));
unittest.expect(queryMap["readTimeWindow.startTime"].first,
unittest.equals(arg_readTimeWindow_startTime));
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildBatchGetAssetsHistoryResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.batchGetAssetsHistory(arg_parent,
assetNames: arg_assetNames,
contentType: arg_contentType,
readTimeWindow_endTime: arg_readTimeWindow_endTime,
readTimeWindow_startTime: arg_readTimeWindow_startTime,
$fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkBatchGetAssetsHistoryResponse(
response as api.BatchGetAssetsHistoryResponse);
})));
});
unittest.test('method--exportAssets', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).v1;
var arg_request = buildExportAssetsRequest();
var arg_parent = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var obj = api.ExportAssetsRequest.fromJson(
json as core.Map<core.String, core.dynamic>);
checkExportAssetsRequest(obj as api.ExportAssetsRequest);
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildOperation());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.exportAssets(arg_request, arg_parent, $fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkOperation(response as api.Operation);
})));
});
unittest.test('method--searchAllIamPolicies', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).v1;
var arg_scope = 'foo';
var arg_pageSize = 42;
var arg_pageToken = 'foo';
var arg_query = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(core.int.parse(queryMap["pageSize"].first),
unittest.equals(arg_pageSize));
unittest.expect(
queryMap["pageToken"].first, unittest.equals(arg_pageToken));
unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildSearchAllIamPoliciesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.searchAllIamPolicies(arg_scope,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
$fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkSearchAllIamPoliciesResponse(
response as api.SearchAllIamPoliciesResponse);
})));
});
unittest.test('method--searchAllResources', () {
var mock = HttpServerMock();
var res = api.CloudAssetApi(mock).v1;
var arg_scope = 'foo';
var arg_assetTypes = buildUnnamed2708();
var arg_orderBy = 'foo';
var arg_pageSize = 42;
var arg_pageToken = 'foo';
var arg_query = 'foo';
var arg_$fields = 'foo';
mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
var path = (req.url).path;
var pathOffset = 0;
core.int index;
core.String 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 = <core.String, core.List<core.String>>{};
void addQueryParam(core.String n, core.String v) =>
queryMap.putIfAbsent(n, () => []).add(v);
if (query.isNotEmpty) {
for (var part in query.split('&')) {
var keyValue = part.split('=');
addQueryParam(
core.Uri.decodeQueryComponent(keyValue[0]),
core.Uri.decodeQueryComponent(keyValue[1]),
);
}
}
unittest.expect(
queryMap["assetTypes"], unittest.equals(arg_assetTypes));
unittest.expect(
queryMap["orderBy"].first, unittest.equals(arg_orderBy));
unittest.expect(core.int.parse(queryMap["pageSize"].first),
unittest.equals(arg_pageSize));
unittest.expect(
queryMap["pageToken"].first, unittest.equals(arg_pageToken));
unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields));
var h = {
'content-type': 'application/json; charset=utf-8',
};
var resp = convert.json.encode(buildSearchAllResourcesResponse());
return async.Future.value(stringResponse(200, h, resp));
}), true);
res
.searchAllResources(arg_scope,
assetTypes: arg_assetTypes,
orderBy: arg_orderBy,
pageSize: arg_pageSize,
pageToken: arg_pageToken,
query: arg_query,
$fields: arg_$fields)
.then(unittest.expectAsync1(((response) {
checkSearchAllResourcesResponse(
response as api.SearchAllResourcesResponse);
})));
});
});
}