| // Copyright 2021 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_const_declarations |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_final_locals |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| // ignore_for_file: unreachable_from_main |
| // ignore_for_file: unused_local_variable |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:googleapis/realtimebidding/v1.dart' as api; |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import '../test_shared.dart'; |
| |
| core.int buildCounterActivatePretargetingConfigRequest = 0; |
| api.ActivatePretargetingConfigRequest buildActivatePretargetingConfigRequest() { |
| final o = api.ActivatePretargetingConfigRequest(); |
| buildCounterActivatePretargetingConfigRequest++; |
| if (buildCounterActivatePretargetingConfigRequest < 3) {} |
| buildCounterActivatePretargetingConfigRequest--; |
| return o; |
| } |
| |
| void checkActivatePretargetingConfigRequest( |
| api.ActivatePretargetingConfigRequest o, |
| ) { |
| buildCounterActivatePretargetingConfigRequest++; |
| if (buildCounterActivatePretargetingConfigRequest < 3) {} |
| buildCounterActivatePretargetingConfigRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed0() => ['foo', 'foo']; |
| |
| void checkUnnamed0(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> buildUnnamed1() => ['foo', 'foo']; |
| |
| void checkUnnamed1(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> buildUnnamed2() => ['foo', 'foo']; |
| |
| void checkUnnamed2(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 buildCounterAdTechnologyProviders = 0; |
| api.AdTechnologyProviders buildAdTechnologyProviders() { |
| final o = api.AdTechnologyProviders(); |
| buildCounterAdTechnologyProviders++; |
| if (buildCounterAdTechnologyProviders < 3) { |
| o.detectedGvlIds = buildUnnamed0(); |
| o.detectedProviderIds = buildUnnamed1(); |
| o.unidentifiedProviderDomains = buildUnnamed2(); |
| } |
| buildCounterAdTechnologyProviders--; |
| return o; |
| } |
| |
| void checkAdTechnologyProviders(api.AdTechnologyProviders o) { |
| buildCounterAdTechnologyProviders++; |
| if (buildCounterAdTechnologyProviders < 3) { |
| checkUnnamed0(o.detectedGvlIds!); |
| checkUnnamed1(o.detectedProviderIds!); |
| checkUnnamed2(o.unidentifiedProviderDomains!); |
| } |
| buildCounterAdTechnologyProviders--; |
| } |
| |
| core.List<core.String> buildUnnamed3() => ['foo', 'foo']; |
| |
| void checkUnnamed3(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 buildCounterAddTargetedAppsRequest = 0; |
| api.AddTargetedAppsRequest buildAddTargetedAppsRequest() { |
| final o = api.AddTargetedAppsRequest(); |
| buildCounterAddTargetedAppsRequest++; |
| if (buildCounterAddTargetedAppsRequest < 3) { |
| o.appIds = buildUnnamed3(); |
| o.targetingMode = 'foo'; |
| } |
| buildCounterAddTargetedAppsRequest--; |
| return o; |
| } |
| |
| void checkAddTargetedAppsRequest(api.AddTargetedAppsRequest o) { |
| buildCounterAddTargetedAppsRequest++; |
| if (buildCounterAddTargetedAppsRequest < 3) { |
| checkUnnamed3(o.appIds!); |
| unittest.expect(o.targetingMode!, unittest.equals('foo')); |
| } |
| buildCounterAddTargetedAppsRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed4() => ['foo', 'foo']; |
| |
| void checkUnnamed4(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 buildCounterAddTargetedPublishersRequest = 0; |
| api.AddTargetedPublishersRequest buildAddTargetedPublishersRequest() { |
| final o = api.AddTargetedPublishersRequest(); |
| buildCounterAddTargetedPublishersRequest++; |
| if (buildCounterAddTargetedPublishersRequest < 3) { |
| o.publisherIds = buildUnnamed4(); |
| o.targetingMode = 'foo'; |
| } |
| buildCounterAddTargetedPublishersRequest--; |
| return o; |
| } |
| |
| void checkAddTargetedPublishersRequest(api.AddTargetedPublishersRequest o) { |
| buildCounterAddTargetedPublishersRequest++; |
| if (buildCounterAddTargetedPublishersRequest < 3) { |
| checkUnnamed4(o.publisherIds!); |
| unittest.expect(o.targetingMode!, unittest.equals('foo')); |
| } |
| buildCounterAddTargetedPublishersRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed5() => ['foo', 'foo']; |
| |
| void checkUnnamed5(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 buildCounterAddTargetedSitesRequest = 0; |
| api.AddTargetedSitesRequest buildAddTargetedSitesRequest() { |
| final o = api.AddTargetedSitesRequest(); |
| buildCounterAddTargetedSitesRequest++; |
| if (buildCounterAddTargetedSitesRequest < 3) { |
| o.sites = buildUnnamed5(); |
| o.targetingMode = 'foo'; |
| } |
| buildCounterAddTargetedSitesRequest--; |
| return o; |
| } |
| |
| void checkAddTargetedSitesRequest(api.AddTargetedSitesRequest o) { |
| buildCounterAddTargetedSitesRequest++; |
| if (buildCounterAddTargetedSitesRequest < 3) { |
| checkUnnamed5(o.sites!); |
| unittest.expect(o.targetingMode!, unittest.equals('foo')); |
| } |
| buildCounterAddTargetedSitesRequest--; |
| } |
| |
| core.int buildCounterAdvertiserAndBrand = 0; |
| api.AdvertiserAndBrand buildAdvertiserAndBrand() { |
| final o = api.AdvertiserAndBrand(); |
| buildCounterAdvertiserAndBrand++; |
| if (buildCounterAdvertiserAndBrand < 3) { |
| o.advertiserId = 'foo'; |
| o.advertiserName = 'foo'; |
| o.brandId = 'foo'; |
| o.brandName = 'foo'; |
| } |
| buildCounterAdvertiserAndBrand--; |
| return o; |
| } |
| |
| void checkAdvertiserAndBrand(api.AdvertiserAndBrand o) { |
| buildCounterAdvertiserAndBrand++; |
| if (buildCounterAdvertiserAndBrand < 3) { |
| unittest.expect(o.advertiserId!, unittest.equals('foo')); |
| unittest.expect(o.advertiserName!, unittest.equals('foo')); |
| unittest.expect(o.brandId!, unittest.equals('foo')); |
| unittest.expect(o.brandName!, unittest.equals('foo')); |
| } |
| buildCounterAdvertiserAndBrand--; |
| } |
| |
| core.int buildCounterAppTargeting = 0; |
| api.AppTargeting buildAppTargeting() { |
| final o = api.AppTargeting(); |
| buildCounterAppTargeting++; |
| if (buildCounterAppTargeting < 3) { |
| o.mobileAppCategoryTargeting = buildNumericTargetingDimension(); |
| o.mobileAppTargeting = buildStringTargetingDimension(); |
| } |
| buildCounterAppTargeting--; |
| return o; |
| } |
| |
| void checkAppTargeting(api.AppTargeting o) { |
| buildCounterAppTargeting++; |
| if (buildCounterAppTargeting < 3) { |
| checkNumericTargetingDimension(o.mobileAppCategoryTargeting!); |
| checkStringTargetingDimension(o.mobileAppTargeting!); |
| } |
| buildCounterAppTargeting--; |
| } |
| |
| core.List<core.String> buildUnnamed6() => ['foo', 'foo']; |
| |
| void checkUnnamed6(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 buildCounterBatchApprovePublisherConnectionsRequest = 0; |
| api.BatchApprovePublisherConnectionsRequest |
| buildBatchApprovePublisherConnectionsRequest() { |
| final o = api.BatchApprovePublisherConnectionsRequest(); |
| buildCounterBatchApprovePublisherConnectionsRequest++; |
| if (buildCounterBatchApprovePublisherConnectionsRequest < 3) { |
| o.names = buildUnnamed6(); |
| } |
| buildCounterBatchApprovePublisherConnectionsRequest--; |
| return o; |
| } |
| |
| void checkBatchApprovePublisherConnectionsRequest( |
| api.BatchApprovePublisherConnectionsRequest o, |
| ) { |
| buildCounterBatchApprovePublisherConnectionsRequest++; |
| if (buildCounterBatchApprovePublisherConnectionsRequest < 3) { |
| checkUnnamed6(o.names!); |
| } |
| buildCounterBatchApprovePublisherConnectionsRequest--; |
| } |
| |
| core.List<api.PublisherConnection> buildUnnamed7() => [ |
| buildPublisherConnection(), |
| buildPublisherConnection(), |
| ]; |
| |
| void checkUnnamed7(core.List<api.PublisherConnection> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPublisherConnection(o[0]); |
| checkPublisherConnection(o[1]); |
| } |
| |
| core.int buildCounterBatchApprovePublisherConnectionsResponse = 0; |
| api.BatchApprovePublisherConnectionsResponse |
| buildBatchApprovePublisherConnectionsResponse() { |
| final o = api.BatchApprovePublisherConnectionsResponse(); |
| buildCounterBatchApprovePublisherConnectionsResponse++; |
| if (buildCounterBatchApprovePublisherConnectionsResponse < 3) { |
| o.publisherConnections = buildUnnamed7(); |
| } |
| buildCounterBatchApprovePublisherConnectionsResponse--; |
| return o; |
| } |
| |
| void checkBatchApprovePublisherConnectionsResponse( |
| api.BatchApprovePublisherConnectionsResponse o, |
| ) { |
| buildCounterBatchApprovePublisherConnectionsResponse++; |
| if (buildCounterBatchApprovePublisherConnectionsResponse < 3) { |
| checkUnnamed7(o.publisherConnections!); |
| } |
| buildCounterBatchApprovePublisherConnectionsResponse--; |
| } |
| |
| core.List<core.String> buildUnnamed8() => ['foo', 'foo']; |
| |
| void checkUnnamed8(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 buildCounterBatchRejectPublisherConnectionsRequest = 0; |
| api.BatchRejectPublisherConnectionsRequest |
| buildBatchRejectPublisherConnectionsRequest() { |
| final o = api.BatchRejectPublisherConnectionsRequest(); |
| buildCounterBatchRejectPublisherConnectionsRequest++; |
| if (buildCounterBatchRejectPublisherConnectionsRequest < 3) { |
| o.names = buildUnnamed8(); |
| } |
| buildCounterBatchRejectPublisherConnectionsRequest--; |
| return o; |
| } |
| |
| void checkBatchRejectPublisherConnectionsRequest( |
| api.BatchRejectPublisherConnectionsRequest o, |
| ) { |
| buildCounterBatchRejectPublisherConnectionsRequest++; |
| if (buildCounterBatchRejectPublisherConnectionsRequest < 3) { |
| checkUnnamed8(o.names!); |
| } |
| buildCounterBatchRejectPublisherConnectionsRequest--; |
| } |
| |
| core.List<api.PublisherConnection> buildUnnamed9() => [ |
| buildPublisherConnection(), |
| buildPublisherConnection(), |
| ]; |
| |
| void checkUnnamed9(core.List<api.PublisherConnection> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPublisherConnection(o[0]); |
| checkPublisherConnection(o[1]); |
| } |
| |
| core.int buildCounterBatchRejectPublisherConnectionsResponse = 0; |
| api.BatchRejectPublisherConnectionsResponse |
| buildBatchRejectPublisherConnectionsResponse() { |
| final o = api.BatchRejectPublisherConnectionsResponse(); |
| buildCounterBatchRejectPublisherConnectionsResponse++; |
| if (buildCounterBatchRejectPublisherConnectionsResponse < 3) { |
| o.publisherConnections = buildUnnamed9(); |
| } |
| buildCounterBatchRejectPublisherConnectionsResponse--; |
| return o; |
| } |
| |
| void checkBatchRejectPublisherConnectionsResponse( |
| api.BatchRejectPublisherConnectionsResponse o, |
| ) { |
| buildCounterBatchRejectPublisherConnectionsResponse++; |
| if (buildCounterBatchRejectPublisherConnectionsResponse < 3) { |
| checkUnnamed9(o.publisherConnections!); |
| } |
| buildCounterBatchRejectPublisherConnectionsResponse--; |
| } |
| |
| core.int buildCounterBidder = 0; |
| api.Bidder buildBidder() { |
| final o = api.Bidder(); |
| buildCounterBidder++; |
| if (buildCounterBidder < 3) { |
| o.bypassNonguaranteedDealsPretargeting = true; |
| o.cookieMatchingNetworkId = 'foo'; |
| o.cookieMatchingUrl = 'foo'; |
| o.dealsBillingId = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterBidder--; |
| return o; |
| } |
| |
| void checkBidder(api.Bidder o) { |
| buildCounterBidder++; |
| if (buildCounterBidder < 3) { |
| unittest.expect(o.bypassNonguaranteedDealsPretargeting!, unittest.isTrue); |
| unittest.expect(o.cookieMatchingNetworkId!, unittest.equals('foo')); |
| unittest.expect(o.cookieMatchingUrl!, unittest.equals('foo')); |
| unittest.expect(o.dealsBillingId!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterBidder--; |
| } |
| |
| core.List<core.String> buildUnnamed10() => ['foo', 'foo']; |
| |
| void checkUnnamed10(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 buildCounterBuyer = 0; |
| api.Buyer buildBuyer() { |
| final o = api.Buyer(); |
| buildCounterBuyer++; |
| if (buildCounterBuyer < 3) { |
| o.activeCreativeCount = 'foo'; |
| o.bidder = 'foo'; |
| o.billingIds = buildUnnamed10(); |
| o.displayName = 'foo'; |
| o.maximumActiveCreativeCount = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterBuyer--; |
| return o; |
| } |
| |
| void checkBuyer(api.Buyer o) { |
| buildCounterBuyer++; |
| if (buildCounterBuyer < 3) { |
| unittest.expect(o.activeCreativeCount!, unittest.equals('foo')); |
| unittest.expect(o.bidder!, unittest.equals('foo')); |
| checkUnnamed10(o.billingIds!); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.maximumActiveCreativeCount!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterBuyer--; |
| } |
| |
| core.int buildCounterCloseUserListRequest = 0; |
| api.CloseUserListRequest buildCloseUserListRequest() { |
| final o = api.CloseUserListRequest(); |
| buildCounterCloseUserListRequest++; |
| if (buildCounterCloseUserListRequest < 3) {} |
| buildCounterCloseUserListRequest--; |
| return o; |
| } |
| |
| void checkCloseUserListRequest(api.CloseUserListRequest o) { |
| buildCounterCloseUserListRequest++; |
| if (buildCounterCloseUserListRequest < 3) {} |
| buildCounterCloseUserListRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed11() => ['foo', 'foo']; |
| |
| void checkUnnamed11(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> buildUnnamed12() => ['foo', 'foo']; |
| |
| void checkUnnamed12(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> buildUnnamed13() => ['foo', 'foo']; |
| |
| void checkUnnamed13(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> buildUnnamed14() => ['foo', 'foo']; |
| |
| void checkUnnamed14(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.int> buildUnnamed15() => [42, 42]; |
| |
| void checkUnnamed15(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42)); |
| unittest.expect(o[1], unittest.equals(42)); |
| } |
| |
| core.List<core.String> buildUnnamed16() => ['foo', 'foo']; |
| |
| void checkUnnamed16(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> buildUnnamed17() => ['foo', 'foo']; |
| |
| void checkUnnamed17(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 buildCounterCreative = 0; |
| api.Creative buildCreative() { |
| final o = api.Creative(); |
| buildCounterCreative++; |
| if (buildCounterCreative < 3) { |
| o.accountId = 'foo'; |
| o.adChoicesDestinationUrl = 'foo'; |
| o.advertiserName = 'foo'; |
| o.agencyId = 'foo'; |
| o.apiUpdateTime = 'foo'; |
| o.creativeFormat = 'foo'; |
| o.creativeId = 'foo'; |
| o.creativeServingDecision = buildCreativeServingDecision(); |
| o.dealIds = buildUnnamed11(); |
| o.declaredAttributes = buildUnnamed12(); |
| o.declaredClickThroughUrls = buildUnnamed13(); |
| o.declaredRestrictedCategories = buildUnnamed14(); |
| o.declaredVendorIds = buildUnnamed15(); |
| o.html = buildHtmlContent(); |
| o.impressionTrackingUrls = buildUnnamed16(); |
| o.name = 'foo'; |
| o.native = buildNativeContent(); |
| o.renderUrl = 'foo'; |
| o.restrictedCategories = buildUnnamed17(); |
| o.version = 42; |
| o.video = buildVideoContent(); |
| } |
| buildCounterCreative--; |
| return o; |
| } |
| |
| void checkCreative(api.Creative o) { |
| buildCounterCreative++; |
| if (buildCounterCreative < 3) { |
| unittest.expect(o.accountId!, unittest.equals('foo')); |
| unittest.expect(o.adChoicesDestinationUrl!, unittest.equals('foo')); |
| unittest.expect(o.advertiserName!, unittest.equals('foo')); |
| unittest.expect(o.agencyId!, unittest.equals('foo')); |
| unittest.expect(o.apiUpdateTime!, unittest.equals('foo')); |
| unittest.expect(o.creativeFormat!, unittest.equals('foo')); |
| unittest.expect(o.creativeId!, unittest.equals('foo')); |
| checkCreativeServingDecision(o.creativeServingDecision!); |
| checkUnnamed11(o.dealIds!); |
| checkUnnamed12(o.declaredAttributes!); |
| checkUnnamed13(o.declaredClickThroughUrls!); |
| checkUnnamed14(o.declaredRestrictedCategories!); |
| checkUnnamed15(o.declaredVendorIds!); |
| checkHtmlContent(o.html!); |
| checkUnnamed16(o.impressionTrackingUrls!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkNativeContent(o.native!); |
| unittest.expect(o.renderUrl!, unittest.equals('foo')); |
| checkUnnamed17(o.restrictedCategories!); |
| unittest.expect(o.version!, unittest.equals(42)); |
| checkVideoContent(o.video!); |
| } |
| buildCounterCreative--; |
| } |
| |
| core.int buildCounterCreativeDimensions = 0; |
| api.CreativeDimensions buildCreativeDimensions() { |
| final o = api.CreativeDimensions(); |
| buildCounterCreativeDimensions++; |
| if (buildCounterCreativeDimensions < 3) { |
| o.height = 'foo'; |
| o.width = 'foo'; |
| } |
| buildCounterCreativeDimensions--; |
| return o; |
| } |
| |
| void checkCreativeDimensions(api.CreativeDimensions o) { |
| buildCounterCreativeDimensions++; |
| if (buildCounterCreativeDimensions < 3) { |
| unittest.expect(o.height!, unittest.equals('foo')); |
| unittest.expect(o.width!, unittest.equals('foo')); |
| } |
| buildCounterCreativeDimensions--; |
| } |
| |
| core.List<api.AdvertiserAndBrand> buildUnnamed18() => [ |
| buildAdvertiserAndBrand(), |
| buildAdvertiserAndBrand(), |
| ]; |
| |
| void checkUnnamed18(core.List<api.AdvertiserAndBrand> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkAdvertiserAndBrand(o[0]); |
| checkAdvertiserAndBrand(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed19() => ['foo', 'foo']; |
| |
| void checkUnnamed19(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> buildUnnamed20() => ['foo', 'foo']; |
| |
| void checkUnnamed20(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> buildUnnamed21() => ['foo', 'foo']; |
| |
| void checkUnnamed21(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> buildUnnamed22() => ['foo', 'foo']; |
| |
| void checkUnnamed22(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> buildUnnamed23() => ['foo', 'foo']; |
| |
| void checkUnnamed23(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.int> buildUnnamed24() => [42, 42]; |
| |
| void checkUnnamed24(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42)); |
| unittest.expect(o[1], unittest.equals(42)); |
| } |
| |
| core.List<core.int> buildUnnamed25() => [42, 42]; |
| |
| void checkUnnamed25(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42)); |
| unittest.expect(o[1], unittest.equals(42)); |
| } |
| |
| core.List<core.int> buildUnnamed26() => [42, 42]; |
| |
| void checkUnnamed26(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42)); |
| unittest.expect(o[1], unittest.equals(42)); |
| } |
| |
| core.int buildCounterCreativeServingDecision = 0; |
| api.CreativeServingDecision buildCreativeServingDecision() { |
| final o = api.CreativeServingDecision(); |
| buildCounterCreativeServingDecision++; |
| if (buildCounterCreativeServingDecision < 3) { |
| o.adTechnologyProviders = buildAdTechnologyProviders(); |
| o.chinaPolicyCompliance = buildPolicyCompliance(); |
| o.dealsPolicyCompliance = buildPolicyCompliance(); |
| o.detectedAdvertisers = buildUnnamed18(); |
| o.detectedAttributes = buildUnnamed19(); |
| o.detectedCategories = buildUnnamed20(); |
| o.detectedCategoriesTaxonomy = 'foo'; |
| o.detectedClickThroughUrls = buildUnnamed21(); |
| o.detectedDomains = buildUnnamed22(); |
| o.detectedLanguages = buildUnnamed23(); |
| o.detectedProductCategories = buildUnnamed24(); |
| o.detectedSensitiveCategories = buildUnnamed25(); |
| o.detectedVendorIds = buildUnnamed26(); |
| o.lastStatusUpdate = 'foo'; |
| o.networkPolicyCompliance = buildPolicyCompliance(); |
| o.platformPolicyCompliance = buildPolicyCompliance(); |
| o.russiaPolicyCompliance = buildPolicyCompliance(); |
| } |
| buildCounterCreativeServingDecision--; |
| return o; |
| } |
| |
| void checkCreativeServingDecision(api.CreativeServingDecision o) { |
| buildCounterCreativeServingDecision++; |
| if (buildCounterCreativeServingDecision < 3) { |
| checkAdTechnologyProviders(o.adTechnologyProviders!); |
| checkPolicyCompliance(o.chinaPolicyCompliance!); |
| checkPolicyCompliance(o.dealsPolicyCompliance!); |
| checkUnnamed18(o.detectedAdvertisers!); |
| checkUnnamed19(o.detectedAttributes!); |
| checkUnnamed20(o.detectedCategories!); |
| unittest.expect(o.detectedCategoriesTaxonomy!, unittest.equals('foo')); |
| checkUnnamed21(o.detectedClickThroughUrls!); |
| checkUnnamed22(o.detectedDomains!); |
| checkUnnamed23(o.detectedLanguages!); |
| checkUnnamed24(o.detectedProductCategories!); |
| checkUnnamed25(o.detectedSensitiveCategories!); |
| checkUnnamed26(o.detectedVendorIds!); |
| unittest.expect(o.lastStatusUpdate!, unittest.equals('foo')); |
| checkPolicyCompliance(o.networkPolicyCompliance!); |
| checkPolicyCompliance(o.platformPolicyCompliance!); |
| checkPolicyCompliance(o.russiaPolicyCompliance!); |
| } |
| buildCounterCreativeServingDecision--; |
| } |
| |
| core.int buildCounterDate = 0; |
| api.Date buildDate() { |
| final o = api.Date(); |
| buildCounterDate++; |
| if (buildCounterDate < 3) { |
| o.day = 42; |
| o.month = 42; |
| o.year = 42; |
| } |
| buildCounterDate--; |
| return o; |
| } |
| |
| void checkDate(api.Date o) { |
| buildCounterDate++; |
| if (buildCounterDate < 3) { |
| unittest.expect(o.day!, unittest.equals(42)); |
| unittest.expect(o.month!, unittest.equals(42)); |
| unittest.expect(o.year!, unittest.equals(42)); |
| } |
| buildCounterDate--; |
| } |
| |
| core.int buildCounterDestinationNotCrawlableEvidence = 0; |
| api.DestinationNotCrawlableEvidence buildDestinationNotCrawlableEvidence() { |
| final o = api.DestinationNotCrawlableEvidence(); |
| buildCounterDestinationNotCrawlableEvidence++; |
| if (buildCounterDestinationNotCrawlableEvidence < 3) { |
| o.crawlTime = 'foo'; |
| o.crawledUrl = 'foo'; |
| o.reason = 'foo'; |
| } |
| buildCounterDestinationNotCrawlableEvidence--; |
| return o; |
| } |
| |
| void checkDestinationNotCrawlableEvidence( |
| api.DestinationNotCrawlableEvidence o, |
| ) { |
| buildCounterDestinationNotCrawlableEvidence++; |
| if (buildCounterDestinationNotCrawlableEvidence < 3) { |
| unittest.expect(o.crawlTime!, unittest.equals('foo')); |
| unittest.expect(o.crawledUrl!, unittest.equals('foo')); |
| unittest.expect(o.reason!, unittest.equals('foo')); |
| } |
| buildCounterDestinationNotCrawlableEvidence--; |
| } |
| |
| core.int buildCounterDestinationNotWorkingEvidence = 0; |
| api.DestinationNotWorkingEvidence buildDestinationNotWorkingEvidence() { |
| final o = api.DestinationNotWorkingEvidence(); |
| buildCounterDestinationNotWorkingEvidence++; |
| if (buildCounterDestinationNotWorkingEvidence < 3) { |
| o.dnsError = 'foo'; |
| o.expandedUrl = 'foo'; |
| o.httpError = 42; |
| o.invalidPage = 'foo'; |
| o.lastCheckTime = 'foo'; |
| o.platform = 'foo'; |
| o.redirectionError = 'foo'; |
| o.urlRejected = 'foo'; |
| } |
| buildCounterDestinationNotWorkingEvidence--; |
| return o; |
| } |
| |
| void checkDestinationNotWorkingEvidence(api.DestinationNotWorkingEvidence o) { |
| buildCounterDestinationNotWorkingEvidence++; |
| if (buildCounterDestinationNotWorkingEvidence < 3) { |
| unittest.expect(o.dnsError!, unittest.equals('foo')); |
| unittest.expect(o.expandedUrl!, unittest.equals('foo')); |
| unittest.expect(o.httpError!, unittest.equals(42)); |
| unittest.expect(o.invalidPage!, unittest.equals('foo')); |
| unittest.expect(o.lastCheckTime!, unittest.equals('foo')); |
| unittest.expect(o.platform!, unittest.equals('foo')); |
| unittest.expect(o.redirectionError!, unittest.equals('foo')); |
| unittest.expect(o.urlRejected!, unittest.equals('foo')); |
| } |
| buildCounterDestinationNotWorkingEvidence--; |
| } |
| |
| core.int buildCounterDestinationUrlEvidence = 0; |
| api.DestinationUrlEvidence buildDestinationUrlEvidence() { |
| final o = api.DestinationUrlEvidence(); |
| buildCounterDestinationUrlEvidence++; |
| if (buildCounterDestinationUrlEvidence < 3) { |
| o.destinationUrl = 'foo'; |
| } |
| buildCounterDestinationUrlEvidence--; |
| return o; |
| } |
| |
| void checkDestinationUrlEvidence(api.DestinationUrlEvidence o) { |
| buildCounterDestinationUrlEvidence++; |
| if (buildCounterDestinationUrlEvidence < 3) { |
| unittest.expect(o.destinationUrl!, unittest.equals('foo')); |
| } |
| buildCounterDestinationUrlEvidence--; |
| } |
| |
| core.List<api.DomainCalls> buildUnnamed27() => [ |
| buildDomainCalls(), |
| buildDomainCalls(), |
| ]; |
| |
| void checkUnnamed27(core.List<api.DomainCalls> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkDomainCalls(o[0]); |
| checkDomainCalls(o[1]); |
| } |
| |
| core.int buildCounterDomainCallEvidence = 0; |
| api.DomainCallEvidence buildDomainCallEvidence() { |
| final o = api.DomainCallEvidence(); |
| buildCounterDomainCallEvidence++; |
| if (buildCounterDomainCallEvidence < 3) { |
| o.topHttpCallDomains = buildUnnamed27(); |
| o.totalHttpCallCount = 42; |
| } |
| buildCounterDomainCallEvidence--; |
| return o; |
| } |
| |
| void checkDomainCallEvidence(api.DomainCallEvidence o) { |
| buildCounterDomainCallEvidence++; |
| if (buildCounterDomainCallEvidence < 3) { |
| checkUnnamed27(o.topHttpCallDomains!); |
| unittest.expect(o.totalHttpCallCount!, unittest.equals(42)); |
| } |
| buildCounterDomainCallEvidence--; |
| } |
| |
| core.int buildCounterDomainCalls = 0; |
| api.DomainCalls buildDomainCalls() { |
| final o = api.DomainCalls(); |
| buildCounterDomainCalls++; |
| if (buildCounterDomainCalls < 3) { |
| o.domain = 'foo'; |
| o.httpCallCount = 42; |
| } |
| buildCounterDomainCalls--; |
| return o; |
| } |
| |
| void checkDomainCalls(api.DomainCalls o) { |
| buildCounterDomainCalls++; |
| if (buildCounterDomainCalls < 3) { |
| unittest.expect(o.domain!, unittest.equals('foo')); |
| unittest.expect(o.httpCallCount!, unittest.equals(42)); |
| } |
| buildCounterDomainCalls--; |
| } |
| |
| core.List<api.UrlDownloadSize> buildUnnamed28() => [ |
| buildUrlDownloadSize(), |
| buildUrlDownloadSize(), |
| ]; |
| |
| void checkUnnamed28(core.List<api.UrlDownloadSize> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUrlDownloadSize(o[0]); |
| checkUrlDownloadSize(o[1]); |
| } |
| |
| core.int buildCounterDownloadSizeEvidence = 0; |
| api.DownloadSizeEvidence buildDownloadSizeEvidence() { |
| final o = api.DownloadSizeEvidence(); |
| buildCounterDownloadSizeEvidence++; |
| if (buildCounterDownloadSizeEvidence < 3) { |
| o.topUrlDownloadSizeBreakdowns = buildUnnamed28(); |
| o.totalDownloadSizeKb = 42; |
| } |
| buildCounterDownloadSizeEvidence--; |
| return o; |
| } |
| |
| void checkDownloadSizeEvidence(api.DownloadSizeEvidence o) { |
| buildCounterDownloadSizeEvidence++; |
| if (buildCounterDownloadSizeEvidence < 3) { |
| checkUnnamed28(o.topUrlDownloadSizeBreakdowns!); |
| unittest.expect(o.totalDownloadSizeKb!, unittest.equals(42)); |
| } |
| buildCounterDownloadSizeEvidence--; |
| } |
| |
| core.int buildCounterEmpty = 0; |
| api.Empty buildEmpty() { |
| final o = api.Empty(); |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| return o; |
| } |
| |
| void checkEmpty(api.Empty o) { |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| } |
| |
| core.int buildCounterEndpoint = 0; |
| api.Endpoint buildEndpoint() { |
| final o = api.Endpoint(); |
| buildCounterEndpoint++; |
| if (buildCounterEndpoint < 3) { |
| o.bidProtocol = 'foo'; |
| o.maximumQps = 'foo'; |
| o.name = 'foo'; |
| o.tradingLocation = 'foo'; |
| o.url = 'foo'; |
| } |
| buildCounterEndpoint--; |
| return o; |
| } |
| |
| void checkEndpoint(api.Endpoint o) { |
| buildCounterEndpoint++; |
| if (buildCounterEndpoint < 3) { |
| unittest.expect(o.bidProtocol!, unittest.equals('foo')); |
| unittest.expect(o.maximumQps!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.tradingLocation!, unittest.equals('foo')); |
| unittest.expect(o.url!, unittest.equals('foo')); |
| } |
| buildCounterEndpoint--; |
| } |
| |
| core.int buildCounterGetRemarketingTagResponse = 0; |
| api.GetRemarketingTagResponse buildGetRemarketingTagResponse() { |
| final o = api.GetRemarketingTagResponse(); |
| buildCounterGetRemarketingTagResponse++; |
| if (buildCounterGetRemarketingTagResponse < 3) { |
| o.snippet = 'foo'; |
| } |
| buildCounterGetRemarketingTagResponse--; |
| return o; |
| } |
| |
| void checkGetRemarketingTagResponse(api.GetRemarketingTagResponse o) { |
| buildCounterGetRemarketingTagResponse++; |
| if (buildCounterGetRemarketingTagResponse < 3) { |
| unittest.expect(o.snippet!, unittest.equals('foo')); |
| } |
| buildCounterGetRemarketingTagResponse--; |
| } |
| |
| core.int buildCounterHtmlContent = 0; |
| api.HtmlContent buildHtmlContent() { |
| final o = api.HtmlContent(); |
| buildCounterHtmlContent++; |
| if (buildCounterHtmlContent < 3) { |
| o.height = 42; |
| o.snippet = 'foo'; |
| o.width = 42; |
| } |
| buildCounterHtmlContent--; |
| return o; |
| } |
| |
| void checkHtmlContent(api.HtmlContent o) { |
| buildCounterHtmlContent++; |
| if (buildCounterHtmlContent < 3) { |
| unittest.expect(o.height!, unittest.equals(42)); |
| unittest.expect(o.snippet!, unittest.equals('foo')); |
| unittest.expect(o.width!, unittest.equals(42)); |
| } |
| buildCounterHtmlContent--; |
| } |
| |
| core.List<core.String> buildUnnamed29() => ['foo', 'foo']; |
| |
| void checkUnnamed29(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 buildCounterHttpCallEvidence = 0; |
| api.HttpCallEvidence buildHttpCallEvidence() { |
| final o = api.HttpCallEvidence(); |
| buildCounterHttpCallEvidence++; |
| if (buildCounterHttpCallEvidence < 3) { |
| o.urls = buildUnnamed29(); |
| } |
| buildCounterHttpCallEvidence--; |
| return o; |
| } |
| |
| void checkHttpCallEvidence(api.HttpCallEvidence o) { |
| buildCounterHttpCallEvidence++; |
| if (buildCounterHttpCallEvidence < 3) { |
| checkUnnamed29(o.urls!); |
| } |
| buildCounterHttpCallEvidence--; |
| } |
| |
| core.List<core.String> buildUnnamed30() => ['foo', 'foo']; |
| |
| void checkUnnamed30(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 buildCounterHttpCookieEvidence = 0; |
| api.HttpCookieEvidence buildHttpCookieEvidence() { |
| final o = api.HttpCookieEvidence(); |
| buildCounterHttpCookieEvidence++; |
| if (buildCounterHttpCookieEvidence < 3) { |
| o.cookieNames = buildUnnamed30(); |
| o.maxCookieCount = 42; |
| } |
| buildCounterHttpCookieEvidence--; |
| return o; |
| } |
| |
| void checkHttpCookieEvidence(api.HttpCookieEvidence o) { |
| buildCounterHttpCookieEvidence++; |
| if (buildCounterHttpCookieEvidence < 3) { |
| checkUnnamed30(o.cookieNames!); |
| unittest.expect(o.maxCookieCount!, unittest.equals(42)); |
| } |
| buildCounterHttpCookieEvidence--; |
| } |
| |
| core.int buildCounterImage = 0; |
| api.Image buildImage() { |
| final o = api.Image(); |
| buildCounterImage++; |
| if (buildCounterImage < 3) { |
| o.height = 42; |
| o.url = 'foo'; |
| o.width = 42; |
| } |
| buildCounterImage--; |
| return o; |
| } |
| |
| void checkImage(api.Image o) { |
| buildCounterImage++; |
| if (buildCounterImage < 3) { |
| unittest.expect(o.height!, unittest.equals(42)); |
| unittest.expect(o.url!, unittest.equals('foo')); |
| unittest.expect(o.width!, unittest.equals(42)); |
| } |
| buildCounterImage--; |
| } |
| |
| core.List<api.Bidder> buildUnnamed31() => [buildBidder(), buildBidder()]; |
| |
| void checkUnnamed31(core.List<api.Bidder> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkBidder(o[0]); |
| checkBidder(o[1]); |
| } |
| |
| core.int buildCounterListBiddersResponse = 0; |
| api.ListBiddersResponse buildListBiddersResponse() { |
| final o = api.ListBiddersResponse(); |
| buildCounterListBiddersResponse++; |
| if (buildCounterListBiddersResponse < 3) { |
| o.bidders = buildUnnamed31(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListBiddersResponse--; |
| return o; |
| } |
| |
| void checkListBiddersResponse(api.ListBiddersResponse o) { |
| buildCounterListBiddersResponse++; |
| if (buildCounterListBiddersResponse < 3) { |
| checkUnnamed31(o.bidders!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListBiddersResponse--; |
| } |
| |
| core.List<api.Buyer> buildUnnamed32() => [buildBuyer(), buildBuyer()]; |
| |
| void checkUnnamed32(core.List<api.Buyer> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkBuyer(o[0]); |
| checkBuyer(o[1]); |
| } |
| |
| core.int buildCounterListBuyersResponse = 0; |
| api.ListBuyersResponse buildListBuyersResponse() { |
| final o = api.ListBuyersResponse(); |
| buildCounterListBuyersResponse++; |
| if (buildCounterListBuyersResponse < 3) { |
| o.buyers = buildUnnamed32(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListBuyersResponse--; |
| return o; |
| } |
| |
| void checkListBuyersResponse(api.ListBuyersResponse o) { |
| buildCounterListBuyersResponse++; |
| if (buildCounterListBuyersResponse < 3) { |
| checkUnnamed32(o.buyers!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListBuyersResponse--; |
| } |
| |
| core.List<api.Creative> buildUnnamed33() => [buildCreative(), buildCreative()]; |
| |
| void checkUnnamed33(core.List<api.Creative> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreative(o[0]); |
| checkCreative(o[1]); |
| } |
| |
| core.int buildCounterListCreativesResponse = 0; |
| api.ListCreativesResponse buildListCreativesResponse() { |
| final o = api.ListCreativesResponse(); |
| buildCounterListCreativesResponse++; |
| if (buildCounterListCreativesResponse < 3) { |
| o.creatives = buildUnnamed33(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListCreativesResponse--; |
| return o; |
| } |
| |
| void checkListCreativesResponse(api.ListCreativesResponse o) { |
| buildCounterListCreativesResponse++; |
| if (buildCounterListCreativesResponse < 3) { |
| checkUnnamed33(o.creatives!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListCreativesResponse--; |
| } |
| |
| core.List<api.Endpoint> buildUnnamed34() => [buildEndpoint(), buildEndpoint()]; |
| |
| void checkUnnamed34(core.List<api.Endpoint> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkEndpoint(o[0]); |
| checkEndpoint(o[1]); |
| } |
| |
| core.int buildCounterListEndpointsResponse = 0; |
| api.ListEndpointsResponse buildListEndpointsResponse() { |
| final o = api.ListEndpointsResponse(); |
| buildCounterListEndpointsResponse++; |
| if (buildCounterListEndpointsResponse < 3) { |
| o.endpoints = buildUnnamed34(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListEndpointsResponse--; |
| return o; |
| } |
| |
| void checkListEndpointsResponse(api.ListEndpointsResponse o) { |
| buildCounterListEndpointsResponse++; |
| if (buildCounterListEndpointsResponse < 3) { |
| checkUnnamed34(o.endpoints!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListEndpointsResponse--; |
| } |
| |
| core.List<api.PretargetingConfig> buildUnnamed35() => [ |
| buildPretargetingConfig(), |
| buildPretargetingConfig(), |
| ]; |
| |
| void checkUnnamed35(core.List<api.PretargetingConfig> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPretargetingConfig(o[0]); |
| checkPretargetingConfig(o[1]); |
| } |
| |
| core.int buildCounterListPretargetingConfigsResponse = 0; |
| api.ListPretargetingConfigsResponse buildListPretargetingConfigsResponse() { |
| final o = api.ListPretargetingConfigsResponse(); |
| buildCounterListPretargetingConfigsResponse++; |
| if (buildCounterListPretargetingConfigsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.pretargetingConfigs = buildUnnamed35(); |
| } |
| buildCounterListPretargetingConfigsResponse--; |
| return o; |
| } |
| |
| void checkListPretargetingConfigsResponse( |
| api.ListPretargetingConfigsResponse o, |
| ) { |
| buildCounterListPretargetingConfigsResponse++; |
| if (buildCounterListPretargetingConfigsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed35(o.pretargetingConfigs!); |
| } |
| buildCounterListPretargetingConfigsResponse--; |
| } |
| |
| core.List<api.PublisherConnection> buildUnnamed36() => [ |
| buildPublisherConnection(), |
| buildPublisherConnection(), |
| ]; |
| |
| void checkUnnamed36(core.List<api.PublisherConnection> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPublisherConnection(o[0]); |
| checkPublisherConnection(o[1]); |
| } |
| |
| core.int buildCounterListPublisherConnectionsResponse = 0; |
| api.ListPublisherConnectionsResponse buildListPublisherConnectionsResponse() { |
| final o = api.ListPublisherConnectionsResponse(); |
| buildCounterListPublisherConnectionsResponse++; |
| if (buildCounterListPublisherConnectionsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.publisherConnections = buildUnnamed36(); |
| } |
| buildCounterListPublisherConnectionsResponse--; |
| return o; |
| } |
| |
| void checkListPublisherConnectionsResponse( |
| api.ListPublisherConnectionsResponse o, |
| ) { |
| buildCounterListPublisherConnectionsResponse++; |
| if (buildCounterListPublisherConnectionsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed36(o.publisherConnections!); |
| } |
| buildCounterListPublisherConnectionsResponse--; |
| } |
| |
| core.List<api.UserList> buildUnnamed37() => [buildUserList(), buildUserList()]; |
| |
| void checkUnnamed37(core.List<api.UserList> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUserList(o[0]); |
| checkUserList(o[1]); |
| } |
| |
| core.int buildCounterListUserListsResponse = 0; |
| api.ListUserListsResponse buildListUserListsResponse() { |
| final o = api.ListUserListsResponse(); |
| buildCounterListUserListsResponse++; |
| if (buildCounterListUserListsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.userLists = buildUnnamed37(); |
| } |
| buildCounterListUserListsResponse--; |
| return o; |
| } |
| |
| void checkListUserListsResponse(api.ListUserListsResponse o) { |
| buildCounterListUserListsResponse++; |
| if (buildCounterListUserListsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed37(o.userLists!); |
| } |
| buildCounterListUserListsResponse--; |
| } |
| |
| core.int buildCounterMediaFile = 0; |
| api.MediaFile buildMediaFile() { |
| final o = api.MediaFile(); |
| buildCounterMediaFile++; |
| if (buildCounterMediaFile < 3) { |
| o.bitrate = 'foo'; |
| o.mimeType = 'foo'; |
| } |
| buildCounterMediaFile--; |
| return o; |
| } |
| |
| void checkMediaFile(api.MediaFile o) { |
| buildCounterMediaFile++; |
| if (buildCounterMediaFile < 3) { |
| unittest.expect(o.bitrate!, unittest.equals('foo')); |
| unittest.expect(o.mimeType!, unittest.equals('foo')); |
| } |
| buildCounterMediaFile--; |
| } |
| |
| core.int buildCounterNativeContent = 0; |
| api.NativeContent buildNativeContent() { |
| final o = api.NativeContent(); |
| buildCounterNativeContent++; |
| if (buildCounterNativeContent < 3) { |
| o.advertiserName = 'foo'; |
| o.appIcon = buildImage(); |
| o.body = 'foo'; |
| o.callToAction = 'foo'; |
| o.clickLinkUrl = 'foo'; |
| o.clickTrackingUrl = 'foo'; |
| o.headline = 'foo'; |
| o.image = buildImage(); |
| o.logo = buildImage(); |
| o.priceDisplayText = 'foo'; |
| o.starRating = 42.0; |
| o.videoUrl = 'foo'; |
| o.videoVastXml = 'foo'; |
| } |
| buildCounterNativeContent--; |
| return o; |
| } |
| |
| void checkNativeContent(api.NativeContent o) { |
| buildCounterNativeContent++; |
| if (buildCounterNativeContent < 3) { |
| unittest.expect(o.advertiserName!, unittest.equals('foo')); |
| checkImage(o.appIcon!); |
| unittest.expect(o.body!, unittest.equals('foo')); |
| unittest.expect(o.callToAction!, unittest.equals('foo')); |
| unittest.expect(o.clickLinkUrl!, unittest.equals('foo')); |
| unittest.expect(o.clickTrackingUrl!, unittest.equals('foo')); |
| unittest.expect(o.headline!, unittest.equals('foo')); |
| checkImage(o.image!); |
| checkImage(o.logo!); |
| unittest.expect(o.priceDisplayText!, unittest.equals('foo')); |
| unittest.expect(o.starRating!, unittest.equals(42.0)); |
| unittest.expect(o.videoUrl!, unittest.equals('foo')); |
| unittest.expect(o.videoVastXml!, unittest.equals('foo')); |
| } |
| buildCounterNativeContent--; |
| } |
| |
| core.List<core.String> buildUnnamed38() => ['foo', 'foo']; |
| |
| void checkUnnamed38(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> buildUnnamed39() => ['foo', 'foo']; |
| |
| void checkUnnamed39(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 buildCounterNumericTargetingDimension = 0; |
| api.NumericTargetingDimension buildNumericTargetingDimension() { |
| final o = api.NumericTargetingDimension(); |
| buildCounterNumericTargetingDimension++; |
| if (buildCounterNumericTargetingDimension < 3) { |
| o.excludedIds = buildUnnamed38(); |
| o.includedIds = buildUnnamed39(); |
| } |
| buildCounterNumericTargetingDimension--; |
| return o; |
| } |
| |
| void checkNumericTargetingDimension(api.NumericTargetingDimension o) { |
| buildCounterNumericTargetingDimension++; |
| if (buildCounterNumericTargetingDimension < 3) { |
| checkUnnamed38(o.excludedIds!); |
| checkUnnamed39(o.includedIds!); |
| } |
| buildCounterNumericTargetingDimension--; |
| } |
| |
| core.int buildCounterOpenUserListRequest = 0; |
| api.OpenUserListRequest buildOpenUserListRequest() { |
| final o = api.OpenUserListRequest(); |
| buildCounterOpenUserListRequest++; |
| if (buildCounterOpenUserListRequest < 3) {} |
| buildCounterOpenUserListRequest--; |
| return o; |
| } |
| |
| void checkOpenUserListRequest(api.OpenUserListRequest o) { |
| buildCounterOpenUserListRequest++; |
| if (buildCounterOpenUserListRequest < 3) {} |
| buildCounterOpenUserListRequest--; |
| } |
| |
| core.List<api.PolicyTopicEntry> buildUnnamed40() => [ |
| buildPolicyTopicEntry(), |
| buildPolicyTopicEntry(), |
| ]; |
| |
| void checkUnnamed40(core.List<api.PolicyTopicEntry> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPolicyTopicEntry(o[0]); |
| checkPolicyTopicEntry(o[1]); |
| } |
| |
| core.int buildCounterPolicyCompliance = 0; |
| api.PolicyCompliance buildPolicyCompliance() { |
| final o = api.PolicyCompliance(); |
| buildCounterPolicyCompliance++; |
| if (buildCounterPolicyCompliance < 3) { |
| o.status = 'foo'; |
| o.topics = buildUnnamed40(); |
| } |
| buildCounterPolicyCompliance--; |
| return o; |
| } |
| |
| void checkPolicyCompliance(api.PolicyCompliance o) { |
| buildCounterPolicyCompliance++; |
| if (buildCounterPolicyCompliance < 3) { |
| unittest.expect(o.status!, unittest.equals('foo')); |
| checkUnnamed40(o.topics!); |
| } |
| buildCounterPolicyCompliance--; |
| } |
| |
| core.List<api.PolicyTopicEvidence> buildUnnamed41() => [ |
| buildPolicyTopicEvidence(), |
| buildPolicyTopicEvidence(), |
| ]; |
| |
| void checkUnnamed41(core.List<api.PolicyTopicEvidence> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkPolicyTopicEvidence(o[0]); |
| checkPolicyTopicEvidence(o[1]); |
| } |
| |
| core.int buildCounterPolicyTopicEntry = 0; |
| api.PolicyTopicEntry buildPolicyTopicEntry() { |
| final o = api.PolicyTopicEntry(); |
| buildCounterPolicyTopicEntry++; |
| if (buildCounterPolicyTopicEntry < 3) { |
| o.evidences = buildUnnamed41(); |
| o.helpCenterUrl = 'foo'; |
| o.missingCertificate = true; |
| o.policyTopic = 'foo'; |
| } |
| buildCounterPolicyTopicEntry--; |
| return o; |
| } |
| |
| void checkPolicyTopicEntry(api.PolicyTopicEntry o) { |
| buildCounterPolicyTopicEntry++; |
| if (buildCounterPolicyTopicEntry < 3) { |
| checkUnnamed41(o.evidences!); |
| unittest.expect(o.helpCenterUrl!, unittest.equals('foo')); |
| unittest.expect(o.missingCertificate!, unittest.isTrue); |
| unittest.expect(o.policyTopic!, unittest.equals('foo')); |
| } |
| buildCounterPolicyTopicEntry--; |
| } |
| |
| core.int buildCounterPolicyTopicEvidence = 0; |
| api.PolicyTopicEvidence buildPolicyTopicEvidence() { |
| final o = api.PolicyTopicEvidence(); |
| buildCounterPolicyTopicEvidence++; |
| if (buildCounterPolicyTopicEvidence < 3) { |
| o.destinationNotCrawlable = buildDestinationNotCrawlableEvidence(); |
| o.destinationNotWorking = buildDestinationNotWorkingEvidence(); |
| o.destinationUrl = buildDestinationUrlEvidence(); |
| o.domainCall = buildDomainCallEvidence(); |
| o.downloadSize = buildDownloadSizeEvidence(); |
| o.httpCall = buildHttpCallEvidence(); |
| o.httpCookie = buildHttpCookieEvidence(); |
| } |
| buildCounterPolicyTopicEvidence--; |
| return o; |
| } |
| |
| void checkPolicyTopicEvidence(api.PolicyTopicEvidence o) { |
| buildCounterPolicyTopicEvidence++; |
| if (buildCounterPolicyTopicEvidence < 3) { |
| checkDestinationNotCrawlableEvidence(o.destinationNotCrawlable!); |
| checkDestinationNotWorkingEvidence(o.destinationNotWorking!); |
| checkDestinationUrlEvidence(o.destinationUrl!); |
| checkDomainCallEvidence(o.domainCall!); |
| checkDownloadSizeEvidence(o.downloadSize!); |
| checkHttpCallEvidence(o.httpCall!); |
| checkHttpCookieEvidence(o.httpCookie!); |
| } |
| buildCounterPolicyTopicEvidence--; |
| } |
| |
| core.List<core.String> buildUnnamed42() => ['foo', 'foo']; |
| |
| void checkUnnamed42(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> buildUnnamed43() => ['foo', 'foo']; |
| |
| void checkUnnamed43(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.CreativeDimensions> buildUnnamed44() => [ |
| buildCreativeDimensions(), |
| buildCreativeDimensions(), |
| ]; |
| |
| void checkUnnamed44(core.List<api.CreativeDimensions> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCreativeDimensions(o[0]); |
| checkCreativeDimensions(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed45() => ['foo', 'foo']; |
| |
| void checkUnnamed45(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> buildUnnamed46() => ['foo', 'foo']; |
| |
| void checkUnnamed46(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> buildUnnamed47() => ['foo', 'foo']; |
| |
| void checkUnnamed47(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> buildUnnamed48() => ['foo', 'foo']; |
| |
| void checkUnnamed48(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> buildUnnamed49() => ['foo', 'foo']; |
| |
| void checkUnnamed49(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> buildUnnamed50() => ['foo', 'foo']; |
| |
| void checkUnnamed50(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> buildUnnamed51() => ['foo', 'foo']; |
| |
| void checkUnnamed51(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 buildCounterPretargetingConfig = 0; |
| api.PretargetingConfig buildPretargetingConfig() { |
| final o = api.PretargetingConfig(); |
| buildCounterPretargetingConfig++; |
| if (buildCounterPretargetingConfig < 3) { |
| o.allowedUserTargetingModes = buildUnnamed42(); |
| o.appTargeting = buildAppTargeting(); |
| o.billingId = 'foo'; |
| o.displayName = 'foo'; |
| o.excludedContentLabelIds = buildUnnamed43(); |
| o.geoTargeting = buildNumericTargetingDimension(); |
| o.includedCreativeDimensions = buildUnnamed44(); |
| o.includedEnvironments = buildUnnamed45(); |
| o.includedFormats = buildUnnamed46(); |
| o.includedLanguages = buildUnnamed47(); |
| o.includedMobileOperatingSystemIds = buildUnnamed48(); |
| o.includedPlatforms = buildUnnamed49(); |
| o.includedUserIdTypes = buildUnnamed50(); |
| o.interstitialTargeting = 'foo'; |
| o.invalidGeoIds = buildUnnamed51(); |
| o.maximumQps = 'foo'; |
| o.minimumViewabilityDecile = 42; |
| o.name = 'foo'; |
| o.publisherTargeting = buildStringTargetingDimension(); |
| o.state = 'foo'; |
| o.userListTargeting = buildNumericTargetingDimension(); |
| o.verticalTargeting = buildNumericTargetingDimension(); |
| o.webTargeting = buildStringTargetingDimension(); |
| } |
| buildCounterPretargetingConfig--; |
| return o; |
| } |
| |
| void checkPretargetingConfig(api.PretargetingConfig o) { |
| buildCounterPretargetingConfig++; |
| if (buildCounterPretargetingConfig < 3) { |
| checkUnnamed42(o.allowedUserTargetingModes!); |
| checkAppTargeting(o.appTargeting!); |
| unittest.expect(o.billingId!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkUnnamed43(o.excludedContentLabelIds!); |
| checkNumericTargetingDimension(o.geoTargeting!); |
| checkUnnamed44(o.includedCreativeDimensions!); |
| checkUnnamed45(o.includedEnvironments!); |
| checkUnnamed46(o.includedFormats!); |
| checkUnnamed47(o.includedLanguages!); |
| checkUnnamed48(o.includedMobileOperatingSystemIds!); |
| checkUnnamed49(o.includedPlatforms!); |
| checkUnnamed50(o.includedUserIdTypes!); |
| unittest.expect(o.interstitialTargeting!, unittest.equals('foo')); |
| checkUnnamed51(o.invalidGeoIds!); |
| unittest.expect(o.maximumQps!, unittest.equals('foo')); |
| unittest.expect(o.minimumViewabilityDecile!, unittest.equals(42)); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkStringTargetingDimension(o.publisherTargeting!); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| checkNumericTargetingDimension(o.userListTargeting!); |
| checkNumericTargetingDimension(o.verticalTargeting!); |
| checkStringTargetingDimension(o.webTargeting!); |
| } |
| buildCounterPretargetingConfig--; |
| } |
| |
| core.int buildCounterPublisherConnection = 0; |
| api.PublisherConnection buildPublisherConnection() { |
| final o = api.PublisherConnection(); |
| buildCounterPublisherConnection++; |
| if (buildCounterPublisherConnection < 3) { |
| o.biddingState = 'foo'; |
| o.createTime = 'foo'; |
| o.displayName = 'foo'; |
| o.name = 'foo'; |
| o.publisherPlatform = 'foo'; |
| } |
| buildCounterPublisherConnection--; |
| return o; |
| } |
| |
| void checkPublisherConnection(api.PublisherConnection o) { |
| buildCounterPublisherConnection++; |
| if (buildCounterPublisherConnection < 3) { |
| unittest.expect(o.biddingState!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.publisherPlatform!, unittest.equals('foo')); |
| } |
| buildCounterPublisherConnection--; |
| } |
| |
| core.List<core.String> buildUnnamed52() => ['foo', 'foo']; |
| |
| void checkUnnamed52(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 buildCounterRemoveTargetedAppsRequest = 0; |
| api.RemoveTargetedAppsRequest buildRemoveTargetedAppsRequest() { |
| final o = api.RemoveTargetedAppsRequest(); |
| buildCounterRemoveTargetedAppsRequest++; |
| if (buildCounterRemoveTargetedAppsRequest < 3) { |
| o.appIds = buildUnnamed52(); |
| } |
| buildCounterRemoveTargetedAppsRequest--; |
| return o; |
| } |
| |
| void checkRemoveTargetedAppsRequest(api.RemoveTargetedAppsRequest o) { |
| buildCounterRemoveTargetedAppsRequest++; |
| if (buildCounterRemoveTargetedAppsRequest < 3) { |
| checkUnnamed52(o.appIds!); |
| } |
| buildCounterRemoveTargetedAppsRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed53() => ['foo', 'foo']; |
| |
| void checkUnnamed53(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 buildCounterRemoveTargetedPublishersRequest = 0; |
| api.RemoveTargetedPublishersRequest buildRemoveTargetedPublishersRequest() { |
| final o = api.RemoveTargetedPublishersRequest(); |
| buildCounterRemoveTargetedPublishersRequest++; |
| if (buildCounterRemoveTargetedPublishersRequest < 3) { |
| o.publisherIds = buildUnnamed53(); |
| } |
| buildCounterRemoveTargetedPublishersRequest--; |
| return o; |
| } |
| |
| void checkRemoveTargetedPublishersRequest( |
| api.RemoveTargetedPublishersRequest o, |
| ) { |
| buildCounterRemoveTargetedPublishersRequest++; |
| if (buildCounterRemoveTargetedPublishersRequest < 3) { |
| checkUnnamed53(o.publisherIds!); |
| } |
| buildCounterRemoveTargetedPublishersRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed54() => ['foo', 'foo']; |
| |
| void checkUnnamed54(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 buildCounterRemoveTargetedSitesRequest = 0; |
| api.RemoveTargetedSitesRequest buildRemoveTargetedSitesRequest() { |
| final o = api.RemoveTargetedSitesRequest(); |
| buildCounterRemoveTargetedSitesRequest++; |
| if (buildCounterRemoveTargetedSitesRequest < 3) { |
| o.sites = buildUnnamed54(); |
| } |
| buildCounterRemoveTargetedSitesRequest--; |
| return o; |
| } |
| |
| void checkRemoveTargetedSitesRequest(api.RemoveTargetedSitesRequest o) { |
| buildCounterRemoveTargetedSitesRequest++; |
| if (buildCounterRemoveTargetedSitesRequest < 3) { |
| checkUnnamed54(o.sites!); |
| } |
| buildCounterRemoveTargetedSitesRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed55() => ['foo', 'foo']; |
| |
| void checkUnnamed55(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 buildCounterStringTargetingDimension = 0; |
| api.StringTargetingDimension buildStringTargetingDimension() { |
| final o = api.StringTargetingDimension(); |
| buildCounterStringTargetingDimension++; |
| if (buildCounterStringTargetingDimension < 3) { |
| o.targetingMode = 'foo'; |
| o.values = buildUnnamed55(); |
| } |
| buildCounterStringTargetingDimension--; |
| return o; |
| } |
| |
| void checkStringTargetingDimension(api.StringTargetingDimension o) { |
| buildCounterStringTargetingDimension++; |
| if (buildCounterStringTargetingDimension < 3) { |
| unittest.expect(o.targetingMode!, unittest.equals('foo')); |
| checkUnnamed55(o.values!); |
| } |
| buildCounterStringTargetingDimension--; |
| } |
| |
| core.int buildCounterSuspendPretargetingConfigRequest = 0; |
| api.SuspendPretargetingConfigRequest buildSuspendPretargetingConfigRequest() { |
| final o = api.SuspendPretargetingConfigRequest(); |
| buildCounterSuspendPretargetingConfigRequest++; |
| if (buildCounterSuspendPretargetingConfigRequest < 3) {} |
| buildCounterSuspendPretargetingConfigRequest--; |
| return o; |
| } |
| |
| void checkSuspendPretargetingConfigRequest( |
| api.SuspendPretargetingConfigRequest o, |
| ) { |
| buildCounterSuspendPretargetingConfigRequest++; |
| if (buildCounterSuspendPretargetingConfigRequest < 3) {} |
| buildCounterSuspendPretargetingConfigRequest--; |
| } |
| |
| core.int buildCounterUrlDownloadSize = 0; |
| api.UrlDownloadSize buildUrlDownloadSize() { |
| final o = api.UrlDownloadSize(); |
| buildCounterUrlDownloadSize++; |
| if (buildCounterUrlDownloadSize < 3) { |
| o.downloadSizeKb = 42; |
| o.normalizedUrl = 'foo'; |
| } |
| buildCounterUrlDownloadSize--; |
| return o; |
| } |
| |
| void checkUrlDownloadSize(api.UrlDownloadSize o) { |
| buildCounterUrlDownloadSize++; |
| if (buildCounterUrlDownloadSize < 3) { |
| unittest.expect(o.downloadSizeKb!, unittest.equals(42)); |
| unittest.expect(o.normalizedUrl!, unittest.equals('foo')); |
| } |
| buildCounterUrlDownloadSize--; |
| } |
| |
| core.int buildCounterUrlRestriction = 0; |
| api.UrlRestriction buildUrlRestriction() { |
| final o = api.UrlRestriction(); |
| buildCounterUrlRestriction++; |
| if (buildCounterUrlRestriction < 3) { |
| o.endDate = buildDate(); |
| o.restrictionType = 'foo'; |
| o.startDate = buildDate(); |
| o.url = 'foo'; |
| } |
| buildCounterUrlRestriction--; |
| return o; |
| } |
| |
| void checkUrlRestriction(api.UrlRestriction o) { |
| buildCounterUrlRestriction++; |
| if (buildCounterUrlRestriction < 3) { |
| checkDate(o.endDate!); |
| unittest.expect(o.restrictionType!, unittest.equals('foo')); |
| checkDate(o.startDate!); |
| unittest.expect(o.url!, unittest.equals('foo')); |
| } |
| buildCounterUrlRestriction--; |
| } |
| |
| core.int buildCounterUserList = 0; |
| api.UserList buildUserList() { |
| final o = api.UserList(); |
| buildCounterUserList++; |
| if (buildCounterUserList < 3) { |
| o.description = 'foo'; |
| o.displayName = 'foo'; |
| o.membershipDurationDays = 'foo'; |
| o.name = 'foo'; |
| o.status = 'foo'; |
| o.urlRestriction = buildUrlRestriction(); |
| } |
| buildCounterUserList--; |
| return o; |
| } |
| |
| void checkUserList(api.UserList o) { |
| buildCounterUserList++; |
| if (buildCounterUserList < 3) { |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.membershipDurationDays!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| checkUrlRestriction(o.urlRestriction!); |
| } |
| buildCounterUserList--; |
| } |
| |
| core.int buildCounterVideoContent = 0; |
| api.VideoContent buildVideoContent() { |
| final o = api.VideoContent(); |
| buildCounterVideoContent++; |
| if (buildCounterVideoContent < 3) { |
| o.videoMetadata = buildVideoMetadata(); |
| o.videoUrl = 'foo'; |
| o.videoVastXml = 'foo'; |
| } |
| buildCounterVideoContent--; |
| return o; |
| } |
| |
| void checkVideoContent(api.VideoContent o) { |
| buildCounterVideoContent++; |
| if (buildCounterVideoContent < 3) { |
| checkVideoMetadata(o.videoMetadata!); |
| unittest.expect(o.videoUrl!, unittest.equals('foo')); |
| unittest.expect(o.videoVastXml!, unittest.equals('foo')); |
| } |
| buildCounterVideoContent--; |
| } |
| |
| core.List<api.MediaFile> buildUnnamed56() => [ |
| buildMediaFile(), |
| buildMediaFile(), |
| ]; |
| |
| void checkUnnamed56(core.List<api.MediaFile> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMediaFile(o[0]); |
| checkMediaFile(o[1]); |
| } |
| |
| core.int buildCounterVideoMetadata = 0; |
| api.VideoMetadata buildVideoMetadata() { |
| final o = api.VideoMetadata(); |
| buildCounterVideoMetadata++; |
| if (buildCounterVideoMetadata < 3) { |
| o.duration = 'foo'; |
| o.isValidVast = true; |
| o.isVpaid = true; |
| o.mediaFiles = buildUnnamed56(); |
| o.skipOffset = 'foo'; |
| o.vastVersion = 'foo'; |
| } |
| buildCounterVideoMetadata--; |
| return o; |
| } |
| |
| void checkVideoMetadata(api.VideoMetadata o) { |
| buildCounterVideoMetadata++; |
| if (buildCounterVideoMetadata < 3) { |
| unittest.expect(o.duration!, unittest.equals('foo')); |
| unittest.expect(o.isValidVast!, unittest.isTrue); |
| unittest.expect(o.isVpaid!, unittest.isTrue); |
| checkUnnamed56(o.mediaFiles!); |
| unittest.expect(o.skipOffset!, unittest.equals('foo')); |
| unittest.expect(o.vastVersion!, unittest.equals('foo')); |
| } |
| buildCounterVideoMetadata--; |
| } |
| |
| core.int buildCounterWatchCreativesRequest = 0; |
| api.WatchCreativesRequest buildWatchCreativesRequest() { |
| final o = api.WatchCreativesRequest(); |
| buildCounterWatchCreativesRequest++; |
| if (buildCounterWatchCreativesRequest < 3) {} |
| buildCounterWatchCreativesRequest--; |
| return o; |
| } |
| |
| void checkWatchCreativesRequest(api.WatchCreativesRequest o) { |
| buildCounterWatchCreativesRequest++; |
| if (buildCounterWatchCreativesRequest < 3) {} |
| buildCounterWatchCreativesRequest--; |
| } |
| |
| core.int buildCounterWatchCreativesResponse = 0; |
| api.WatchCreativesResponse buildWatchCreativesResponse() { |
| final o = api.WatchCreativesResponse(); |
| buildCounterWatchCreativesResponse++; |
| if (buildCounterWatchCreativesResponse < 3) { |
| o.subscription = 'foo'; |
| o.topic = 'foo'; |
| } |
| buildCounterWatchCreativesResponse--; |
| return o; |
| } |
| |
| void checkWatchCreativesResponse(api.WatchCreativesResponse o) { |
| buildCounterWatchCreativesResponse++; |
| if (buildCounterWatchCreativesResponse < 3) { |
| unittest.expect(o.subscription!, unittest.equals('foo')); |
| unittest.expect(o.topic!, unittest.equals('foo')); |
| } |
| buildCounterWatchCreativesResponse--; |
| } |
| |
| void main() { |
| unittest.group('obj-schema-ActivatePretargetingConfigRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildActivatePretargetingConfigRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ActivatePretargetingConfigRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkActivatePretargetingConfigRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdTechnologyProviders', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdTechnologyProviders(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdTechnologyProviders.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdTechnologyProviders(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AddTargetedAppsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAddTargetedAppsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AddTargetedAppsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedAppsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AddTargetedPublishersRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAddTargetedPublishersRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AddTargetedPublishersRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedPublishersRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AddTargetedSitesRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAddTargetedSitesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AddTargetedSitesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedSitesRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AdvertiserAndBrand', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAdvertiserAndBrand(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AdvertiserAndBrand.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAdvertiserAndBrand(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-AppTargeting', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildAppTargeting(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.AppTargeting.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkAppTargeting(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BatchApprovePublisherConnectionsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBatchApprovePublisherConnectionsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BatchApprovePublisherConnectionsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchApprovePublisherConnectionsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BatchApprovePublisherConnectionsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBatchApprovePublisherConnectionsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BatchApprovePublisherConnectionsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchApprovePublisherConnectionsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BatchRejectPublisherConnectionsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBatchRejectPublisherConnectionsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BatchRejectPublisherConnectionsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchRejectPublisherConnectionsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BatchRejectPublisherConnectionsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBatchRejectPublisherConnectionsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BatchRejectPublisherConnectionsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchRejectPublisherConnectionsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Bidder', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBidder(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Bidder.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBidder(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Buyer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBuyer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Buyer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBuyer(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CloseUserListRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCloseUserListRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CloseUserListRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCloseUserListRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Creative', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreative(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Creative.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreative(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeDimensions', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreativeDimensions(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreativeDimensions.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreativeDimensions(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreativeServingDecision', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreativeServingDecision(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreativeServingDecision.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreativeServingDecision(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Date', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDate(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Date.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDate(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DestinationNotCrawlableEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDestinationNotCrawlableEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DestinationNotCrawlableEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDestinationNotCrawlableEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DestinationNotWorkingEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDestinationNotWorkingEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DestinationNotWorkingEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDestinationNotWorkingEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DestinationUrlEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDestinationUrlEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DestinationUrlEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDestinationUrlEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DomainCallEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDomainCallEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DomainCallEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDomainCallEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DomainCalls', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDomainCalls(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DomainCalls.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDomainCalls(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DownloadSizeEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDownloadSizeEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DownloadSizeEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDownloadSizeEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Empty', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEmpty(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Empty.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEmpty(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Endpoint', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEndpoint(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Endpoint.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEndpoint(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GetRemarketingTagResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGetRemarketingTagResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GetRemarketingTagResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGetRemarketingTagResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HtmlContent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHtmlContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HtmlContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHtmlContent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HttpCallEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHttpCallEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HttpCallEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHttpCallEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HttpCookieEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHttpCookieEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HttpCookieEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHttpCookieEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Image', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildImage(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Image.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkImage(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListBiddersResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListBiddersResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListBiddersResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListBiddersResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListBuyersResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListBuyersResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListBuyersResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListBuyersResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListCreativesResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListCreativesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListCreativesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListCreativesResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListEndpointsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListEndpointsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListEndpointsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListEndpointsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPretargetingConfigsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListPretargetingConfigsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListPretargetingConfigsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListPretargetingConfigsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListPublisherConnectionsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListPublisherConnectionsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListPublisherConnectionsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListPublisherConnectionsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListUserListsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListUserListsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListUserListsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListUserListsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MediaFile', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMediaFile(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MediaFile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMediaFile(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NativeContent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNativeContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NativeContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNativeContent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NumericTargetingDimension', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNumericTargetingDimension(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NumericTargetingDimension.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNumericTargetingDimension(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-OpenUserListRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildOpenUserListRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.OpenUserListRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkOpenUserListRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PolicyCompliance', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPolicyCompliance(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PolicyCompliance.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPolicyCompliance(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PolicyTopicEntry', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPolicyTopicEntry(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PolicyTopicEntry.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPolicyTopicEntry(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PolicyTopicEvidence', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPolicyTopicEvidence(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PolicyTopicEvidence.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPolicyTopicEvidence(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PretargetingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPretargetingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PretargetingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPretargetingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PublisherConnection', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPublisherConnection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PublisherConnection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPublisherConnection(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemoveTargetedAppsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRemoveTargetedAppsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RemoveTargetedAppsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedAppsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemoveTargetedPublishersRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRemoveTargetedPublishersRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RemoveTargetedPublishersRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedPublishersRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RemoveTargetedSitesRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRemoveTargetedSitesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RemoveTargetedSitesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedSitesRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-StringTargetingDimension', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildStringTargetingDimension(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.StringTargetingDimension.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkStringTargetingDimension(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SuspendPretargetingConfigRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSuspendPretargetingConfigRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SuspendPretargetingConfigRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSuspendPretargetingConfigRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UrlDownloadSize', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUrlDownloadSize(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UrlDownloadSize.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUrlDownloadSize(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UrlRestriction', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUrlRestriction(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UrlRestriction.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUrlRestriction(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UserList', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUserList(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UserList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUserList(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoContent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildVideoContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.VideoContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkVideoContent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-VideoMetadata', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildVideoMetadata(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.VideoMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkVideoMetadata(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WatchCreativesRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWatchCreativesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WatchCreativesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWatchCreativesRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-WatchCreativesResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildWatchCreativesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.WatchCreativesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkWatchCreativesResponse(od); |
| }); |
| }); |
| |
| unittest.group('resource-BiddersResource', () { |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildBidder()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkBidder(response as api.Bidder); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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 + 10), |
| unittest.equals('v1/bidders'), |
| ); |
| pathOffset += 10; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListBiddersResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListBiddersResponse(response as api.ListBiddersResponse); |
| }); |
| }); |
| |
| unittest.group('resource-BiddersCreativesResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.creatives; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_view = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect(queryMap['view']!.first, unittest.equals(arg_view)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListCreativesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| view: arg_view, |
| $fields: arg_$fields, |
| ); |
| checkListCreativesResponse(response as api.ListCreativesResponse); |
| }); |
| |
| unittest.test('method--watch', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.creatives; |
| final arg_request = buildWatchCreativesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.WatchCreativesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkWatchCreativesRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildWatchCreativesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.watch( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkWatchCreativesResponse(response as api.WatchCreativesResponse); |
| }); |
| }); |
| |
| unittest.group('resource-BiddersEndpointsResource', () { |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.endpoints; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEndpoint()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkEndpoint(response as api.Endpoint); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.endpoints; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListEndpointsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListEndpointsResponse(response as api.ListEndpointsResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.endpoints; |
| final arg_request = buildEndpoint(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.Endpoint.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkEndpoint(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEndpoint()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkEndpoint(response as api.Endpoint); |
| }); |
| }); |
| |
| unittest.group('resource-BiddersPretargetingConfigsResource', () { |
| unittest.test('method--activate', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildActivatePretargetingConfigRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.ActivatePretargetingConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkActivatePretargetingConfigRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.activate( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--addTargetedApps', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildAddTargetedAppsRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.AddTargetedAppsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedAppsRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.addTargetedApps( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--addTargetedPublishers', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildAddTargetedPublishersRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.AddTargetedPublishersRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedPublishersRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.addTargetedPublishers( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--addTargetedSites', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildAddTargetedSitesRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.AddTargetedSitesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkAddTargetedSitesRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.addTargetedSites( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildPretargetingConfig(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.PretargetingConfig.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkPretargetingConfig(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildListPretargetingConfigsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListPretargetingConfigsResponse( |
| response as api.ListPretargetingConfigsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildPretargetingConfig(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.PretargetingConfig.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkPretargetingConfig(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--removeTargetedApps', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildRemoveTargetedAppsRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.RemoveTargetedAppsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedAppsRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.removeTargetedApps( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--removeTargetedPublishers', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildRemoveTargetedPublishersRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.RemoveTargetedPublishersRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedPublishersRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.removeTargetedPublishers( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--removeTargetedSites', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildRemoveTargetedSitesRequest(); |
| final arg_pretargetingConfig = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.RemoveTargetedSitesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkRemoveTargetedSitesRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.removeTargetedSites( |
| arg_request, |
| arg_pretargetingConfig, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| |
| unittest.test('method--suspend', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.pretargetingConfigs; |
| final arg_request = buildSuspendPretargetingConfigRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SuspendPretargetingConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSuspendPretargetingConfigRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPretargetingConfig()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suspend( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkPretargetingConfig(response as api.PretargetingConfig); |
| }); |
| }); |
| |
| unittest.group('resource-BiddersPublisherConnectionsResource', () { |
| unittest.test('method--batchApprove', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.publisherConnections; |
| final arg_request = buildBatchApprovePublisherConnectionsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.BatchApprovePublisherConnectionsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchApprovePublisherConnectionsRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildBatchApprovePublisherConnectionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchApprove( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkBatchApprovePublisherConnectionsResponse( |
| response as api.BatchApprovePublisherConnectionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--batchReject', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.publisherConnections; |
| final arg_request = buildBatchRejectPublisherConnectionsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.BatchRejectPublisherConnectionsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchRejectPublisherConnectionsRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildBatchRejectPublisherConnectionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchReject( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkBatchRejectPublisherConnectionsResponse( |
| response as api.BatchRejectPublisherConnectionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.publisherConnections; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildPublisherConnection()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkPublisherConnection(response as api.PublisherConnection); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).bidders.publisherConnections; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_orderBy = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildListPublisherConnectionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| orderBy: arg_orderBy, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListPublisherConnectionsResponse( |
| response as api.ListPublisherConnectionsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-BuyersResource', () { |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildBuyer()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkBuyer(response as api.Buyer); |
| }); |
| |
| unittest.test('method--getRemarketingTag', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGetRemarketingTagResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getRemarketingTag( |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGetRemarketingTagResponse(response as api.GetRemarketingTagResponse); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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 + 9), |
| unittest.equals('v1/buyers'), |
| ); |
| pathOffset += 9; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListBuyersResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListBuyersResponse(response as api.ListBuyersResponse); |
| }); |
| }); |
| |
| unittest.group('resource-BuyersCreativesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.creatives; |
| final arg_request = buildCreative(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.Creative.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreative(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkCreative(response as api.Creative); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.creatives; |
| final arg_name = 'foo'; |
| final arg_view = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect(queryMap['view']!.first, unittest.equals(arg_view)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| view: arg_view, |
| $fields: arg_$fields, |
| ); |
| checkCreative(response as api.Creative); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.creatives; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_view = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect(queryMap['view']!.first, unittest.equals(arg_view)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListCreativesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| view: arg_view, |
| $fields: arg_$fields, |
| ); |
| checkListCreativesResponse(response as api.ListCreativesResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.creatives; |
| final arg_request = buildCreative(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.Creative.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreative(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCreative()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkCreative(response as api.Creative); |
| }); |
| }); |
| |
| unittest.group('resource-BuyersUserListsResource', () { |
| unittest.test('method--close', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_request = buildCloseUserListRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CloseUserListRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCloseUserListRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildUserList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.close( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkUserList(response as api.UserList); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_request = buildUserList(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UserList.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUserList(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildUserList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkUserList(response as api.UserList); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildUserList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkUserList(response as api.UserList); |
| }); |
| |
| unittest.test('method--getRemarketingTag', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGetRemarketingTagResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getRemarketingTag( |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGetRemarketingTagResponse(response as api.GetRemarketingTagResponse); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final 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['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListUserListsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListUserListsResponse(response as api.ListUserListsResponse); |
| }); |
| |
| unittest.test('method--open', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_request = buildOpenUserListRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.OpenUserListRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkOpenUserListRequest(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildUserList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.open( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkUserList(response as api.UserList); |
| }); |
| |
| unittest.test('method--update', () async { |
| final mock = HttpServerMock(); |
| final res = api.RealTimeBiddingApi(mock).buyers.userLists; |
| final arg_request = buildUserList(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UserList.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUserList(obj); |
| |
| final 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; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final 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('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildUserList()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.update( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkUserList(response as api.UserList); |
| }); |
| }); |
| } |